trybeacon 0.1.26 → 0.1.28

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 (359) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +13 -13
  3. package/.next/build-manifest.json +3 -3
  4. package/.next/next-server.js.nft.json +1 -1
  5. package/.next/prerender-manifest.json +3 -3
  6. package/.next/required-server-files.js +4 -4
  7. package/.next/required-server-files.json +4 -4
  8. package/.next/server/app/_global-error/page.js +3 -3
  9. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  10. package/.next/server/app/_global-error.html +1 -1
  11. package/.next/server/app/_global-error.rsc +1 -1
  12. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  13. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  14. package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  15. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  16. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  17. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  18. package/.next/server/app/_not-found/page.js +2 -2
  19. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  20. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  21. package/.next/server/app/_not-found.html +1 -1
  22. package/.next/server/app/_not-found.rsc +10 -10
  23. package/.next/server/app/_not-found.segments/_full.segment.rsc +10 -10
  24. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  25. package/.next/server/app/_not-found.segments/_index.segment.rsc +10 -10
  26. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  27. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  28. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  29. package/.next/server/app/api/board-annotations/[id]/route.js +1 -1
  30. package/.next/server/app/api/board-annotations/[id]/route.js.nft.json +1 -1
  31. package/.next/server/app/api/board-annotations/[id]/route_client-reference-manifest.js +1 -1
  32. package/.next/server/app/api/board-annotations/route.js +1 -1
  33. package/.next/server/app/api/board-annotations/route.js.nft.json +1 -1
  34. package/.next/server/app/api/board-annotations/route_client-reference-manifest.js +1 -1
  35. package/.next/server/app/api/board-layout/route.js +1 -1
  36. package/.next/server/app/api/board-layout/route.js.nft.json +1 -1
  37. package/.next/server/app/api/board-layout/route_client-reference-manifest.js +1 -1
  38. package/.next/server/app/api/bug-flags/[id]/route.js +1 -1
  39. package/.next/server/app/api/bug-flags/[id]/route.js.nft.json +1 -1
  40. package/.next/server/app/api/bug-flags/[id]/route_client-reference-manifest.js +1 -1
  41. package/.next/server/app/api/bug-flags/route.js +1 -1
  42. package/.next/server/app/api/bug-flags/route.js.nft.json +1 -1
  43. package/.next/server/app/api/bug-flags/route_client-reference-manifest.js +1 -1
  44. package/.next/server/app/api/code-graph/position/route.js +1 -1
  45. package/.next/server/app/api/code-graph/position/route.js.nft.json +1 -1
  46. package/.next/server/app/api/code-graph/position/route_client-reference-manifest.js +1 -1
  47. package/.next/server/app/api/code-graph/route.js +1 -1
  48. package/.next/server/app/api/code-graph/route.js.nft.json +1 -1
  49. package/.next/server/app/api/code-graph/route_client-reference-manifest.js +1 -1
  50. package/.next/server/app/api/context/feature/route.js +1 -1
  51. package/.next/server/app/api/context/feature/route.js.nft.json +1 -1
  52. package/.next/server/app/api/context/feature/route_client-reference-manifest.js +1 -1
  53. package/.next/server/app/api/context/file/route.js +1 -1
  54. package/.next/server/app/api/context/file/route.js.nft.json +1 -1
  55. package/.next/server/app/api/context/file/route_client-reference-manifest.js +1 -1
  56. package/.next/server/app/api/context/route.js +6 -6
  57. package/.next/server/app/api/context/route.js.nft.json +1 -1
  58. package/.next/server/app/api/context/route_client-reference-manifest.js +1 -1
  59. package/.next/server/app/api/db/arrange/route.js +1 -1
  60. package/.next/server/app/api/db/arrange/route.js.nft.json +1 -1
  61. package/.next/server/app/api/db/arrange/route_client-reference-manifest.js +1 -1
  62. package/.next/server/app/api/db/backfill-access/route.js +1 -1
  63. package/.next/server/app/api/db/backfill-access/route.js.nft.json +1 -1
  64. package/.next/server/app/api/db/backfill-access/route_client-reference-manifest.js +1 -1
  65. package/.next/server/app/api/db/position/route.js +1 -1
  66. package/.next/server/app/api/db/position/route.js.nft.json +1 -1
  67. package/.next/server/app/api/db/position/route_client-reference-manifest.js +1 -1
  68. package/.next/server/app/api/db/prune-planned/route.js +1 -1
  69. package/.next/server/app/api/db/prune-planned/route.js.nft.json +1 -1
  70. package/.next/server/app/api/db/prune-planned/route_client-reference-manifest.js +1 -1
  71. package/.next/server/app/api/db/reconcile-endpoints/route.js +1 -1
  72. package/.next/server/app/api/db/reconcile-endpoints/route.js.nft.json +1 -1
  73. package/.next/server/app/api/db/reconcile-endpoints/route_client-reference-manifest.js +1 -1
  74. package/.next/server/app/api/db/relations/[id]/route.js +1 -1
  75. package/.next/server/app/api/db/relations/[id]/route.js.nft.json +1 -1
  76. package/.next/server/app/api/db/relations/[id]/route_client-reference-manifest.js +1 -1
  77. package/.next/server/app/api/db/tables/[id]/route.js +1 -1
  78. package/.next/server/app/api/db/tables/[id]/route.js.nft.json +1 -1
  79. package/.next/server/app/api/db/tables/[id]/route_client-reference-manifest.js +1 -1
  80. package/.next/server/app/api/draft/approve/route.js +1 -1
  81. package/.next/server/app/api/draft/approve/route.js.nft.json +1 -1
  82. package/.next/server/app/api/draft/approve/route_client-reference-manifest.js +1 -1
  83. package/.next/server/app/api/draft/route.js +1 -1
  84. package/.next/server/app/api/draft/route.js.nft.json +1 -1
  85. package/.next/server/app/api/draft/route_client-reference-manifest.js +1 -1
  86. package/.next/server/app/api/draft/status/route.js +1 -1
  87. package/.next/server/app/api/draft/status/route.js.nft.json +1 -1
  88. package/.next/server/app/api/draft/status/route_client-reference-manifest.js +1 -1
  89. package/.next/server/app/api/edges/[id]/route.js +1 -1
  90. package/.next/server/app/api/edges/[id]/route.js.nft.json +1 -1
  91. package/.next/server/app/api/edges/[id]/route_client-reference-manifest.js +1 -1
  92. package/.next/server/app/api/edges/route.js +1 -1
  93. package/.next/server/app/api/edges/route.js.nft.json +1 -1
  94. package/.next/server/app/api/edges/route_client-reference-manifest.js +1 -1
  95. package/.next/server/app/api/endpoints/[id]/route.js +1 -1
  96. package/.next/server/app/api/endpoints/[id]/route.js.nft.json +1 -1
  97. package/.next/server/app/api/endpoints/[id]/route_client-reference-manifest.js +1 -1
  98. package/.next/server/app/api/entities/route.js +1 -1
  99. package/.next/server/app/api/entities/route.js.nft.json +1 -1
  100. package/.next/server/app/api/entities/route_client-reference-manifest.js +1 -1
  101. package/.next/server/app/api/feedback/[id]/route.js +1 -1
  102. package/.next/server/app/api/feedback/[id]/route_client-reference-manifest.js +1 -1
  103. package/.next/server/app/api/feedback/[id]/vote/route.js +1 -1
  104. package/.next/server/app/api/feedback/[id]/vote/route_client-reference-manifest.js +1 -1
  105. package/.next/server/app/api/feedback/route.js +1 -1
  106. package/.next/server/app/api/feedback/route_client-reference-manifest.js +1 -1
  107. package/.next/server/app/api/ingest/route.js +6 -6
  108. package/.next/server/app/api/ingest/route.js.nft.json +1 -1
  109. package/.next/server/app/api/ingest/route_client-reference-manifest.js +1 -1
  110. package/.next/server/app/api/init/route.js +6 -6
  111. package/.next/server/app/api/init/route.js.nft.json +1 -1
  112. package/.next/server/app/api/init/route_client-reference-manifest.js +1 -1
  113. package/.next/server/app/api/map/describe/route.js +6 -6
  114. package/.next/server/app/api/map/describe/route.js.nft.json +1 -1
  115. package/.next/server/app/api/map/describe/route_client-reference-manifest.js +1 -1
  116. package/.next/server/app/api/map/files/route.js +1 -1
  117. package/.next/server/app/api/map/files/route.js.nft.json +1 -1
  118. package/.next/server/app/api/map/files/route_client-reference-manifest.js +1 -1
  119. package/.next/server/app/api/map/finish/route.js +1 -1
  120. package/.next/server/app/api/map/finish/route.js.nft.json +1 -1
  121. package/.next/server/app/api/map/finish/route_client-reference-manifest.js +1 -1
  122. package/.next/server/app/api/map/route.js +1 -1
  123. package/.next/server/app/api/map/route.js.nft.json +1 -1
  124. package/.next/server/app/api/map/route_client-reference-manifest.js +1 -1
  125. package/.next/server/app/api/map/start/route.js +1 -1
  126. package/.next/server/app/api/map/start/route.js.nft.json +1 -1
  127. package/.next/server/app/api/map/start/route_client-reference-manifest.js +1 -1
  128. package/.next/server/app/api/map/touch-active/route.js +1 -1
  129. package/.next/server/app/api/map/touch-active/route.js.nft.json +1 -1
  130. package/.next/server/app/api/map/touch-active/route_client-reference-manifest.js +1 -1
  131. package/.next/server/app/api/nodes/[id]/position/route.js +1 -1
  132. package/.next/server/app/api/nodes/[id]/position/route.js.nft.json +1 -1
  133. package/.next/server/app/api/nodes/[id]/position/route_client-reference-manifest.js +1 -1
  134. package/.next/server/app/api/nodes/[id]/route.js +1 -1
  135. package/.next/server/app/api/nodes/[id]/route.js.nft.json +1 -1
  136. package/.next/server/app/api/nodes/[id]/route_client-reference-manifest.js +1 -1
  137. package/.next/server/app/api/nodes/positions/route.js +1 -1
  138. package/.next/server/app/api/nodes/positions/route.js.nft.json +1 -1
  139. package/.next/server/app/api/nodes/positions/route_client-reference-manifest.js +1 -1
  140. package/.next/server/app/api/nodes/route.js +1 -1
  141. package/.next/server/app/api/nodes/route.js.nft.json +1 -1
  142. package/.next/server/app/api/nodes/route_client-reference-manifest.js +1 -1
  143. package/.next/server/app/api/nodes/subtasks/route.js +1 -1
  144. package/.next/server/app/api/nodes/subtasks/route.js.nft.json +1 -1
  145. package/.next/server/app/api/nodes/subtasks/route_client-reference-manifest.js +1 -1
  146. package/.next/server/app/api/notes/[id]/route.js +1 -1
  147. package/.next/server/app/api/notes/[id]/route.js.nft.json +1 -1
  148. package/.next/server/app/api/notes/[id]/route_client-reference-manifest.js +1 -1
  149. package/.next/server/app/api/notes/route.js +1 -1
  150. package/.next/server/app/api/notes/route.js.nft.json +1 -1
  151. package/.next/server/app/api/notes/route_client-reference-manifest.js +1 -1
  152. package/.next/server/app/api/open/route.js +1 -1
  153. package/.next/server/app/api/open/route.js.nft.json +1 -1
  154. package/.next/server/app/api/open/route_client-reference-manifest.js +1 -1
  155. package/.next/server/app/api/plan/annotations/route.js +3 -3
  156. package/.next/server/app/api/plan/annotations/route.js.nft.json +1 -1
  157. package/.next/server/app/api/plan/annotations/route_client-reference-manifest.js +1 -1
  158. package/.next/server/app/api/plan/approve/route.js +6 -6
  159. package/.next/server/app/api/plan/approve/route.js.nft.json +1 -1
  160. package/.next/server/app/api/plan/approve/route_client-reference-manifest.js +1 -1
  161. package/.next/server/app/api/plan/history/route.js +1 -1
  162. package/.next/server/app/api/plan/history/route.js.nft.json +1 -1
  163. package/.next/server/app/api/plan/history/route_client-reference-manifest.js +1 -1
  164. package/.next/server/app/api/plan/markdown/route.js +1 -1
  165. package/.next/server/app/api/plan/markdown/route.js.nft.json +1 -1
  166. package/.next/server/app/api/plan/markdown/route_client-reference-manifest.js +1 -1
  167. package/.next/server/app/api/plan/presence/route.js +1 -1
  168. package/.next/server/app/api/plan/presence/route.js.nft.json +1 -1
  169. package/.next/server/app/api/plan/presence/route_client-reference-manifest.js +1 -1
  170. package/.next/server/app/api/plan/route.js +1 -1
  171. package/.next/server/app/api/plan/route.js.nft.json +1 -1
  172. package/.next/server/app/api/plan/route_client-reference-manifest.js +1 -1
  173. package/.next/server/app/api/plan/verdict/route.js +1 -1
  174. package/.next/server/app/api/plan/verdict/route.js.nft.json +1 -1
  175. package/.next/server/app/api/plan/verdict/route_client-reference-manifest.js +1 -1
  176. package/.next/server/app/api/preferences/route.js +1 -1
  177. package/.next/server/app/api/preferences/route.js.nft.json +1 -1
  178. package/.next/server/app/api/preferences/route_client-reference-manifest.js +1 -1
  179. package/.next/server/app/api/reset/route.js +1 -1
  180. package/.next/server/app/api/reset/route.js.nft.json +1 -1
  181. package/.next/server/app/api/reset/route_client-reference-manifest.js +1 -1
  182. package/.next/server/app/api/stream/route.js +2 -2
  183. package/.next/server/app/api/stream/route.js.nft.json +1 -1
  184. package/.next/server/app/api/stream/route_client-reference-manifest.js +1 -1
  185. package/.next/server/app/api/version/route.js +1 -1
  186. package/.next/server/app/api/version/route.js.nft.json +1 -1
  187. package/.next/server/app/api/version/route_client-reference-manifest.js +1 -1
  188. package/.next/server/app/api/workspace/activate/route.js +1 -1
  189. package/.next/server/app/api/workspace/activate/route.js.nft.json +1 -1
  190. package/.next/server/app/api/workspace/activate/route_client-reference-manifest.js +1 -1
  191. package/.next/server/app/api/workspace/route.js +1 -1
  192. package/.next/server/app/api/workspace/route.js.nft.json +1 -1
  193. package/.next/server/app/api/workspace/route_client-reference-manifest.js +1 -1
  194. package/.next/server/app/apple-icon.png/route.js +1 -1
  195. package/.next/server/app/docs/page.js +2 -2
  196. package/.next/server/app/docs/page.js.nft.json +1 -1
  197. package/.next/server/app/docs/page_client-reference-manifest.js +1 -1
  198. package/.next/server/app/docs.html +1 -1
  199. package/.next/server/app/docs.rsc +11 -11
  200. package/.next/server/app/docs.segments/_full.segment.rsc +11 -11
  201. package/.next/server/app/docs.segments/_head.segment.rsc +1 -1
  202. package/.next/server/app/docs.segments/_index.segment.rsc +10 -10
  203. package/.next/server/app/docs.segments/_tree.segment.rsc +2 -2
  204. package/.next/server/app/docs.segments/docs/__PAGE__.segment.rsc +2 -2
  205. package/.next/server/app/docs.segments/docs.segment.rsc +1 -1
  206. package/.next/server/app/feedback/page.js +2 -2
  207. package/.next/server/app/feedback/page.js.nft.json +1 -1
  208. package/.next/server/app/feedback/page_client-reference-manifest.js +1 -1
  209. package/.next/server/app/feedback.html +1 -1
  210. package/.next/server/app/feedback.rsc +11 -11
  211. package/.next/server/app/feedback.segments/_full.segment.rsc +11 -11
  212. package/.next/server/app/feedback.segments/_head.segment.rsc +1 -1
  213. package/.next/server/app/feedback.segments/_index.segment.rsc +10 -10
  214. package/.next/server/app/feedback.segments/_tree.segment.rsc +2 -2
  215. package/.next/server/app/feedback.segments/feedback/__PAGE__.segment.rsc +2 -2
  216. package/.next/server/app/feedback.segments/feedback.segment.rsc +1 -1
  217. package/.next/server/app/help/page.js +2 -2
  218. package/.next/server/app/help/page.js.nft.json +1 -1
  219. package/.next/server/app/help/page_client-reference-manifest.js +1 -1
  220. package/.next/server/app/help.html +1 -1
  221. package/.next/server/app/help.rsc +30 -29
  222. package/.next/server/app/help.segments/_full.segment.rsc +30 -29
  223. package/.next/server/app/help.segments/_head.segment.rsc +1 -1
  224. package/.next/server/app/help.segments/_index.segment.rsc +10 -10
  225. package/.next/server/app/help.segments/_tree.segment.rsc +2 -2
  226. package/.next/server/app/help.segments/help/__PAGE__.segment.rsc +3 -3
  227. package/.next/server/app/help.segments/help.segment.rsc +1 -1
  228. package/.next/server/app/icon.svg/route.js +1 -1
  229. package/.next/server/app/index.html +1 -1
  230. package/.next/server/app/index.rsc +11 -11
  231. package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  232. package/.next/server/app/index.segments/_full.segment.rsc +11 -11
  233. package/.next/server/app/index.segments/_head.segment.rsc +1 -1
  234. package/.next/server/app/index.segments/_index.segment.rsc +10 -10
  235. package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  236. package/.next/server/app/map/page.js +2 -2
  237. package/.next/server/app/map/page.js.nft.json +1 -1
  238. package/.next/server/app/map/page_client-reference-manifest.js +1 -1
  239. package/.next/server/app/page.js +2 -2
  240. package/.next/server/app/page.js.nft.json +1 -1
  241. package/.next/server/app/page_client-reference-manifest.js +1 -1
  242. package/.next/server/app/plan/page.js +2 -2
  243. package/.next/server/app/plan/page.js.nft.json +1 -1
  244. package/.next/server/app/plan/page_client-reference-manifest.js +1 -1
  245. package/.next/server/app/settings/page.js +2 -2
  246. package/.next/server/app/settings/page.js.nft.json +1 -1
  247. package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  248. package/.next/server/app-paths-manifest.json +13 -13
  249. package/.next/server/chunks/2877.js +1 -1
  250. package/.next/server/chunks/2981.js +1 -1
  251. package/.next/server/chunks/319.js +3 -3
  252. package/.next/server/chunks/333.js +1 -0
  253. package/.next/server/chunks/4038.js +1 -0
  254. package/.next/server/chunks/5258.js +1 -1
  255. package/.next/server/chunks/9127.js +1 -1
  256. package/.next/server/chunks/9313.js +3 -3
  257. package/.next/server/instrumentation.js.nft.json +1 -1
  258. package/.next/server/middleware-build-manifest.js +1 -1
  259. package/.next/server/middleware.js +2 -2
  260. package/.next/server/next-font-manifest.js +1 -1
  261. package/.next/server/next-font-manifest.json +1 -1
  262. package/.next/server/pages/404.html +1 -1
  263. package/.next/server/pages/500.html +1 -1
  264. package/.next/server/server-reference-manifest.js +1 -1
  265. package/.next/server/server-reference-manifest.json +1 -1
  266. package/.next/static/chunks/2110-3a7f79855dc0d2ad.js +1 -0
  267. package/.next/static/chunks/app/_not-found/page-b2c1eefe2cdbb8c3.js +1 -0
  268. package/.next/static/chunks/app/docs/page-7a4088b448564ae2.js +1 -0
  269. package/.next/static/chunks/app/feedback/page-5538af3c0677cc71.js +1 -0
  270. package/.next/static/chunks/app/help/page-7ece210a72cf4a67.js +1 -0
  271. package/.next/static/chunks/app/layout-a49ad21243d12263.js +1 -0
  272. package/.next/static/chunks/app/map/{page-bd17b84e1aebd827.js → page-fd37a85a0c06b420.js} +1 -1
  273. package/.next/static/chunks/app/{page-bb6bef10a857544d.js → page-dd0ab6cbc85d131f.js} +1 -1
  274. package/.next/static/chunks/app/plan/{page-f52b1b0bc8037bc0.js → page-8ad3d3527c2ea7f1.js} +1 -1
  275. package/.next/static/chunks/app/settings/page-8a6efc095447310f.js +1 -0
  276. package/.next/static/chunks/main-app-cb1a040ffaced80b.js +1 -0
  277. package/.next/static/chunks/next/dist/client/components/builtin/global-error-c82bd7a72a198de4.js +1 -0
  278. package/.next/static/css/adeb1fa01259c532.css +1 -0
  279. package/.next/trace +38 -37
  280. package/.next/trace-build +1 -1
  281. package/.next/types/app/api/board-annotations/[id]/route.ts +1 -1
  282. package/.next/types/app/api/board-annotations/route.ts +1 -1
  283. package/.next/types/app/api/board-layout/route.ts +1 -1
  284. package/.next/types/app/api/bug-flags/[id]/route.ts +1 -1
  285. package/.next/types/app/api/bug-flags/route.ts +1 -1
  286. package/.next/types/app/api/code-graph/position/route.ts +1 -1
  287. package/.next/types/app/api/code-graph/route.ts +1 -1
  288. package/.next/types/app/api/context/feature/route.ts +1 -1
  289. package/.next/types/app/api/context/file/route.ts +1 -1
  290. package/.next/types/app/api/context/route.ts +1 -1
  291. package/.next/types/app/api/db/arrange/route.ts +1 -1
  292. package/.next/types/app/api/db/backfill-access/route.ts +1 -1
  293. package/.next/types/app/api/db/position/route.ts +1 -1
  294. package/.next/types/app/api/db/prune-planned/route.ts +1 -1
  295. package/.next/types/app/api/db/reconcile-endpoints/route.ts +1 -1
  296. package/.next/types/app/api/db/relations/[id]/route.ts +1 -1
  297. package/.next/types/app/api/db/tables/[id]/route.ts +1 -1
  298. package/.next/types/app/api/draft/approve/route.ts +1 -1
  299. package/.next/types/app/api/draft/route.ts +1 -1
  300. package/.next/types/app/api/draft/status/route.ts +1 -1
  301. package/.next/types/app/api/edges/[id]/route.ts +1 -1
  302. package/.next/types/app/api/edges/route.ts +1 -1
  303. package/.next/types/app/api/endpoints/[id]/route.ts +1 -1
  304. package/.next/types/app/api/entities/route.ts +1 -1
  305. package/.next/types/app/api/feedback/[id]/route.ts +1 -1
  306. package/.next/types/app/api/feedback/[id]/vote/route.ts +1 -1
  307. package/.next/types/app/api/feedback/route.ts +1 -1
  308. package/.next/types/app/api/ingest/route.ts +1 -1
  309. package/.next/types/app/api/init/route.ts +1 -1
  310. package/.next/types/app/api/map/describe/route.ts +1 -1
  311. package/.next/types/app/api/map/files/route.ts +1 -1
  312. package/.next/types/app/api/map/finish/route.ts +1 -1
  313. package/.next/types/app/api/map/route.ts +1 -1
  314. package/.next/types/app/api/map/start/route.ts +1 -1
  315. package/.next/types/app/api/map/touch-active/route.ts +1 -1
  316. package/.next/types/app/api/nodes/[id]/position/route.ts +1 -1
  317. package/.next/types/app/api/nodes/[id]/route.ts +1 -1
  318. package/.next/types/app/api/nodes/positions/route.ts +1 -1
  319. package/.next/types/app/api/nodes/route.ts +1 -1
  320. package/.next/types/app/api/nodes/subtasks/route.ts +1 -1
  321. package/.next/types/app/api/notes/[id]/route.ts +1 -1
  322. package/.next/types/app/api/notes/route.ts +1 -1
  323. package/.next/types/app/api/open/route.ts +1 -1
  324. package/.next/types/app/api/plan/annotations/route.ts +1 -1
  325. package/.next/types/app/api/plan/approve/route.ts +1 -1
  326. package/.next/types/app/api/plan/history/route.ts +1 -1
  327. package/.next/types/app/api/plan/markdown/route.ts +1 -1
  328. package/.next/types/app/api/plan/presence/route.ts +1 -1
  329. package/.next/types/app/api/plan/route.ts +1 -1
  330. package/.next/types/app/api/plan/verdict/route.ts +1 -1
  331. package/.next/types/app/api/preferences/route.ts +1 -1
  332. package/.next/types/app/api/reset/route.ts +1 -1
  333. package/.next/types/app/api/stream/route.ts +1 -1
  334. package/.next/types/app/api/version/route.ts +1 -1
  335. package/.next/types/app/api/workspace/activate/route.ts +1 -1
  336. package/.next/types/app/api/workspace/route.ts +1 -1
  337. package/.next/types/app/docs/page.ts +1 -1
  338. package/.next/types/app/feedback/page.ts +1 -1
  339. package/.next/types/app/help/page.ts +1 -1
  340. package/.next/types/app/map/page.ts +1 -1
  341. package/.next/types/app/page.ts +1 -1
  342. package/.next/types/app/plan/page.ts +1 -1
  343. package/.next/types/app/settings/page.ts +1 -1
  344. package/dist/bin/beacon.js +6 -6
  345. package/package.json +1 -1
  346. package/.next/server/chunks/3015.js +0 -1
  347. package/.next/server/chunks/5934.js +0 -1
  348. package/.next/static/chunks/1317-abd6936ef6f7e4d9.js +0 -1
  349. package/.next/static/chunks/app/_not-found/page-57c7dfeb659fcab6.js +0 -1
  350. package/.next/static/chunks/app/docs/page-5b14c5cfd82e6427.js +0 -1
  351. package/.next/static/chunks/app/feedback/page-9c313281ba613e34.js +0 -1
  352. package/.next/static/chunks/app/help/page-d720609312abff8b.js +0 -1
  353. package/.next/static/chunks/app/layout-78fefdd943b8c8f9.js +0 -1
  354. package/.next/static/chunks/app/settings/page-4d4879990a4f14fc.js +0 -1
  355. package/.next/static/chunks/main-app-1a32dc335629e4e4.js +0 -1
  356. package/.next/static/chunks/next/dist/client/components/builtin/global-error-df87398e192c5e45.js +0 -1
  357. package/.next/static/css/cbb14bbfa47152fd.css +0 -1
  358. /package/.next/static/{nIOWlnJIVXwqjfj2Fpn44 → aZKqTYAW0DIvFxgnjl3so}/_buildManifest.js +0 -0
  359. /package/.next/static/{nIOWlnJIVXwqjfj2Fpn44 → aZKqTYAW0DIvFxgnjl3so}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5823],{15373:(e,t,s)=>{"use strict";s.d(t,{FilesMapClient:()=>w});var o=s(95155),r=s(12115),n=s(81750),l=s(6266),a=s(7679),i=s(98766),d=s(15629),c=s(79176),u=s(74371);s(53255);var p=s(18986),h=s(9005),x=s(25583),m=s(82099),f=s(62311);let b=/(^|\/)tests?\/|\.(test|spec)\.[jt]sx?$/i;var g=s(91337);let y={ts:"#3178c6",js:"#f7df1e",py:"#3776ab",go:"#00add8",rs:"#dea584",swift:"#f05138",java:"#b07219",ruby:"#cc342d",kotlin:"#a97bff",csharp:"#178600",php:"#4f5d95",cpp:"#f34b7d",c:"#555555"},j={file:function({data:e}){var t;let s=!!e.touched,r=e.recency??0,a=e.inDegree??0,i=10+.35*Math.min(a,20),d=s?Math.max(13+4*r,i):i,c={fontSize:`${d}px`,...s?{boxShadow:`0 0 ${6+Math.round(12*r)}px ${1+Math.round(3*r)}px rgba(45,212,191,${(.25+.5*r).toFixed(2)})`,zIndex:10}:{}},u=a>0?` \xb7 imported by ${a}`:"",p=s?`${e.tooltip} \xb7 edited ${e.count??0}\xd7 this session${u}`:e.untested?`${e.tooltip} \xb7 no test imports this file${u}`:`${e.tooltip}${u}`;return(0,o.jsxs)("div",{title:p,style:c,className:(0,g.cn)("relative rounded-md border bg-card/85 px-2 py-0.5 text-[10px] font-medium backdrop-blur transition-[font-size,box-shadow,border-color] duration-300",s?"border-teal-300/80 px-2.5 py-1 font-semibold text-foreground":e.untested?"border-amber-400/60 text-foreground/85":"border-white/10 text-foreground/85",e.isNewest&&"animate-touch-pulse"),children:[(0,o.jsx)(n.h7,{type:"target",position:l.yX.Top,isConnectable:!1,className:"!h-0 !w-0 !min-w-0 !border-0 !bg-transparent"}),e.untested&&(0,o.jsx)("span",{"aria-hidden":!0,className:"absolute -right-1 -top-1 size-1.5 rounded-full bg-amber-400 ring-2 ring-background"}),s&&(e.count??0)>0&&(0,o.jsx)("span",{"aria-hidden":!0,className:"absolute -left-1.5 -top-1.5 flex h-3 min-w-3 items-center justify-center rounded-full bg-teal-400 px-0.5 text-[7px] font-bold text-background ring-1 ring-background",children:e.count}),e.lang&&(0,o.jsx)("span",{"aria-hidden":!0,title:e.lang,className:"absolute -bottom-1 -right-1 size-1.5 rounded-full ring-1 ring-background",style:{backgroundColor:(t=e.lang)&&y[t]||"#9ca3af"}}),e.label,(0,o.jsx)(n.h7,{type:"source",position:l.yX.Bottom,isConnectable:!1,className:"!h-0 !w-0 !min-w-0 !border-0 !bg-transparent"})]})}};function w({files:e,edges:t,touched:s}){let l,y=(0,r.useMemo)(()=>{if(!e.some(e=>0===e.x&&0===e.y)){let t=new Map;for(let s of e)t.set(s.path,{x:s.x,y:s.y});return{positions:t,fresh:!1}}return{positions:function(e,t){let s=e.map(e=>{let t=0!==e.x||0!==e.y,s=e.path.includes("/")?e.path.split("/").pop():e.path;return{id:e.path,x:t?e.x:(Math.random()-.5)*600,y:t?e.y:(Math.random()-.5)*600,fx:t?e.x:void 0,fy:t?e.y:void 0,pinned:t,radius:Math.max(28,(6*s.length+24)/2+8)}}),o=t.filter(e=>e.from!==e.to).map(e=>({source:e.from,target:e.to})),r=(0,a.A)(s).force("link",(0,i.A)(o).id(e=>e.id).distance(130).strength(.45)).force("charge",(0,d.A)().strength(-380).distanceMax(1e3)).force("collide",(0,c.A)().radius(e=>e.radius).strength(1)).force("center",(0,u.A)(0,0).strength(.025)).stop();for(let e=0;e<500;e++)r.tick();let n=new Map;for(let e of s)n.set(e.id,{x:e.x??0,y:e.y??0});return n}(e,t),fresh:!0}},[e,t]),k=(0,r.useMemo)(()=>(function(e,t){var s;let o=new Set;for(let e of t)s=e.from,b.test(s)&&o.add(e.to);let r=new Set;for(let t of e)b.test(t)||o.has(t)||r.add(t);return r})(e.map(e=>e.path),t),[e,t]),v=(0,r.useMemo)(()=>{let e=new Map,t=Object.entries(s??{});if(!t.length)return e;let o=t.map(([,e])=>e.lastAt),r=Math.max(...o),n=Math.min(...o),l=r-n||1,a=t[0][0],i=t[0][1].lastAt;for(let[e,s]of t)s.lastAt>=i&&(a=e,i=s.lastAt);for(let[s,o]of t)e.set(s,{count:o.count,recency:(o.lastAt-n)/l,isNewest:s===a});return e},[s]),C=v.size>0,M=(0,r.useMemo)(()=>Array.from(v.entries()).map(([e,t])=>({path:e,label:e.slice(e.lastIndexOf("/")+1),count:t.count,recency:t.recency})).sort((e,t)=>t.recency-e.recency),[v]),S=(0,r.useMemo)(()=>e.map(e=>{let t=y.positions.get(e.path)??{x:e.x,y:e.y},s=e.path.lastIndexOf("/"),o=s>=0?e.path.slice(s+1):e.path,r=v.get(e.path);return{id:e.path,type:"file",position:t,data:{label:o,tooltip:e.path,untested:k.has(e.path),inDegree:e.inDegree??0,lang:e.lang??null,touched:!!r,count:r?.count??0,recency:r?.recency??0,isNewest:r?.isNewest??!1}}}),[e,y,k,v]),A=(0,r.useRef)(!1);(0,r.useEffect)(()=>{if(!y.fresh||A.current)return;A.current=!0;let t=e.filter(e=>0===e.x&&0===e.y).map(e=>{let t=y.positions.get(e.path);return t?{path:e.path,x:t.x,y:t.y}:null}).filter(e=>null!==e);t.length&&fetch("/api/code-graph/position",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({batch:t})})},[y,e]);let E=(0,r.useMemo)(()=>t.map(e=>({id:`${e.from}|${e.to}`,source:e.from,target:e.to,type:"straight",style:e.circular?{stroke:"#f87171",strokeDasharray:"5 3",strokeWidth:2}:{stroke:"#a1a1aa",strokeWidth:1.5,opacity:.85}})),[t]),[$,z]=(0,r.useState)(S),[O,I]=(0,r.useState)(E),[_,D]=(0,r.useState)(null),[P,R]=(0,r.useState)(null),[T,F]=(0,r.useState)(!1),[L,W]=(0,r.useState)(!1),[Z,B]=(0,r.useState)(!1),[H,U]=(0,r.useState)(!1),J=(0,r.useRef)(null),K=(0,r.useCallback)(e=>{D(e),R(null);let t=J.current?.getNode(e);t&&J.current&&J.current.setCenter(t.position.x+40,t.position.y+12,{zoom:1.4,duration:600})},[]),V=(0,r.useCallback)(()=>{D(null),R(null);let e=!L;if(W(e),B(e),e&&J.current){let e=Array.from(v.keys()).map(e=>({id:e}));e.length&&J.current.fitView({nodes:e,duration:600,padding:.4})}},[L,v]);(0,r.useEffect)(()=>U(!0),[]),(0,r.useEffect)(()=>z(S),[S]),(0,r.useEffect)(()=>I(E),[E]);let X=(0,r.useCallback)(e=>z(t=>(0,n._0)(e,t)),[]),G=(0,r.useCallback)(e=>I(t=>(0,n.zW)(e,t)),[]),q=(0,r.useCallback)((e,t,s)=>{fetch("/api/code-graph/position",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:e,x:t,y:s})})},[]),Q=(0,r.useMemo)(()=>new Set(t.filter(e=>e.circular).map(e=>`${e.from}|${e.to}`)),[t]),Y=(0,r.useMemo)(()=>{let e=new Set;for(let s of t)s.circular&&(e.add(s.from),e.add(s.to));return e},[t]),ee=(0,r.useMemo)(()=>{if(P){let e=O.find(e=>e.id===P);return e?new Set([e.source,e.target]):null}if(_){let e=new Set([_]);for(let s of t)s.from===_&&e.add(s.to),s.to===_&&e.add(s.from);return e}return T?Y:L&&C?new Set(v.keys()):null},[_,P,T,Y,t,O,L,C,v]),et=(0,r.useMemo)(()=>ee?$.map(e=>({...e,style:{...e.style,opacity:ee.has(e.id)?1:.15,transition:"opacity 120ms"}})):$,[$,ee]),es=(0,r.useMemo)(()=>_||P||T||L?O.map(e=>{let t=!1;return P?t=e.id===P:_?t=e.source===_||e.target===_:T?t=Q.has(e.id):L&&(t=v.has(e.source)&&v.has(e.target)),t?{...e,zIndex:20,style:{...e.style,opacity:1,strokeWidth:2}}:{...e,style:{...e.style,opacity:.05}}}):O,[O,_,P,T,Q,L,v]),eo=t.filter(e=>e.circular).length,er=(0,r.useMemo)(()=>_?t.filter(e=>e.from===_).map(e=>e.to):[],[_,t]),en=(0,r.useMemo)(()=>_?t.filter(e=>e.to===_).map(e=>e.from):[],[_,t]),el=null!==_||Z&&C,ea=(0,r.useCallback)(()=>{D(null),B(!1),W(!1)},[]);return H?(0,o.jsxs)("div",{className:"canvas-dots relative h-screen w-full",children:[(0,o.jsxs)(n.Gc,{nodes:et,edges:es,nodeTypes:j,onNodesChange:X,onEdgesChange:G,onNodeClick:(e,t)=>{D(t.id),R(null)},onEdgeClick:(e,t)=>{R(t.id),D(null)},onPaneClick:()=>{D(null),R(null)},onInit:e=>{J.current=e},onNodeDragStop:(e,t)=>q(t.id,t.position.x,t.position.y),deleteKeyCode:null,colorMode:"dark",fitView:!0,minZoom:.05,panOnScroll:!0,zoomActivationKeyCode:["Meta","Control"],proOptions:{hideAttribution:!0},children:[(0,o.jsx)(n.H2,{position:"bottom-right",className:"!overflow-hidden !rounded-xl !border !border-white/10 [&_button]:!border-white/10 [&_button]:!bg-card/70 [&_button]:!text-foreground [&_button]:!backdrop-blur"}),(0,o.jsx)(n.of,{pannable:!0,zoomable:!0,position:"bottom-left",style:{width:140,height:90},className:"!rounded-xl !border !border-white/10 !bg-card/50 !backdrop-blur",nodeColor:()=>"#555"}),(0,o.jsx)(n.Zk,{position:"top-center",className:"glass rounded-full px-1 py-0.5",children:(0,o.jsx)(f.Z,{active:"FILES",tabs:[{value:"ROADMAP",label:"Roadmap",href:"/map?view=ROADMAP"},{value:"ARCHITECTURE",label:"Architecture",href:"/map?view=ARCHITECTURE"},{value:"FILES",label:"Files",href:"/map?view=FILES"},{value:"DATABASE",label:"Database",href:"/map?view=DATABASE"}]})}),(0,o.jsxs)(n.Zk,{position:"top-right",className:"glass flex items-center gap-3 rounded-xl px-3 py-1.5 text-[11px]",children:[(0,o.jsxs)("span",{className:"text-muted-foreground",children:[e.length," files \xb7 ",t.length," imports"]}),eo>0&&(0,o.jsxs)("button",{type:"button",onClick:()=>{F(e=>!e),D(null),R(null)},title:T?"Show all imports":"Show only files involved in import cycles",className:(0,g.cn)("flex items-center gap-1.5 rounded-md px-1.5 py-0.5 transition-colors",T?"bg-red-500/15 text-red-200 ring-1 ring-red-400/40":"text-red-300 hover:bg-red-500/10"),children:[(0,o.jsx)("span",{"aria-hidden":!0,className:"inline-block h-0 w-5 border-t border-dashed",style:{borderColor:"#ef4444"}}),eo," circular"]}),C&&(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)("button",{type:"button",onClick:V,title:L?"Show all files again":"Focus + zoom to the files edited this session",className:(0,g.cn)("flex items-center gap-1.5 rounded-md px-1.5 py-0.5 transition-colors",L?"bg-teal-500/15 text-teal-200 ring-1 ring-teal-400/40":"text-teal-300 hover:bg-teal-500/10"),children:[(0,o.jsx)(p.A,{className:"size-3"}),v.size," edited"]})})]})]}),el&&(0,o.jsxs)(m.b,{className:"absolute bottom-3 right-3 top-16 z-10 flex w-72 flex-col rounded-2xl",children:[(0,o.jsxs)("div",{className:"flex items-center justify-between border-b border-white/10 px-3.5 py-2.5",children:[(0,o.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-wide text-muted-foreground",children:_?"File":"Edited this session"}),(0,o.jsx)("button",{onClick:ea,title:"Close panel",className:"rounded-md p-1 text-muted-foreground transition-colors hover:bg-white/10 hover:text-foreground",children:(0,o.jsx)(h.A,{className:"size-4"})})]}),(0,o.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto p-3",children:_?(0,o.jsxs)("div",{className:"space-y-3",children:[(0,o.jsxs)("div",{children:[(0,o.jsxs)("div",{className:"flex items-start gap-1.5",children:[(0,o.jsx)(x.A,{className:"mt-0.5 size-4 shrink-0 text-muted-foreground"}),(0,o.jsx)("h2",{className:"break-all text-sm font-semibold leading-tight",children:_.slice(_.lastIndexOf("/")+1)})]}),(0,o.jsx)("div",{className:"mt-0.5 break-all font-mono text-[10px] text-muted-foreground",children:_})]}),(0,o.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(l=v.get(_))?(0,o.jsxs)("span",{className:"rounded bg-teal-500/15 px-1.5 py-0.5 text-[10px] font-semibold text-teal-300",children:["edited ",l.count,"\xd7"]}):null,k.has(_)&&(0,o.jsx)("span",{className:"rounded bg-amber-500/15 px-1.5 py-0.5 text-[10px] font-semibold text-amber-300",children:"untested"})]}),(0,o.jsx)("button",{onClick:()=>fetch(`/api/open?path=${encodeURIComponent(_)}`).catch(()=>{}),className:"w-full rounded-md border border-white/10 px-2 py-1.5 text-[11px] text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:"Open in editor"}),(0,o.jsx)(N,{label:"Imports",paths:er,onPick:K}),(0,o.jsx)(N,{label:"Imported by",paths:en,onPick:K})]}):(0,o.jsx)("ul",{className:"space-y-0.5",children:M.map(e=>(0,o.jsx)("li",{children:(0,o.jsxs)("button",{onClick:()=>K(e.path),title:e.path,className:"flex w-full items-center justify-between gap-2 rounded px-2 py-1 text-left transition-colors hover:bg-white/[0.06]",children:[(0,o.jsx)("span",{className:"truncate text-[11px] text-foreground/90",children:e.label}),(0,o.jsxs)("span",{className:"shrink-0 text-[9px] text-teal-300/80",children:[e.count,"\xd7"]})]})},e.path))})})]})]}):(0,o.jsx)("div",{className:"flex h-screen w-full items-center justify-center text-sm text-muted-foreground",children:"Loading graph…"})}function N({label:e,paths:t,onPick:s}){return t.length?(0,o.jsxs)("div",{children:[(0,o.jsxs)("h3",{className:"mb-1 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:[e," (",t.length,")"]}),(0,o.jsx)("ul",{className:"space-y-0.5",children:t.map(e=>(0,o.jsx)("li",{children:(0,o.jsx)("button",{onClick:()=>s(e),title:e,className:"block w-full truncate rounded px-1.5 py-0.5 text-left font-mono text-[10px] text-muted-foreground transition-colors hover:bg-white/5 hover:text-foreground",children:e.slice(e.lastIndexOf("/")+1)})},e))})]}):null}},39454:(e,t,s)=>{Promise.resolve().then(s.bind(s,91588)),Promise.resolve().then(s.bind(s,15373)),Promise.resolve().then(s.bind(s,5712))}},e=>{e.O(0,[2574,3862,8500,4294,766,1202,7028,1317,8441,3794,7358],()=>e(e.s=39454)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5823],{15373:(e,t,s)=>{"use strict";s.d(t,{FilesMapClient:()=>w});var o=s(95155),r=s(12115),n=s(81750),l=s(6266),a=s(7679),i=s(98766),d=s(15629),c=s(79176),u=s(74371);s(53255);var p=s(18986),h=s(9005),x=s(25583),m=s(82099),f=s(62311);let b=/(^|\/)tests?\/|\.(test|spec)\.[jt]sx?$/i;var g=s(91337);let y={ts:"#3178c6",js:"#f7df1e",py:"#3776ab",go:"#00add8",rs:"#dea584",swift:"#f05138",java:"#b07219",ruby:"#cc342d",kotlin:"#a97bff",csharp:"#178600",php:"#4f5d95",cpp:"#f34b7d",c:"#555555"},j={file:function({data:e}){var t;let s=!!e.touched,r=e.recency??0,a=e.inDegree??0,i=10+.35*Math.min(a,20),d=s?Math.max(13+4*r,i):i,c={fontSize:`${d}px`,...s?{boxShadow:`0 0 ${6+Math.round(12*r)}px ${1+Math.round(3*r)}px rgba(45,212,191,${(.25+.5*r).toFixed(2)})`,zIndex:10}:{}},u=a>0?` \xb7 imported by ${a}`:"",p=s?`${e.tooltip} \xb7 edited ${e.count??0}\xd7 this session${u}`:e.untested?`${e.tooltip} \xb7 no test imports this file${u}`:`${e.tooltip}${u}`;return(0,o.jsxs)("div",{title:p,style:c,className:(0,g.cn)("relative rounded-md border bg-card/85 px-2 py-0.5 text-[10px] font-medium backdrop-blur transition-[font-size,box-shadow,border-color] duration-300",s?"border-teal-300/80 px-2.5 py-1 font-semibold text-foreground":e.untested?"border-amber-400/60 text-foreground/85":"border-white/10 text-foreground/85",e.isNewest&&"animate-touch-pulse"),children:[(0,o.jsx)(n.h7,{type:"target",position:l.yX.Top,isConnectable:!1,className:"!h-0 !w-0 !min-w-0 !border-0 !bg-transparent"}),e.untested&&(0,o.jsx)("span",{"aria-hidden":!0,className:"absolute -right-1 -top-1 size-1.5 rounded-full bg-amber-400 ring-2 ring-background"}),s&&(e.count??0)>0&&(0,o.jsx)("span",{"aria-hidden":!0,className:"absolute -left-1.5 -top-1.5 flex h-3 min-w-3 items-center justify-center rounded-full bg-teal-400 px-0.5 text-[7px] font-bold text-background ring-1 ring-background",children:e.count}),e.lang&&(0,o.jsx)("span",{"aria-hidden":!0,title:e.lang,className:"absolute -bottom-1 -right-1 size-1.5 rounded-full ring-1 ring-background",style:{backgroundColor:(t=e.lang)&&y[t]||"#9ca3af"}}),e.label,(0,o.jsx)(n.h7,{type:"source",position:l.yX.Bottom,isConnectable:!1,className:"!h-0 !w-0 !min-w-0 !border-0 !bg-transparent"})]})}};function w({files:e,edges:t,touched:s}){let l,y=(0,r.useMemo)(()=>{if(!e.some(e=>0===e.x&&0===e.y)){let t=new Map;for(let s of e)t.set(s.path,{x:s.x,y:s.y});return{positions:t,fresh:!1}}return{positions:function(e,t){let s=e.map(e=>{let t=0!==e.x||0!==e.y,s=e.path.includes("/")?e.path.split("/").pop():e.path;return{id:e.path,x:t?e.x:(Math.random()-.5)*600,y:t?e.y:(Math.random()-.5)*600,fx:t?e.x:void 0,fy:t?e.y:void 0,pinned:t,radius:Math.max(28,(6*s.length+24)/2+8)}}),o=t.filter(e=>e.from!==e.to).map(e=>({source:e.from,target:e.to})),r=(0,a.A)(s).force("link",(0,i.A)(o).id(e=>e.id).distance(130).strength(.45)).force("charge",(0,d.A)().strength(-380).distanceMax(1e3)).force("collide",(0,c.A)().radius(e=>e.radius).strength(1)).force("center",(0,u.A)(0,0).strength(.025)).stop();for(let e=0;e<500;e++)r.tick();let n=new Map;for(let e of s)n.set(e.id,{x:e.x??0,y:e.y??0});return n}(e,t),fresh:!0}},[e,t]),k=(0,r.useMemo)(()=>(function(e,t){var s;let o=new Set;for(let e of t)s=e.from,b.test(s)&&o.add(e.to);let r=new Set;for(let t of e)b.test(t)||o.has(t)||r.add(t);return r})(e.map(e=>e.path),t),[e,t]),v=(0,r.useMemo)(()=>{let e=new Map,t=Object.entries(s??{});if(!t.length)return e;let o=t.map(([,e])=>e.lastAt),r=Math.max(...o),n=Math.min(...o),l=r-n||1,a=t[0][0],i=t[0][1].lastAt;for(let[e,s]of t)s.lastAt>=i&&(a=e,i=s.lastAt);for(let[s,o]of t)e.set(s,{count:o.count,recency:(o.lastAt-n)/l,isNewest:s===a});return e},[s]),C=v.size>0,M=(0,r.useMemo)(()=>Array.from(v.entries()).map(([e,t])=>({path:e,label:e.slice(e.lastIndexOf("/")+1),count:t.count,recency:t.recency})).sort((e,t)=>t.recency-e.recency),[v]),S=(0,r.useMemo)(()=>e.map(e=>{let t=y.positions.get(e.path)??{x:e.x,y:e.y},s=e.path.lastIndexOf("/"),o=s>=0?e.path.slice(s+1):e.path,r=v.get(e.path);return{id:e.path,type:"file",position:t,data:{label:o,tooltip:e.path,untested:k.has(e.path),inDegree:e.inDegree??0,lang:e.lang??null,touched:!!r,count:r?.count??0,recency:r?.recency??0,isNewest:r?.isNewest??!1}}}),[e,y,k,v]),A=(0,r.useRef)(!1);(0,r.useEffect)(()=>{if(!y.fresh||A.current)return;A.current=!0;let t=e.filter(e=>0===e.x&&0===e.y).map(e=>{let t=y.positions.get(e.path);return t?{path:e.path,x:t.x,y:t.y}:null}).filter(e=>null!==e);t.length&&fetch("/api/code-graph/position",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({batch:t})})},[y,e]);let E=(0,r.useMemo)(()=>t.map(e=>({id:`${e.from}|${e.to}`,source:e.from,target:e.to,type:"straight",style:e.circular?{stroke:"#f87171",strokeDasharray:"5 3",strokeWidth:2}:{stroke:"#a1a1aa",strokeWidth:1.5,opacity:.85}})),[t]),[$,z]=(0,r.useState)(S),[O,I]=(0,r.useState)(E),[_,D]=(0,r.useState)(null),[P,R]=(0,r.useState)(null),[T,F]=(0,r.useState)(!1),[L,W]=(0,r.useState)(!1),[Z,B]=(0,r.useState)(!1),[H,U]=(0,r.useState)(!1),J=(0,r.useRef)(null),K=(0,r.useCallback)(e=>{D(e),R(null);let t=J.current?.getNode(e);t&&J.current&&J.current.setCenter(t.position.x+40,t.position.y+12,{zoom:1.4,duration:600})},[]),V=(0,r.useCallback)(()=>{D(null),R(null);let e=!L;if(W(e),B(e),e&&J.current){let e=Array.from(v.keys()).map(e=>({id:e}));e.length&&J.current.fitView({nodes:e,duration:600,padding:.4})}},[L,v]);(0,r.useEffect)(()=>U(!0),[]),(0,r.useEffect)(()=>z(S),[S]),(0,r.useEffect)(()=>I(E),[E]);let X=(0,r.useCallback)(e=>z(t=>(0,n._0)(e,t)),[]),G=(0,r.useCallback)(e=>I(t=>(0,n.zW)(e,t)),[]),q=(0,r.useCallback)((e,t,s)=>{fetch("/api/code-graph/position",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:e,x:t,y:s})})},[]),Q=(0,r.useMemo)(()=>new Set(t.filter(e=>e.circular).map(e=>`${e.from}|${e.to}`)),[t]),Y=(0,r.useMemo)(()=>{let e=new Set;for(let s of t)s.circular&&(e.add(s.from),e.add(s.to));return e},[t]),ee=(0,r.useMemo)(()=>{if(P){let e=O.find(e=>e.id===P);return e?new Set([e.source,e.target]):null}if(_){let e=new Set([_]);for(let s of t)s.from===_&&e.add(s.to),s.to===_&&e.add(s.from);return e}return T?Y:L&&C?new Set(v.keys()):null},[_,P,T,Y,t,O,L,C,v]),et=(0,r.useMemo)(()=>ee?$.map(e=>({...e,style:{...e.style,opacity:ee.has(e.id)?1:.15,transition:"opacity 120ms"}})):$,[$,ee]),es=(0,r.useMemo)(()=>_||P||T||L?O.map(e=>{let t=!1;return P?t=e.id===P:_?t=e.source===_||e.target===_:T?t=Q.has(e.id):L&&(t=v.has(e.source)&&v.has(e.target)),t?{...e,zIndex:20,style:{...e.style,opacity:1,strokeWidth:2}}:{...e,style:{...e.style,opacity:.05}}}):O,[O,_,P,T,Q,L,v]),eo=t.filter(e=>e.circular).length,er=(0,r.useMemo)(()=>_?t.filter(e=>e.from===_).map(e=>e.to):[],[_,t]),en=(0,r.useMemo)(()=>_?t.filter(e=>e.to===_).map(e=>e.from):[],[_,t]),el=null!==_||Z&&C,ea=(0,r.useCallback)(()=>{D(null),B(!1),W(!1)},[]);return H?(0,o.jsxs)("div",{className:"canvas-dots relative h-screen w-full",children:[(0,o.jsxs)(n.Gc,{nodes:et,edges:es,nodeTypes:j,onNodesChange:X,onEdgesChange:G,onNodeClick:(e,t)=>{D(t.id),R(null)},onEdgeClick:(e,t)=>{R(t.id),D(null)},onPaneClick:()=>{D(null),R(null)},onInit:e=>{J.current=e},onNodeDragStop:(e,t)=>q(t.id,t.position.x,t.position.y),deleteKeyCode:null,colorMode:"dark",fitView:!0,minZoom:.05,panOnScroll:!0,zoomActivationKeyCode:["Meta","Control"],proOptions:{hideAttribution:!0},children:[(0,o.jsx)(n.H2,{position:"bottom-right",className:"!overflow-hidden !rounded-xl !border !border-white/10 [&_button]:!border-white/10 [&_button]:!bg-card/70 [&_button]:!text-foreground [&_button]:!backdrop-blur"}),(0,o.jsx)(n.of,{pannable:!0,zoomable:!0,position:"bottom-left",style:{width:140,height:90},className:"!rounded-xl !border !border-white/10 !bg-card/50 !backdrop-blur",nodeColor:()=>"#555"}),(0,o.jsx)(n.Zk,{position:"top-center",className:"glass rounded-full px-1 py-0.5",children:(0,o.jsx)(f.Z,{active:"FILES",tabs:[{value:"ROADMAP",label:"Roadmap",href:"/map?view=ROADMAP"},{value:"ARCHITECTURE",label:"Architecture",href:"/map?view=ARCHITECTURE"},{value:"FILES",label:"Files",href:"/map?view=FILES"},{value:"DATABASE",label:"Database",href:"/map?view=DATABASE"}]})}),(0,o.jsxs)(n.Zk,{position:"top-right",className:"glass flex items-center gap-3 rounded-xl px-3 py-1.5 text-[11px]",children:[(0,o.jsxs)("span",{className:"text-muted-foreground",children:[e.length," files \xb7 ",t.length," imports"]}),eo>0&&(0,o.jsxs)("button",{type:"button",onClick:()=>{F(e=>!e),D(null),R(null)},title:T?"Show all imports":"Show only files involved in import cycles",className:(0,g.cn)("flex items-center gap-1.5 rounded-md px-1.5 py-0.5 transition-colors",T?"bg-red-500/15 text-red-200 ring-1 ring-red-400/40":"text-red-300 hover:bg-red-500/10"),children:[(0,o.jsx)("span",{"aria-hidden":!0,className:"inline-block h-0 w-5 border-t border-dashed",style:{borderColor:"#ef4444"}}),eo," circular"]}),C&&(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)("button",{type:"button",onClick:V,title:L?"Show all files again":"Focus + zoom to the files edited this session",className:(0,g.cn)("flex items-center gap-1.5 rounded-md px-1.5 py-0.5 transition-colors",L?"bg-teal-500/15 text-teal-200 ring-1 ring-teal-400/40":"text-teal-300 hover:bg-teal-500/10"),children:[(0,o.jsx)(p.A,{className:"size-3"}),v.size," edited"]})})]})]}),el&&(0,o.jsxs)(m.b,{className:"absolute bottom-3 right-3 top-16 z-10 flex w-72 flex-col rounded-2xl",children:[(0,o.jsxs)("div",{className:"flex items-center justify-between border-b border-white/10 px-3.5 py-2.5",children:[(0,o.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-wide text-muted-foreground",children:_?"File":"Edited this session"}),(0,o.jsx)("button",{onClick:ea,title:"Close panel",className:"rounded-md p-1 text-muted-foreground transition-colors hover:bg-white/10 hover:text-foreground",children:(0,o.jsx)(h.A,{className:"size-4"})})]}),(0,o.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto p-3",children:_?(0,o.jsxs)("div",{className:"space-y-3",children:[(0,o.jsxs)("div",{children:[(0,o.jsxs)("div",{className:"flex items-start gap-1.5",children:[(0,o.jsx)(x.A,{className:"mt-0.5 size-4 shrink-0 text-muted-foreground"}),(0,o.jsx)("h2",{className:"break-all text-sm font-semibold leading-tight",children:_.slice(_.lastIndexOf("/")+1)})]}),(0,o.jsx)("div",{className:"mt-0.5 break-all font-mono text-[10px] text-muted-foreground",children:_})]}),(0,o.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(l=v.get(_))?(0,o.jsxs)("span",{className:"rounded bg-teal-500/15 px-1.5 py-0.5 text-[10px] font-semibold text-teal-300",children:["edited ",l.count,"\xd7"]}):null,k.has(_)&&(0,o.jsx)("span",{className:"rounded bg-amber-500/15 px-1.5 py-0.5 text-[10px] font-semibold text-amber-300",children:"untested"})]}),(0,o.jsx)("button",{onClick:()=>fetch(`/api/open?path=${encodeURIComponent(_)}`).catch(()=>{}),className:"w-full rounded-md border border-white/10 px-2 py-1.5 text-[11px] text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:"Open in editor"}),(0,o.jsx)(N,{label:"Imports",paths:er,onPick:K}),(0,o.jsx)(N,{label:"Imported by",paths:en,onPick:K})]}):(0,o.jsx)("ul",{className:"space-y-0.5",children:M.map(e=>(0,o.jsx)("li",{children:(0,o.jsxs)("button",{onClick:()=>K(e.path),title:e.path,className:"flex w-full items-center justify-between gap-2 rounded px-2 py-1 text-left transition-colors hover:bg-white/[0.06]",children:[(0,o.jsx)("span",{className:"truncate text-[11px] text-foreground/90",children:e.label}),(0,o.jsxs)("span",{className:"shrink-0 text-[9px] text-teal-300/80",children:[e.count,"\xd7"]})]})},e.path))})})]})]}):(0,o.jsx)("div",{className:"flex h-screen w-full items-center justify-center text-sm text-muted-foreground",children:"Loading graph…"})}function N({label:e,paths:t,onPick:s}){return t.length?(0,o.jsxs)("div",{children:[(0,o.jsxs)("h3",{className:"mb-1 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:[e," (",t.length,")"]}),(0,o.jsx)("ul",{className:"space-y-0.5",children:t.map(e=>(0,o.jsx)("li",{children:(0,o.jsx)("button",{onClick:()=>s(e),title:e,className:"block w-full truncate rounded px-1.5 py-0.5 text-left font-mono text-[10px] text-muted-foreground transition-colors hover:bg-white/5 hover:text-foreground",children:e.slice(e.lastIndexOf("/")+1)})},e))})]}):null}},24791:(e,t,s)=>{Promise.resolve().then(s.bind(s,91588)),Promise.resolve().then(s.bind(s,15373)),Promise.resolve().then(s.bind(s,61643))}},e=>{e.O(0,[2574,3862,8500,4294,766,1202,7028,2110,8441,3794,7358],()=>e(e.s=24791)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8974],{30772:(e,s,a)=>{"use strict";a.d(s,{A:()=>i});var l=a(12115),t=a(30907);let n=e=>{let s=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,s,a)=>a?a.toUpperCase():s.toLowerCase());return s.charAt(0).toUpperCase()+s.slice(1)};var r=a(71265);let i=(e,s)=>{let a=(0,l.forwardRef)(({className:a,...i},c)=>(0,l.createElement)(r.default,{ref:c,iconNode:s,className:(0,t.z)(`lucide-${n(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,a),...i}));return a.displayName=n(e),a}},30907:(e,s,a)=>{"use strict";a.d(s,{z:()=>l});let l=(...e)=>e.filter((e,s,a)=>!!e&&""!==e.trim()&&a.indexOf(e)===s).join(" ").trim()},31698:(e,s,a)=>{"use strict";a.d(s,{Landing:()=>N});var l=a(95155),t=a(12115),n=a(98500),r=a.n(n),i=a(81499),c=a(51128),d=a(86272),o=a(64577),m=a(32133),h=a(65738),x=a(99314),p=a(52965),u=a(39593);a(93340);let j=u.EO;function w({d:e,color:s}){return(0,l.jsx)("svg",{width:15,height:15,viewBox:"0 0 24 24",fill:s??"currentColor","aria-hidden":!0,children:(0,l.jsx)("path",{d:e})})}let f=[{n:"01",title:"Propose",body:(0,l.jsxs)(l.Fragment,{children:["Ask the session in your terminal to plan a feature. It calls"," ",(0,l.jsx)("span",{className:"w-mono text-foreground",children:"beacon_propose_plan"})," and blocks until you decide. No fire-and-forget."]}),code:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"w-signal",children:"›"})," plan: magic-link sign-in"]})},{n:"02",title:"Review",body:"The plan renders as feature nodes, tables, and endpoints. Select any passage to annotate it, mark it for deletion, or edit the boards directly.",code:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"text-foreground",children:"/plan"})," \xb7 2 features \xb7 1 table"]})},{n:"03",title:"Verdict",body:"Approve persists the drafts. Feedback sends your notes back and the agent re-plans. Discard throws it away. Every plan is archived either way.",code:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{style:{color:"#6ee7b7"},children:"✓ approved"})," \xb7 drafts persisted"]})}],b=[{route:"/plan",title:"Review",body:"Split screen: the proposal on the left, live canvases on the right. Every plan archived with your decision and a snapshot of the moment."},{route:"/map",title:"Roadmap",body:"Features, sub-tasks, and dependencies as a graph. Duplicate features get blocked before they exist."},{route:"/db",title:"Database",body:"Proposed tables and endpoints land as drafts, diffed against your live schema: new, changed, or untouched."}],y=[{label:"Reuse first",body:"Beacon blocks duplicate features. Check the map before you create."},{label:"Design data first",body:(0,l.jsxs)(l.Fragment,{children:["Tables and endpoints before code. Review the schema as a draft on"," ",(0,l.jsx)("span",{className:"text-foreground",children:"/db"}),"."]})},{label:"Close every loop",body:"Register finished work so the map stays accurate next session."}];function g(){let e=(0,t.useRef)(null),[s,a]=(0,t.useState)(1);return(0,t.useEffect)(()=>{let s=e.current;if(!s)return;let l=new ResizeObserver(()=>a(Math.min(1,s.clientWidth/620)));return l.observe(s),()=>l.disconnect()},[]),(0,l.jsxs)("div",{className:"bm-window glass",children:[(0,l.jsxs)("div",{className:"bm-tabs",children:[(0,l.jsx)("span",{className:"h-3 w-3 rounded-full",style:{background:"#ff7a45",boxShadow:"0 0 7px rgba(255,122,69,.7)"}}),(0,l.jsx)("span",{className:"h-3 w-3 rounded-full",style:{background:"oklch(1 0 0 / .16)"}}),(0,l.jsx)("span",{className:"h-3 w-3 rounded-full",style:{background:"oklch(1 0 0 / .16)"}}),(0,l.jsx)("span",{className:"bm-tab active ml-2",children:"Roadmap"}),(0,l.jsx)("span",{className:"bm-tab",children:"Database"}),(0,l.jsx)("span",{className:"w-mono ml-auto hidden text-[0.66rem] w-muted min-[400px]:block",children:"/plan \xb7 review"})]}),(0,l.jsx)("div",{className:"bm-canvas",ref:e,style:{aspectRatio:"620 / 392"},children:(0,l.jsxs)("div",{className:"bm-stage",style:{width:620,height:392,transform:`scale(${s})`},children:[(0,l.jsxs)("svg",{className:"bm-edges",width:620,height:392,viewBox:"0 0 620 392","aria-hidden":!0,children:[(0,l.jsx)("path",{className:"bm-edge",style:{animationDelay:"1s"},pathLength:1,d:"M 135 111 C 135 148 165 168 165 210"}),(0,l.jsx)("path",{className:"bm-edge",style:{animationDelay:"1.15s"},pathLength:1,d:"M 244 78 C 300 78 320 150 374 150"}),(0,l.jsx)("path",{className:"bm-edge bm-edge-tail",style:{animationDelay:"1.7s"},pathLength:1,d:"M 596 205 C 596 230 576 242 558 252"})]}),(0,l.jsxs)("div",{className:"bm-node bm-node-draft",style:{left:26,top:38,width:218,animationDelay:".45s"},children:[(0,l.jsx)("div",{className:"bm-title",children:"Magic-link sign-in"}),(0,l.jsx)("div",{className:"bm-role",children:"Email a one-time link, no passwords"}),(0,l.jsxs)("div",{className:"bm-chiprow",children:[(0,l.jsx)("span",{className:"chip chip-sky",children:"feature"}),(0,l.jsx)("span",{className:"chip chip-violet",children:"auth"}),(0,l.jsx)("span",{className:"chip chip-amber",style:{marginLeft:"auto"},children:"Pending"})]})]}),(0,l.jsxs)("div",{className:"bm-node bm-node-draft",style:{left:70,top:210,width:190,animationDelay:".75s"},children:[(0,l.jsx)("div",{className:"bm-title",children:"Issue + verify token"}),(0,l.jsxs)("div",{className:"bm-chiprow",children:[(0,l.jsx)("span",{className:"chip chip-zinc",children:"sub-task"}),(0,l.jsx)("span",{className:"chip chip-amber",style:{marginLeft:"auto"},children:"Pending"})]})]}),(0,l.jsxs)("div",{className:"bm-table",style:{left:374,top:96,width:222,animationDelay:".6s"},children:[(0,l.jsxs)("div",{className:"bm-table-head",children:[(0,l.jsx)("span",{children:"auth_tokens"}),(0,l.jsx)("span",{className:"chip chip-green",children:"new"})]}),(0,l.jsxs)("div",{className:"bm-trow",children:[(0,l.jsx)(i.A,{size:9,style:{color:"#fde68a"}}),(0,l.jsx)("span",{children:"id"}),(0,l.jsx)("span",{className:"t",children:"uuid"})]}),(0,l.jsxs)("div",{className:"bm-trow",children:[(0,l.jsx)("span",{style:{width:9}}),(0,l.jsx)("span",{children:"token_hash"}),(0,l.jsx)("span",{className:"t",children:"text"})]}),(0,l.jsxs)("div",{className:"bm-trow",children:[(0,l.jsx)(c.A,{size:9,style:{color:"#7dd3fc"}}),(0,l.jsx)("span",{children:"user_id"}),(0,l.jsx)("span",{className:"t",children:"→ users"})]}),(0,l.jsxs)("div",{className:"bm-trow",children:[(0,l.jsx)("span",{style:{width:9}}),(0,l.jsx)("span",{children:"expires_at"}),(0,l.jsx)("span",{className:"t",children:"timestamp"})]})]}),(0,l.jsx)("span",{className:"bm-dot",style:{left:135,top:111,animationDelay:"1s"}}),(0,l.jsx)("span",{className:"bm-dot",style:{left:165,top:210,animationDelay:"1.3s"}}),(0,l.jsx)("span",{className:"bm-dot",style:{left:244,top:78,animationDelay:"1.15s"}}),(0,l.jsx)("span",{className:"bm-dot",style:{left:374,top:150,animationDelay:"1.45s"}}),(0,l.jsx)("span",{className:"bm-pin",style:{left:596,top:201,animationDelay:"1.55s"},children:"1"}),(0,l.jsxs)("div",{className:"bm-bubble",style:{left:356,top:252,width:226,animationDelay:"1.85s"},children:[(0,l.jsx)("div",{className:"lab",children:"annotation \xb7 you"}),(0,l.jsx)("div",{className:"txt",children:"Expire links after 15 min, not 24 h."})]}),(0,l.jsxs)("div",{className:"bm-bar",style:{animationDelay:"2.15s"},children:[(0,l.jsx)(d.A,{size:11,style:{color:"#6ee7b7"}}),(0,l.jsx)("span",{className:"ready",children:"plan ready \xb7 waiting for your verdict"}),(0,l.jsxs)("span",{className:"bm-btn bm-btn-approve",children:[(0,l.jsx)(o.A,{size:10})," Approve"]}),(0,l.jsxs)("span",{className:"bm-btn bm-btn-ghost",children:[(0,l.jsx)(m.A,{size:10})," Feedback"]}),(0,l.jsxs)("span",{className:"bm-btn bm-btn-ghost",children:[(0,l.jsx)(h.A,{size:10})," Discard"]})]})]})})]})}function N(){let e=(0,t.useRef)(null),[s,a]=(0,t.useState)(null);(0,t.useEffect)(()=>{let s=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&(e.target.classList.add("in"),s.unobserve(e.target))})},{threshold:.12});return e.current?.querySelectorAll(".w-reveal").forEach(e=>s.observe(e)),()=>s.disconnect()},[]);let n=e=>(0,l.jsx)("button",{onClick:()=>{navigator.clipboard?.writeText(j),a(e),setTimeout(()=>a(null),1600)},className:"glass-soft w-hover grid h-8 w-8 shrink-0 place-items-center rounded-md","aria-label":"Copy install command",children:s===e?(0,l.jsx)(o.A,{size:13,style:{color:"#ff7a45"}}):(0,l.jsx)(x.A,{size:13,className:"w-muted"})});return(0,l.jsxs)("div",{className:"welcome",ref:e,children:[(0,l.jsx)("div",{className:"welcome-bg","aria-hidden":!0}),(0,l.jsx)("header",{className:"fixed inset-x-0 top-0 z-50",children:(0,l.jsx)("div",{className:"mx-auto max-w-6xl px-6",children:(0,l.jsxs)("div",{className:"w-load mt-4 glass flex items-center justify-between rounded-full py-2.5 pl-5 pr-3",style:{animationDelay:".05s"},children:[(0,l.jsxs)(r(),{href:"#top",className:"flex items-center gap-2.5",children:[(0,l.jsx)(p._,{size:20,className:"text-foreground"}),(0,l.jsx)("span",{className:"font-semibold tracking-tight",children:"Beacon"})]}),(0,l.jsxs)("nav",{className:"flex items-center gap-6 text-sm w-muted",children:[(0,l.jsx)("a",{href:"#how",className:"transition-colors hover:text-foreground",children:"The loop"}),(0,l.jsx)("a",{href:"#quickstart",className:"hidden transition-colors hover:text-foreground sm:block",children:"Quickstart"}),(0,l.jsx)("a",{href:"/docs",className:"transition-colors hover:text-foreground",children:"Docs"})]})]})})}),(0,l.jsx)("span",{id:"top"}),(0,l.jsxs)("section",{className:"px-6 pb-16 pt-20 md:pt-24",children:[(0,l.jsxs)("div",{className:"mx-auto grid max-w-6xl items-center gap-12 lg:grid-cols-[1fr_1.1fr]",children:[(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("div",{className:"w-load glass-soft mb-6 inline-flex items-center gap-2 rounded-full px-3.5 py-1.5",style:{animationDelay:".12s"},children:[(0,l.jsx)("span",{className:"w-live h-1.5 w-1.5 rounded-full",style:{background:"#ff7a45",boxShadow:"0 0 8px #ff7a45"}}),(0,l.jsx)("span",{className:"w-mono w-eyebrow w-muted",children:"Local \xb7 no account \xb7 no API key"})]}),(0,l.jsxs)("h1",{className:"w-load font-semibold text-[clamp(2.2rem,4.6vw,3.4rem)]",style:{letterSpacing:"-0.025em",lineHeight:1.06,animationDelay:".18s"},children:["Give your coding agent ",(0,l.jsx)("span",{className:"w-signal",children:"eyes"})," and hands."]}),(0,l.jsx)("p",{className:"w-load w-muted mt-5 max-w-md text-[1.02rem] leading-relaxed",style:{animationDelay:".26s"},children:"The session in your terminal is the brain. Beacon is where its plans become visible: features, tables, and endpoints on a canvas you annotate, edit, and approve with one click."}),(0,l.jsxs)("div",{className:"w-load mt-8",style:{animationDelay:".34s"},children:[(0,l.jsxs)("div",{className:"glass flex max-w-lg items-center gap-3 rounded-lg py-2.5 pl-4 pr-2",children:[(0,l.jsxs)("code",{className:"w-mono w-scrollbar-none min-w-0 flex-1 overflow-x-auto whitespace-nowrap text-[0.85rem]",children:[(0,l.jsx)("span",{className:"w-signal select-none",children:"$"}),(0,l.jsx)("span",{className:"ml-2",children:j}),(0,l.jsx)("span",{className:"w-caret ml-1 inline-block h-3.5 w-1.5 align-middle",style:{background:"#ff7a45"}})]}),n("hero")]}),(0,l.jsxs)("p",{className:"w-mono w-muted mt-3 text-[0.78rem]",children:["then run ",(0,l.jsx)("span",{className:"text-foreground",children:"beacon"})," inside any repo"]})]}),(0,l.jsxs)("div",{className:"w-load mt-9 flex flex-wrap items-center gap-x-5 gap-y-2",style:{animationDelay:".42s"},children:[(0,l.jsx)("span",{className:"w-mono w-eyebrow w-muted",children:"Works with"}),(0,l.jsxs)("span",{className:"flex items-center gap-2 text-sm text-foreground/90",children:[(0,l.jsx)(w,{d:"m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z",color:"#D97757"})," Claude Code"]}),(0,l.jsxs)("span",{className:"flex items-center gap-2 text-sm text-foreground/90",children:[(0,l.jsx)(w,{d:"M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z"})," Codex"]})]})]}),(0,l.jsx)("div",{className:"w-load min-w-0",style:{animationDelay:".3s"},children:(0,l.jsx)(g,{})})]}),(0,l.jsxs)("a",{href:"#how",className:"w-load mx-auto mt-12 flex w-fit flex-col items-center gap-2 w-muted transition-colors hover:text-foreground md:mt-20",style:{animationDelay:".6s"},children:[(0,l.jsx)("span",{className:"w-mono w-eyebrow",children:"The loop"}),(0,l.jsx)("svg",{className:"w-cue",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,l.jsx)("path",{d:"m6 9 6 6 6-6"})})]})]}),(0,l.jsx)("section",{id:"how",className:"px-6 py-16 md:py-24",children:(0,l.jsxs)("div",{className:"mx-auto max-w-5xl",children:[(0,l.jsxs)("div",{className:"w-reveal mb-14 text-center",children:[(0,l.jsx)("p",{className:"w-mono w-eyebrow w-signal mb-4",children:"The loop"}),(0,l.jsx)("h2",{className:"text-[clamp(1.9rem,4vw,2.75rem)] font-semibold tracking-tight",children:"Propose. Review. Verdict. Repeat."}),(0,l.jsx)("div",{className:"w-accent-line mx-auto mt-6 h-px w-40"})]}),(0,l.jsx)("div",{className:"grid gap-10 md:grid-cols-3",children:f.map(e=>(0,l.jsxs)("div",{className:"loop-card w-reveal glass w-hover rounded-lg p-6",children:[(0,l.jsx)("p",{className:"w-mono w-eyebrow w-signal mb-3",children:e.n}),(0,l.jsx)("h3",{className:"mb-2 font-semibold",children:e.title}),(0,l.jsx)("p",{className:"w-muted mb-4 text-[0.92rem] leading-relaxed",children:e.body}),(0,l.jsx)("code",{className:"w-mono glass-soft inline-block rounded-md px-3 py-1.5 text-[0.74rem]",children:e.code})]},e.n))}),(0,l.jsxs)("p",{className:"w-reveal w-mono w-muted mt-10 text-center text-[0.78rem]",children:["feedback sends the agent back to ",(0,l.jsx)("span",{className:"w-signal",children:"01"})," \xb7 approval persists the drafts"]})]})}),(0,l.jsx)("section",{className:"px-6 py-12",children:(0,l.jsxs)("div",{className:"mx-auto max-w-5xl",children:[(0,l.jsxs)("div",{className:"w-reveal mb-12 text-center",children:[(0,l.jsx)("p",{className:"w-mono w-eyebrow w-signal mb-4",children:"The surfaces"}),(0,l.jsx)("h2",{className:"text-[clamp(1.6rem,3.4vw,2.25rem)] font-semibold tracking-tight",children:"Everything the agent plans, drawn"})]}),(0,l.jsx)("div",{className:"grid gap-5 md:grid-cols-3",children:b.map(e=>(0,l.jsxs)("div",{className:"w-reveal glass w-hover rounded-lg p-6",children:[(0,l.jsx)("p",{className:"w-mono mb-1 text-[0.82rem] font-semibold w-signal",children:e.route}),(0,l.jsx)("h3",{className:"mb-2 font-semibold",children:e.title}),(0,l.jsx)("p",{className:"w-muted text-[0.92rem] leading-relaxed",children:e.body})]},e.route))})]})}),(0,l.jsxs)("section",{id:"quickstart",className:"px-6 py-16 md:py-24",children:[(0,l.jsxs)("div",{className:"mx-auto max-w-3xl",children:[(0,l.jsxs)("div",{className:"w-reveal mb-12 text-center",children:[(0,l.jsx)("p",{className:"w-mono w-eyebrow w-signal mb-4",children:"Quickstart"}),(0,l.jsx)("h2",{className:"text-[clamp(1.6rem,3.4vw,2.25rem)] font-semibold tracking-tight",children:"Five lines to your first approved plan"})]}),(0,l.jsxs)("div",{className:"w-reveal glass overflow-hidden rounded-lg",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 border-b px-4 py-3",style:{borderColor:"var(--border)"},children:[(0,l.jsx)("span",{className:"h-3 w-3 rounded-full",style:{background:"#ff7a45",boxShadow:"0 0 7px rgba(255,122,69,.7)"}}),(0,l.jsx)("span",{className:"h-3 w-3 rounded-full",style:{background:"oklch(1 0 0 / .16)"}}),(0,l.jsx)("span",{className:"h-3 w-3 rounded-full",style:{background:"oklch(1 0 0 / .16)"}}),(0,l.jsx)("span",{className:"w-mono ml-2 text-[0.72rem] w-muted",children:"your-repo — terminal"})]}),(0,l.jsxs)("div",{className:"px-5 py-4",children:[(0,l.jsxs)("div",{className:"ql",children:[(0,l.jsxs)("code",{className:"cmd w-scrollbar-none",children:[(0,l.jsx)("span",{className:"w-signal select-none",children:"$ "}),j]}),(0,l.jsx)("span",{className:"note",children:"01 \xb7 one binary, no account"}),n("qs")]}),(0,l.jsxs)("div",{className:"ql",children:[(0,l.jsxs)("code",{className:"cmd",children:[(0,l.jsx)("span",{className:"w-signal select-none",children:"$ "}),"cd your-repo && beacon"]}),(0,l.jsx)("span",{className:"note",children:"02 \xb7 registers the repo, opens the panel"})]}),(0,l.jsxs)("div",{className:"ql",children:[(0,l.jsxs)("code",{className:"cmd",children:[(0,l.jsx)("span",{className:"w-signal select-none",children:"› "}),"/beacon-init"]}),(0,l.jsx)("span",{className:"note",children:"03 \xb7 maps architecture, schema, roadmap"})]}),(0,l.jsxs)("div",{className:"ql",children:[(0,l.jsxs)("code",{className:"cmd",children:[(0,l.jsx)("span",{className:"w-signal select-none",children:"› "}),"plan: magic-link sign-in"]}),(0,l.jsx)("span",{className:"note",children:"04 \xb7 the plan streams onto /plan"})]}),(0,l.jsxs)("div",{className:"ql",children:[(0,l.jsxs)("code",{className:"cmd",children:[(0,l.jsxs)("span",{className:"select-none",style:{color:"#6ee7b7"},children:["✓"," "]}),"approve \xb7 feedback \xb7 discard"]}),(0,l.jsx)("span",{className:"note",children:"05 \xb7 the verdict returns to your session"})]})]})]})]}),(0,l.jsx)("div",{className:"mx-auto mt-16 max-w-5xl",children:(0,l.jsx)("div",{className:"w-reveal glass grid overflow-hidden rounded-lg md:grid-cols-3 md:divide-x md:divide-y-0 divide-y",style:{borderColor:"var(--border)"},children:y.map(e=>(0,l.jsxs)("div",{className:"p-6",style:{borderColor:"oklch(1 0 0 / 0.07)"},children:[(0,l.jsx)("p",{className:"w-mono w-eyebrow w-signal mb-2.5",children:e.label}),(0,l.jsx)("p",{className:"w-muted text-[0.9rem] leading-relaxed",children:e.body})]},e.label))})})]}),(0,l.jsx)("footer",{className:"px-6 pb-12 pt-8",children:(0,l.jsxs)("div",{className:"mx-auto max-w-5xl",children:[(0,l.jsx)("div",{className:"w-accent-line mb-8 h-px w-full opacity-60"}),(0,l.jsxs)("div",{className:"flex flex-col items-center justify-between gap-5 md:flex-row",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,l.jsx)(p._,{size:26,className:"text-foreground"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"font-semibold leading-tight",children:"Beacon"}),(0,l.jsx)("p",{className:"w-mono w-muted text-[0.72rem]",children:"the visual planning surface for your terminal"})]})]}),(0,l.jsxs)("nav",{className:"flex items-center gap-6 text-sm w-muted",children:[(0,l.jsx)("a",{href:"/docs",className:"transition-colors hover:text-foreground",children:"Docs"}),(0,l.jsx)("a",{href:"#",className:"transition-colors hover:text-foreground",children:"Changelog"})]}),(0,l.jsxs)("p",{className:"w-mono w-muted text-[0.72rem]",children:["Created by"," ",(0,l.jsxs)("a",{href:"https://www.instagram.com/wenzorithelly/",target:"_blank",rel:"noreferrer",className:"w-signal inline-flex items-center gap-1 underline decoration-dotted underline-offset-2 transition-opacity hover:opacity-80",children:[(0,l.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[(0,l.jsx)("rect",{x:"2",y:"2",width:"20",height:"20",rx:"5",ry:"5"}),(0,l.jsx)("path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z"}),(0,l.jsx)("line",{x1:"17.5",y1:"6.5",x2:"17.51",y2:"6.5"})]}),"Wenzo"]}),(0,l.jsx)("span",{className:"mx-2 opacity-40",children:"\xb7"}),"\xa9 2026 Beacon"]})]})]})})]})}},32133:(e,s,a)=>{"use strict";a.d(s,{A:()=>l});let l=(0,a(30772).A)("message-square-plus",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M12 8v6",key:"1ib9pf"}],["path",{d:"M9 11h6",key:"1fldmi"}]])},39593:(e,s,a)=>{"use strict";a.d(s,{EO:()=>r,S2:()=>t,W6:()=>n});var l=a(41463);let t="https://api.github.com/repos/wenzorithelly/beacon/releases/latest",n=(l.env.NEXT_PUBLIC_BEACON_SITE_URL??"https://www.trybeacon.sh").replace(/\/$/,""),r=`curl -fsSL ${n}/install.sh | sh`},50814:(e,s,a)=>{Promise.resolve().then(a.bind(a,31698))},51128:(e,s,a)=>{"use strict";a.d(s,{A:()=>l});let l=(0,a(30772).A)("link-2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]])},52965:(e,s,a)=>{"use strict";a.d(s,{_:()=>t});var l=a(95155);function t({size:e=18,className:s}){return(0,l.jsxs)("svg",{width:e,height:e,viewBox:"11 1.5 74 74",fill:"none",className:s,"aria-hidden":"true",children:[(0,l.jsx)("defs",{children:(0,l.jsxs)("linearGradient",{id:"beacon-mark-beam",x1:"0",y1:"1",x2:"0",y2:"0",children:[(0,l.jsx)("stop",{offset:"0",stopColor:"#ffb27a",stopOpacity:"0.9"}),(0,l.jsx)("stop",{offset:"0.55",stopColor:"#ff7a45",stopOpacity:"0.3"}),(0,l.jsx)("stop",{offset:"1",stopColor:"#ff7a45",stopOpacity:"0"})]})}),(0,l.jsx)("path",{d:"M48 30 L40 4 L56 4 Z",fill:"url(#beacon-mark-beam)"}),(0,l.jsx)("path",{d:"M48 33 L72.5 73 L23.5 73 Z",fill:"currentColor",stroke:"currentColor",strokeWidth:2.4,strokeLinejoin:"round"}),(0,l.jsx)("circle",{cx:"48",cy:"31",r:"5.2",fill:"var(--accent-2, #ff7a45)",style:{filter:"drop-shadow(0 0 4px var(--accent-2, #ff7a45))"}}),(0,l.jsx)("circle",{cx:"48",cy:"31",r:"2",fill:"#ffd9c2"})]})}},64577:(e,s,a)=>{"use strict";a.d(s,{A:()=>l});let l=(0,a(30772).A)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},65738:(e,s,a)=>{"use strict";a.d(s,{A:()=>l});let l=(0,a(30772).A)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]])},71265:(e,s,a)=>{"use strict";a.d(s,{default:()=>i});var l=a(12115),t={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},n=a(30907);let r=(0,l.createContext)({}),i=(0,l.forwardRef)(({color:e,size:s,strokeWidth:a,absoluteStrokeWidth:i,className:c="",children:d,iconNode:o,...m},h)=>{let{size:x=24,strokeWidth:p=2,absoluteStrokeWidth:u=!1,color:j="currentColor",className:w=""}=(0,l.useContext)(r)??{},f=i??u?24*Number(a??p)/Number(s??x):a??p;return(0,l.createElement)("svg",{ref:h,...t,width:s??x??t.width,height:s??x??t.height,stroke:e??j,strokeWidth:f,className:(0,n.z)("lucide",w,c),...!d&&!(e=>{for(let s in e)if(s.startsWith("aria-")||"role"===s||"title"===s)return!0;return!1})(m)&&{"aria-hidden":"true"},...m},[...o.map(([e,s])=>(0,l.createElement)(e,s)),...Array.isArray(d)?d:[d]])})},81499:(e,s,a)=>{"use strict";a.d(s,{A:()=>l});let l=(0,a(30772).A)("key-round",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]])},86272:(e,s,a)=>{"use strict";a.d(s,{A:()=>l});let l=(0,a(30772).A)("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]])},93340:()=>{},99314:(e,s,a)=>{"use strict";a.d(s,{A:()=>l});let l=(0,a(30772).A)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])}},e=>{e.O(0,[1477,8500,8441,3794,7358],()=>e(e.s=50814)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8974],{30772:(e,s,a)=>{"use strict";a.d(s,{A:()=>i});var l=a(12115),t=a(30907);let n=e=>{let s=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,s,a)=>a?a.toUpperCase():s.toLowerCase());return s.charAt(0).toUpperCase()+s.slice(1)};var r=a(71265);let i=(e,s)=>{let a=(0,l.forwardRef)(({className:a,...i},c)=>(0,l.createElement)(r.default,{ref:c,iconNode:s,className:(0,t.z)(`lucide-${n(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,a),...i}));return a.displayName=n(e),a}},30907:(e,s,a)=>{"use strict";a.d(s,{z:()=>l});let l=(...e)=>e.filter((e,s,a)=>!!e&&""!==e.trim()&&a.indexOf(e)===s).join(" ").trim()},31698:(e,s,a)=>{"use strict";a.d(s,{Landing:()=>N});var l=a(95155),t=a(12115),n=a(98500),r=a.n(n),i=a(81499),c=a(51128),d=a(86272),o=a(64577),m=a(32133),h=a(65738),x=a(99314),p=a(52965),j=a(39593);a(93340);let u=j.EO;function w({d:e,color:s}){return(0,l.jsx)("svg",{width:15,height:15,viewBox:"0 0 24 24",fill:s??"currentColor","aria-hidden":!0,children:(0,l.jsx)("path",{d:e})})}let f=[{n:"01",title:"Propose",body:(0,l.jsxs)(l.Fragment,{children:["Ask the session in your terminal to plan a feature. It calls"," ",(0,l.jsx)("span",{className:"w-mono text-foreground",children:"beacon_propose_plan"})," and blocks until you decide. No fire-and-forget."]}),code:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"w-signal",children:"›"})," plan: magic-link sign-in"]})},{n:"02",title:"Review",body:"The plan renders as feature nodes, tables, and endpoints. Select any passage to annotate it, mark it for deletion, or edit the boards directly.",code:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"text-foreground",children:"/plan"})," \xb7 2 features \xb7 1 table"]})},{n:"03",title:"Verdict",body:"Approve persists the drafts. Feedback sends your notes back and the agent re-plans. Discard throws it away. Every plan is archived either way.",code:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{style:{color:"#6ee7b7"},children:"✓ approved"})," \xb7 drafts persisted"]})}],b=[{route:"/plan",title:"Review",body:"Split screen: the proposal on the left, live canvases on the right. Every plan archived with your decision and a snapshot of the moment."},{route:"/map",title:"Roadmap",body:"Features, sub-tasks, and dependencies as a graph. Duplicate features get blocked before they exist."},{route:"/db",title:"Database",body:"Proposed tables and endpoints land as drafts, diffed against your live schema: new, changed, or untouched."}],y=[{label:"Reuse first",body:"Beacon blocks duplicate features. Check the map before you create."},{label:"Design data first",body:(0,l.jsxs)(l.Fragment,{children:["Tables and endpoints before code. Review the schema as a draft on"," ",(0,l.jsx)("span",{className:"text-foreground",children:"/db"}),"."]})},{label:"Close every loop",body:"Register finished work so the map stays accurate next session."}];function g(){let e=(0,t.useRef)(null),[s,a]=(0,t.useState)(1);return(0,t.useEffect)(()=>{let s=e.current;if(!s)return;let l=new ResizeObserver(()=>a(Math.min(1,s.clientWidth/620)));return l.observe(s),()=>l.disconnect()},[]),(0,l.jsxs)("div",{className:"bm-window glass",children:[(0,l.jsxs)("div",{className:"bm-tabs",children:[(0,l.jsx)("span",{className:"h-3 w-3 rounded-full",style:{background:"#ff7a45",boxShadow:"0 0 7px rgba(255,122,69,.7)"}}),(0,l.jsx)("span",{className:"h-3 w-3 rounded-full",style:{background:"oklch(1 0 0 / .16)"}}),(0,l.jsx)("span",{className:"h-3 w-3 rounded-full",style:{background:"oklch(1 0 0 / .16)"}}),(0,l.jsx)("span",{className:"bm-tab active ml-2",children:"Roadmap"}),(0,l.jsx)("span",{className:"bm-tab",children:"Database"}),(0,l.jsx)("span",{className:"w-mono ml-auto hidden text-[0.66rem] w-muted min-[400px]:block",children:"/plan \xb7 review"})]}),(0,l.jsx)("div",{className:"bm-canvas",ref:e,style:{aspectRatio:"620 / 392"},children:(0,l.jsxs)("div",{className:"bm-stage",style:{width:620,height:392,transform:`scale(${s})`},children:[(0,l.jsxs)("svg",{className:"bm-edges",width:620,height:392,viewBox:"0 0 620 392","aria-hidden":!0,children:[(0,l.jsx)("path",{className:"bm-edge",style:{animationDelay:"1s"},pathLength:1,d:"M 135 111 C 135 148 165 168 165 210"}),(0,l.jsx)("path",{className:"bm-edge",style:{animationDelay:"1.15s"},pathLength:1,d:"M 244 78 C 300 78 320 150 374 150"}),(0,l.jsx)("path",{className:"bm-edge bm-edge-tail",style:{animationDelay:"1.7s"},pathLength:1,d:"M 596 205 C 596 230 576 242 558 252"})]}),(0,l.jsxs)("div",{className:"bm-node bm-node-draft",style:{left:26,top:38,width:218,animationDelay:".45s"},children:[(0,l.jsx)("div",{className:"bm-title",children:"Magic-link sign-in"}),(0,l.jsx)("div",{className:"bm-role",children:"Email a one-time link, no passwords"}),(0,l.jsxs)("div",{className:"bm-chiprow",children:[(0,l.jsx)("span",{className:"chip chip-sky",children:"feature"}),(0,l.jsx)("span",{className:"chip chip-violet",children:"auth"}),(0,l.jsx)("span",{className:"chip chip-amber",style:{marginLeft:"auto"},children:"Pending"})]})]}),(0,l.jsxs)("div",{className:"bm-node bm-node-draft",style:{left:70,top:210,width:190,animationDelay:".75s"},children:[(0,l.jsx)("div",{className:"bm-title",children:"Issue + verify token"}),(0,l.jsxs)("div",{className:"bm-chiprow",children:[(0,l.jsx)("span",{className:"chip chip-zinc",children:"sub-task"}),(0,l.jsx)("span",{className:"chip chip-amber",style:{marginLeft:"auto"},children:"Pending"})]})]}),(0,l.jsxs)("div",{className:"bm-table",style:{left:374,top:96,width:222,animationDelay:".6s"},children:[(0,l.jsxs)("div",{className:"bm-table-head",children:[(0,l.jsx)("span",{children:"auth_tokens"}),(0,l.jsx)("span",{className:"chip chip-green",children:"new"})]}),(0,l.jsxs)("div",{className:"bm-trow",children:[(0,l.jsx)(i.A,{size:9,style:{color:"#fde68a"}}),(0,l.jsx)("span",{children:"id"}),(0,l.jsx)("span",{className:"t",children:"uuid"})]}),(0,l.jsxs)("div",{className:"bm-trow",children:[(0,l.jsx)("span",{style:{width:9}}),(0,l.jsx)("span",{children:"token_hash"}),(0,l.jsx)("span",{className:"t",children:"text"})]}),(0,l.jsxs)("div",{className:"bm-trow",children:[(0,l.jsx)(c.A,{size:9,style:{color:"#7dd3fc"}}),(0,l.jsx)("span",{children:"user_id"}),(0,l.jsx)("span",{className:"t",children:"→ users"})]}),(0,l.jsxs)("div",{className:"bm-trow",children:[(0,l.jsx)("span",{style:{width:9}}),(0,l.jsx)("span",{children:"expires_at"}),(0,l.jsx)("span",{className:"t",children:"timestamp"})]})]}),(0,l.jsx)("span",{className:"bm-dot",style:{left:135,top:111,animationDelay:"1s"}}),(0,l.jsx)("span",{className:"bm-dot",style:{left:165,top:210,animationDelay:"1.3s"}}),(0,l.jsx)("span",{className:"bm-dot",style:{left:244,top:78,animationDelay:"1.15s"}}),(0,l.jsx)("span",{className:"bm-dot",style:{left:374,top:150,animationDelay:"1.45s"}}),(0,l.jsx)("span",{className:"bm-pin",style:{left:596,top:201,animationDelay:"1.55s"},children:"1"}),(0,l.jsxs)("div",{className:"bm-bubble",style:{left:356,top:252,width:226,animationDelay:"1.85s"},children:[(0,l.jsx)("div",{className:"lab",children:"annotation \xb7 you"}),(0,l.jsx)("div",{className:"txt",children:"Expire links after 15 min, not 24 h."})]}),(0,l.jsxs)("div",{className:"bm-bar",style:{animationDelay:"2.15s"},children:[(0,l.jsx)(d.A,{size:11,style:{color:"#6ee7b7"}}),(0,l.jsx)("span",{className:"ready",children:"plan ready \xb7 waiting for your verdict"}),(0,l.jsxs)("span",{className:"bm-btn bm-btn-approve",children:[(0,l.jsx)(o.A,{size:10})," Approve"]}),(0,l.jsxs)("span",{className:"bm-btn bm-btn-ghost",children:[(0,l.jsx)(m.A,{size:10})," Feedback"]}),(0,l.jsxs)("span",{className:"bm-btn bm-btn-ghost",children:[(0,l.jsx)(h.A,{size:10})," Discard"]})]})]})})]})}function N(){let e=(0,t.useRef)(null),[s,a]=(0,t.useState)(null);(0,t.useEffect)(()=>{let s=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&(e.target.classList.add("in"),s.unobserve(e.target))})},{threshold:.12});return e.current?.querySelectorAll(".w-reveal").forEach(e=>s.observe(e)),()=>s.disconnect()},[]);let n=e=>(0,l.jsx)("button",{onClick:()=>{navigator.clipboard?.writeText(u),a(e),setTimeout(()=>a(null),1600)},className:"glass-soft w-hover grid h-8 w-8 shrink-0 place-items-center rounded-md","aria-label":"Copy install command",children:s===e?(0,l.jsx)(o.A,{size:13,style:{color:"#ff7a45"}}):(0,l.jsx)(x.A,{size:13,className:"w-muted"})});return(0,l.jsxs)("div",{className:"welcome",ref:e,children:[(0,l.jsx)("div",{className:"welcome-bg","aria-hidden":!0}),(0,l.jsx)("header",{className:"fixed inset-x-0 top-0 z-50",children:(0,l.jsx)("div",{className:"mx-auto max-w-6xl px-6",children:(0,l.jsxs)("div",{className:"w-load mt-4 glass flex items-center justify-between rounded-full py-2.5 pl-5 pr-3",style:{animationDelay:".05s"},children:[(0,l.jsxs)(r(),{href:"#top",className:"flex items-center gap-2.5",children:[(0,l.jsx)(p._,{size:20,className:"text-foreground"}),(0,l.jsx)("span",{className:"font-semibold tracking-tight",children:"Beacon"})]}),(0,l.jsxs)("nav",{className:"flex items-center gap-6 text-sm w-muted",children:[(0,l.jsx)("a",{href:"#how",className:"transition-colors hover:text-foreground",children:"The loop"}),(0,l.jsx)("a",{href:"#quickstart",className:"hidden transition-colors hover:text-foreground sm:block",children:"Quickstart"}),(0,l.jsx)("a",{href:"/docs",className:"transition-colors hover:text-foreground",children:"Docs"})]})]})})}),(0,l.jsx)("span",{id:"top"}),(0,l.jsxs)("section",{className:"px-6 pb-16 pt-20 md:pt-24",children:[(0,l.jsxs)("div",{className:"mx-auto grid max-w-6xl items-center gap-12 lg:grid-cols-[1fr_1.1fr]",children:[(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("div",{className:"w-load glass-soft mb-6 inline-flex items-center gap-2 rounded-full px-3.5 py-1.5",style:{animationDelay:".12s"},children:[(0,l.jsx)("span",{className:"w-live h-1.5 w-1.5 rounded-full",style:{background:"#ff7a45",boxShadow:"0 0 8px #ff7a45"}}),(0,l.jsx)("span",{className:"w-mono w-eyebrow w-muted",children:"Local \xb7 no account \xb7 no API key"})]}),(0,l.jsxs)("h1",{className:"w-load font-semibold text-[clamp(2.2rem,4.6vw,3.4rem)]",style:{letterSpacing:"-0.025em",lineHeight:1.06,animationDelay:".18s"},children:["Give your coding agent ",(0,l.jsx)("span",{className:"w-signal",children:"eyes"})," and hands."]}),(0,l.jsx)("p",{className:"w-load w-muted mt-5 max-w-md text-[1.02rem] leading-relaxed",style:{animationDelay:".26s"},children:"The session in your terminal is the brain. Beacon is where its plans become visible: features, tables, and endpoints on a canvas you annotate, edit, and approve with one click."}),(0,l.jsxs)("div",{className:"w-load mt-8",style:{animationDelay:".34s"},children:[(0,l.jsxs)("div",{className:"glass flex max-w-lg items-center gap-3 rounded-lg py-2.5 pl-4 pr-2",children:[(0,l.jsxs)("code",{className:"w-mono w-scrollbar-none min-w-0 flex-1 overflow-x-auto whitespace-nowrap text-[0.85rem]",children:[(0,l.jsx)("span",{className:"w-signal select-none",children:"$"}),(0,l.jsx)("span",{className:"ml-2",children:u}),(0,l.jsx)("span",{className:"w-caret ml-1 inline-block h-3.5 w-1.5 align-middle",style:{background:"#ff7a45"}})]}),n("hero")]}),(0,l.jsxs)("p",{className:"w-mono w-muted mt-3 text-[0.78rem]",children:["then run ",(0,l.jsx)("span",{className:"text-foreground",children:"beacon"})," inside any repo"]})]}),(0,l.jsxs)("div",{className:"w-load mt-9 flex flex-wrap items-center gap-x-5 gap-y-2",style:{animationDelay:".42s"},children:[(0,l.jsx)("span",{className:"w-mono w-eyebrow w-muted",children:"Works with"}),(0,l.jsxs)("span",{className:"flex items-center gap-2 text-sm text-foreground/90",children:[(0,l.jsx)(w,{d:"m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z",color:"#D97757"})," Claude Code"]}),(0,l.jsxs)("span",{className:"flex items-center gap-2 text-sm text-foreground/90",children:[(0,l.jsx)(w,{d:"M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z"})," Codex"]})]})]}),(0,l.jsx)("div",{className:"w-load min-w-0",style:{animationDelay:".3s"},children:(0,l.jsx)(g,{})})]}),(0,l.jsxs)("a",{href:"#how",className:"w-load mx-auto mt-12 flex w-fit flex-col items-center gap-2 w-muted transition-colors hover:text-foreground md:mt-20",style:{animationDelay:".6s"},children:[(0,l.jsx)("span",{className:"w-mono w-eyebrow",children:"The loop"}),(0,l.jsx)("svg",{className:"w-cue",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,l.jsx)("path",{d:"m6 9 6 6 6-6"})})]})]}),(0,l.jsx)("section",{id:"how",className:"px-6 py-16 md:py-24",children:(0,l.jsxs)("div",{className:"mx-auto max-w-5xl",children:[(0,l.jsxs)("div",{className:"w-reveal mb-14 text-center",children:[(0,l.jsx)("p",{className:"w-mono w-eyebrow w-signal mb-4",children:"The loop"}),(0,l.jsx)("h2",{className:"text-[clamp(1.9rem,4vw,2.75rem)] font-semibold tracking-tight",children:"Propose. Review. Verdict. Repeat."}),(0,l.jsx)("div",{className:"w-accent-line mx-auto mt-6 h-px w-40"})]}),(0,l.jsx)("div",{className:"grid gap-10 md:grid-cols-3",children:f.map(e=>(0,l.jsxs)("div",{className:"loop-card w-reveal glass w-hover rounded-lg p-6",children:[(0,l.jsx)("p",{className:"w-mono w-eyebrow w-signal mb-3",children:e.n}),(0,l.jsx)("h3",{className:"mb-2 font-semibold",children:e.title}),(0,l.jsx)("p",{className:"w-muted mb-4 text-[0.92rem] leading-relaxed",children:e.body}),(0,l.jsx)("code",{className:"w-mono glass-soft inline-block rounded-md px-3 py-1.5 text-[0.74rem]",children:e.code})]},e.n))}),(0,l.jsxs)("p",{className:"w-reveal w-mono w-muted mt-10 text-center text-[0.78rem]",children:["feedback sends the agent back to ",(0,l.jsx)("span",{className:"w-signal",children:"01"})," \xb7 approval persists the drafts"]})]})}),(0,l.jsx)("section",{className:"px-6 py-12",children:(0,l.jsxs)("div",{className:"mx-auto max-w-5xl",children:[(0,l.jsxs)("div",{className:"w-reveal mb-12 text-center",children:[(0,l.jsx)("p",{className:"w-mono w-eyebrow w-signal mb-4",children:"The surfaces"}),(0,l.jsx)("h2",{className:"text-[clamp(1.6rem,3.4vw,2.25rem)] font-semibold tracking-tight",children:"Everything the agent plans, drawn"})]}),(0,l.jsx)("div",{className:"grid gap-5 md:grid-cols-3",children:b.map(e=>(0,l.jsxs)("div",{className:"w-reveal glass w-hover rounded-lg p-6",children:[(0,l.jsx)("p",{className:"w-mono mb-1 text-[0.82rem] font-semibold w-signal",children:e.route}),(0,l.jsx)("h3",{className:"mb-2 font-semibold",children:e.title}),(0,l.jsx)("p",{className:"w-muted text-[0.92rem] leading-relaxed",children:e.body})]},e.route))})]})}),(0,l.jsxs)("section",{id:"quickstart",className:"px-6 py-16 md:py-24",children:[(0,l.jsxs)("div",{className:"mx-auto max-w-3xl",children:[(0,l.jsxs)("div",{className:"w-reveal mb-12 text-center",children:[(0,l.jsx)("p",{className:"w-mono w-eyebrow w-signal mb-4",children:"Quickstart"}),(0,l.jsx)("h2",{className:"text-[clamp(1.6rem,3.4vw,2.25rem)] font-semibold tracking-tight",children:"Five lines to your first approved plan"})]}),(0,l.jsxs)("div",{className:"w-reveal glass overflow-hidden rounded-lg",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 border-b px-4 py-3",style:{borderColor:"var(--border)"},children:[(0,l.jsx)("span",{className:"h-3 w-3 rounded-full",style:{background:"#ff7a45",boxShadow:"0 0 7px rgba(255,122,69,.7)"}}),(0,l.jsx)("span",{className:"h-3 w-3 rounded-full",style:{background:"oklch(1 0 0 / .16)"}}),(0,l.jsx)("span",{className:"h-3 w-3 rounded-full",style:{background:"oklch(1 0 0 / .16)"}}),(0,l.jsx)("span",{className:"w-mono ml-2 text-[0.72rem] w-muted",children:"your-repo — terminal"})]}),(0,l.jsxs)("div",{className:"px-5 py-4",children:[(0,l.jsxs)("div",{className:"ql",children:[(0,l.jsxs)("code",{className:"cmd w-scrollbar-none",children:[(0,l.jsx)("span",{className:"w-signal select-none",children:"$ "}),u]}),(0,l.jsx)("span",{className:"note",children:"01 \xb7 one binary, no account"}),n("qs")]}),(0,l.jsxs)("div",{className:"ql",children:[(0,l.jsxs)("code",{className:"cmd",children:[(0,l.jsx)("span",{className:"w-signal select-none",children:"$ "}),"cd your-repo && beacon"]}),(0,l.jsx)("span",{className:"note",children:"02 \xb7 registers the repo, opens the panel"})]}),(0,l.jsxs)("div",{className:"ql",children:[(0,l.jsxs)("code",{className:"cmd",children:[(0,l.jsx)("span",{className:"w-signal select-none",children:"› "}),"/beacon-init"]}),(0,l.jsx)("span",{className:"note",children:"03 \xb7 maps architecture, schema, roadmap"})]}),(0,l.jsxs)("div",{className:"ql",children:[(0,l.jsxs)("code",{className:"cmd",children:[(0,l.jsx)("span",{className:"w-signal select-none",children:"› "}),"plan: magic-link sign-in"]}),(0,l.jsx)("span",{className:"note",children:"04 \xb7 the plan streams onto /plan"})]}),(0,l.jsxs)("div",{className:"ql",children:[(0,l.jsxs)("code",{className:"cmd",children:[(0,l.jsxs)("span",{className:"select-none",style:{color:"#6ee7b7"},children:["✓"," "]}),"approve \xb7 feedback \xb7 discard"]}),(0,l.jsx)("span",{className:"note",children:"05 \xb7 the verdict returns to your session"})]})]})]})]}),(0,l.jsx)("div",{className:"mx-auto mt-16 max-w-5xl",children:(0,l.jsx)("div",{className:"w-reveal glass grid overflow-hidden rounded-lg md:grid-cols-3 md:divide-x md:divide-y-0 divide-y",style:{borderColor:"var(--border)"},children:y.map(e=>(0,l.jsxs)("div",{className:"p-6",style:{borderColor:"oklch(1 0 0 / 0.07)"},children:[(0,l.jsx)("p",{className:"w-mono w-eyebrow w-signal mb-2.5",children:e.label}),(0,l.jsx)("p",{className:"w-muted text-[0.9rem] leading-relaxed",children:e.body})]},e.label))})})]}),(0,l.jsx)("footer",{className:"px-6 pb-12 pt-8",children:(0,l.jsxs)("div",{className:"mx-auto max-w-5xl",children:[(0,l.jsx)("div",{className:"w-accent-line mb-8 h-px w-full opacity-60"}),(0,l.jsxs)("div",{className:"flex flex-col items-center justify-between gap-5 md:flex-row",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,l.jsx)(p._,{size:26,className:"text-foreground"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"font-semibold leading-tight",children:"Beacon"}),(0,l.jsx)("p",{className:"w-mono w-muted text-[0.72rem]",children:"the visual planning surface for your terminal"})]})]}),(0,l.jsxs)("nav",{className:"flex items-center gap-6 text-sm w-muted",children:[(0,l.jsx)("a",{href:"/docs",className:"transition-colors hover:text-foreground",children:"Docs"}),(0,l.jsx)("a",{href:"#",className:"transition-colors hover:text-foreground",children:"Changelog"})]}),(0,l.jsxs)("p",{className:"w-mono w-muted text-[0.72rem]",children:["Created by"," ",(0,l.jsxs)("a",{href:"https://www.instagram.com/wenzorithelly/",target:"_blank",rel:"noreferrer",className:"w-signal inline-flex items-center gap-1 underline decoration-dotted underline-offset-2 transition-opacity hover:opacity-80",children:[(0,l.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[(0,l.jsx)("rect",{x:"2",y:"2",width:"20",height:"20",rx:"5",ry:"5"}),(0,l.jsx)("path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z"}),(0,l.jsx)("line",{x1:"17.5",y1:"6.5",x2:"17.51",y2:"6.5"})]}),"Wenzo"]}),(0,l.jsx)("span",{className:"mx-2 opacity-40",children:"\xb7"}),"\xa9 2026 Beacon"]})]})]})})]})}},32133:(e,s,a)=>{"use strict";a.d(s,{A:()=>l});let l=(0,a(30772).A)("message-square-plus",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M12 8v6",key:"1ib9pf"}],["path",{d:"M9 11h6",key:"1fldmi"}]])},39593:(e,s,a)=>{"use strict";a.d(s,{EO:()=>r,W6:()=>n,kw:()=>t});var l=a(41463);let t="https://registry.npmjs.org/trybeacon/latest",n=(l.env.NEXT_PUBLIC_BEACON_SITE_URL??"https://www.trybeacon.sh").replace(/\/$/,""),r=`curl -fsSL ${n}/install.sh | sh`},51128:(e,s,a)=>{"use strict";a.d(s,{A:()=>l});let l=(0,a(30772).A)("link-2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]])},52965:(e,s,a)=>{"use strict";a.d(s,{_:()=>t});var l=a(95155);function t({size:e=18,className:s}){return(0,l.jsxs)("svg",{width:e,height:e,viewBox:"11 1.5 74 74",fill:"none",className:s,"aria-hidden":"true",children:[(0,l.jsx)("defs",{children:(0,l.jsxs)("linearGradient",{id:"beacon-mark-beam",x1:"0",y1:"1",x2:"0",y2:"0",children:[(0,l.jsx)("stop",{offset:"0",stopColor:"#ffb27a",stopOpacity:"0.9"}),(0,l.jsx)("stop",{offset:"0.55",stopColor:"#ff7a45",stopOpacity:"0.3"}),(0,l.jsx)("stop",{offset:"1",stopColor:"#ff7a45",stopOpacity:"0"})]})}),(0,l.jsx)("path",{d:"M48 30 L40 4 L56 4 Z",fill:"url(#beacon-mark-beam)"}),(0,l.jsx)("path",{d:"M48 33 L72.5 73 L23.5 73 Z",fill:"currentColor",stroke:"currentColor",strokeWidth:2.4,strokeLinejoin:"round"}),(0,l.jsx)("circle",{cx:"48",cy:"31",r:"5.2",fill:"var(--accent-2, #ff7a45)",style:{filter:"drop-shadow(0 0 4px var(--accent-2, #ff7a45))"}}),(0,l.jsx)("circle",{cx:"48",cy:"31",r:"2",fill:"#ffd9c2"})]})}},64577:(e,s,a)=>{"use strict";a.d(s,{A:()=>l});let l=(0,a(30772).A)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},65738:(e,s,a)=>{"use strict";a.d(s,{A:()=>l});let l=(0,a(30772).A)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]])},71265:(e,s,a)=>{"use strict";a.d(s,{default:()=>i});var l=a(12115),t={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},n=a(30907);let r=(0,l.createContext)({}),i=(0,l.forwardRef)(({color:e,size:s,strokeWidth:a,absoluteStrokeWidth:i,className:c="",children:d,iconNode:o,...m},h)=>{let{size:x=24,strokeWidth:p=2,absoluteStrokeWidth:j=!1,color:u="currentColor",className:w=""}=(0,l.useContext)(r)??{},f=i??j?24*Number(a??p)/Number(s??x):a??p;return(0,l.createElement)("svg",{ref:h,...t,width:s??x??t.width,height:s??x??t.height,stroke:e??u,strokeWidth:f,className:(0,n.z)("lucide",w,c),...!d&&!(e=>{for(let s in e)if(s.startsWith("aria-")||"role"===s||"title"===s)return!0;return!1})(m)&&{"aria-hidden":"true"},...m},[...o.map(([e,s])=>(0,l.createElement)(e,s)),...Array.isArray(d)?d:[d]])})},72543:(e,s,a)=>{Promise.resolve().then(a.bind(a,31698))},81499:(e,s,a)=>{"use strict";a.d(s,{A:()=>l});let l=(0,a(30772).A)("key-round",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]])},86272:(e,s,a)=>{"use strict";a.d(s,{A:()=>l});let l=(0,a(30772).A)("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]])},93340:()=>{},99314:(e,s,a)=>{"use strict";a.d(s,{A:()=>l});let l=(0,a(30772).A)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])}},e=>{e.O(0,[1477,8500,8441,3794,7358],()=>e(e.s=72543)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6624],{8143:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});let s=(0,n(30772).A)("list-checks",[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]])},9383:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});let s=(0,n(30772).A)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]])},10396:(e,t,n)=>{"use strict";n.d(t,{PlanWorkspace:()=>Y});var s=n(95155),r=n(12115),a=n(64577),o=n(25640),l=n(34306),i=n(92571),d=n(65408),c=n(30772);let u=(0,c.A)("archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);var m=n(8143);let x=(0,c.A)("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]);var p=n(82879),h=n(17356),f=n(9383),g=n(9005),b=n(65738),v=n(8962),j=n(73321),y=n(48484),w=n(99979),k=n(32133),N=n(38332),C=n(91337),A=n(60874);function z({markdown:e,round:t,onApi:n,hideSubmit:o=!1,getExtraSubmitPayload:l}){let[i,d]=(0,r.useState)([]),[c,u]=(0,r.useState)(""),[m,x]=(0,r.useState)(!1),[p,h]=(0,r.useState)(null),[b,v]=(0,r.useState)(null),[j,y]=(0,r.useState)(null),[A,E]=(0,r.useState)(!1),[P,M]=(0,r.useState)(!1),O=(0,r.useRef)(null),D=(0,r.useRef)(null);(0,r.useEffect)(()=>{let e=!0;return(async()=>{try{let t=await fetch("/api/plan/annotations",{cache:"no-store",headers:(0,w.dh)((0,w.X0)())});if(!t.ok)return;let n=await t.json();if(!e)return;d(n.annotations??[]),u(n.globalComment??""),M(!!n.submitted)}catch{}})(),()=>{e=!1}},[e,t]),(0,r.useEffect)(()=>{if(P)return;let e=setTimeout(()=>{fetch("/api/plan/annotations",{method:"PUT",headers:{"content-type":"application/json",...(0,w.dh)((0,w.X0)())},body:JSON.stringify({annotations:i,globalComment:c,round:t})}).catch(()=>{})},400);return()=>clearTimeout(e)},[i,c,P,t]);let T=(0,r.useCallback)(()=>{let e=window.getSelection();if(!e||e.isCollapsed)return void h(null);let t=e.toString().trim();if(!t)return void h(null);if(!O.current?.contains(e.anchorNode))return;let n=e.getRangeAt(0).getBoundingClientRect();h({x:n.right+window.scrollX,y:n.top+window.scrollY,excerpt:t})},[]);(0,r.useEffect)(()=>{let e=()=>setTimeout(T,0);return document.addEventListener("mouseup",e),document.addEventListener("selectionchange",e),()=>{document.removeEventListener("mouseup",e),document.removeEventListener("selectionchange",e)}},[T]);let L=(0,r.useCallback)((e,t="comment",n="")=>{let s=`a-${Date.now()}-${Math.floor(1e6*Math.random())}`;d(r=>[...r,{id:s,excerpt:e,comment:n,kind:t}]),"comment"===t&&y(s),h(null),window.getSelection()?.removeAllRanges()},[]);(0,r.useEffect)(()=>{let e=e=>{let t=window.getSelection();if(!t||t.isCollapsed)return;let n=t.toString().trim();if(!n||!O.current?.contains(t.anchorNode))return;let s=document.activeElement;if(s&&/^(TEXTAREA|INPUT)$/.test(s.tagName)||!(1===e.key.length&&!e.metaKey&&!e.ctrlKey&&!e.altKey))return;e.preventDefault();let r=t.getRangeAt(0).getBoundingClientRect();v({x:r.right+window.scrollX,y:r.top+window.scrollY,excerpt:n,seed:e.key}),h(null),window.getSelection()?.removeAllRanges()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[]),(0,r.useEffect)(()=>{if(!m)return;let e=e=>{let t=e.target;!t||D.current?.contains(t)||t.closest("[data-overall-toggle]")||x(!1)},t=e=>{"Escape"===e.key&&x(!1)};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[m]);let I=(e,t)=>d(n=>n.map(n=>n.id===e?{...n,comment:t}:n)),$=e=>d(t=>t.filter(t=>t.id!==e)),F=()=>{d([]),u(""),x(!1),fetch("/api/plan/annotations",{method:"DELETE",headers:(0,w.dh)((0,w.X0)())}).catch(()=>{})},U=async()=>{if(!A){E(!0);try{let e=l?.()??{},n=await fetch("/api/plan/annotations",{method:"POST",headers:{"content-type":"application/json",...(0,w.dh)((0,w.X0)())},body:JSON.stringify({annotations:i,globalComment:c,round:t,...e})});n.ok?M(!0):409===n.status&&window.location.reload()}finally{E(!1)}}},X=(0,r.useMemo)(()=>i.filter(e=>"deletion"===e.kind||e.comment.trim()).length+ +!!c.trim(),[i,c]);return(0,r.useEffect)(()=>{n?.({liveCount:X,submitting:A,submitted:P,submit:()=>void U(),clearAll:F,annotationCount:i.length,hasGlobalComment:!!c.trim(),globalOpen:m,toggleOverall:()=>x(e=>!e),annotations:i,updateComment:I,removeAnnotation:$,focusOnAnnotation:e=>y(e),addComment:e=>L(e,"comment")})},[X,A,P,i,c,m]),(0,s.jsxs)("div",{className:"flex h-full min-h-0 flex-col",children:[(0,s.jsx)("div",{className:"relative shrink-0",children:(0,s.jsxs)("div",{className:"absolute right-3 top-2 z-30 flex items-center gap-1",children:[!o&&(0,s.jsxs)("button",{onClick:()=>void U(),disabled:A||0===X,className:(0,C.cn)("flex items-center gap-1 rounded-md border px-2 py-1 text-[11px] font-semibold transition-colors",P?"border-emerald-500/40 bg-emerald-500/15 text-emerald-300":0===X?"border-white/10 text-muted-foreground opacity-50":"border-sky-500/40 bg-sky-500/15 text-sky-300 hover:bg-sky-500/25"),title:P?"Submitted — your terminal session is reading the feedback":"Submit all feedback so the agent can revise the plan",children:[P?(0,s.jsx)(a.A,{className:"size-3"}):(0,s.jsx)(f.A,{className:"size-3"}),P?"Submitted":"Submit feedback"]}),m&&(0,s.jsxs)("div",{ref:D,className:"absolute right-0 top-[calc(100%+6px)] z-50 w-[320px] rounded-md border border-white/10 bg-card p-2 shadow-xl",children:[(0,s.jsxs)("div",{className:"mb-1 flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Overall feedback"}),(0,s.jsx)("button",{onClick:()=>x(!1),title:"Close (Esc)",className:"rounded p-0.5 text-muted-foreground hover:text-foreground",children:(0,s.jsx)(g.A,{className:"size-3"})})]}),(0,s.jsx)("textarea",{autoFocus:!0,value:c,onChange:e=>u(e.target.value),onKeyDown:e=>{e.stopPropagation(),"Enter"===e.key&&e.shiftKey?(e.preventDefault(),!A&&X>0&&(U(),x(!1))):"Escape"===e.key&&(e.preventDefault(),x(!1))},placeholder:"Plan-level notes — e.g. 'split this into two phases' or 'wrong abstraction'…",rows:4,className:"w-full resize-y rounded border border-white/5 bg-background px-2 py-1.5 text-[12px] leading-snug outline-none focus:border-sky-400/40"}),(0,s.jsx)("div",{className:"mt-1 text-right text-[9px] text-muted-foreground/70",children:"Shift+Enter to submit \xb7 Esc to close"})]})]})}),(0,s.jsx)("div",{ref:O,className:"min-h-0 flex-1 overflow-y-auto px-5 pb-5 pt-16 text-[15px] leading-[1.6] selection:bg-[var(--accent-2,#ff7a45)]/30",children:(0,s.jsx)(R,{markdown:e,annotations:b?[...i,{id:"__pending",excerpt:b.excerpt,comment:"",kind:"comment"}]:i,focusOnId:j,onClearFocus:()=>y(null),onUpdate:I,onRemove:$})}),p&&(0,s.jsxs)("div",{style:{position:"fixed",left:p.x+4,top:p.y-30,zIndex:60},className:"flex items-center gap-0.5 rounded-md border border-white/15 bg-card/95 p-0.5 shadow-lg backdrop-blur",children:[(0,s.jsx)("button",{onClick:()=>{v({...p,seed:""}),h(null),window.getSelection()?.removeAllRanges()},title:"Comment on this text",className:"rounded p-1 text-sky-300 hover:bg-sky-500/15",children:(0,s.jsx)(k.A,{className:"size-3.5"})}),(0,s.jsx)("button",{onClick:()=>L(p.excerpt,"deletion"),title:"Mark this for deletion",className:"rounded p-1 text-red-300 hover:bg-red-500/15",children:(0,s.jsx)(N.A,{className:"size-3.5"})})]}),b&&(0,s.jsx)(S,{excerpt:b.excerpt,x:b.x,y:b.y,seed:b.seed,onConfirm:e=>{L(b.excerpt,"comment",e),v(null)},onCancel:()=>v(null)})]})}function S({excerpt:e,x:t,y:n,seed:o,onConfirm:l,onCancel:i}){let[d,c]=(0,r.useState)(o),u=(0,r.useRef)(null),m=()=>d.trim()?l(d.trim()):i();return(0,s.jsxs)("div",{ref:u,style:{position:"fixed",left:t+4,top:n-6,zIndex:60},className:"w-64 rounded-md border border-white/15 bg-card/95 p-1.5 shadow-xl backdrop-blur",onBlur:e=>{u.current?.contains(e.relatedTarget)||m()},children:[(0,s.jsxs)("div",{className:"mb-1 line-clamp-1 text-[10px] text-muted-foreground",children:["“",e,"”"]}),(0,s.jsx)("textarea",{autoFocus:!0,value:d,onChange:e=>c(e.target.value),onFocus:e=>e.currentTarget.setSelectionRange(d.length,d.length),placeholder:"Comment… (Enter to add \xb7 Esc to discard)",onKeyDown:e=>{e.stopPropagation(),"Enter"!==e.key||e.shiftKey?"Escape"===e.key&&(e.preventDefault(),i()):(e.preventDefault(),m())},className:"h-16 w-full resize-none rounded bg-white/[0.05] px-1.5 py-1 text-xs outline-none placeholder:text-muted-foreground/50 focus:bg-white/[0.08]"}),(0,s.jsxs)("div",{className:"mt-1 flex items-center justify-end gap-1",children:[(0,s.jsxs)("button",{type:"button",onClick:i,title:"Discard this comment (Esc)",className:"flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground transition-colors hover:bg-red-500/15 hover:text-red-300",children:[(0,s.jsx)(g.A,{className:"size-3"}),"Discard"]}),(0,s.jsxs)("button",{type:"button",onClick:m,disabled:!d.trim(),title:"Add this comment (Enter)",className:"flex items-center gap-1 rounded bg-sky-500/15 px-1.5 py-0.5 text-[10px] font-semibold text-sky-300 transition-colors hover:bg-sky-500/25 disabled:opacity-40",children:[(0,s.jsx)(a.A,{className:"size-3"}),"Add"]})]})]})}function E({annotations:e,updateComment:t,removeAnnotation:n,focusOnAnnotation:r,onClose:a}){return 0===e.length?(0,s.jsx)("div",{className:"rounded-lg border border-dashed border-white/10 px-3 py-6 text-center text-[11px] text-muted-foreground",children:"Highlight any text in the plan to leave an inline comment."}):(0,s.jsx)("ul",{className:"space-y-1.5",children:e.map(e=>(0,s.jsx)("li",{className:(0,C.cn)("group rounded-md border bg-background/30 px-2 py-1.5 transition-colors hover:bg-background/50","deletion"===e.kind?"border-red-500/25":"border-sky-500/15"),children:(0,s.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("button",{type:"button",onClick:()=>{r(e.id),a?.()},title:"Jump to this excerpt in the plan",className:(0,C.cn)("block w-full truncate text-left text-[10.5px] font-mono","deletion"===e.kind?"text-red-300/90 line-through":"text-foreground/80 hover:text-foreground"),children:["“",e.excerpt,"”"]}),"deletion"!==e.kind&&(0,s.jsx)("textarea",{value:e.comment,onChange:n=>t(e.id,n.target.value),placeholder:"Write your comment…",rows:1,className:"field-sizing-content mt-1 w-full resize-none bg-transparent text-[11px] leading-snug text-foreground/90 outline-none placeholder:text-muted-foreground/60 focus:text-foreground"})]}),(0,s.jsx)("button",{onClick:()=>n(e.id),title:"Remove this annotation",className:"shrink-0 rounded p-1 text-muted-foreground/70 opacity-0 transition-opacity hover:bg-red-500/15 hover:text-red-300 group-hover:opacity-100",children:(0,s.jsx)(b.A,{className:"size-3"})})]})},e.id))})}function R({markdown:e,annotations:t,focusOnId:n,onClearFocus:a,onUpdate:o,onRemove:l}){let i=(0,r.useMemo)(()=>(0,A.n$)(e),[e]);return(0,s.jsx)("div",{className:"mx-auto w-full max-w-[66ch] space-y-4",children:i.map((e,r)=>(0,s.jsx)(P,{block:e,index:r,annotations:t,focusOnId:n,onClearFocus:a,onUpdate:o,onRemove:l},r))})}function P({block:e,index:t,annotations:n,focusOnId:r,onClearFocus:a,onUpdate:o,onRemove:l}){if("code"===e.kind)return(0,s.jsx)(A.NG,{text:e.text});if("table"===e.kind)return(0,s.jsx)(A.QH,{block:e});let i=(0,s.jsx)(M,{text:e.text,annotations:n,focusOnId:r,onClearFocus:a,onUpdate:o,onRemove:l}),d=(0,A.Vq)(e.kind)?(0,A.vB)(t):void 0;return(0,s.jsx)(s.Fragment,{children:(0,A.aM)(e,i,"reading",d)})}function M({text:e,annotations:t,focusOnId:n,onClearFocus:r,onUpdate:a,onRemove:o}){let l=t.map(t=>({a:t,idx:e.indexOf(t.excerpt)})).filter(e=>e.idx>=0).sort((e,t)=>e.idx-t.idx);if(!l.length)return(0,s.jsx)(D,{text:e});let i=[],d=0;for(let{a:t,idx:c}of l)c<d||(c>d&&i.push((0,s.jsx)(D,{text:e.slice(d,c)},`p-${d}`)),i.push((0,s.jsx)(O,{annotation:t,autoFocus:n===t.id,onClearFocus:r,onUpdate:a,onRemove:o},t.id)),d=c+t.excerpt.length);return d<e.length&&i.push((0,s.jsx)(D,{text:e.slice(d)},"p-tail")),(0,s.jsx)(s.Fragment,{children:i})}function O({annotation:e,autoFocus:t,onClearFocus:n,onUpdate:a,onRemove:o}){let l=(0,r.useRef)(null);return((0,r.useEffect)(()=>{if(t&&l.current){l.current.focus();let e=l.current.value;l.current.setSelectionRange(e.length,e.length),n()}},[t,n]),"deletion"===(e.kind??"comment"))?(0,s.jsxs)("span",{className:"relative inline",children:[(0,s.jsx)("span",{className:"rounded bg-red-500/15 px-0.5 text-red-200/90 line-through decoration-red-300/70 decoration-2",children:(0,s.jsx)(D,{text:e.excerpt})}),(0,s.jsx)("button",{type:"button",onClick:()=>o(e.id),title:"Unmark",className:"ml-0.5 inline-flex translate-y-[-1px] items-center text-red-300/70 hover:text-red-300",children:(0,s.jsx)(b.A,{className:"size-3"})})]}):(0,s.jsx)("span",{className:"rounded bg-[var(--accent-2,#ff7a45)]/15 px-0.5","data-annotation-id":e.id,children:(0,s.jsx)(D,{text:e.excerpt})})}function D({text:e}){return(0,s.jsx)(A.cV,{text:e})}let T=(0,c.A)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);function L({pendingPlan:e=!1}={}){let t=(0,j.useRouter)(),[n,i]=(0,r.useState)([]),[d,c]=(0,r.useState)(null),[m,x]=(0,r.useState)(null),[p,h]=(0,r.useState)("markdown");(0,r.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/plan/history");if(!e.ok)return;let t=await e.json();i(t.items),t.items.length&&!d&&c(t.items[0].id)}catch{}})()},[]),(0,r.useEffect)(()=>{d&&(async()=>{let e=await fetch(`/api/plan/history?id=${encodeURIComponent(d)}`);e.ok&&x(await e.json())})()},[d]);let f=(0,r.useMemo)(()=>(function(e){let t=new Map;for(let n of e){let e=new Date(n.archivedAt).toLocaleDateString(void 0,{weekday:"short",month:"short",day:"numeric"});t.has(e)||t.set(e,[]),t.get(e).push(n)}return Array.from(t.entries())})(n),[n]),b=e?(0,s.jsxs)("button",{onClick:()=>t.push((0,w.rc)()),className:"glass pointer-events-auto fixed left-3 top-3 z-30 flex h-10 items-center gap-1.5 rounded-full px-3 text-[11px] font-semibold text-sky-300 transition-colors hover:bg-sky-500/15",title:"Return to the plan that's still pending review",children:[(0,s.jsx)(T,{className:"size-3.5"})," Back to current plan"]}):null;return 0===n.length?(0,s.jsxs)(s.Fragment,{children:[b,(0,s.jsx)("div",{className:"flex h-screen items-center justify-center px-6 pt-14 text-center",children:(0,s.jsxs)("div",{className:"max-w-md text-sm text-muted-foreground",children:[(0,s.jsx)(u,{className:"mx-auto mb-3 size-7 text-muted-foreground/40"}),(0,s.jsx)("div",{className:"mb-2 text-base font-semibold text-foreground",children:"No plans yet."}),"Ask the agent to propose a feature in your terminal session — it lands here via MCP and you can review + annotate on both sides. Past plans get archived to this page for browsing."]})})]}):(0,s.jsxs)("div",{className:"flex h-screen min-h-0 pt-14",children:[b,m&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"glass pointer-events-auto fixed left-1/2 top-3 z-30 flex -translate-x-1/2 items-center gap-0.5 rounded-full p-1",children:[(0,s.jsx)(I,{active:"markdown"===p,onClick:()=>h("markdown"),children:"Plan"}),(0,s.jsx)(I,{active:"map"===p,onClick:()=>h("map"),icon:(0,s.jsx)(o.A,{className:"size-3"}),children:"Features"}),(0,s.jsx)(I,{active:"db"===p,onClick:()=>h("db"),icon:(0,s.jsx)(l.A,{className:"size-3"}),children:"Schema"})]}),(0,s.jsxs)("div",{className:"glass pointer-events-auto fixed right-3 top-3 z-30 flex h-9 items-center gap-2 rounded-full px-3",children:[(0,s.jsx)("span",{className:(0,C.cn)("rounded px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide","approved"===m.verdict?"bg-emerald-500/15 text-emerald-300":"bg-red-500/15 text-red-300"),children:m.verdict}),(0,s.jsx)("span",{className:"text-[10px] text-muted-foreground",children:new Date(m.archivedAt).toLocaleString()})]})]}),(0,s.jsxs)("aside",{className:"flex w-64 min-w-0 shrink-0 flex-col border-r border-white/5 bg-card/30",children:[(0,s.jsxs)("div",{className:"border-b border-white/5 px-3 py-2 text-[10.5px] font-semibold uppercase tracking-wide text-muted-foreground",children:["Plan history \xb7 ",n.length]}),(0,s.jsx)("ul",{className:"min-h-0 flex-1 overflow-y-auto",children:f.map(([e,t])=>(0,s.jsxs)("li",{children:[(0,s.jsx)("div",{className:"px-3 pb-1 pt-3 text-[9px] font-semibold uppercase tracking-widest text-muted-foreground/60",children:e}),(0,s.jsx)("ul",{children:t.map(e=>(0,s.jsx)("li",{children:(0,s.jsxs)("button",{onClick:()=>c(e.id),className:(0,C.cn)("flex w-full items-start gap-1.5 px-3 py-1.5 text-left text-[12px] transition-colors",d===e.id?"bg-white/[0.06] text-foreground":"text-muted-foreground hover:bg-white/[0.03] hover:text-foreground"),children:[(0,s.jsx)("span",{className:(0,C.cn)("mt-0.5 inline-flex size-3.5 shrink-0 items-center justify-center rounded-full","approved"===e.verdict?"bg-emerald-500/15 text-emerald-300":"bg-red-500/15 text-red-300"),title:e.verdict,children:"approved"===e.verdict?(0,s.jsx)(a.A,{className:"size-2.5"}):(0,s.jsx)(g.A,{className:"size-2.5"})}),(0,s.jsx)("span",{className:"line-clamp-2",children:e.description})]})},e.id))})]},e))})]}),m?(0,s.jsx)("section",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:(0,s.jsxs)("div",{className:"min-h-0 flex-1 overflow-y-auto",children:["markdown"===p&&(0,s.jsxs)("div",{className:"px-5 py-4",children:[(0,s.jsx)(A.pO,{markdown:m.markdown}),""===m.markdown.replace(/^#[^\n]*\n?/,"").trim()&&(0,s.jsx)("p",{className:"mt-2 text-[13px] text-muted-foreground",children:(m.featureGraph?.features?.length??0)===0&&(m.draftDoc?.tables?.length??0)===0&&(m.draftDoc?.endpoints?.length??0)===0?"This plan was approved without a detailed write-up — no features or schema were attached either.":"This plan has no written body. See the Features and Schema tabs for what it proposed."}),m.globalComment&&(0,s.jsxs)("div",{className:"mt-4 rounded-lg border border-white/5 bg-card/40 p-3",children:[(0,s.jsx)("div",{className:"mb-1 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Overall feedback"}),(0,s.jsx)("div",{className:"text-[12px] whitespace-pre-wrap",children:m.globalComment})]})]}),"map"===p&&(0,s.jsx)($,{featureGraph:m.featureGraph}),"db"===p&&(0,s.jsx)(F,{draftDoc:m.draftDoc})]})}):(0,s.jsx)("section",{className:"flex min-h-0 min-w-0 flex-1 items-center justify-center text-sm text-muted-foreground",children:"Select a plan on the left to view it."})]})}function I({active:e,onClick:t,icon:n,children:r}){return(0,s.jsxs)("button",{onClick:t,className:(0,C.cn)("flex items-center gap-1 rounded-md px-2 py-1 text-[11px] font-medium transition-colors",e?"bg-white/10 text-foreground":"text-muted-foreground hover:text-foreground"),children:[n,r]})}function $({featureGraph:e}){let t=e?.features??[];return 0===t.length?(0,s.jsx)("div",{className:"flex h-full items-center justify-center px-6 text-center text-sm text-muted-foreground",children:"No features were proposed in this plan."}):(0,s.jsx)("div",{className:"grid gap-3 px-5 py-4 sm:grid-cols-2 lg:grid-cols-3",children:t.map((e,t)=>(0,s.jsxs)("div",{className:"rounded-lg border border-sky-500/20 bg-card/50 p-3",children:[(0,s.jsxs)("div",{className:"mb-1.5 flex items-center gap-1.5",children:[(0,s.jsx)("span",{className:"rounded bg-sky-500/15 px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide text-sky-300",children:"feature"}),e.cluster&&(0,s.jsx)("span",{className:"text-[10px] text-muted-foreground",children:e.cluster})]}),(0,s.jsx)("div",{className:"text-sm font-semibold leading-tight",children:e.title}),e.role&&(0,s.jsx)("div",{className:"mt-1 text-[11px] text-muted-foreground",children:e.role}),e.plain&&(0,s.jsx)("div",{className:"mt-2 text-[12px] text-foreground/80",children:e.plain})]},t))})}function F({draftDoc:e}){let t=e?.tables??[],n=e?.endpoints??[];return 0===t.length&&0===n.length?(0,s.jsx)("div",{className:"flex h-full items-center justify-center px-6 text-center text-sm text-muted-foreground",children:"No schema was proposed in this plan."}):(0,s.jsxs)("div",{className:"space-y-5 px-5 py-4",children:[t.length>0&&(0,s.jsxs)("section",{children:[(0,s.jsxs)("div",{className:"mb-2 text-[10.5px] font-semibold uppercase tracking-wide text-muted-foreground",children:["Tables \xb7 ",t.length]}),(0,s.jsx)("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:t.map(e=>(0,s.jsxs)("div",{className:"rounded-lg border border-white/5 bg-card/40 p-3",children:[(0,s.jsxs)("div",{className:"mb-1 flex items-center gap-1.5",children:[(0,s.jsx)("span",{className:"font-mono text-[13px] font-semibold",children:e.name}),e.domain&&(0,s.jsx)("span",{className:"text-[10px] text-muted-foreground",children:e.domain})]}),e.description&&(0,s.jsx)("div",{className:"mb-1.5 text-[11px] text-muted-foreground",children:e.description}),(0,s.jsx)("ul",{className:"space-y-0.5 text-[11px]",children:e.columns.map((e,t)=>(0,s.jsxs)("li",{className:"flex items-baseline gap-1.5",children:[(0,s.jsx)("code",{className:"rounded bg-white/5 px-1 font-mono text-[11px]",children:e.name}),(0,s.jsx)("span",{className:"text-muted-foreground",children:e.type}),e.isPk&&(0,s.jsx)("span",{className:"text-amber-300/80 text-[9px]",children:"PK"}),e.isFk&&(0,s.jsx)("span",{className:"text-sky-300/80 text-[9px]",children:"FK"}),!e.nullable&&(0,s.jsx)("span",{className:"text-muted-foreground/60 text-[9px]",children:"NOT NULL"})]},t))})]},e.id))})]}),n.length>0&&(0,s.jsxs)("section",{children:[(0,s.jsxs)("div",{className:"mb-2 text-[10.5px] font-semibold uppercase tracking-wide text-muted-foreground",children:["Endpoints \xb7 ",n.length]}),(0,s.jsx)("ul",{className:"space-y-1.5",children:n.map(e=>{let t;return(0,s.jsxs)("li",{className:"flex items-center gap-2 rounded-md border border-white/5 bg-card/40 px-2.5 py-1.5 text-[12px]",children:[(0,s.jsx)("span",{className:"rounded px-1.5 py-0.5 text-[10px] font-bold",style:(t=U[e.method.toUpperCase()]??"#8a8a8a",{background:`${t}22`,color:t}),children:e.method}),(0,s.jsx)("span",{className:"font-mono",children:e.path}),e.description&&(0,s.jsx)("span",{className:"ml-2 text-[11px] text-muted-foreground",children:e.description})]},e.id)})})]})]})}let U={GET:"#7bd389",POST:"#4ea1ff",PUT:"#ffb86b",PATCH:"#ffb86b",DELETE:"#ff3860"};function X({markdown:e}){let t=(0,r.useMemo)(()=>(0,A.n$)(e).map((e,t)=>({b:e,i:t})).filter(({b:e})=>(0,A.Vq)(e.kind)).map(({b:e,i:t})=>({id:(0,A.vB)(t),level:(0,A.F8)(e.kind),label:(0,A.kz)(e.text)})).filter(e=>e.label.length>0),[e]),[n,a]=(0,r.useState)(null);return(0,r.useEffect)(()=>{if("u"<typeof IntersectionObserver||0===t.length)return;let e=t.map(e=>document.getElementById(e.id)).filter(e=>null!==e);if(0===e.length)return;let n=new IntersectionObserver(e=>{let t=e.filter(e=>e.isIntersecting).sort((e,t)=>e.boundingClientRect.top-t.boundingClientRect.top);t[0]&&a(t[0].target.id)},{rootMargin:"-12% 0px -70% 0px",threshold:0});return e.forEach(e=>n.observe(e)),()=>n.disconnect()},[t]),(0,s.jsxs)("aside",{className:"flex w-60 shrink-0 flex-col overflow-y-auto border-r border-white/5 bg-background pt-16",children:[(0,s.jsx)("div",{className:"px-4 pb-2 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Sections"}),0===t.length?(0,s.jsx)("p",{className:"px-4 text-[12px] text-muted-foreground/70",children:"No headings in this plan."}):(0,s.jsx)("nav",{className:"space-y-0.5 px-2 pb-6",children:t.map(e=>(0,s.jsx)("button",{onClick:()=>{var t;let n;return t=e.id,void((n=document.getElementById(t))&&(n.scrollIntoView({behavior:"smooth",block:"start"}),a(t)))},title:e.label,style:{paddingLeft:`${.5+.75*e.level}rem`},className:(0,C.cn)("block w-full truncate rounded py-1 pr-2 text-left text-[12px] leading-snug transition-colors",n===e.id?"bg-white/10 font-medium text-foreground":"text-muted-foreground hover:bg-white/[0.05] hover:text-foreground"),children:e.label},e.id))})]})}var B=n(50981),K=n(74350),q=n(4474),G=n(97358);function H({open:e,onOpenChange:t,onConfirmed:n}){let[o,l]=(0,r.useState)("bypassPermissions"),[i,d]=(0,r.useState)(!1);async function c(){d(!0);try{await fetch("/api/preferences",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({planApprovalMode:o})}).catch(()=>{}),t(!1),n()}finally{d(!1)}}return(0,s.jsx)(K.lG,{open:e,onOpenChange:t,children:(0,s.jsxs)(K.Cf,{className:"max-w-lg",children:[(0,s.jsxs)(K.c7,{children:[(0,s.jsxs)(K.L3,{className:"flex items-center gap-2",children:[(0,s.jsx)(B.A,{className:"size-4 text-emerald-400"}),"After approving, the agent should…"]}),(0,s.jsx)(K.rr,{children:"Pick the permission mode your terminal session enters when you approve a plan. We ask once and remember it for every project — change it anytime in Settings."})]}),(0,s.jsx)("div",{className:"space-y-2 py-1",children:G.pC.map(e=>(0,s.jsxs)("button",{type:"button",onClick:()=>l(e.value),className:(0,C.cn)("flex w-full items-start gap-3 rounded-lg border p-3 text-left transition-colors",o===e.value?"border-emerald-500/50 bg-emerald-500/10":"border-white/10 bg-white/[0.03] hover:bg-white/[0.06]"),children:[(0,s.jsx)("span",{className:(0,C.cn)("mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-full border",o===e.value?"border-emerald-400 bg-emerald-400/20":"border-white/30"),children:o===e.value&&(0,s.jsx)(a.A,{className:"size-3 text-emerald-300"})}),(0,s.jsxs)("span",{className:"min-w-0",children:[(0,s.jsx)("span",{className:"block text-sm font-medium text-foreground",children:e.label}),(0,s.jsx)("span",{className:"block text-xs text-muted-foreground",children:e.description})]})]},e.value))}),(0,s.jsxs)(K.Es,{className:"items-center justify-between gap-2 sm:justify-between",children:[(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:"You can change this later in Settings."}),(0,s.jsx)(q.$,{onClick:c,disabled:i,size:"sm",children:i?"Saving…":"Save & approve"})]})]})})}var _=n(5712),V=n(91588);function Y({dbProps:e,mapProps:t,planMarkdown:n,forceHistory:c=!1}){let k=(0,j.useRouter)(),{status:N,discard:A}=(0,y.j)(),S=t.nodes.length>0,R=e.tables.length>0||e.endpoints.length>0||(e.draft?.tables.length??0)>0||(e.draft?.endpoints.length??0)>0,[P,M]=(0,r.useState)(S?"map":"db"),O="map"!==P||S?"db"!==P||R?P:"map":"db",[D,T]=(0,r.useState)(!1),[I,$]=(0,r.useState)(!1),[F,U]=(0,r.useState)(null),B=(0,r.useCallback)(async()=>{await fetch("/api/plan/approve",{method:"POST",headers:(0,w.dh)((0,w.X0)())}).catch(()=>{}),U({features:N.features,tables:N.tables,endpoints:N.endpoints})},[N.features,N.tables,N.endpoints]),K=(0,r.useCallback)(async()=>{try{let e=await fetch("/api/preferences",{cache:"no-store"});if((await e.json()).planApprovalModeConfigured)return void B()}catch{B();return}$(!0)},[B]),[q,G]=(0,r.useState)(null),Q=(0,r.useCallback)(e=>G(e),[]),Z=(0,r.useRef)(null),ee=(0,r.useRef)(null),et=(0,r.useRef)(e.draft),[en,es]=(0,r.useState)(!1),er=(0,r.useCallback)(()=>es(!0),[]),[ea,eo]=(0,r.useState)([]),[el,ei]=(0,r.useState)(!1),[ed,ec]=(0,r.useState)(""),eu=(0,r.useCallback)(e=>{ec(e),ei(!0)},[]),em=(0,r.useRef)(ea);(0,r.useEffect)(()=>{em.current=ea},[ea]),(0,r.useEffect)(()=>{eo([]),ei(!1),es(!1)},[N.proposedAt]),(0,r.useEffect)(()=>{let e=()=>void fetch("/api/plan/presence",{method:"POST",cache:"no-store",headers:(0,w.dh)((0,w.X0)())}).catch(()=>{});e();let t=setInterval(e,5e3);return()=>clearInterval(t)},[]);let ex=(0,r.useCallback)(()=>({draft:et.current,questions:em.current}),[]),ep=(0,r.useMemo)(()=>{let n=[];for(let e of t.nodes)n.push(`feature: ${e.title}`);for(let t of e.draft?.tables??[])n.push(`table: ${t.name}`);for(let t of e.tables)n.push(`table: ${t.name}`);for(let t of e.draft?.endpoints??[])n.push(`endpoint: ${t.method} ${t.path}`);for(let t of e.endpoints)n.push(`endpoint: ${t.method} ${t.path}`);return Array.from(new Set(n))},[t.nodes,e]),eh=q?(0,s.jsx)(E,{annotations:q.annotations,updateComment:q.updateComment,removeAnnotation:q.removeAnnotation,focusOnAnnotation:q.focusOnAnnotation,onClose:()=>Z.current?.close()}):null,ef=(0,r.useCallback)(()=>{Z.current?.open()},[]),eg=(0,r.useCallback)(()=>{"db"===O?ee.current?.openComments():Z.current?.openComments()},[O]),eb=(0,r.useCallback)(e=>{q?.addComment(e)},[q]),ev=(0,r.useCallback)(e=>{q?.focusOnAnnotation(e),"db"===O?ee.current?.openComments():Z.current?.openComments()},[q,O]),[ej,ey]=(0,r.useState)(()=>{try{let e=window.localStorage.getItem("beacon:plan-left-pct");return e?Math.max(20,Math.min(80,Number(e))):50}catch{return 50}}),ew=(0,r.useRef)(null),ek=(0,r.useRef)(!1),eN=(0,r.useCallback)(e=>{e.preventDefault(),ek.current=!0,document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[]);(0,r.useEffect)(()=>{let e=e=>{if(!ek.current||!ew.current)return;let t=ew.current.getBoundingClientRect();ey(Math.max(20,Math.min(80,(e.clientX-t.left)/t.width*100)))},t=()=>{if(ek.current){ek.current=!1,document.body.style.cursor="",document.body.style.userSelect="";try{localStorage.setItem("beacon:plan-left-pct",String(ej))}catch{}}};return window.addEventListener("pointermove",e),window.addEventListener("pointerup",t),()=>{window.removeEventListener("pointermove",e),window.removeEventListener("pointerup",t)}},[ej]);let eC=async()=>{await fetch("/api/plan/annotations",{method:"DELETE",headers:(0,w.dh)((0,w.X0)())}).catch(()=>{}),await A(),k.refresh()};if((!N.pending||c)&&!F)return(0,s.jsx)(L,{pendingPlan:N.pending});let eA=S||R,ez=eA&&!D,eS=!eA||D,eE=((q?.liveCount??0)>0||en||ea.length>0)&&!q?.submitted;return(0,s.jsxs)("div",{className:"relative flex h-screen flex-col",children:[F&&(0,s.jsxs)("div",{className:"absolute inset-0 z-50 flex flex-col items-center justify-center gap-5 bg-background/97 px-6 text-center backdrop-blur-sm",children:[(0,s.jsx)("div",{className:"flex size-12 items-center justify-center rounded-full bg-emerald-500/15",children:(0,s.jsx)(a.A,{className:"size-6 text-emerald-300"})}),(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold text-foreground",children:"Plan approved"}),(0,s.jsx)("p",{className:"max-w-sm text-sm text-muted-foreground",children:F.features>0||F.tables>0||F.endpoints>0?"It's committed. Here's where to find it:":"It's archived to your plan history."})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-center gap-2",children:[F.features>0&&(0,s.jsxs)("button",{onClick:()=>k.push("/map?view=ROADMAP"),className:"flex items-center gap-2 rounded-lg border border-white/12 px-3 py-2 text-sm text-foreground transition-colors hover:bg-white/[0.06]",children:[(0,s.jsx)(o.A,{className:"size-4 text-sky-300"})," ",F.features," feature",1===F.features?"":"s"," → Map"]}),(F.tables>0||F.endpoints>0)&&(0,s.jsxs)("button",{onClick:()=>k.push("/map?view=DATABASE"),className:"flex items-center gap-2 rounded-lg border border-white/12 px-3 py-2 text-sm text-foreground transition-colors hover:bg-white/[0.06]",children:[(0,s.jsx)(l.A,{className:"size-4 text-violet-300"})," ",F.tables," table",1===F.tables?"":"s"," \xb7 ",F.endpoints," endpoint",1===F.endpoints?"":"s"," → Database"]})]}),(0,s.jsx)("button",{onClick:()=>{U(null),k.push((0,w.rc)({view:"history"}))},className:"rounded-full border border-white/12 px-3 py-1.5 text-xs font-medium text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:"Done — browse plan history"})]}),q?.submitted&&(0,s.jsxs)("div",{className:"absolute inset-0 z-40 flex flex-col items-center justify-center gap-4 bg-background/95 px-6 text-center backdrop-blur-sm",children:[(0,s.jsx)("div",{className:"flex size-12 items-center justify-center rounded-full bg-sky-500/15",children:(0,s.jsx)(i.A,{className:"size-6 animate-spin text-sky-300"})}),(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold text-foreground",children:"Feedback sent"}),(0,s.jsx)("p",{className:"max-w-sm text-sm text-muted-foreground",children:"Your terminal session is revising the plan based on your comments. The updated plan will appear here automatically — no need to refresh."})]}),(0,s.jsx)("button",{onClick:()=>k.push((0,w.rc)({view:"history"})),className:"rounded-full border border-white/12 px-3 py-1.5 text-xs font-medium text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:"Browse past plans"})]}),(0,s.jsxs)("div",{className:"pointer-events-none fixed right-3 top-3 z-30 flex items-center gap-2",children:[eA&&D&&(0,s.jsx)("button",{onClick:()=>T(!1),title:"Collapse — show the board again",className:"glass pointer-events-auto flex size-8 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:(0,s.jsx)(d.A,{className:"size-3.5"})}),(0,s.jsxs)("div",{className:"glass pointer-events-auto flex h-10 items-center gap-0.5 rounded-full px-1",children:[(0,s.jsx)("button",{onClick:()=>k.push((0,w.rc)({view:"history"})),title:"Browse past plans (you can come back to this one)",className:"flex size-8 shrink-0 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:(0,s.jsx)(u,{className:"size-3.5"})}),(0,s.jsx)("span",{"aria-hidden":!0,className:"mx-1 h-5 w-px bg-white/10"}),(0,s.jsx)("button",{onClick:ef,disabled:!q,title:"Open the side panel (details)",className:"relative flex size-8 shrink-0 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:(0,s.jsx)(m.A,{className:"size-3.5"})}),(0,s.jsxs)("button",{onClick:eg,disabled:!q,title:q?.annotationCount?`Open comments \xb7 ${q.annotationCount} comment${1===q.annotationCount?"":"s"} so far`:"Open comments — select a card/table and 'Comment on this', or highlight text",className:"relative flex size-8 shrink-0 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:[(0,s.jsx)(x,{className:"size-3.5"}),q&&(q.annotationCount??0)>0&&(0,s.jsx)("span",{className:"absolute -right-0.5 -top-0.5 flex h-3.5 min-w-3.5 items-center justify-center rounded-full bg-sky-500 px-1 text-[9px] font-semibold text-white",children:q.annotationCount})]}),(0,s.jsxs)("button",{"data-overall-toggle":!0,onClick:()=>q?.toggleOverall?.(),disabled:!q?.toggleOverall,title:q?.hasGlobalComment?"Edit your overall feedback":"Add overall plan-level feedback",className:(0,C.cn)("relative flex size-8 shrink-0 items-center justify-center rounded-full transition-colors",q?.globalOpen?"bg-white/10 text-foreground":q?.hasGlobalComment?"text-sky-300 hover:bg-sky-500/15":"text-muted-foreground hover:bg-white/[0.06] hover:text-foreground"),children:[(0,s.jsx)(p.A,{className:"size-3.5"}),q?.hasGlobalComment&&(0,s.jsx)("span",{className:"absolute -right-0.5 -top-0.5 size-2 rounded-full bg-sky-400"})]}),(0,s.jsxs)("button",{onClick:()=>ei(e=>!e),title:"Ask the agent a question about a node (answered in its next round)",className:(0,C.cn)("relative flex size-8 shrink-0 items-center justify-center rounded-full transition-colors",el?"bg-white/10 text-foreground":ea.length?"text-sky-300 hover:bg-sky-500/15":"text-muted-foreground hover:bg-white/[0.06] hover:text-foreground"),children:[(0,s.jsx)(h.A,{className:"size-3.5"}),ea.length>0&&(0,s.jsx)("span",{className:"absolute -right-0.5 -top-0.5 flex h-3.5 min-w-3.5 items-center justify-center rounded-full bg-sky-500 px-1 text-[9px] font-semibold text-white",children:ea.length})]}),(0,s.jsx)("span",{"aria-hidden":!0,className:"mx-1 h-5 w-px bg-white/10"}),(0,s.jsxs)("button",{onClick:()=>q?.submit(),disabled:!q||q.submitting||0===q.liveCount&&!en&&0===ea.length,title:q&&(0!==q.liveCount||en||0!==ea.length)?q.submitted?"Submitted — your terminal session is reading the feedback":"Submit feedback (comments + canvas edits) so the agent can revise the plan":"Highlight text or edit the canvas, then submit",className:(0,C.cn)("flex shrink-0 items-center gap-1 rounded-full px-2.5 py-1 text-[11px] font-semibold transition-colors",q?.submitted?"text-sky-300":q&&(0!==q.liveCount||en||0!==ea.length)?"text-sky-300 hover:bg-sky-500/15":"text-muted-foreground opacity-50"),children:[q?.submitted?(0,s.jsx)(a.A,{className:"size-3"}):(0,s.jsx)(f.A,{className:"size-3"}),q?.submitted?"Submitted":"Feedback"]}),eE&&(0,s.jsxs)("button",{onClick:()=>{q?.clearAll?.(),es(!1),eo([])},title:"Discard your unsubmitted comments / canvas edits so you can approve the plan as-is",className:"flex shrink-0 items-center gap-1 rounded-full px-2 py-1 text-[11px] font-medium text-amber-300/90 transition-colors hover:bg-amber-500/15",children:[(0,s.jsx)(g.A,{className:"size-3"})," Clear to approve"]}),(0,s.jsxs)("button",{onClick:()=>void K(),disabled:eE,title:eE?"You have unsubmitted feedback — submit it, or click ‘Clear to approve’ to drop it":"Approve the plan",className:(0,C.cn)("flex shrink-0 items-center gap-1 rounded-full border border-emerald-500/40 bg-emerald-500/15 px-2.5 py-1 text-[11px] font-semibold text-emerald-300 transition-colors hover:bg-emerald-500/25",eE&&"opacity-40 hover:bg-emerald-500/15"),children:[(0,s.jsx)(a.A,{className:"size-3"})," Approve"]}),(0,s.jsxs)("button",{onClick:eC,className:"flex shrink-0 items-center gap-1 rounded-full px-2.5 py-1 text-[11px] font-medium text-muted-foreground transition-colors hover:bg-red-500/15 hover:text-red-300",title:"Discard the plan",children:[(0,s.jsx)(b.A,{className:"size-3"})," Discard"]}),(0,s.jsx)(H,{open:I,onOpenChange:$,onConfirmed:()=>void B()})]})]}),el&&(0,s.jsxs)("div",{className:"fixed right-3 top-16 z-30 w-80 rounded-xl border border-white/10 bg-card p-3 shadow-xl",children:[(0,s.jsxs)("div",{className:"mb-2 flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Ask the agent"}),(0,s.jsx)("button",{onClick:()=>ei(!1),title:"Close",className:"rounded p-0.5 text-muted-foreground hover:text-foreground",children:(0,s.jsx)(g.A,{className:"size-3.5"})})]}),(0,s.jsx)(J,{targets:ep,initialTarget:ed,onAdd:e=>eo(t=>[...t,e])}),ea.length>0&&(0,s.jsx)("ul",{className:"mt-2 space-y-1",children:ea.map((e,t)=>(0,s.jsxs)("li",{className:"group flex items-start justify-between gap-2 rounded-md border border-white/5 bg-background/40 px-2 py-1",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("div",{className:"truncate font-mono text-[10px] text-sky-300/90",children:e.target}),(0,s.jsx)("div",{className:"text-[11px] text-foreground/90",children:e.question})]}),(0,s.jsx)("button",{onClick:()=>eo(e=>e.filter((e,n)=>n!==t)),title:"Remove",className:"shrink-0 rounded p-0.5 text-muted-foreground/70 opacity-0 transition-opacity hover:text-red-300 group-hover:opacity-100",children:(0,s.jsx)(g.A,{className:"size-3"})})]},t))}),(0,s.jsx)("p",{className:"mt-2 text-[10px] text-muted-foreground",children:"Questions are sent with your feedback on Submit — the agent answers them in its next round."})]}),(0,s.jsxs)("div",{ref:ew,className:"flex min-h-0 flex-1",children:[eS&&(0,s.jsx)(X,{markdown:n}),(0,s.jsxs)("div",{className:(0,C.cn)("relative flex min-w-0 flex-col",!ez&&"flex-1"),style:ez?{width:`${ej}%`}:void 0,children:[ez&&(0,s.jsx)("div",{className:"pointer-events-none absolute right-3 top-3 z-20",children:(0,s.jsx)("button",{onClick:()=>T(!0),title:"Expand the plan to full width",className:"glass pointer-events-auto flex size-8 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:(0,s.jsx)(v.A,{className:"size-3.5"})})}),(0,s.jsx)("div",{className:"min-h-0 flex-1 overflow-hidden bg-background",children:(0,s.jsx)(z,{markdown:n,round:N.proposedAt,onApi:Q,hideSubmit:!0,getExtraSubmitPayload:ex})})]}),ez&&(0,s.jsx)("div",{onPointerDown:eN,className:"group relative w-px shrink-0 cursor-col-resize bg-white/5 hover:bg-white/15",title:"Drag to resize",children:(0,s.jsx)("div",{className:"absolute inset-y-0 -left-1.5 right-[-6px] z-10"})}),ez&&(0,s.jsxs)("div",{className:"relative flex min-w-0 flex-col",style:{width:`${100-ej}%`},children:[S&&R&&(0,s.jsx)("div",{className:"pointer-events-none absolute left-3 top-3 z-20",children:(0,s.jsxs)("div",{className:"glass pointer-events-auto flex items-center gap-1 rounded-full p-0.5",children:[(0,s.jsx)(W,{active:"map"===O,onClick:()=>M("map"),icon:(0,s.jsx)(o.A,{className:"size-3"}),children:"Map"}),(0,s.jsx)(W,{active:"db"===O,onClick:()=>M("db"),icon:(0,s.jsx)(l.A,{className:"size-3"}),children:"Database"})]})}),(0,s.jsx)("div",{className:"min-h-0 flex-1 overflow-hidden bg-background",children:"map"===O?(0,s.jsx)(_.MapClient,{view:t.view,nodes:t.nodes,edges:t.edges,embedded:!0,commentsContent:eh,commentsCount:q?.annotationCount??0,controlRef:Z,onAskAgent:eu,onAddComment:eb,annotations:q?.annotations,onPinClick:ev,onUpdateComment:q?.updateComment,onRemoveComment:q?.removeAnnotation}):(0,s.jsx)(V.DbMapClient,{tables:e.tables,relations:e.relations,endpoints:e.endpoints,draft:e.draft,workspaceId:e.workspaceId,embedded:!0,draftRef:et,onEdit:er,controlRef:ee,commentsContent:eh,commentsCount:q?.annotationCount??0,onAddComment:eb,annotations:q?.annotations,onPinClick:ev,onUpdateComment:q?.updateComment,onRemoveComment:q?.removeAnnotation})})]})]})]})}function J({targets:e,onAdd:t,initialTarget:n}){let[a,o]=(0,r.useState)(n||e[0]||""),[l,i]=(0,r.useState)("");(0,r.useEffect)(()=>{n&&o(n)},[n]),(0,r.useEffect)(()=>{!a&&e[0]&&o(e[0])},[e,a]);let d=()=>{let e=l.trim();e&&(t({target:a||"(plan)",question:e}),i(""))};return(0,s.jsxs)("div",{className:"space-y-1.5",children:[e.length>0&&(0,s.jsx)("select",{value:a,onChange:e=>o(e.target.value),className:"w-full rounded border border-white/10 bg-background px-2 py-1 text-[11px] outline-none focus:border-sky-400/40",children:e.map(e=>(0,s.jsx)("option",{value:e,className:"bg-card",children:e},e))}),(0,s.jsx)("textarea",{value:l,onChange:e=>i(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),d())},rows:2,placeholder:"e.g. why a new table instead of reusing users? (⌘/Ctrl+Enter to add)",className:"w-full resize-y rounded border border-white/10 bg-background px-2 py-1.5 text-[12px] leading-snug outline-none focus:border-sky-400/40"}),(0,s.jsx)("button",{onClick:d,disabled:!l.trim(),className:(0,C.cn)("w-full rounded-md px-2 py-1 text-[11px] font-semibold transition-colors",l.trim()?"bg-sky-500/15 text-sky-300 hover:bg-sky-500/25":"text-muted-foreground opacity-50"),children:"Add question"})]})}function W({active:e,onClick:t,icon:n,children:r}){return(0,s.jsxs)("button",{onClick:t,className:(0,C.cn)("flex items-center gap-1 rounded-md px-2.5 py-1 text-[11px] font-medium transition-colors",e?"bg-white/10 text-foreground":"text-muted-foreground hover:text-foreground"),children:[n,r]})}},22137:(e,t,n)=>{Promise.resolve().then(n.bind(n,10396))},38332:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});let s=(0,n(30772).A)("strikethrough",[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]])},48484:(e,t,n)=>{"use strict";n.d(t,{PlanProvider:()=>d,j:()=>c});var s=n(95155),r=n(12115),a=n(73321),o=n(99979);let l={pending:!1,proposedAt:0,tables:0,endpoints:0,features:0},i=(0,r.createContext)(null);function d({children:e}){let t=(0,a.useRouter)(),[n,c]=(0,r.useState)(l),u=(0,r.useCallback)(async()=>{try{let e=await fetch("/api/plan",{method:"GET",cache:"no-store",headers:(0,o.dh)((0,o.X0)())});if(!e.ok)return;let t=await e.json();c(t)}catch{}},[]);(0,r.useEffect)(()=>{u();let e=setInterval(()=>void u(),4e3);return()=>clearInterval(e)},[u]);let m=(0,r.useCallback)(async()=>{await fetch("/api/plan",{method:"DELETE",headers:(0,o.dh)((0,o.X0)())}).catch(()=>{}),c(l),t.refresh()},[t]),x=(0,r.useCallback)(async()=>{await fetch("/api/plan/approve",{method:"POST",headers:(0,o.dh)((0,o.X0)())}).catch(()=>{}),c(l),t.refresh()},[t]);return(0,s.jsx)(i.Provider,{value:{status:n,discard:m,approvePlan:x,refresh:u},children:e})}function c(){let e=(0,r.useContext)(i);if(!e)throw Error("usePlan must be used inside PlanProvider");return e}},50981:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});let s=(0,n(30772).A)("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},82879:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});let s=(0,n(30772).A)("sticky-note",[["path",{d:"M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z",key:"1dfntj"}],["path",{d:"M15 3v5a1 1 0 0 0 1 1h5",key:"6s6qgf"}]])},92571:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});let s=(0,n(30772).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},97358:(e,t,n)=>{"use strict";n.d(t,{pC:()=>s});let s=[{value:"default",label:"Manual approval",description:"Approve each tool call yourself — Claude Code's default."},{value:"acceptEdits",label:"Auto-accept edits",description:"Auto-approve file edits; still ask before running other tools."},{value:"bypassPermissions",label:"Bypass permissions",description:"Auto-approve every tool call (like --dangerously-skip-permissions)."},{value:"auto",label:"Auto",description:"Autonomous, gated by a safety classifier (needs a recent Claude Code + Sonnet 4.6+)."}]},99979:(e,t,n)=>{"use strict";function s(){return new URLSearchParams(window.location.search).get("ws")}function r(e){return e?{"x-beacon-workspace":e}:{}}function a(e){let t=new URLSearchParams,n=s();for(let[s,r]of(n&&t.set("ws",n),Object.entries(e??{})))t.set(s,r);let r=t.toString();return r?`/plan?${r}`:"/plan"}n.d(t,{X0:()=>s,dh:()=>r,rc:()=>a})}},e=>{e.O(0,[2574,3862,8500,4294,766,1202,1317,8441,3794,7358],()=>e(e.s=22137)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6624],{8143:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});let s=(0,n(30772).A)("list-checks",[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]])},9383:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});let s=(0,n(30772).A)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]])},10396:(e,t,n)=>{"use strict";n.d(t,{PlanWorkspace:()=>Y});var s=n(95155),r=n(12115),a=n(64577),o=n(25640),l=n(34306),i=n(92571),d=n(65408),c=n(30772);let u=(0,c.A)("archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);var m=n(8143);let x=(0,c.A)("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]);var p=n(82879),h=n(17356),f=n(9383),g=n(9005),b=n(65738),v=n(8962),j=n(73321),y=n(48484),w=n(99979),k=n(32133),N=n(38332),C=n(91337),A=n(60874);function z({markdown:e,round:t,onApi:n,hideSubmit:o=!1,getExtraSubmitPayload:l}){let[i,d]=(0,r.useState)([]),[c,u]=(0,r.useState)(""),[m,x]=(0,r.useState)(!1),[p,h]=(0,r.useState)(null),[b,v]=(0,r.useState)(null),[j,y]=(0,r.useState)(null),[A,E]=(0,r.useState)(!1),[P,M]=(0,r.useState)(!1),O=(0,r.useRef)(null),D=(0,r.useRef)(null);(0,r.useEffect)(()=>{let e=!0;return(async()=>{try{let t=await fetch("/api/plan/annotations",{cache:"no-store",headers:(0,w.dh)((0,w.X0)())});if(!t.ok)return;let n=await t.json();if(!e)return;d(n.annotations??[]),u(n.globalComment??""),M(!!n.submitted)}catch{}})(),()=>{e=!1}},[e,t]),(0,r.useEffect)(()=>{if(P)return;let e=setTimeout(()=>{fetch("/api/plan/annotations",{method:"PUT",headers:{"content-type":"application/json",...(0,w.dh)((0,w.X0)())},body:JSON.stringify({annotations:i,globalComment:c,round:t})}).catch(()=>{})},400);return()=>clearTimeout(e)},[i,c,P,t]);let T=(0,r.useCallback)(()=>{let e=window.getSelection();if(!e||e.isCollapsed)return void h(null);let t=e.toString().trim();if(!t)return void h(null);if(!O.current?.contains(e.anchorNode))return;let n=e.getRangeAt(0).getBoundingClientRect();h({x:n.right+window.scrollX,y:n.top+window.scrollY,excerpt:t})},[]);(0,r.useEffect)(()=>{let e=()=>setTimeout(T,0);return document.addEventListener("mouseup",e),document.addEventListener("selectionchange",e),()=>{document.removeEventListener("mouseup",e),document.removeEventListener("selectionchange",e)}},[T]);let L=(0,r.useCallback)((e,t="comment",n="")=>{let s=`a-${Date.now()}-${Math.floor(1e6*Math.random())}`;d(r=>[...r,{id:s,excerpt:e,comment:n,kind:t}]),"comment"===t&&y(s),h(null),window.getSelection()?.removeAllRanges()},[]);(0,r.useEffect)(()=>{let e=e=>{let t=window.getSelection();if(!t||t.isCollapsed)return;let n=t.toString().trim();if(!n||!O.current?.contains(t.anchorNode))return;let s=document.activeElement;if(s&&/^(TEXTAREA|INPUT)$/.test(s.tagName)||!(1===e.key.length&&!e.metaKey&&!e.ctrlKey&&!e.altKey))return;e.preventDefault();let r=t.getRangeAt(0).getBoundingClientRect();v({x:r.right+window.scrollX,y:r.top+window.scrollY,excerpt:n,seed:e.key}),h(null),window.getSelection()?.removeAllRanges()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[]),(0,r.useEffect)(()=>{if(!m)return;let e=e=>{let t=e.target;!t||D.current?.contains(t)||t.closest("[data-overall-toggle]")||x(!1)},t=e=>{"Escape"===e.key&&x(!1)};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[m]);let I=(e,t)=>d(n=>n.map(n=>n.id===e?{...n,comment:t}:n)),$=e=>d(t=>t.filter(t=>t.id!==e)),F=()=>{d([]),u(""),x(!1),fetch("/api/plan/annotations",{method:"DELETE",headers:(0,w.dh)((0,w.X0)())}).catch(()=>{})},B=async()=>{if(!A){E(!0);try{let e=l?.()??{},n=await fetch("/api/plan/annotations",{method:"POST",headers:{"content-type":"application/json",...(0,w.dh)((0,w.X0)())},body:JSON.stringify({annotations:i,globalComment:c,round:t,...e})});n.ok?M(!0):409===n.status&&window.location.reload()}finally{E(!1)}}},U=(0,r.useMemo)(()=>i.filter(e=>"deletion"===e.kind||e.comment.trim()).length+ +!!c.trim(),[i,c]);return(0,r.useEffect)(()=>{n?.({liveCount:U,submitting:A,submitted:P,submit:()=>void B(),clearAll:F,annotationCount:i.length,hasGlobalComment:!!c.trim(),globalOpen:m,toggleOverall:()=>x(e=>!e),annotations:i,updateComment:I,removeAnnotation:$,focusOnAnnotation:e=>y(e),addComment:e=>L(e,"comment")})},[U,A,P,i,c,m]),(0,s.jsxs)("div",{className:"flex h-full min-h-0 flex-col",children:[(0,s.jsx)("div",{className:"relative shrink-0",children:(0,s.jsxs)("div",{className:"absolute right-3 top-2 z-30 flex items-center gap-1",children:[!o&&(0,s.jsxs)("button",{onClick:()=>void B(),disabled:A||0===U,className:(0,C.cn)("flex items-center gap-1 rounded-md border px-2 py-1 text-[11px] font-semibold transition-colors",P?"border-emerald-500/40 bg-emerald-500/15 text-emerald-300":0===U?"border-white/10 text-muted-foreground opacity-50":"border-sky-500/40 bg-sky-500/15 text-sky-300 hover:bg-sky-500/25"),title:P?"Submitted — your terminal session is reading the feedback":"Submit all feedback so the agent can revise the plan",children:[P?(0,s.jsx)(a.A,{className:"size-3"}):(0,s.jsx)(f.A,{className:"size-3"}),P?"Submitted":"Submit feedback"]}),m&&(0,s.jsxs)("div",{ref:D,className:"absolute right-0 top-[calc(100%+6px)] z-50 w-[320px] rounded-md border border-white/10 bg-card p-2 shadow-xl",children:[(0,s.jsxs)("div",{className:"mb-1 flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Overall feedback"}),(0,s.jsx)("button",{onClick:()=>x(!1),title:"Close (Esc)",className:"rounded p-0.5 text-muted-foreground hover:text-foreground",children:(0,s.jsx)(g.A,{className:"size-3"})})]}),(0,s.jsx)("textarea",{autoFocus:!0,value:c,onChange:e=>u(e.target.value),onKeyDown:e=>{e.stopPropagation(),"Enter"===e.key&&e.shiftKey?(e.preventDefault(),!A&&U>0&&(B(),x(!1))):"Escape"===e.key&&(e.preventDefault(),x(!1))},placeholder:"Plan-level notes — e.g. 'split this into two phases' or 'wrong abstraction'…",rows:4,className:"w-full resize-y rounded border border-white/5 bg-background px-2 py-1.5 text-[12px] leading-snug outline-none focus:border-sky-400/40"}),(0,s.jsx)("div",{className:"mt-1 text-right text-[9px] text-muted-foreground/70",children:"Shift+Enter to submit \xb7 Esc to close"})]})]})}),(0,s.jsx)("div",{ref:O,className:"min-h-0 flex-1 overflow-y-auto px-5 pb-5 pt-16 text-[15px] leading-[1.6] selection:bg-[var(--accent-2,#ff7a45)]/30",children:(0,s.jsx)(R,{markdown:e,annotations:b?[...i,{id:"__pending",excerpt:b.excerpt,comment:"",kind:"comment"}]:i,focusOnId:j,onClearFocus:()=>y(null),onUpdate:I,onRemove:$})}),p&&(0,s.jsxs)("div",{style:{position:"fixed",left:p.x+4,top:p.y-30,zIndex:60},className:"flex items-center gap-0.5 rounded-md border border-white/15 bg-card/95 p-0.5 shadow-lg backdrop-blur",children:[(0,s.jsx)("button",{onClick:()=>{v({...p,seed:""}),h(null),window.getSelection()?.removeAllRanges()},title:"Comment on this text",className:"rounded p-1 text-sky-300 hover:bg-sky-500/15",children:(0,s.jsx)(k.A,{className:"size-3.5"})}),(0,s.jsx)("button",{onClick:()=>L(p.excerpt,"deletion"),title:"Mark this for deletion",className:"rounded p-1 text-red-300 hover:bg-red-500/15",children:(0,s.jsx)(N.A,{className:"size-3.5"})})]}),b&&(0,s.jsx)(S,{excerpt:b.excerpt,x:b.x,y:b.y,seed:b.seed,onConfirm:e=>{L(b.excerpt,"comment",e),v(null)},onCancel:()=>v(null)})]})}function S({excerpt:e,x:t,y:n,seed:o,onConfirm:l,onCancel:i}){let[d,c]=(0,r.useState)(o),u=(0,r.useRef)(null),m=()=>d.trim()?l(d.trim()):i();return(0,s.jsxs)("div",{ref:u,style:{position:"fixed",left:t+4,top:n-6,zIndex:60},className:"w-64 rounded-md border border-white/15 bg-card/95 p-1.5 shadow-xl backdrop-blur",onBlur:e=>{u.current?.contains(e.relatedTarget)||m()},children:[(0,s.jsxs)("div",{className:"mb-1 line-clamp-1 text-[10px] text-muted-foreground",children:["“",e,"”"]}),(0,s.jsx)("textarea",{autoFocus:!0,value:d,onChange:e=>c(e.target.value),onFocus:e=>e.currentTarget.setSelectionRange(d.length,d.length),placeholder:"Comment… (Enter to add \xb7 Esc to discard)",onKeyDown:e=>{e.stopPropagation(),"Enter"!==e.key||e.shiftKey?"Escape"===e.key&&(e.preventDefault(),i()):(e.preventDefault(),m())},className:"h-16 w-full resize-none rounded bg-white/[0.05] px-1.5 py-1 text-xs outline-none placeholder:text-muted-foreground/50 focus:bg-white/[0.08]"}),(0,s.jsxs)("div",{className:"mt-1 flex items-center justify-end gap-1",children:[(0,s.jsxs)("button",{type:"button",onClick:i,title:"Discard this comment (Esc)",className:"flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground transition-colors hover:bg-red-500/15 hover:text-red-300",children:[(0,s.jsx)(g.A,{className:"size-3"}),"Discard"]}),(0,s.jsxs)("button",{type:"button",onClick:m,disabled:!d.trim(),title:"Add this comment (Enter)",className:"flex items-center gap-1 rounded bg-sky-500/15 px-1.5 py-0.5 text-[10px] font-semibold text-sky-300 transition-colors hover:bg-sky-500/25 disabled:opacity-40",children:[(0,s.jsx)(a.A,{className:"size-3"}),"Add"]})]})]})}function E({annotations:e,updateComment:t,removeAnnotation:n,focusOnAnnotation:r,onClose:a}){return 0===e.length?(0,s.jsx)("div",{className:"rounded-lg border border-dashed border-white/10 px-3 py-6 text-center text-[11px] text-muted-foreground",children:"Highlight any text in the plan to leave an inline comment."}):(0,s.jsx)("ul",{className:"space-y-1.5",children:e.map(e=>(0,s.jsx)("li",{className:(0,C.cn)("group rounded-md border bg-background/30 px-2 py-1.5 transition-colors hover:bg-background/50","deletion"===e.kind?"border-red-500/25":"border-sky-500/15"),children:(0,s.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("button",{type:"button",onClick:()=>{r(e.id),a?.()},title:"Jump to this excerpt in the plan",className:(0,C.cn)("block w-full truncate text-left text-[10.5px] font-mono","deletion"===e.kind?"text-red-300/90 line-through":"text-foreground/80 hover:text-foreground"),children:["“",e.excerpt,"”"]}),"deletion"!==e.kind&&(0,s.jsx)("textarea",{value:e.comment,onChange:n=>t(e.id,n.target.value),placeholder:"Write your comment…",rows:1,className:"field-sizing-content mt-1 w-full resize-none bg-transparent text-[11px] leading-snug text-foreground/90 outline-none placeholder:text-muted-foreground/60 focus:text-foreground"})]}),(0,s.jsx)("button",{onClick:()=>n(e.id),title:"Remove this annotation",className:"shrink-0 rounded p-1 text-muted-foreground/70 opacity-0 transition-opacity hover:bg-red-500/15 hover:text-red-300 group-hover:opacity-100",children:(0,s.jsx)(b.A,{className:"size-3"})})]})},e.id))})}function R({markdown:e,annotations:t,focusOnId:n,onClearFocus:a,onUpdate:o,onRemove:l}){let i=(0,r.useMemo)(()=>(0,A.n$)(e),[e]);return(0,s.jsx)("div",{className:"mx-auto w-full max-w-[66ch] space-y-4",children:i.map((e,r)=>(0,s.jsx)(P,{block:e,index:r,annotations:t,focusOnId:n,onClearFocus:a,onUpdate:o,onRemove:l},r))})}function P({block:e,index:t,annotations:n,focusOnId:r,onClearFocus:a,onUpdate:o,onRemove:l}){if("code"===e.kind)return(0,s.jsx)(A.NG,{text:e.text});if("table"===e.kind)return(0,s.jsx)(A.QH,{block:e});let i=(0,s.jsx)(M,{text:e.text,annotations:n,focusOnId:r,onClearFocus:a,onUpdate:o,onRemove:l}),d=(0,A.Vq)(e.kind)?(0,A.vB)(t):void 0;return(0,s.jsx)(s.Fragment,{children:(0,A.aM)(e,i,"reading",d)})}function M({text:e,annotations:t,focusOnId:n,onClearFocus:r,onUpdate:a,onRemove:o}){let l=t.map(t=>({a:t,idx:e.indexOf(t.excerpt)})).filter(e=>e.idx>=0).sort((e,t)=>e.idx-t.idx);if(!l.length)return(0,s.jsx)(D,{text:e});let i=[],d=0;for(let{a:t,idx:c}of l)c<d||(c>d&&i.push((0,s.jsx)(D,{text:e.slice(d,c)},`p-${d}`)),i.push((0,s.jsx)(O,{annotation:t,autoFocus:n===t.id,onClearFocus:r,onUpdate:a,onRemove:o},t.id)),d=c+t.excerpt.length);return d<e.length&&i.push((0,s.jsx)(D,{text:e.slice(d)},"p-tail")),(0,s.jsx)(s.Fragment,{children:i})}function O({annotation:e,autoFocus:t,onClearFocus:n,onUpdate:a,onRemove:o}){let l=(0,r.useRef)(null);return((0,r.useEffect)(()=>{if(t&&l.current){l.current.focus();let e=l.current.value;l.current.setSelectionRange(e.length,e.length),n()}},[t,n]),"deletion"===(e.kind??"comment"))?(0,s.jsxs)("span",{className:"relative inline",children:[(0,s.jsx)("span",{className:"rounded bg-red-500/15 px-0.5 text-red-200/90 line-through decoration-red-300/70 decoration-2",children:(0,s.jsx)(D,{text:e.excerpt})}),(0,s.jsx)("button",{type:"button",onClick:()=>o(e.id),title:"Unmark",className:"ml-0.5 inline-flex translate-y-[-1px] items-center text-red-300/70 hover:text-red-300",children:(0,s.jsx)(b.A,{className:"size-3"})})]}):(0,s.jsx)("span",{className:"rounded bg-[var(--accent-2,#ff7a45)]/15 px-0.5","data-annotation-id":e.id,children:(0,s.jsx)(D,{text:e.excerpt})})}function D({text:e}){return(0,s.jsx)(A.cV,{text:e})}let T=(0,c.A)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);function L({pendingPlan:e=!1}={}){let t=(0,j.useRouter)(),[n,i]=(0,r.useState)([]),[d,c]=(0,r.useState)(null),[m,x]=(0,r.useState)(null),[p,h]=(0,r.useState)("markdown");(0,r.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/plan/history");if(!e.ok)return;let t=await e.json();i(t.items),t.items.length&&!d&&c(t.items[0].id)}catch{}})()},[]),(0,r.useEffect)(()=>{d&&(async()=>{let e=await fetch(`/api/plan/history?id=${encodeURIComponent(d)}`);e.ok&&x(await e.json())})()},[d]);let f=(0,r.useMemo)(()=>(function(e){let t=new Map;for(let n of e){let e=new Date(n.archivedAt).toLocaleDateString(void 0,{weekday:"short",month:"short",day:"numeric"});t.has(e)||t.set(e,[]),t.get(e).push(n)}return Array.from(t.entries())})(n),[n]),b=e?(0,s.jsxs)("button",{onClick:()=>t.push((0,w.rc)()),className:"glass pointer-events-auto fixed left-3 top-3 z-30 flex h-10 items-center gap-1.5 rounded-full px-3 text-[11px] font-semibold text-sky-300 transition-colors hover:bg-sky-500/15",title:"Return to the plan that's still pending review",children:[(0,s.jsx)(T,{className:"size-3.5"})," Back to current plan"]}):null;return 0===n.length?(0,s.jsxs)(s.Fragment,{children:[b,(0,s.jsx)("div",{className:"flex h-screen items-center justify-center px-6 pt-14 text-center",children:(0,s.jsxs)("div",{className:"max-w-md text-sm text-muted-foreground",children:[(0,s.jsx)(u,{className:"mx-auto mb-3 size-7 text-muted-foreground/40"}),(0,s.jsx)("div",{className:"mb-2 text-base font-semibold text-foreground",children:"No plans yet."}),"Ask the agent to propose a feature in your terminal session — it lands here via MCP and you can review + annotate on both sides. Past plans get archived to this page for browsing."]})})]}):(0,s.jsxs)("div",{className:"flex h-screen min-h-0 pt-14",children:[b,m&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"glass pointer-events-auto fixed left-1/2 top-3 z-30 flex -translate-x-1/2 items-center gap-0.5 rounded-full p-1",children:[(0,s.jsx)(I,{active:"markdown"===p,onClick:()=>h("markdown"),children:"Plan"}),(0,s.jsx)(I,{active:"map"===p,onClick:()=>h("map"),icon:(0,s.jsx)(o.A,{className:"size-3"}),children:"Features"}),(0,s.jsx)(I,{active:"db"===p,onClick:()=>h("db"),icon:(0,s.jsx)(l.A,{className:"size-3"}),children:"Schema"})]}),(0,s.jsxs)("div",{className:"glass pointer-events-auto fixed right-3 top-3 z-30 flex h-9 items-center gap-2 rounded-full px-3",children:[(0,s.jsx)("span",{className:(0,C.cn)("rounded px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide","approved"===m.verdict?"bg-emerald-500/15 text-emerald-300":"bg-red-500/15 text-red-300"),children:m.verdict}),(0,s.jsx)("span",{className:"text-[10px] text-muted-foreground",children:new Date(m.archivedAt).toLocaleString()})]})]}),(0,s.jsxs)("aside",{className:"flex w-64 min-w-0 shrink-0 flex-col border-r border-white/5 bg-card/30",children:[(0,s.jsxs)("div",{className:"border-b border-white/5 px-3 py-2 text-[10.5px] font-semibold uppercase tracking-wide text-muted-foreground",children:["Plan history \xb7 ",n.length]}),(0,s.jsx)("ul",{className:"min-h-0 flex-1 overflow-y-auto",children:f.map(([e,t])=>(0,s.jsxs)("li",{children:[(0,s.jsx)("div",{className:"px-3 pb-1 pt-3 text-[9px] font-semibold uppercase tracking-widest text-muted-foreground/60",children:e}),(0,s.jsx)("ul",{children:t.map(e=>(0,s.jsx)("li",{children:(0,s.jsxs)("button",{onClick:()=>c(e.id),className:(0,C.cn)("flex w-full items-start gap-1.5 px-3 py-1.5 text-left text-[12px] transition-colors",d===e.id?"bg-white/[0.06] text-foreground":"text-muted-foreground hover:bg-white/[0.03] hover:text-foreground"),children:[(0,s.jsx)("span",{className:(0,C.cn)("mt-0.5 inline-flex size-3.5 shrink-0 items-center justify-center rounded-full","approved"===e.verdict?"bg-emerald-500/15 text-emerald-300":"bg-red-500/15 text-red-300"),title:e.verdict,children:"approved"===e.verdict?(0,s.jsx)(a.A,{className:"size-2.5"}):(0,s.jsx)(g.A,{className:"size-2.5"})}),(0,s.jsx)("span",{className:"line-clamp-2",children:e.description})]})},e.id))})]},e))})]}),m?(0,s.jsx)("section",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:(0,s.jsxs)("div",{className:"min-h-0 flex-1 overflow-y-auto",children:["markdown"===p&&(0,s.jsxs)("div",{className:"px-5 py-4",children:[(0,s.jsx)(A.pO,{markdown:m.markdown}),""===m.markdown.replace(/^#[^\n]*\n?/,"").trim()&&(0,s.jsx)("p",{className:"mt-2 text-[13px] text-muted-foreground",children:(m.featureGraph?.features?.length??0)===0&&(m.draftDoc?.tables?.length??0)===0&&(m.draftDoc?.endpoints?.length??0)===0?"This plan was approved without a detailed write-up — no features or schema were attached either.":"This plan has no written body. See the Features and Schema tabs for what it proposed."}),m.globalComment&&(0,s.jsxs)("div",{className:"mt-4 rounded-lg border border-white/5 bg-card/40 p-3",children:[(0,s.jsx)("div",{className:"mb-1 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Overall feedback"}),(0,s.jsx)("div",{className:"text-[12px] whitespace-pre-wrap",children:m.globalComment})]})]}),"map"===p&&(0,s.jsx)($,{featureGraph:m.featureGraph}),"db"===p&&(0,s.jsx)(F,{draftDoc:m.draftDoc})]})}):(0,s.jsx)("section",{className:"flex min-h-0 min-w-0 flex-1 items-center justify-center text-sm text-muted-foreground",children:"Select a plan on the left to view it."})]})}function I({active:e,onClick:t,icon:n,children:r}){return(0,s.jsxs)("button",{onClick:t,className:(0,C.cn)("flex items-center gap-1 rounded-md px-2 py-1 text-[11px] font-medium transition-colors",e?"bg-white/10 text-foreground":"text-muted-foreground hover:text-foreground"),children:[n,r]})}function $({featureGraph:e}){let t=e?.features??[];return 0===t.length?(0,s.jsx)("div",{className:"flex h-full items-center justify-center px-6 text-center text-sm text-muted-foreground",children:"No features were proposed in this plan."}):(0,s.jsx)("div",{className:"grid gap-3 px-5 py-4 sm:grid-cols-2 lg:grid-cols-3",children:t.map((e,t)=>(0,s.jsxs)("div",{className:"rounded-lg border border-sky-500/20 bg-card/50 p-3",children:[(0,s.jsxs)("div",{className:"mb-1.5 flex items-center gap-1.5",children:[(0,s.jsx)("span",{className:"rounded bg-sky-500/15 px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide text-sky-300",children:"feature"}),e.cluster&&(0,s.jsx)("span",{className:"text-[10px] text-muted-foreground",children:e.cluster})]}),(0,s.jsx)("div",{className:"text-sm font-semibold leading-tight",children:e.title}),e.role&&(0,s.jsx)("div",{className:"mt-1 text-[11px] text-muted-foreground",children:e.role}),e.plain&&(0,s.jsx)("div",{className:"mt-2 text-[12px] text-foreground/80",children:e.plain})]},t))})}function F({draftDoc:e}){let t=e?.tables??[],n=e?.endpoints??[];return 0===t.length&&0===n.length?(0,s.jsx)("div",{className:"flex h-full items-center justify-center px-6 text-center text-sm text-muted-foreground",children:"No schema was proposed in this plan."}):(0,s.jsxs)("div",{className:"space-y-5 px-5 py-4",children:[t.length>0&&(0,s.jsxs)("section",{children:[(0,s.jsxs)("div",{className:"mb-2 text-[10.5px] font-semibold uppercase tracking-wide text-muted-foreground",children:["Tables \xb7 ",t.length]}),(0,s.jsx)("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:t.map(e=>(0,s.jsxs)("div",{className:"rounded-lg border border-white/5 bg-card/40 p-3",children:[(0,s.jsxs)("div",{className:"mb-1 flex items-center gap-1.5",children:[(0,s.jsx)("span",{className:"font-mono text-[13px] font-semibold",children:e.name}),e.domain&&(0,s.jsx)("span",{className:"text-[10px] text-muted-foreground",children:e.domain})]}),e.description&&(0,s.jsx)("div",{className:"mb-1.5 text-[11px] text-muted-foreground",children:e.description}),(0,s.jsx)("ul",{className:"space-y-0.5 text-[11px]",children:e.columns.map((e,t)=>(0,s.jsxs)("li",{className:"flex items-baseline gap-1.5",children:[(0,s.jsx)("code",{className:"rounded bg-white/5 px-1 font-mono text-[11px]",children:e.name}),(0,s.jsx)("span",{className:"text-muted-foreground",children:e.type}),e.isPk&&(0,s.jsx)("span",{className:"text-amber-300/80 text-[9px]",children:"PK"}),e.isFk&&(0,s.jsx)("span",{className:"text-sky-300/80 text-[9px]",children:"FK"}),!e.nullable&&(0,s.jsx)("span",{className:"text-muted-foreground/60 text-[9px]",children:"NOT NULL"})]},t))})]},e.id))})]}),n.length>0&&(0,s.jsxs)("section",{children:[(0,s.jsxs)("div",{className:"mb-2 text-[10.5px] font-semibold uppercase tracking-wide text-muted-foreground",children:["Endpoints \xb7 ",n.length]}),(0,s.jsx)("ul",{className:"space-y-1.5",children:n.map(e=>{let t;return(0,s.jsxs)("li",{className:"flex items-center gap-2 rounded-md border border-white/5 bg-card/40 px-2.5 py-1.5 text-[12px]",children:[(0,s.jsx)("span",{className:"rounded px-1.5 py-0.5 text-[10px] font-bold",style:(t=B[e.method.toUpperCase()]??"#8a8a8a",{background:`${t}22`,color:t}),children:e.method}),(0,s.jsx)("span",{className:"font-mono",children:e.path}),e.description&&(0,s.jsx)("span",{className:"ml-2 text-[11px] text-muted-foreground",children:e.description})]},e.id)})})]})]})}let B={GET:"#7bd389",POST:"#4ea1ff",PUT:"#ffb86b",PATCH:"#ffb86b",DELETE:"#ff3860"};function U({markdown:e}){let t=(0,r.useMemo)(()=>(0,A.n$)(e).map((e,t)=>({b:e,i:t})).filter(({b:e})=>(0,A.Vq)(e.kind)).map(({b:e,i:t})=>({id:(0,A.vB)(t),level:(0,A.F8)(e.kind),label:(0,A.kz)(e.text)})).filter(e=>e.label.length>0),[e]),[n,a]=(0,r.useState)(null);return(0,r.useEffect)(()=>{if("u"<typeof IntersectionObserver||0===t.length)return;let e=t.map(e=>document.getElementById(e.id)).filter(e=>null!==e);if(0===e.length)return;let n=new IntersectionObserver(e=>{let t=e.filter(e=>e.isIntersecting).sort((e,t)=>e.boundingClientRect.top-t.boundingClientRect.top);t[0]&&a(t[0].target.id)},{rootMargin:"-12% 0px -70% 0px",threshold:0});return e.forEach(e=>n.observe(e)),()=>n.disconnect()},[t]),(0,s.jsxs)("aside",{className:"flex w-60 shrink-0 flex-col overflow-y-auto border-r border-white/5 bg-background pt-16",children:[(0,s.jsx)("div",{className:"px-4 pb-2 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Sections"}),0===t.length?(0,s.jsx)("p",{className:"px-4 text-[12px] text-muted-foreground/70",children:"No headings in this plan."}):(0,s.jsx)("nav",{className:"space-y-0.5 px-2 pb-6",children:t.map(e=>(0,s.jsx)("button",{onClick:()=>{var t;let n;return t=e.id,void((n=document.getElementById(t))&&(n.scrollIntoView({behavior:"smooth",block:"start"}),a(t)))},title:e.label,style:{paddingLeft:`${.5+.75*e.level}rem`},className:(0,C.cn)("block w-full truncate rounded py-1 pr-2 text-left text-[12px] leading-snug transition-colors",n===e.id?"bg-white/10 font-medium text-foreground":"text-muted-foreground hover:bg-white/[0.05] hover:text-foreground"),children:e.label},e.id))})]})}var X=n(50981),K=n(74350),q=n(4474),G=n(97358);function H({open:e,onOpenChange:t,onConfirmed:n}){let[o,l]=(0,r.useState)("bypassPermissions"),[i,d]=(0,r.useState)(!1);async function c(){d(!0);try{await fetch("/api/preferences",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({planApprovalMode:o})}).catch(()=>{}),t(!1),n()}finally{d(!1)}}return(0,s.jsx)(K.lG,{open:e,onOpenChange:t,children:(0,s.jsxs)(K.Cf,{className:"max-w-lg",children:[(0,s.jsxs)(K.c7,{children:[(0,s.jsxs)(K.L3,{className:"flex items-center gap-2",children:[(0,s.jsx)(X.A,{className:"size-4 text-emerald-400"}),"After approving, the agent should…"]}),(0,s.jsx)(K.rr,{children:"Pick the permission mode your terminal session enters when you approve a plan. We ask once and remember it for every project — change it anytime in Settings."})]}),(0,s.jsx)("div",{className:"space-y-2 py-1",children:G.pC.map(e=>(0,s.jsxs)("button",{type:"button",onClick:()=>l(e.value),className:(0,C.cn)("flex w-full items-start gap-3 rounded-lg border p-3 text-left transition-colors",o===e.value?"border-emerald-500/50 bg-emerald-500/10":"border-white/10 bg-white/[0.03] hover:bg-white/[0.06]"),children:[(0,s.jsx)("span",{className:(0,C.cn)("mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-full border",o===e.value?"border-emerald-400 bg-emerald-400/20":"border-white/30"),children:o===e.value&&(0,s.jsx)(a.A,{className:"size-3 text-emerald-300"})}),(0,s.jsxs)("span",{className:"min-w-0",children:[(0,s.jsx)("span",{className:"block text-sm font-medium text-foreground",children:e.label}),(0,s.jsx)("span",{className:"block text-xs text-muted-foreground",children:e.description})]})]},e.value))}),(0,s.jsxs)(K.Es,{className:"items-center justify-between gap-2 sm:justify-between",children:[(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:"You can change this later in Settings."}),(0,s.jsx)(q.$,{onClick:c,disabled:i,size:"sm",children:i?"Saving…":"Save & approve"})]})]})})}var _=n(61643),V=n(91588);function Y({dbProps:e,mapProps:t,planMarkdown:n,forceHistory:c=!1}){let k=(0,j.useRouter)(),{status:N,discard:A}=(0,y.j)(),S=t.nodes.length>0,R=e.tables.length>0||e.endpoints.length>0||(e.draft?.tables.length??0)>0||(e.draft?.endpoints.length??0)>0,[P,M]=(0,r.useState)(S?"map":"db"),O="map"!==P||S?"db"!==P||R?P:"map":"db",[D,T]=(0,r.useState)(!1),[I,$]=(0,r.useState)(!1),[F,B]=(0,r.useState)(null),X=(0,r.useCallback)(async()=>{await fetch("/api/plan/approve",{method:"POST",headers:(0,w.dh)((0,w.X0)())}).catch(()=>{}),B({features:N.features,tables:N.tables,endpoints:N.endpoints})},[N.features,N.tables,N.endpoints]),K=(0,r.useCallback)(async()=>{try{let e=await fetch("/api/preferences",{cache:"no-store"});if((await e.json()).planApprovalModeConfigured)return void X()}catch{X();return}$(!0)},[X]),[q,G]=(0,r.useState)(null),Q=(0,r.useCallback)(e=>G(e),[]),Z=(0,r.useRef)(null),ee=(0,r.useRef)(null),et=(0,r.useRef)(e.draft),[en,es]=(0,r.useState)(!1),er=(0,r.useCallback)(()=>es(!0),[]),[ea,eo]=(0,r.useState)([]),[el,ei]=(0,r.useState)(!1),[ed,ec]=(0,r.useState)(""),eu=(0,r.useCallback)(e=>{ec(e),ei(!0)},[]),em=(0,r.useRef)(ea);(0,r.useEffect)(()=>{em.current=ea},[ea]),(0,r.useEffect)(()=>{eo([]),ei(!1),es(!1)},[N.proposedAt]),(0,r.useEffect)(()=>{let e=()=>void fetch("/api/plan/presence",{method:"POST",cache:"no-store",headers:(0,w.dh)((0,w.X0)())}).catch(()=>{});e();let t=setInterval(e,5e3);return()=>clearInterval(t)},[]);let ex=(0,r.useCallback)(()=>({draft:et.current,questions:em.current}),[]),ep=(0,r.useMemo)(()=>{let n=[];for(let e of t.nodes)n.push(`feature: ${e.title}`);for(let t of e.draft?.tables??[])n.push(`table: ${t.name}`);for(let t of e.tables)n.push(`table: ${t.name}`);for(let t of e.draft?.endpoints??[])n.push(`endpoint: ${t.method} ${t.path}`);for(let t of e.endpoints)n.push(`endpoint: ${t.method} ${t.path}`);return Array.from(new Set(n))},[t.nodes,e]),eh=q?(0,s.jsx)(E,{annotations:q.annotations,updateComment:q.updateComment,removeAnnotation:q.removeAnnotation,focusOnAnnotation:q.focusOnAnnotation,onClose:()=>Z.current?.close()}):null,ef=(0,r.useCallback)(()=>{Z.current?.open()},[]),eg=(0,r.useCallback)(()=>{"db"===O?ee.current?.openComments():Z.current?.openComments()},[O]),eb=(0,r.useCallback)(e=>{q?.addComment(e)},[q]),ev=(0,r.useCallback)(e=>{q?.focusOnAnnotation(e),"db"===O?ee.current?.openComments():Z.current?.openComments()},[q,O]),[ej,ey]=(0,r.useState)(()=>{try{let e=window.localStorage.getItem("beacon:plan-left-pct");return e?Math.max(20,Math.min(80,Number(e))):50}catch{return 50}}),ew=(0,r.useRef)(null),ek=(0,r.useRef)(!1),eN=(0,r.useCallback)(e=>{e.preventDefault(),ek.current=!0,document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[]);(0,r.useEffect)(()=>{let e=e=>{if(!ek.current||!ew.current)return;let t=ew.current.getBoundingClientRect();ey(Math.max(20,Math.min(80,(e.clientX-t.left)/t.width*100)))},t=()=>{if(ek.current){ek.current=!1,document.body.style.cursor="",document.body.style.userSelect="";try{localStorage.setItem("beacon:plan-left-pct",String(ej))}catch{}}};return window.addEventListener("pointermove",e),window.addEventListener("pointerup",t),()=>{window.removeEventListener("pointermove",e),window.removeEventListener("pointerup",t)}},[ej]);let eC=async()=>{await fetch("/api/plan/annotations",{method:"DELETE",headers:(0,w.dh)((0,w.X0)())}).catch(()=>{}),await A(),k.refresh()};if((!N.pending||c)&&!F)return(0,s.jsx)(L,{pendingPlan:N.pending});let eA=S||R,ez=eA&&!D,eS=!eA||D,eE=((q?.liveCount??0)>0||en||ea.length>0)&&!q?.submitted;return(0,s.jsxs)("div",{className:"relative flex h-screen flex-col",children:[F&&(0,s.jsxs)("div",{className:"absolute inset-0 z-50 flex flex-col items-center justify-center gap-5 bg-background/97 px-6 text-center backdrop-blur-sm",children:[(0,s.jsx)("div",{className:"flex size-12 items-center justify-center rounded-full bg-emerald-500/15",children:(0,s.jsx)(a.A,{className:"size-6 text-emerald-300"})}),(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold text-foreground",children:"Plan approved"}),(0,s.jsx)("p",{className:"max-w-sm text-sm text-muted-foreground",children:F.features>0||F.tables>0||F.endpoints>0?"It's committed. Here's where to find it:":"It's archived to your plan history."})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-center gap-2",children:[F.features>0&&(0,s.jsxs)("button",{onClick:()=>k.push("/map?view=ROADMAP"),className:"flex items-center gap-2 rounded-lg border border-white/12 px-3 py-2 text-sm text-foreground transition-colors hover:bg-white/[0.06]",children:[(0,s.jsx)(o.A,{className:"size-4 text-sky-300"})," ",F.features," feature",1===F.features?"":"s"," → Map"]}),(F.tables>0||F.endpoints>0)&&(0,s.jsxs)("button",{onClick:()=>k.push("/map?view=DATABASE"),className:"flex items-center gap-2 rounded-lg border border-white/12 px-3 py-2 text-sm text-foreground transition-colors hover:bg-white/[0.06]",children:[(0,s.jsx)(l.A,{className:"size-4 text-violet-300"})," ",F.tables," table",1===F.tables?"":"s"," \xb7 ",F.endpoints," endpoint",1===F.endpoints?"":"s"," → Database"]})]}),(0,s.jsx)("button",{onClick:()=>{B(null),k.push((0,w.rc)({view:"history"}))},className:"rounded-full border border-white/12 px-3 py-1.5 text-xs font-medium text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:"Done — browse plan history"})]}),q?.submitted&&(0,s.jsxs)("div",{className:"absolute inset-0 z-40 flex flex-col items-center justify-center gap-4 bg-background/95 px-6 text-center backdrop-blur-sm",children:[(0,s.jsx)("div",{className:"flex size-12 items-center justify-center rounded-full bg-sky-500/15",children:(0,s.jsx)(i.A,{className:"size-6 animate-spin text-sky-300"})}),(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold text-foreground",children:"Feedback sent"}),(0,s.jsx)("p",{className:"max-w-sm text-sm text-muted-foreground",children:"Your terminal session is revising the plan based on your comments. The updated plan will appear here automatically — no need to refresh."})]}),(0,s.jsx)("button",{onClick:()=>k.push((0,w.rc)({view:"history"})),className:"rounded-full border border-white/12 px-3 py-1.5 text-xs font-medium text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:"Browse past plans"})]}),(0,s.jsxs)("div",{className:"pointer-events-none fixed right-3 top-3 z-30 flex items-center gap-2",children:[eA&&D&&(0,s.jsx)("button",{onClick:()=>T(!1),title:"Collapse — show the board again",className:"glass pointer-events-auto flex size-8 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:(0,s.jsx)(d.A,{className:"size-3.5"})}),(0,s.jsxs)("div",{className:"glass pointer-events-auto flex h-10 items-center gap-0.5 rounded-full px-1",children:[(0,s.jsx)("button",{onClick:()=>k.push((0,w.rc)({view:"history"})),title:"Browse past plans (you can come back to this one)",className:"flex size-8 shrink-0 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:(0,s.jsx)(u,{className:"size-3.5"})}),(0,s.jsx)("span",{"aria-hidden":!0,className:"mx-1 h-5 w-px bg-white/10"}),(0,s.jsx)("button",{onClick:ef,disabled:!q,title:"Open the side panel (details)",className:"relative flex size-8 shrink-0 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:(0,s.jsx)(m.A,{className:"size-3.5"})}),(0,s.jsxs)("button",{onClick:eg,disabled:!q,title:q?.annotationCount?`Open comments \xb7 ${q.annotationCount} comment${1===q.annotationCount?"":"s"} so far`:"Open comments — select a card/table and 'Comment on this', or highlight text",className:"relative flex size-8 shrink-0 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:[(0,s.jsx)(x,{className:"size-3.5"}),q&&(q.annotationCount??0)>0&&(0,s.jsx)("span",{className:"absolute -right-0.5 -top-0.5 flex h-3.5 min-w-3.5 items-center justify-center rounded-full bg-sky-500 px-1 text-[9px] font-semibold text-white",children:q.annotationCount})]}),(0,s.jsxs)("button",{"data-overall-toggle":!0,onClick:()=>q?.toggleOverall?.(),disabled:!q?.toggleOverall,title:q?.hasGlobalComment?"Edit your overall feedback":"Add overall plan-level feedback",className:(0,C.cn)("relative flex size-8 shrink-0 items-center justify-center rounded-full transition-colors",q?.globalOpen?"bg-white/10 text-foreground":q?.hasGlobalComment?"text-sky-300 hover:bg-sky-500/15":"text-muted-foreground hover:bg-white/[0.06] hover:text-foreground"),children:[(0,s.jsx)(p.A,{className:"size-3.5"}),q?.hasGlobalComment&&(0,s.jsx)("span",{className:"absolute -right-0.5 -top-0.5 size-2 rounded-full bg-sky-400"})]}),(0,s.jsxs)("button",{onClick:()=>ei(e=>!e),title:"Ask the agent a question about a node (answered in its next round)",className:(0,C.cn)("relative flex size-8 shrink-0 items-center justify-center rounded-full transition-colors",el?"bg-white/10 text-foreground":ea.length?"text-sky-300 hover:bg-sky-500/15":"text-muted-foreground hover:bg-white/[0.06] hover:text-foreground"),children:[(0,s.jsx)(h.A,{className:"size-3.5"}),ea.length>0&&(0,s.jsx)("span",{className:"absolute -right-0.5 -top-0.5 flex h-3.5 min-w-3.5 items-center justify-center rounded-full bg-sky-500 px-1 text-[9px] font-semibold text-white",children:ea.length})]}),(0,s.jsx)("span",{"aria-hidden":!0,className:"mx-1 h-5 w-px bg-white/10"}),(0,s.jsxs)("button",{onClick:()=>q?.submit(),disabled:!q||q.submitting||0===q.liveCount&&!en&&0===ea.length,title:q&&(0!==q.liveCount||en||0!==ea.length)?q.submitted?"Submitted — your terminal session is reading the feedback":"Submit feedback (comments + canvas edits) so the agent can revise the plan":"Highlight text or edit the canvas, then submit",className:(0,C.cn)("flex shrink-0 items-center gap-1 rounded-full px-2.5 py-1 text-[11px] font-semibold transition-colors",q?.submitted?"text-sky-300":q&&(0!==q.liveCount||en||0!==ea.length)?"text-sky-300 hover:bg-sky-500/15":"text-muted-foreground opacity-50"),children:[q?.submitted?(0,s.jsx)(a.A,{className:"size-3"}):(0,s.jsx)(f.A,{className:"size-3"}),q?.submitted?"Submitted":"Feedback"]}),eE&&(0,s.jsxs)("button",{onClick:()=>{q?.clearAll?.(),es(!1),eo([])},title:"Discard your unsubmitted comments / canvas edits so you can approve the plan as-is",className:"flex shrink-0 items-center gap-1 rounded-full px-2 py-1 text-[11px] font-medium text-amber-300/90 transition-colors hover:bg-amber-500/15",children:[(0,s.jsx)(g.A,{className:"size-3"})," Clear to approve"]}),(0,s.jsxs)("button",{onClick:()=>void K(),disabled:eE,title:eE?"You have unsubmitted feedback — submit it, or click ‘Clear to approve’ to drop it":"Approve the plan",className:(0,C.cn)("flex shrink-0 items-center gap-1 rounded-full border border-emerald-500/40 bg-emerald-500/15 px-2.5 py-1 text-[11px] font-semibold text-emerald-300 transition-colors hover:bg-emerald-500/25",eE&&"opacity-40 hover:bg-emerald-500/15"),children:[(0,s.jsx)(a.A,{className:"size-3"})," Approve"]}),(0,s.jsxs)("button",{onClick:eC,className:"flex shrink-0 items-center gap-1 rounded-full px-2.5 py-1 text-[11px] font-medium text-muted-foreground transition-colors hover:bg-red-500/15 hover:text-red-300",title:"Discard the plan",children:[(0,s.jsx)(b.A,{className:"size-3"})," Discard"]}),(0,s.jsx)(H,{open:I,onOpenChange:$,onConfirmed:()=>void X()})]})]}),el&&(0,s.jsxs)("div",{className:"fixed right-3 top-16 z-30 w-80 rounded-xl border border-white/10 bg-card p-3 shadow-xl",children:[(0,s.jsxs)("div",{className:"mb-2 flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Ask the agent"}),(0,s.jsx)("button",{onClick:()=>ei(!1),title:"Close",className:"rounded p-0.5 text-muted-foreground hover:text-foreground",children:(0,s.jsx)(g.A,{className:"size-3.5"})})]}),(0,s.jsx)(J,{targets:ep,initialTarget:ed,onAdd:e=>eo(t=>[...t,e])}),ea.length>0&&(0,s.jsx)("ul",{className:"mt-2 space-y-1",children:ea.map((e,t)=>(0,s.jsxs)("li",{className:"group flex items-start justify-between gap-2 rounded-md border border-white/5 bg-background/40 px-2 py-1",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("div",{className:"truncate font-mono text-[10px] text-sky-300/90",children:e.target}),(0,s.jsx)("div",{className:"text-[11px] text-foreground/90",children:e.question})]}),(0,s.jsx)("button",{onClick:()=>eo(e=>e.filter((e,n)=>n!==t)),title:"Remove",className:"shrink-0 rounded p-0.5 text-muted-foreground/70 opacity-0 transition-opacity hover:text-red-300 group-hover:opacity-100",children:(0,s.jsx)(g.A,{className:"size-3"})})]},t))}),(0,s.jsx)("p",{className:"mt-2 text-[10px] text-muted-foreground",children:"Questions are sent with your feedback on Submit — the agent answers them in its next round."})]}),(0,s.jsxs)("div",{ref:ew,className:"flex min-h-0 flex-1",children:[eS&&(0,s.jsx)(U,{markdown:n}),(0,s.jsxs)("div",{className:(0,C.cn)("relative flex min-w-0 flex-col",!ez&&"flex-1"),style:ez?{width:`${ej}%`}:void 0,children:[ez&&(0,s.jsx)("div",{className:"pointer-events-none absolute right-3 top-3 z-20",children:(0,s.jsx)("button",{onClick:()=>T(!0),title:"Expand the plan to full width",className:"glass pointer-events-auto flex size-8 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:(0,s.jsx)(v.A,{className:"size-3.5"})})}),(0,s.jsx)("div",{className:"min-h-0 flex-1 overflow-hidden bg-background",children:(0,s.jsx)(z,{markdown:n,round:N.proposedAt,onApi:Q,hideSubmit:!0,getExtraSubmitPayload:ex})})]}),ez&&(0,s.jsx)("div",{onPointerDown:eN,className:"group relative w-px shrink-0 cursor-col-resize bg-white/5 hover:bg-white/15",title:"Drag to resize",children:(0,s.jsx)("div",{className:"absolute inset-y-0 -left-1.5 right-[-6px] z-10"})}),ez&&(0,s.jsxs)("div",{className:"relative flex min-w-0 flex-col",style:{width:`${100-ej}%`},children:[S&&R&&(0,s.jsx)("div",{className:"pointer-events-none absolute left-3 top-3 z-20",children:(0,s.jsxs)("div",{className:"glass pointer-events-auto flex items-center gap-1 rounded-full p-0.5",children:[(0,s.jsx)(W,{active:"map"===O,onClick:()=>M("map"),icon:(0,s.jsx)(o.A,{className:"size-3"}),children:"Map"}),(0,s.jsx)(W,{active:"db"===O,onClick:()=>M("db"),icon:(0,s.jsx)(l.A,{className:"size-3"}),children:"Database"})]})}),(0,s.jsx)("div",{className:"min-h-0 flex-1 overflow-hidden bg-background",children:"map"===O?(0,s.jsx)(_.MapClient,{view:t.view,nodes:t.nodes,edges:t.edges,embedded:!0,commentsContent:eh,commentsCount:q?.annotationCount??0,controlRef:Z,onAskAgent:eu,onAddComment:eb,annotations:q?.annotations,onPinClick:ev,onUpdateComment:q?.updateComment,onRemoveComment:q?.removeAnnotation}):(0,s.jsx)(V.DbMapClient,{tables:e.tables,relations:e.relations,endpoints:e.endpoints,draft:e.draft,workspaceId:e.workspaceId,diffBase:e.diffBase,embedded:!0,draftRef:et,onEdit:er,controlRef:ee,commentsContent:eh,commentsCount:q?.annotationCount??0,onAddComment:eb,annotations:q?.annotations,onPinClick:ev,onUpdateComment:q?.updateComment,onRemoveComment:q?.removeAnnotation})})]})]})]})}function J({targets:e,onAdd:t,initialTarget:n}){let[a,o]=(0,r.useState)(n||e[0]||""),[l,i]=(0,r.useState)("");(0,r.useEffect)(()=>{n&&o(n)},[n]),(0,r.useEffect)(()=>{!a&&e[0]&&o(e[0])},[e,a]);let d=()=>{let e=l.trim();e&&(t({target:a||"(plan)",question:e}),i(""))};return(0,s.jsxs)("div",{className:"space-y-1.5",children:[e.length>0&&(0,s.jsx)("select",{value:a,onChange:e=>o(e.target.value),className:"w-full rounded border border-white/10 bg-background px-2 py-1 text-[11px] outline-none focus:border-sky-400/40",children:e.map(e=>(0,s.jsx)("option",{value:e,className:"bg-card",children:e},e))}),(0,s.jsx)("textarea",{value:l,onChange:e=>i(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),d())},rows:2,placeholder:"e.g. why a new table instead of reusing users? (⌘/Ctrl+Enter to add)",className:"w-full resize-y rounded border border-white/10 bg-background px-2 py-1.5 text-[12px] leading-snug outline-none focus:border-sky-400/40"}),(0,s.jsx)("button",{onClick:d,disabled:!l.trim(),className:(0,C.cn)("w-full rounded-md px-2 py-1 text-[11px] font-semibold transition-colors",l.trim()?"bg-sky-500/15 text-sky-300 hover:bg-sky-500/25":"text-muted-foreground opacity-50"),children:"Add question"})]})}function W({active:e,onClick:t,icon:n,children:r}){return(0,s.jsxs)("button",{onClick:t,className:(0,C.cn)("flex items-center gap-1 rounded-md px-2.5 py-1 text-[11px] font-medium transition-colors",e?"bg-white/10 text-foreground":"text-muted-foreground hover:text-foreground"),children:[n,r]})}},13056:(e,t,n)=>{Promise.resolve().then(n.bind(n,10396))},38332:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});let s=(0,n(30772).A)("strikethrough",[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]])},48484:(e,t,n)=>{"use strict";n.d(t,{PlanProvider:()=>d,j:()=>c});var s=n(95155),r=n(12115),a=n(73321),o=n(99979);let l={pending:!1,proposedAt:0,tables:0,endpoints:0,features:0},i=(0,r.createContext)(null);function d({children:e}){let t=(0,a.useRouter)(),[n,c]=(0,r.useState)(l),u=(0,r.useCallback)(async()=>{try{let e=await fetch("/api/plan",{method:"GET",cache:"no-store",headers:(0,o.dh)((0,o.X0)())});if(!e.ok)return;let t=await e.json();c(t)}catch{}},[]);(0,r.useEffect)(()=>{u();let e=setInterval(()=>void u(),4e3);return()=>clearInterval(e)},[u]);let m=(0,r.useCallback)(async()=>{await fetch("/api/plan",{method:"DELETE",headers:(0,o.dh)((0,o.X0)())}).catch(()=>{}),c(l),t.refresh()},[t]),x=(0,r.useCallback)(async()=>{await fetch("/api/plan/approve",{method:"POST",headers:(0,o.dh)((0,o.X0)())}).catch(()=>{}),c(l),t.refresh()},[t]);return(0,s.jsx)(i.Provider,{value:{status:n,discard:m,approvePlan:x,refresh:u},children:e})}function c(){let e=(0,r.useContext)(i);if(!e)throw Error("usePlan must be used inside PlanProvider");return e}},50981:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});let s=(0,n(30772).A)("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},82879:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});let s=(0,n(30772).A)("sticky-note",[["path",{d:"M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z",key:"1dfntj"}],["path",{d:"M15 3v5a1 1 0 0 0 1 1h5",key:"6s6qgf"}]])},92571:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});let s=(0,n(30772).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},97358:(e,t,n)=>{"use strict";n.d(t,{pC:()=>s});let s=[{value:"default",label:"Manual approval",description:"Approve each tool call yourself — Claude Code's default."},{value:"acceptEdits",label:"Auto-accept edits",description:"Auto-approve file edits; still ask before running other tools."},{value:"bypassPermissions",label:"Bypass permissions",description:"Auto-approve every tool call (like --dangerously-skip-permissions)."},{value:"auto",label:"Auto",description:"Autonomous, gated by a safety classifier (needs a recent Claude Code + Sonnet 4.6+)."}]},99979:(e,t,n)=>{"use strict";function s(){return new URLSearchParams(window.location.search).get("ws")}function r(e){return e?{"x-beacon-workspace":e}:{}}function a(e){let t=new URLSearchParams,n=s();for(let[s,r]of(n&&t.set("ws",n),Object.entries(e??{})))t.set(s,r);let r=t.toString();return r?`/plan?${r}`:"/plan"}n.d(t,{X0:()=>s,dh:()=>r,rc:()=>a})}},e=>{e.O(0,[2574,3862,8500,4294,766,1202,2110,8441,3794,7358],()=>e(e.s=13056)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4662],{4474:(e,t,a)=>{"use strict";a.d(t,{$:()=>o});var s=a(95155),r=a(6539),n=a(18460),i=a(91337);let d=(0,n.F)("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function o({className:e,variant:t="default",size:a="default",...n}){return(0,s.jsx)(r.Button,{"data-slot":"button",className:(0,i.cn)(d({variant:t,size:a,className:e})),...n})}},10462:(e,t,a)=>{Promise.resolve().then(a.bind(a,81453)),Promise.resolve().then(a.bind(a,71423)),Promise.resolve().then(a.bind(a,96759)),Promise.resolve().then(a.bind(a,67787)),Promise.resolve().then(a.bind(a,6539)),Promise.resolve().then(a.bind(a,71265)),Promise.resolve().then(a.t.bind(a,98500,23))},26518:(e,t,a)=>{"use strict";a.d(t,{bq:()=>N,eb:()=>k,gC:()=>z,l6:()=>y,yv:()=>w});var s=a(95155);a(12115);var r=a(40595),n=a(41294),i=a(75681),d=a(17314),o=a(37265),l=a(23107),c=a(70826),u=a(67564),p=a(1938),g=a(15433),m=a(5919),x=a(45450),h=a(88988),f=a(91337),v=a(12363),b=a(64577),j=a(94088);let y=r.H;function w({className:e,...t}){return(0,s.jsx)(n.y,{"data-slot":"select-value",className:(0,f.cn)("flex flex-1 text-left",e),...t})}function N({className:e,size:t="default",children:a,...r}){return(0,s.jsxs)(i.b,{"data-slot":"select-trigger","data-size":t,className:(0,f.cn)("flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[a,(0,s.jsx)(d.w,{render:(0,s.jsx)(v.A,{className:"pointer-events-none size-4 text-muted-foreground"})})]})}function z({className:e,children:t,side:a="bottom",sideOffset:r=4,align:n="center",alignOffset:i=0,alignItemWithTrigger:d=!0,...p}){return(0,s.jsx)(o.V,{children:(0,s.jsx)(l.l,{side:a,sideOffset:r,align:n,alignOffset:i,alignItemWithTrigger:d,className:"isolate z-50",children:(0,s.jsxs)(c.t,{"data-slot":"select-content","data-align-trigger":d,className:(0,f.cn)("relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...p,children:[(0,s.jsx)(C,{}),(0,s.jsx)(u.B,{children:t}),(0,s.jsx)(_,{})]})})})}function k({className:e,children:t,...a}){return(0,s.jsxs)(p.e,{"data-slot":"select-item",className:(0,f.cn)("relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...a,children:[(0,s.jsx)(g.h,{className:"flex flex-1 shrink-0 gap-2 whitespace-nowrap",children:t}),(0,s.jsx)(m.h,{render:(0,s.jsx)("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center"}),children:(0,s.jsx)(b.A,{className:"pointer-events-none"})})]})}function C({className:e,...t}){return(0,s.jsx)(x.w,{"data-slot":"select-scroll-up-button",className:(0,f.cn)("top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",e),...t,children:(0,s.jsx)(j.A,{})})}function _({className:e,...t}){return(0,s.jsx)(h.d,{"data-slot":"select-scroll-down-button",className:(0,f.cn)("bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",e),...t,children:(0,s.jsx)(v.A,{})})}},50981:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});let s=(0,a(30772).A)("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},67787:(e,t,a)=>{"use strict";a.d(t,{PermissionModeCard:()=>l});var s=a(95155),r=a(12115),n=a(50981),i=a(79984),d=a(26518),o=a(97358);function l(){let[e,t]=(0,r.useState)("default"),[a,l]=(0,r.useState)(!1);async function c(e){t(e),l(!1),await fetch("/api/preferences",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({planApprovalMode:e})}).catch(()=>{}),l(!0)}(0,r.useEffect)(()=>{let e=!0;return fetch("/api/preferences",{cache:"no-store"}).then(e=>e.ok?e.json():null).then(a=>{e&&a&&t(a.planApprovalMode??"default")}).catch(()=>{}),()=>{e=!1}},[]);let u=o.pC.find(t=>t.value===e);return(0,s.jsxs)(i.Zp,{children:[(0,s.jsxs)(i.aR,{children:[(0,s.jsxs)(i.ZB,{className:"flex items-center gap-2 text-base",children:[(0,s.jsx)(n.A,{className:"size-4 text-emerald-400"}),"Permission mode after approval"]}),(0,s.jsx)(i.BT,{children:"When you approve a plan, your terminal session switches to this permission mode. Applies to all projects. (Requires Claude Code 2.1.7+.)"})]}),(0,s.jsxs)(i.Wu,{className:"flex items-center gap-3",children:[(0,s.jsxs)(d.l6,{value:e,onValueChange:e=>e&&void c(e),children:[(0,s.jsx)(d.bq,{className:"h-9 w-64",children:(0,s.jsx)(d.yv,{})}),(0,s.jsx)(d.gC,{children:o.pC.map(e=>(0,s.jsx)(d.eb,{value:e.value,children:e.label},e.value))})]}),u&&(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:u.description}),a&&(0,s.jsx)("span",{className:"text-xs text-emerald-300",children:"✓ saved"})]})]})}},70521:(e,t,a)=>{"use strict";a.d(t,{$v:()=>w,EO:()=>v,Lt:()=>m,Rx:()=>N,Zr:()=>z,ck:()=>j,r7:()=>y,tv:()=>x,wd:()=>b});var s=a(95155);a(12115);var r=a(25381),n=a(7121),i=a(51880),d=a(35176),o=a(11248),l=a(82022),c=a(98758),u=a(45362),p=a(91337),g=a(4474);function m({...e}){return(0,s.jsx)(r.V,{"data-slot":"alert-dialog",...e})}function x({...e}){return(0,s.jsx)(n.t,{"data-slot":"alert-dialog-trigger",...e})}function h({...e}){return(0,s.jsx)(i.Z,{"data-slot":"alert-dialog-portal",...e})}function f({className:e,...t}){return(0,s.jsx)(d.X,{"data-slot":"alert-dialog-overlay",className:(0,p.cn)("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...t})}function v({className:e,size:t="default",...a}){return(0,s.jsxs)(h,{children:[(0,s.jsx)(f,{}),(0,s.jsx)(o.h,{"data-slot":"alert-dialog-content","data-size":t,className:(0,p.cn)("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...a})]})}function b({className:e,...t}){return(0,s.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,p.cn)("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",e),...t})}function j({className:e,...t}){return(0,s.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,p.cn)("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",e),...t})}function y({className:e,...t}){return(0,s.jsx)(l.L,{"data-slot":"alert-dialog-title",className:(0,p.cn)("font-heading text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",e),...t})}function w({className:e,...t}){return(0,s.jsx)(c.r,{"data-slot":"alert-dialog-description",className:(0,p.cn)("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...t})}function N({className:e,variant:t,size:a,...r}){return(0,s.jsx)(u.H,{"data-slot":"alert-dialog-action",className:(0,p.cn)(e),render:(0,s.jsx)(g.$,{variant:t,size:a}),...r})}function z({className:e,variant:t="outline",size:a="default",...r}){return(0,s.jsx)(u.H,{"data-slot":"alert-dialog-cancel",className:(0,p.cn)(e),render:(0,s.jsx)(g.$,{variant:t,size:a}),...r})}},71423:(e,t,a)=>{"use strict";a.d(t,{DangerCard:()=>l});var s=a(95155),r=a(12115),n=a(73321),i=a(65738),d=a(79984),o=a(70521);function l(){let e=(0,n.useRouter)(),[t,a]=(0,r.useState)(!1),[l,c]=(0,r.useState)(!1);async function u(){a(!0);try{(await fetch("/api/reset",{method:"POST"})).ok&&(c(!0),e.refresh())}finally{a(!1)}}return(0,s.jsxs)(d.Zp,{className:"border-red-500/30",children:[(0,s.jsxs)(d.aR,{children:[(0,s.jsx)(d.ZB,{className:"text-base text-red-400",children:"Danger zone"}),(0,s.jsx)(d.BT,{children:"Erases all project data — the map, the database, drafts, the code graph and the generated summary — leaving the panel empty. Your preferences (provider and editor) are kept. This cannot be undone."})]}),(0,s.jsxs)(d.Wu,{className:"flex items-center gap-3",children:[(0,s.jsxs)(o.Lt,{children:[(0,s.jsxs)(o.tv,{className:"inline-flex h-9 items-center gap-2 rounded-lg bg-red-600 px-3 text-sm font-medium text-white transition-colors hover:bg-red-500 disabled:opacity-50",disabled:t,children:[(0,s.jsx)(i.A,{className:"size-4"}),t?"Erasing…":"Erase all data"]}),(0,s.jsxs)(o.EO,{children:[(0,s.jsxs)(o.wd,{children:[(0,s.jsx)(o.r7,{children:"Erase all data?"}),(0,s.jsx)(o.$v,{children:"This permanently removes the map, the database, drafts, the code graph and the project summary. This action cannot be undone."})]}),(0,s.jsxs)(o.ck,{children:[(0,s.jsx)(o.Zr,{children:"Cancel"}),(0,s.jsx)(o.Rx,{onClick:u,className:"bg-red-600 text-white hover:bg-red-500",children:"Yes, erase everything"})]})]})]}),l&&(0,s.jsx)("span",{className:"text-xs text-red-300",children:"✓ data erased"})]})]})}},79984:(e,t,a)=>{"use strict";a.d(t,{BT:()=>l,Wu:()=>c,ZB:()=>o,Zp:()=>i,aR:()=>d});var s=a(95155);a(12115);var r=a(91337),n=a(82099);function i({className:e,...t}){return(0,s.jsx)(n.b,{"data-slot":"card",className:(0,r.cn)("text-card-foreground flex flex-col gap-6 rounded-2xl py-6",e),...t})}function d({className:e,...t}){return(0,s.jsx)("div",{"data-slot":"card-header",className:(0,r.cn)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function o({className:e,...t}){return(0,s.jsx)("div",{"data-slot":"card-title",className:(0,r.cn)("leading-none font-semibold",e),...t})}function l({className:e,...t}){return(0,s.jsx)("div",{"data-slot":"card-description",className:(0,r.cn)("text-muted-foreground text-sm",e),...t})}function c({className:e,...t}){return(0,s.jsx)("div",{"data-slot":"card-content",className:(0,r.cn)("px-6",e),...t})}},81453:(e,t,a)=>{"use strict";a.d(t,{ContextCard:()=>d});var s=a(95155),r=a(12115),n=a(79984),i=a(4474);function d(){let[e,t]=(0,r.useState)(null),[a,d]=(0,r.useState)(!1);async function o(){d(!0),t(null);try{let e=await fetch("/api/context",{method:"POST"});if(!e.ok)return void t(await e.text());let a=await e.json();t(a.files?.length?`Updated: ${a.files.map(e=>e.split("/").pop()).join(" + ")}`:"Nothing to update")}catch{t("Failed")}finally{d(!1)}}return(0,s.jsxs)(n.Zp,{children:[(0,s.jsxs)(n.aR,{children:[(0,s.jsx)(n.ZB,{className:"text-base",children:"Context for the AI"}),(0,s.jsxs)(n.BT,{children:["Generates ",(0,s.jsx)("span",{className:"font-mono",children:"AGENTS.md"})," (read by Cursor/Codex/Aider) and makes sure ",(0,s.jsx)("span",{className:"font-mono",children:"CLAUDE.md"})," imports it (Claude Code reads CLAUDE.md), from the current map."]})]}),(0,s.jsxs)(n.Wu,{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsx)(i.$,{size:"sm",disabled:a,onClick:o,children:a?"Generating…":"Update AGENTS.md + CLAUDE.md"}),e&&(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:e})]})]})}},82099:(e,t,a)=>{"use strict";a.d(t,{b:()=>n});var s=a(95155);a(12115);var r=a(91337);function n({className:e,children:t,...a}){return(0,s.jsxs)("div",{className:(0,r.cn)("glass relative isolate overflow-hidden",e),...a,children:[(0,s.jsx)("span",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 -z-10 rounded-[inherit]",style:{background:"radial-gradient(90% 60% at 0% 0%, oklch(1 0 0 / 0.04), transparent 42%)"}}),(0,s.jsx)("span",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 -z-10 rounded-[inherit] opacity-[0.035] mix-blend-overlay",style:{backgroundImage:"url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E\")",backgroundSize:"120px 120px"}}),t]})}},91337:(e,t,a)=>{"use strict";a.d(t,{cn:()=>n});var s=a(29722),r=a(622);function n(...e){return(0,r.QP)((0,s.$)(e))}},96759:(e,t,a)=>{"use strict";a.d(t,{DeleteWorkspaceCard:()=>l});var s=a(95155),r=a(12115),n=a(73321),i=a(65738),d=a(79984),o=a(70521);function l({id:e,name:t}){let a=(0,n.useRouter)(),[c,u]=(0,r.useState)(!1);async function p(){u(!0);try{let t=await fetch("/api/workspace",{method:"DELETE",headers:{"content-type":"application/json"},body:JSON.stringify({id:e})});if(t.ok){let{fallbackId:e}=await t.json();document.cookie=e?`beacon_ws=${e}; Path=/; Max-Age=31536000; SameSite=Lax`:"beacon_ws=; Path=/; Max-Age=0; SameSite=Lax",a.refresh()}}finally{u(!1)}}return(0,s.jsxs)(d.Zp,{className:"border-red-500/30",children:[(0,s.jsxs)(d.aR,{children:[(0,s.jsx)(d.ZB,{className:"text-base text-red-400",children:"Delete this workspace"}),(0,s.jsxs)(d.BT,{children:["Removes ",(0,s.jsx)("span",{className:"font-medium text-foreground",children:t})," ","from Beacon and erases all of its Beacon data — the map, the database, drafts and the code graph. The repository's files on disk are untouched. This cannot be undone."]})]}),(0,s.jsx)(d.Wu,{className:"flex items-center gap-3",children:(0,s.jsxs)(o.Lt,{children:[(0,s.jsxs)(o.tv,{className:"inline-flex h-9 items-center gap-2 rounded-lg bg-red-600 px-3 text-sm font-medium text-white transition-colors hover:bg-red-500 disabled:opacity-50",disabled:c,children:[(0,s.jsx)(i.A,{className:"size-4"}),c?"Deleting…":"Delete workspace"]}),(0,s.jsxs)(o.EO,{children:[(0,s.jsxs)(o.wd,{children:[(0,s.jsxs)(o.r7,{children:["Delete workspace “",t,"”?"]}),(0,s.jsx)(o.$v,{children:"This permanently removes the workspace from Beacon and erases its data — the map, the database, drafts and the code graph. Your code is not affected; only Beacon's data for this repository is erased. This action cannot be undone."})]}),(0,s.jsxs)(o.ck,{children:[(0,s.jsx)(o.Zr,{children:"Cancel"}),(0,s.jsx)(o.Rx,{onClick:p,className:"bg-red-600 text-white hover:bg-red-500",children:"Yes, delete workspace"})]})]})]})})]})}},97358:(e,t,a)=>{"use strict";a.d(t,{pC:()=>s});let s=[{value:"default",label:"Manual approval",description:"Approve each tool call yourself — Claude Code's default."},{value:"acceptEdits",label:"Auto-accept edits",description:"Auto-approve file edits; still ask before running other tools."},{value:"bypassPermissions",label:"Bypass permissions",description:"Auto-approve every tool call (like --dangerously-skip-permissions)."},{value:"auto",label:"Auto",description:"Autonomous, gated by a safety classifier (needs a recent Claude Code + Sonnet 4.6+)."}]}},e=>{e.O(0,[8500,4294,766,8441,3794,7358],()=>e(e.s=10462)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7358],{19393:()=>{},61020:(e,s,n)=>{Promise.resolve().then(n.t.bind(n,27123,23)),Promise.resolve().then(n.t.bind(n,61304,23)),Promise.resolve().then(n.t.bind(n,78616,23)),Promise.resolve().then(n.t.bind(n,64777,23)),Promise.resolve().then(n.t.bind(n,57121,23)),Promise.resolve().then(n.t.bind(n,74581,23)),Promise.resolve().then(n.t.bind(n,90484,23)),Promise.resolve().then(n.bind(n,86869))}},e=>{var s=s=>e(e.s=s);e.O(0,[8441,3794],()=>(s(83861),s(61020))),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9337],{85877:(e,s,_)=>{Promise.resolve().then(_.t.bind(_,27123,23))}},e=>{e.O(0,[8441,3794,7358],()=>e(e.s=85877)),_N_E=e.O()}]);