six-degrees 0.3.0 → 0.4.0-beta.1

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 (299) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/app-path-routes-manifest.json +1 -0
  3. package/.next/standalone/.next/build-manifest.json +3 -3
  4. package/.next/standalone/.next/prerender-manifest.json +34 -6
  5. package/.next/standalone/.next/routes-manifest.json +6 -0
  6. package/.next/standalone/.next/server/app/_global-error/page.js.nft.json +1 -1
  7. package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  8. package/.next/standalone/.next/server/app/_global-error.html +1 -1
  9. package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
  10. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  11. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  12. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  13. package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  14. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  15. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  16. package/.next/standalone/.next/server/app/_not-found.rsc +10 -10
  17. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +10 -10
  18. package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +9 -9
  19. package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  20. package/.next/standalone/.next/server/app/api/admin-delete/route.js.nft.json +1 -1
  21. package/.next/standalone/.next/server/app/api/admin-update/route.js.nft.json +1 -1
  22. package/.next/standalone/.next/server/app/api/bridges/route.js.nft.json +1 -1
  23. package/.next/standalone/.next/server/app/api/bulk-import/route.js.nft.json +1 -1
  24. package/.next/standalone/.next/server/app/api/company-scores/legacy/route.js.nft.json +1 -1
  25. package/.next/standalone/.next/server/app/api/company-scores/route.js.nft.json +1 -1
  26. package/.next/standalone/.next/server/app/api/connections/route.js.nft.json +1 -1
  27. package/.next/standalone/.next/server/app/api/data/export/route.js.nft.json +1 -1
  28. package/.next/standalone/.next/server/app/api/data/import/route.js.nft.json +1 -1
  29. package/.next/standalone/.next/server/app/api/data/restart/route.js.nft.json +1 -1
  30. package/.next/standalone/.next/server/app/api/data/reveal/route.js.nft.json +1 -1
  31. package/.next/standalone/.next/server/app/api/data/route.js.nft.json +1 -1
  32. package/.next/standalone/.next/server/app/api/delete-cluster/route.js.nft.json +1 -1
  33. package/.next/standalone/.next/server/app/api/ingest/route.js.nft.json +1 -1
  34. package/.next/standalone/.next/server/app/api/network/route.js.nft.json +1 -1
  35. package/.next/standalone/.next/server/app/api/notifications/route.js.nft.json +1 -1
  36. package/.next/standalone/.next/server/app/api/outreach/route.js +3 -3
  37. package/.next/standalone/.next/server/app/api/outreach/route.js.nft.json +1 -1
  38. package/.next/standalone/.next/server/app/api/queue/route.js.nft.json +1 -1
  39. package/.next/standalone/.next/server/app/api/scraper/route.js.nft.json +1 -1
  40. package/.next/standalone/.next/server/app/api/settings/route.js.nft.json +1 -1
  41. package/.next/standalone/.next/server/app/api/settings/sector-preview/route.js.nft.json +1 -1
  42. package/.next/standalone/.next/server/app/api/settings/sector-suggestions/route.js.nft.json +1 -1
  43. package/.next/standalone/.next/server/app/api/setup-profile/route.js.nft.json +1 -1
  44. package/.next/standalone/.next/server/app/api/unlock/route.js.nft.json +1 -1
  45. package/.next/standalone/.next/server/app/api/update/route.js.nft.json +1 -1
  46. package/.next/standalone/.next/server/app/api/update-images/route.js.nft.json +1 -1
  47. package/.next/standalone/.next/server/app/api/users/route.js.nft.json +1 -1
  48. package/.next/standalone/.next/server/app/avatars/[file]/route.js.nft.json +1 -1
  49. package/.next/standalone/.next/server/app/import/page.js.nft.json +1 -1
  50. package/.next/standalone/.next/server/app/import/page_client-reference-manifest.js +1 -1
  51. package/.next/standalone/.next/server/app/import.html +1 -1
  52. package/.next/standalone/.next/server/app/import.rsc +12 -12
  53. package/.next/standalone/.next/server/app/import.segments/_full.segment.rsc +12 -12
  54. package/.next/standalone/.next/server/app/import.segments/_tree.segment.rsc +1 -1
  55. package/.next/standalone/.next/server/app/import.segments/import/__PAGE__.segment.rsc +11 -11
  56. package/.next/standalone/.next/server/app/index.html +1 -1
  57. package/.next/standalone/.next/server/app/index.rsc +12 -12
  58. package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +11 -11
  59. package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +12 -12
  60. package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  61. package/.next/standalone/.next/server/app/launch/page.js.nft.json +1 -1
  62. package/.next/standalone/.next/server/app/launch/page_client-reference-manifest.js +1 -1
  63. package/.next/standalone/.next/server/app/launch.html +2 -2
  64. package/.next/standalone/.next/server/app/launch.rsc +12 -12
  65. package/.next/standalone/.next/server/app/launch.segments/_full.segment.rsc +12 -12
  66. package/.next/standalone/.next/server/app/launch.segments/_tree.segment.rsc +1 -1
  67. package/.next/standalone/.next/server/app/launch.segments/launch/__PAGE__.segment.rsc +11 -11
  68. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  69. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  70. package/.next/standalone/.next/server/app/paths/page.js.nft.json +1 -1
  71. package/.next/standalone/.next/server/app/paths/page_client-reference-manifest.js +1 -1
  72. package/.next/standalone/.next/server/app/paths.html +1 -1
  73. package/.next/standalone/.next/server/app/paths.rsc +12 -12
  74. package/.next/standalone/.next/server/app/paths.segments/_full.segment.rsc +12 -12
  75. package/.next/standalone/.next/server/app/paths.segments/_tree.segment.rsc +1 -1
  76. package/.next/standalone/.next/server/app/paths.segments/paths/__PAGE__.segment.rsc +11 -11
  77. package/.next/standalone/.next/server/app/profile/page.js.nft.json +1 -1
  78. package/.next/standalone/.next/server/app/profile/page_client-reference-manifest.js +1 -1
  79. package/.next/standalone/.next/server/app/profile.html +1 -1
  80. package/.next/standalone/.next/server/app/profile.rsc +12 -12
  81. package/.next/standalone/.next/server/app/profile.segments/_full.segment.rsc +12 -12
  82. package/.next/standalone/.next/server/app/profile.segments/_tree.segment.rsc +1 -1
  83. package/.next/standalone/.next/server/app/profile.segments/profile/__PAGE__.segment.rsc +11 -11
  84. package/.next/standalone/.next/server/app/queue/page.js.nft.json +1 -1
  85. package/.next/standalone/.next/server/app/queue/page_client-reference-manifest.js +1 -1
  86. package/.next/standalone/.next/server/app/queue.html +1 -1
  87. package/.next/standalone/.next/server/app/queue.rsc +12 -12
  88. package/.next/standalone/.next/server/app/queue.segments/_full.segment.rsc +12 -12
  89. package/.next/standalone/.next/server/app/queue.segments/_tree.segment.rsc +1 -1
  90. package/.next/standalone/.next/server/app/queue.segments/queue/__PAGE__.segment.rsc +11 -11
  91. package/.next/standalone/.next/server/app/scores/page/app-paths-manifest.json +3 -0
  92. package/.next/standalone/.next/server/app/scores/page/build-manifest.json +20 -0
  93. package/.next/standalone/.next/server/app/scores/page/next-font-manifest.json +11 -0
  94. package/.next/standalone/.next/server/app/scores/page/react-loadable-manifest.json +1 -0
  95. package/.next/standalone/.next/server/app/scores/page/server-reference-manifest.json +4 -0
  96. package/.next/standalone/.next/server/app/scores/page.js +13 -0
  97. package/.next/standalone/.next/server/app/scores/page.js.map +5 -0
  98. package/.next/standalone/.next/server/app/scores/page.js.nft.json +1 -0
  99. package/.next/standalone/.next/server/app/scores/page_client-reference-manifest.js +3 -0
  100. package/.next/standalone/.next/server/app/scores.html +1 -0
  101. package/.next/standalone/.next/server/app/scores.meta +26 -0
  102. package/.next/standalone/.next/server/app/scores.rsc +24 -0
  103. package/.next/standalone/.next/server/app/scores.segments/_full.segment.rsc +24 -0
  104. package/.next/standalone/.next/server/app/scores.segments/_tree.segment.rsc +4 -0
  105. package/.next/standalone/.next/server/app/scores.segments/scores/__PAGE__.segment.rsc +28 -0
  106. package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
  107. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  108. package/.next/standalone/.next/server/app/settings.html +1 -1
  109. package/.next/standalone/.next/server/app/settings.rsc +12 -12
  110. package/.next/standalone/.next/server/app/settings.segments/_full.segment.rsc +12 -12
  111. package/.next/standalone/.next/server/app/settings.segments/_tree.segment.rsc +1 -1
  112. package/.next/standalone/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +11 -11
  113. package/.next/standalone/.next/server/app/setup/page.js.nft.json +1 -1
  114. package/.next/standalone/.next/server/app/setup/page_client-reference-manifest.js +1 -1
  115. package/.next/standalone/.next/server/app/setup.html +1 -1
  116. package/.next/standalone/.next/server/app/setup.rsc +12 -12
  117. package/.next/standalone/.next/server/app/setup.segments/_full.segment.rsc +12 -12
  118. package/.next/standalone/.next/server/app/setup.segments/_tree.segment.rsc +1 -1
  119. package/.next/standalone/.next/server/app/setup.segments/setup/__PAGE__.segment.rsc +11 -11
  120. package/.next/standalone/.next/server/app-paths-manifest.json +1 -0
  121. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0rc27za._.js +8 -0
  122. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1kbl21f._.js +1 -1
  123. package/.next/standalone/.next/server/chunks/_02twlca._.js +10 -0
  124. package/.next/standalone/.next/server/chunks/_072jl0y._.js +1 -1
  125. package/.next/standalone/.next/server/chunks/_0lw8_i0._.js +1 -1
  126. package/.next/standalone/.next/server/chunks/_1_fynia._.js +7 -6
  127. package/.next/standalone/.next/server/chunks/_1itd1o_._.js +1 -1
  128. package/.next/standalone/.next/server/chunks/_1iwkh8t._.js +1 -1
  129. package/.next/standalone/.next/server/chunks/lib_db-client_15le7cw.js +3 -2
  130. package/.next/standalone/.next/server/chunks/lib_rpc_0c9d9ti.js +5 -5
  131. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0an6blh._.js → [root-of-the-server]__0zzcbqg._.js} +2 -2
  132. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1194jps._.js +3 -0
  133. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__1z1j3ek._.js → [root-of-the-server]__19ip1qq._.js} +2 -2
  134. package/.next/standalone/.next/server/chunks/ssr/_01f38ty._.js +3 -0
  135. package/.next/standalone/.next/server/chunks/ssr/_0223v9s._.js +3 -0
  136. package/.next/standalone/.next/server/chunks/ssr/_0bcf13g._.js +3 -0
  137. package/.next/standalone/.next/server/chunks/ssr/_0cu6-an._.js +3 -0
  138. package/.next/standalone/.next/server/chunks/ssr/_0wxbq78._.js +3 -0
  139. package/.next/standalone/.next/server/chunks/ssr/_0z88zcl._.js +3 -0
  140. package/.next/standalone/.next/server/chunks/ssr/_17gui6a._.js +1 -1
  141. package/.next/standalone/.next/server/chunks/ssr/_1cyxocj._.js +3 -0
  142. package/.next/standalone/.next/server/chunks/ssr/_1gpbbw9._.js +3 -0
  143. package/.next/standalone/.next/server/chunks/ssr/_next-internal_server_app_scores_page_actions_0x-w58n.js +3 -0
  144. package/.next/standalone/.next/server/chunks/ssr/app_launch_page_19t0dyd.js +1 -1
  145. package/.next/standalone/.next/server/chunks/ssr/app_page_1fazqbf.js +4 -4
  146. package/.next/standalone/.next/server/chunks/ssr/app_paths_page_1ol90m7.js +4 -0
  147. package/.next/standalone/.next/server/chunks/ssr/app_profile_page_0u3-l5y.js +1 -1
  148. package/.next/standalone/.next/server/chunks/ssr/app_queue_page_0c6znd6.js +5 -5
  149. package/.next/standalone/.next/server/chunks/ssr/app_scores_page_09wepvv.js +3 -0
  150. package/.next/standalone/.next/server/chunks/ssr/app_settings_page_1f8mjj_.js +1 -1
  151. package/.next/standalone/.next/server/chunks/ssr/lib_1bn38gs._.js +3 -0
  152. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_0x3i8za._.js +131 -0
  153. package/.next/standalone/.next/server/chunks/ssr/{node_modules_next_dist_1bunoni._.js → node_modules_next_dist_1v8aef8._.js} +2 -2
  154. package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
  155. package/.next/standalone/.next/server/middleware-manifest.json +5 -5
  156. package/.next/standalone/.next/server/next-font-manifest.js +1 -1
  157. package/.next/standalone/.next/server/next-font-manifest.json +4 -0
  158. package/.next/standalone/.next/server/pages/404.html +1 -1
  159. package/.next/standalone/.next/server/pages/500.html +1 -1
  160. package/.next/standalone/.next/server/prefetch-hints.json +14 -0
  161. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  162. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  163. package/.next/standalone/.next/static/chunks/0_yurn4q91vq8.js +16 -0
  164. package/.next/standalone/.next/static/chunks/0d_mh-06srh2k.js +1 -0
  165. package/.next/standalone/.next/static/chunks/0x3oadfikvb1c.js +1 -0
  166. package/.next/standalone/.next/static/chunks/1d5hl1io798n2.js +1 -0
  167. package/.next/standalone/.next/static/chunks/1qt67cvj9sjwi.js +1 -0
  168. package/.next/{static/chunks/1chp3nx45meg5.js → standalone/.next/static/chunks/1roznk7hkjes1.js} +1 -1
  169. package/.next/standalone/.next/static/chunks/2_bf2n4gstad9.js +33 -0
  170. package/.next/standalone/.next/static/chunks/36gbwek52x_w-.js +2 -0
  171. package/.next/standalone/.next/static/chunks/3a55suosthntc.js +1 -0
  172. package/.next/standalone/.next/static/chunks/3fq1zq-6cfwbc.js +1 -0
  173. package/.next/standalone/.next/static/chunks/3nbnio971zlji.js +2 -0
  174. package/.next/standalone/.next/static/chunks/3s6awp3qq9s7w.js +1 -0
  175. package/.next/standalone/CHANGELOG.md +134 -0
  176. package/.next/standalone/README.md +30 -15
  177. package/.next/standalone/app/api/company-scores/legacy/route.js +1 -1
  178. package/.next/standalone/app/api/company-scores/route.js +1 -1
  179. package/.next/standalone/app/api/ingest/route.js +17 -1
  180. package/.next/standalone/app/api/outreach/route.js +107 -44
  181. package/.next/standalone/app/api/scraper/route.js +69 -8
  182. package/.next/standalone/app/api/settings/sector-preview/route.js +3 -2
  183. package/.next/standalone/app/api/settings/sector-suggestions/route.js +1 -1
  184. package/.next/standalone/app/components/CompanyScores.js +16 -10
  185. package/.next/standalone/app/components/LegacyScoresCard.js +1 -1
  186. package/.next/standalone/app/components/OrbitGraph.js +30 -0
  187. package/.next/standalone/app/components/PathsAnalyzer.js +1 -1
  188. package/.next/standalone/app/components/SeparationView.js +96 -14
  189. package/.next/standalone/app/components/Sidebar.js +258 -239
  190. package/.next/standalone/app/components/TheirCircle.js +293 -0
  191. package/.next/standalone/app/components/settings/SectorSection.js +5 -5
  192. package/.next/standalone/app/components/settings/TierSection.js +104 -0
  193. package/.next/standalone/app/components/useRequests.js +12 -0
  194. package/.next/standalone/app/components/useScanner.js +13 -0
  195. package/.next/standalone/app/components/views.js +1 -3
  196. package/.next/standalone/app/launch/page.js +4 -1
  197. package/.next/standalone/app/page.js +55 -51
  198. package/.next/standalone/app/paths/page.js +17 -12
  199. package/.next/standalone/app/profile/page.js +3 -3
  200. package/.next/standalone/app/queue/page.js +38 -50
  201. package/.next/standalone/app/scores/page.js +72 -0
  202. package/.next/standalone/app/settings/page.js +15 -3
  203. package/.next/standalone/db/schema.js +1 -0
  204. package/.next/standalone/lib/circle.js +169 -0
  205. package/.next/standalone/lib/companies.js +1 -1
  206. package/.next/standalone/lib/csv.js +17 -4
  207. package/.next/standalone/lib/db-client.js +1 -0
  208. package/.next/standalone/lib/ingest.js +12 -0
  209. package/.next/standalone/lib/legacy-offer.js +7 -6
  210. package/.next/standalone/lib/legacy-scores.js +2 -2
  211. package/.next/standalone/lib/rarity.js +80 -0
  212. package/.next/standalone/lib/requests-client.js +113 -0
  213. package/.next/standalone/lib/rpc.js +26 -15
  214. package/.next/standalone/lib/score-guess.js +60 -0
  215. package/.next/standalone/lib/scoring.js +1002 -61
  216. package/.next/standalone/lib/scraper-client.js +208 -17
  217. package/.next/standalone/lib/sector-directory.js +1 -1
  218. package/.next/standalone/lib/sector-focus.js +4 -3
  219. package/.next/standalone/lib/settings-effects.js +19 -1
  220. package/.next/standalone/lib/settings.js +4 -1
  221. package/.next/standalone/package-lock.json +2 -2
  222. package/.next/standalone/package.json +2 -2
  223. package/.next/standalone/public/demo-data.json +1 -1
  224. package/.next/standalone/scripts/gen-synthetic.mjs +1 -1
  225. package/.next/standalone/scripts/scrape.py +62 -0
  226. package/.next/static/chunks/0_yurn4q91vq8.js +16 -0
  227. package/.next/static/chunks/0d_mh-06srh2k.js +1 -0
  228. package/.next/static/chunks/0x3oadfikvb1c.js +1 -0
  229. package/.next/static/chunks/1d5hl1io798n2.js +1 -0
  230. package/.next/static/chunks/1qt67cvj9sjwi.js +1 -0
  231. package/.next/{standalone/.next/static/chunks/1chp3nx45meg5.js → static/chunks/1roznk7hkjes1.js} +1 -1
  232. package/.next/static/chunks/2_bf2n4gstad9.js +33 -0
  233. package/.next/static/chunks/36gbwek52x_w-.js +2 -0
  234. package/.next/static/chunks/3a55suosthntc.js +1 -0
  235. package/.next/static/chunks/3fq1zq-6cfwbc.js +1 -0
  236. package/.next/static/chunks/3nbnio971zlji.js +2 -0
  237. package/.next/static/chunks/3s6awp3qq9s7w.js +1 -0
  238. package/CHANGELOG.md +134 -0
  239. package/README.md +30 -15
  240. package/db/schema.js +1 -0
  241. package/lib/circle.js +169 -0
  242. package/lib/companies.js +1 -1
  243. package/lib/csv.js +17 -4
  244. package/lib/db-client.js +1 -0
  245. package/lib/ingest.js +12 -0
  246. package/lib/legacy-offer.js +7 -6
  247. package/lib/legacy-scores.js +2 -2
  248. package/lib/rarity.js +80 -0
  249. package/lib/requests-client.js +113 -0
  250. package/lib/rpc.js +26 -15
  251. package/lib/score-guess.js +60 -0
  252. package/lib/scoring.js +1002 -61
  253. package/lib/scraper-client.js +208 -17
  254. package/lib/sector-directory.js +1 -1
  255. package/lib/sector-focus.js +4 -3
  256. package/lib/settings-effects.js +19 -1
  257. package/lib/settings.js +4 -1
  258. package/package.json +2 -2
  259. package/public/demo-data.json +1 -1
  260. package/scripts/scrape.py +62 -0
  261. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1t3rugi._.js +0 -3
  262. package/.next/standalone/.next/server/chunks/lib_rpc_0jzisgh.js +0 -3
  263. package/.next/standalone/.next/server/chunks/ssr/_07u8byv._.js +0 -3
  264. package/.next/standalone/.next/server/chunks/ssr/_08r_mlf._.js +0 -3
  265. package/.next/standalone/.next/server/chunks/ssr/_0942v8n._.js +0 -3
  266. package/.next/standalone/.next/server/chunks/ssr/_0hl_t7r._.js +0 -3
  267. package/.next/standalone/.next/server/chunks/ssr/_0tb83dw._.js +0 -132
  268. package/.next/standalone/.next/server/chunks/ssr/lib_0i8v-s3._.js +0 -3
  269. package/.next/standalone/.next/server/chunks/ssr/node_modules_16vay6l._.js +0 -3
  270. package/.next/standalone/.next/server/chunks/ssr/node_modules_1kciwn4._.js +0 -3
  271. package/.next/standalone/.next/static/chunks/06x3jiiz96m5t.js +0 -1
  272. package/.next/standalone/.next/static/chunks/08k1crid-05dt.js +0 -1
  273. package/.next/standalone/.next/static/chunks/0ngx9s6-zgshe.js +0 -33
  274. package/.next/standalone/.next/static/chunks/0q-_khndfxubv.js +0 -2
  275. package/.next/standalone/.next/static/chunks/1c79veqedvubt.js +0 -1
  276. package/.next/standalone/.next/static/chunks/1irqj0lf-fu3d.js +0 -1
  277. package/.next/standalone/.next/static/chunks/1uadqylrod5_v.js +0 -1
  278. package/.next/standalone/.next/static/chunks/23u0zclgwpc4d.js +0 -1
  279. package/.next/standalone/.next/static/chunks/289ktj97di6zg.js +0 -1
  280. package/.next/standalone/.next/static/chunks/2b3lmf8e6uj8m.js +0 -16
  281. package/.next/standalone/.next/static/chunks/3npq5yd7c4dmn.js +0 -2
  282. package/.next/standalone/app/components/BridgeRing.js +0 -753
  283. package/.next/static/chunks/06x3jiiz96m5t.js +0 -1
  284. package/.next/static/chunks/08k1crid-05dt.js +0 -1
  285. package/.next/static/chunks/0ngx9s6-zgshe.js +0 -33
  286. package/.next/static/chunks/0q-_khndfxubv.js +0 -2
  287. package/.next/static/chunks/1c79veqedvubt.js +0 -1
  288. package/.next/static/chunks/1irqj0lf-fu3d.js +0 -1
  289. package/.next/static/chunks/1uadqylrod5_v.js +0 -1
  290. package/.next/static/chunks/23u0zclgwpc4d.js +0 -1
  291. package/.next/static/chunks/289ktj97di6zg.js +0 -1
  292. package/.next/static/chunks/2b3lmf8e6uj8m.js +0 -16
  293. package/.next/static/chunks/3npq5yd7c4dmn.js +0 -2
  294. /package/.next/standalone/.next/static/{qqqcxvzBUizkECrT4swyK → NnWlxbDF24KhrU1eHiEnv}/_buildManifest.js +0 -0
  295. /package/.next/standalone/.next/static/{qqqcxvzBUizkECrT4swyK → NnWlxbDF24KhrU1eHiEnv}/_clientMiddlewareManifest.js +0 -0
  296. /package/.next/standalone/.next/static/{qqqcxvzBUizkECrT4swyK → NnWlxbDF24KhrU1eHiEnv}/_ssgManifest.js +0 -0
  297. /package/.next/static/{qqqcxvzBUizkECrT4swyK → NnWlxbDF24KhrU1eHiEnv}/_buildManifest.js +0 -0
  298. /package/.next/static/{qqqcxvzBUizkECrT4swyK → NnWlxbDF24KhrU1eHiEnv}/_clientMiddlewareManifest.js +0 -0
  299. /package/.next/static/{qqqcxvzBUizkECrT4swyK → NnWlxbDF24KhrU1eHiEnv}/_ssgManifest.js +0 -0
@@ -7,6 +7,8 @@
7
7
  //
8
8
  // Now they all call this, which talks to /api/scraper on the app itself.
9
9
 
10
+ import { runningNow } from './scan-state.js';
11
+
10
12
  export async function scraperStatus() {
11
13
  const r = await fetch('/api/scraper');
12
14
  if (!r.ok) throw new Error('Could not reach the app.');
@@ -25,24 +27,14 @@ export async function startScrape(action, name, extra = {}) {
25
27
  }
26
28
 
27
29
  /**
28
- * Run one scrape and report progress until it ends.
29
- * onLog receives the whole log each tick; returns the final status.
30
+ * Where Resume would carry on with one of your connections, for their profile
31
+ * card: { nextPage, pagesRead, legacy }, or null when there is nothing left to
32
+ * read (never mapped, read to the end, hidden).
30
33
  */
31
- export function runScrape(action, { name, onLog, ...extra } = {}) {
32
- return new Promise((resolve, reject) => {
33
- startScrape(action, name, extra).then(() => {
34
- const poll = setInterval(async () => {
35
- try {
36
- const s = await scraperStatus();
37
- onLog?.(s.log || []);
38
- if (!s.running) {
39
- clearInterval(poll);
40
- resolve(s);
41
- }
42
- } catch { /* transient; keep polling */ }
43
- }, 1500);
44
- }).catch(reject);
45
- });
34
+ export async function resumePoint(id) {
35
+ const r = await fetch(`/api/scraper?resume=${encodeURIComponent(id)}`);
36
+ if (!r.ok) return null;
37
+ return (await r.json()).resume ?? null;
46
38
  }
47
39
 
48
40
  /** What to tell someone when the scanner is not usable yet. */
@@ -67,3 +59,202 @@ export async function stopScrape() {
67
59
  body: JSON.stringify({ action: 'cancel' }),
68
60
  });
69
61
  }
62
+
63
+ // One scan at a time, and every button knows it.
64
+ //
65
+ // The scanner runs one job and refuses a second. The buttons that start one
66
+ // didn't know that: each kept its own idea of whether a scan was running, so a
67
+ // scan started on one profile card left every other card's button live, and
68
+ // pressing it said "Scan failed — connections may be private" about a scan
69
+ // that had never started. Now they all read the scanner's own answer, asked
70
+ // here once for the whole page however many buttons are showing: every 1.5 s
71
+ // while a job runs, every 5 s while none does (so one started on the Scan page
72
+ // or in another window greys them out too), and not at all while no button is
73
+ // on screen. The idle look is skipped while the page is hidden.
74
+
75
+ const BUSY_MS = 1500;
76
+ const QUIET_MS = 5000;
77
+
78
+ /** Before the first answer, and on the server, where nothing is asked. */
79
+ export const SCANNER_UNKNOWN = Object.freeze({
80
+ known: false, running: false, pending: false, action: null, target: null,
81
+ startedAt: null, progress: null, log: [], finished: [],
82
+ });
83
+
84
+ const listeners = new Set();
85
+ let now = SCANNER_UNKNOWN;
86
+ let said = JSON.stringify(now);
87
+ let timer = null;
88
+ let asking = null;
89
+ let epoch = 0; // moves when this page starts a job: answers asked before then are stale
90
+ let starting = false; // this page's start request is on its way
91
+ const followed = new Set(); // jobs (by startedAt) this page has seen running, or started
92
+
93
+ function publish(next) {
94
+ const text = JSON.stringify(next);
95
+ if (text === said) return;
96
+ said = text;
97
+ now = Object.freeze(next);
98
+ for (const listener of [...listeners]) listener();
99
+ }
100
+
101
+ /**
102
+ * An answer from GET /api/scraper?job=1. `finished` is how the jobs this page
103
+ * watched ended, newest first, so a card can say its scan is done even if it
104
+ * was closed while the scan ran, and never shows the end of a scan from before
105
+ * the page opened.
106
+ */
107
+ function take(s) {
108
+ if (!s || typeof s !== 'object') return;
109
+ const running = s.running === true;
110
+ if (running && s.startedAt != null) followed.add(s.startedAt);
111
+ const finished = (Array.isArray(s.recent) ? s.recent : [])
112
+ .filter((j) => followed.has(j.startedAt))
113
+ .map((j) => ({ ...j, log: !running && j.startedAt === s.startedAt && Array.isArray(s.log) ? s.log : [] }));
114
+ // While our own start request is on its way, the server may not have begun
115
+ // the job yet and says nothing runs: the buttons stay grey regardless.
116
+ publish({
117
+ known: true,
118
+ running: running || starting,
119
+ pending: starting && !running,
120
+ action: running ? s.action ?? null : starting ? now.action : null,
121
+ target: running ? s.target ?? null : starting ? now.target : null,
122
+ startedAt: running ? s.startedAt ?? null : null,
123
+ progress: running ? s.progress ?? null : null,
124
+ log: running && Array.isArray(s.log) ? s.log : [],
125
+ finished,
126
+ });
127
+ }
128
+
129
+ function ask() {
130
+ if (asking && asking.epoch === epoch) return asking.promise;
131
+ const asked = epoch;
132
+ const promise = fetch('/api/scraper?job=1')
133
+ .then((r) => (r.ok ? r.json() : null))
134
+ .then((s) => { if (asked === epoch) take(s); })
135
+ .catch(() => { /* the app restarting, say: keep the last answer */ })
136
+ .finally(() => { if (asking?.promise === promise) asking = null; });
137
+ asking = { epoch: asked, promise };
138
+ return promise;
139
+ }
140
+
141
+ function schedule() {
142
+ clearTimeout(timer);
143
+ timer = listeners.size ? setTimeout(tick, now.running ? BUSY_MS : QUIET_MS) : null;
144
+ }
145
+
146
+ async function tick() {
147
+ const hidden = typeof document !== 'undefined' && document.hidden;
148
+ if (!hidden || now.running) await ask();
149
+ schedule();
150
+ }
151
+
152
+ /** Call `listener` whenever the answer changes. Returns the way to stop. */
153
+ export function watchScanner(listener) {
154
+ listeners.add(listener);
155
+ if (listeners.size === 1) tick();
156
+ return () => {
157
+ listeners.delete(listener);
158
+ if (!listeners.size) {
159
+ clearTimeout(timer);
160
+ timer = null;
161
+ }
162
+ };
163
+ }
164
+
165
+ /** The latest answer: { known, running, pending, action, target, startedAt, progress, log, finished }. */
166
+ export function scannerNow() {
167
+ return now;
168
+ }
169
+
170
+ /**
171
+ * Start a job. Every Scan button greys out at once, not a poll later.
172
+ * Resolves once the scanner has taken it, with `ended`: a promise of how it
173
+ * ends ({ exitCode, failure, log, … }). onLog gets the whole log as it grows.
174
+ * `id` is who a scan of a person is of, so their card can find it again.
175
+ */
176
+ export async function beginScrape(action, { name, id, onLog, ...extra } = {}) {
177
+ epoch++;
178
+ starting = true;
179
+ publish({
180
+ ...now, known: true, running: true, pending: true, action,
181
+ target: name || id ? { id: id ?? null, name: name ?? null } : null,
182
+ startedAt: null, progress: null, log: [],
183
+ });
184
+ let started;
185
+ try {
186
+ started = await startScrape(action, name, { ...(id ? { id } : {}), ...extra });
187
+ } catch (err) {
188
+ // Refused, often because something else runs: ask what, straight away.
189
+ // Until the answer comes, only our own claim is taken back.
190
+ starting = false;
191
+ epoch++;
192
+ if (now.pending) publish({ ...now, running: false, pending: false, action: null, target: null, log: [] });
193
+ tick();
194
+ throw err;
195
+ }
196
+ starting = false;
197
+ epoch++;
198
+ const mine = started?.startedAt ?? null;
199
+ if (mine != null) followed.add(mine);
200
+ const ended = new Promise((resolve) => {
201
+ const stop = watchScanner(() => {
202
+ if (now.running && now.startedAt === mine) onLog?.(now.log);
203
+ // A server from before jobs had a start time (one left running while
204
+ // the app updated): the first answer with nothing running is the end.
205
+ const end = mine == null
206
+ ? (!now.running ? { exitCode: null, failure: null, log: [] } : null)
207
+ : now.finished.find((j) => j.startedAt === mine);
208
+ if (!end) return;
209
+ stop();
210
+ if (end.log.length) onLog?.(end.log);
211
+ resolve(end);
212
+ });
213
+ tick();
214
+ });
215
+ return { startedAt: mine, ended };
216
+ }
217
+
218
+ /** Start a job and follow it to its end: resolves with how it ended. */
219
+ export function runScrape(action, opts = {}) {
220
+ return beginScrape(action, opts).then((s) => s.ended);
221
+ }
222
+
223
+ /** Is this job, running or finished, a read of one person's circle? */
224
+ export function isCircleScan(job) {
225
+ return Boolean(job?.target) && ['bridge', 'rescrape', 'resume'].includes(job.action);
226
+ }
227
+
228
+ /**
229
+ * Is this job, running or finished, a read of this person's circle? By id when
230
+ * both have one: two connections can share a name. Else by name.
231
+ */
232
+ export function scansCircleOf(job, person) {
233
+ if (!isCircleScan(job) || !person) return false;
234
+ const { id, name } = job.target;
235
+ if (id && person.id) return id === person.id;
236
+ return Boolean(name) && name === person.name;
237
+ }
238
+
239
+ /** Why the Scan buttons are greyed out, in a few words; null when nothing runs. */
240
+ export function busyReason(job = now) {
241
+ if (!job?.running) return null;
242
+ const who = job.target?.name;
243
+ switch (job.action) {
244
+ case 'bridge':
245
+ case 'rescrape':
246
+ case 'resume':
247
+ return who ? `${who}’s circle is being scanned` : 'A circle is being scanned';
248
+ case 'company':
249
+ return who ? `${who} is being scanned` : 'A company is being scanned';
250
+ case 'auto-bridge':
251
+ case 'auto-bridge-retry':
252
+ case 'resume-all':
253
+ return 'Your bridges are being mapped, one by one';
254
+ case 'full':
255
+ case 'refresh':
256
+ return 'Your own connections are being scanned';
257
+ default:
258
+ return runningNow(job.action);
259
+ }
260
+ }
@@ -1460,7 +1460,7 @@ export function sectorMatcher() {
1460
1460
  export { sectorByKey, sectorLabel } from './sector-labels.js';
1461
1461
 
1462
1462
  /**
1463
- * Everything Settings → Your sector can pick, in the order a choice is stored:
1463
+ * Everything Scores → Your sector can pick, in the order a choice is stored:
1464
1464
  * each broad industry, then its sectors.
1465
1465
  */
1466
1466
  export const SECTOR_KEYS = Object.freeze(INDUSTRIES.flatMap((g) => [g.key, ...DIRECTORY.filter((s) => s.group === g.key).map((s) => s.key)]));
@@ -128,10 +128,11 @@ export function tierMoves(rows, tierBefore, tierAfter, { examples = 5, companyOf
128
128
  */
129
129
  export function previewSectorFocus(rows = [], {
130
130
  overrides = new Map(), industryOf, sectorsOf = sectorMatcher(), groupOf = sectorGroup, from = NO_FOCUS, to = NO_FOCUS, examples = 5,
131
- read = readNetwork(rows, { industryOf, sectorsOf, groupOf }),
131
+ tierScale, read = readNetwork(rows, { industryOf, sectorsOf, groupOf }),
132
132
  } = {}) {
133
- const before = scoreNetwork(rows, { overrides, focus: from, read });
134
- const after = scoreNetwork(rows, { overrides, focus: to, read });
133
+ // Both on the tier scale saved now (Scores → Tiers), as rescoring grades them.
134
+ const before = scoreNetwork(rows, { overrides, focus: from, tierScale, read });
135
+ const after = scoreNetwork(rows, { overrides, focus: to, tierScale, read });
135
136
 
136
137
  // Companies whose score moves, biggest first (by your people there now).
137
138
  // Every company anyone names counts, a former employer too: its score moves
@@ -4,12 +4,30 @@
4
4
  // circle). A setting with no entry here is simply saved.
5
5
 
6
6
  import { rescoreAll } from './rpc.js';
7
- import { sameFocus, NO_FOCUS } from './sector-focus.js';
7
+ import { sameFocus, NO_FOCUS, tierMoves } from './sector-focus.js';
8
8
 
9
9
  // Each entry: `changed(before, after)` says whether a change matters (by
10
10
  // default, any change to the stored value), and `run(db, after, before)` does
11
11
  // the work and returns what to tell the page.
12
12
  const EFFECTS = {
13
+ tierScale: {
14
+ // Tiers are graded when everyone is scored, so a new scale rescores
15
+ // everyone. The answer counts who changed tier, from the stored tiers
16
+ // before and after, with the sector focus's own counter (tierMoves): a
17
+ // person reachable through two bridges is two rows but one person, counted
18
+ // once at their closest degree.
19
+ run(db) {
20
+ const rows = () => db.prepare('SELECT id, degree, profile_url, tier FROM linkedin_connections').all();
21
+ try {
22
+ const before = new Map(rows().map((r) => [r.id, r.tier]));
23
+ const { scored } = rescoreAll();
24
+ const { people, up, down } = tierMoves(rows(), (r) => before.get(r.id), (r) => r.tier, { examples: 0 });
25
+ return { scored, people, moved: up + down, up, down };
26
+ } catch (err) {
27
+ throw new Error(`Saved, but rescoring your network failed (${err.message}). It will try again the next time the map loads.`);
28
+ }
29
+ },
30
+ },
13
31
  sectorFocus: {
14
32
  // Only a change to what scoring uses: a strength with no sectors picked
15
33
  // scores exactly like nothing picked, so it saves without a rescore.
@@ -11,10 +11,13 @@
11
11
  // request can't plant values nothing reads.
12
12
 
13
13
  import { SECTOR_FOCUS_SETTING } from './sector-focus.js';
14
+ import { TIER_SCALE_SETTING } from './scoring.js';
14
15
 
15
16
  export const SETTINGS = {
16
- // Settings → Your sector: industries whose companies count for more (lib/sector-focus.js).
17
+ // Scores → Your sector: industries whose companies count for more (lib/sector-focus.js).
17
18
  sectorFocus: SECTOR_FOCUS_SETTING,
19
+ // Scores → Tiers: graded on your network's curve, or on the fixed scale (lib/scoring.js).
20
+ tierScale: TIER_SCALE_SETTING,
18
21
  };
19
22
 
20
23
  const KEY = 'settings';
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "six-degrees",
3
- "version": "0.3.0",
3
+ "version": "0.4.0-beta.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "six-degrees",
9
- "version": "0.3.0",
9
+ "version": "0.4.0-beta.1",
10
10
  "license": "MIT",
11
11
  "os": [
12
12
  "darwin",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "six-degrees",
3
- "version": "0.3.0",
3
+ "version": "0.4.0-beta.1",
4
4
  "description": "Map your professional network as a galaxy — leverage tiers, bridges into new circles, and the shortest path to anyone. Runs locally on your own data.",
5
5
  "license": "MIT",
6
6
  "author": "Blake Burford",
@@ -11,7 +11,7 @@
11
11
  "bugs": {
12
12
  "url": "https://github.com/blakeb056/six-degrees/issues"
13
13
  },
14
- "homepage": "https://blakeb056.github.io/six-degrees/",
14
+ "homepage": "https://sixdegreesapp.com/",
15
15
  "keywords": [
16
16
  "linkedin",
17
17
  "network",