trybeacon 0.1.77 → 0.1.79

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 (386) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.next/BUILD_ID +1 -1
  3. package/.next/app-path-routes-manifest.json +18 -14
  4. package/.next/build-manifest.json +2 -2
  5. package/.next/prerender-manifest.json +3 -3
  6. package/.next/routes-manifest.json +24 -0
  7. package/.next/server/app/_global-error/page.js +3 -3
  8. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  9. package/.next/server/app/_global-error.html +1 -1
  10. package/.next/server/app/_global-error.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  12. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  13. package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  14. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  15. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  16. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  17. package/.next/server/app/_not-found/page.js +2 -2
  18. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  19. package/.next/server/app/_not-found.html +1 -1
  20. package/.next/server/app/_not-found.rsc +12 -12
  21. package/.next/server/app/_not-found.segments/_full.segment.rsc +12 -12
  22. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  23. package/.next/server/app/_not-found.segments/_index.segment.rsc +12 -12
  24. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  25. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  26. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  27. package/.next/server/app/api/ask/answer/route.js +1 -1
  28. package/.next/server/app/api/ask/route.js +1 -1
  29. package/.next/server/app/api/ask/verdict/route.js +1 -1
  30. package/.next/server/app/api/board-annotations/[id]/route.js +1 -1
  31. package/.next/server/app/api/board-annotations/route.js +1 -1
  32. package/.next/server/app/api/board-layout/route.js +1 -1
  33. package/.next/server/app/api/bug-flags/[id]/route.js +1 -1
  34. package/.next/server/app/api/bug-flags/route.js +1 -1
  35. package/.next/server/app/api/changes/comment/answer/route.js +2 -2
  36. package/.next/server/app/api/changes/comment/claim/route.js +2 -2
  37. package/.next/server/app/api/changes/comment/route.js +2 -2
  38. package/.next/server/app/api/changes/quality/route.js +1 -1
  39. package/.next/server/app/api/changes/route.js +1 -1
  40. package/.next/server/app/api/changes/viewed/route.js +1 -1
  41. package/.next/server/app/api/code-graph/position/route.js +1 -1
  42. package/.next/server/app/api/code-graph/route.js +1 -1
  43. package/.next/server/app/api/context/feature/route.js +1 -1
  44. package/.next/server/app/api/context/file/route.js +1 -1
  45. package/.next/server/app/api/context/route.js +1 -1
  46. package/.next/server/app/api/db/arrange/route.js +1 -1
  47. package/.next/server/app/api/db/backfill-access/route.js +1 -1
  48. package/.next/server/app/api/db/position/route.js +1 -1
  49. package/.next/server/app/api/db/prune-planned/route.js +1 -1
  50. package/.next/server/app/api/db/reconcile-endpoints/route.js +1 -1
  51. package/.next/server/app/api/db/relations/[id]/route.js +1 -1
  52. package/.next/server/app/api/db/tables/[id]/route.js +1 -1
  53. package/.next/server/app/api/draft/approve/route.js +1 -1
  54. package/.next/server/app/api/draft/route.js +1 -1
  55. package/.next/server/app/api/draft/status/route.js +1 -1
  56. package/.next/server/app/api/edges/[id]/route.js +1 -1
  57. package/.next/server/app/api/edges/route.js +1 -1
  58. package/.next/server/app/api/endpoints/[id]/route.js +1 -1
  59. package/.next/server/app/api/entities/route.js +1 -1
  60. package/.next/server/app/api/ingest/route.js +1 -1
  61. package/.next/server/app/api/init/route.js +1 -1
  62. package/.next/server/app/api/lesson/close/route.js +1 -1
  63. package/.next/server/app/api/lesson/presence/route.js +1 -1
  64. package/.next/server/app/api/lesson/questions/route.js +1 -1
  65. package/.next/server/app/api/lesson/route.js +1 -1
  66. package/.next/server/app/api/lesson/save/route.js +1 -1
  67. package/.next/server/app/api/lesson/verdict/route.js +1 -1
  68. package/.next/server/app/api/linear/route.js +17 -0
  69. package/.next/server/app/api/linear/route.js.nft.json +1 -0
  70. package/.next/server/app/api/linear/route_client-reference-manifest.js +1 -0
  71. package/.next/server/app/api/linear/scopes/route.js +17 -0
  72. package/.next/server/app/api/linear/scopes/route.js.nft.json +1 -0
  73. package/.next/server/app/api/linear/scopes/route_client-reference-manifest.js +1 -0
  74. package/.next/server/app/api/linear/sync/route.js +17 -0
  75. package/.next/server/app/api/linear/sync/route.js.nft.json +1 -0
  76. package/.next/server/app/api/linear/sync/route_client-reference-manifest.js +1 -0
  77. package/.next/server/app/api/map/describe/route.js +1 -1
  78. package/.next/server/app/api/map/files/route.js +1 -1
  79. package/.next/server/app/api/map/finish/route.js +1 -1
  80. package/.next/server/app/api/map/route.js +1 -1
  81. package/.next/server/app/api/map/start/route.js +1 -1
  82. package/.next/server/app/api/map/touch-active/route.js +1 -1
  83. package/.next/server/app/api/mention-search/route.js +1 -1
  84. package/.next/server/app/api/nodes/[id]/position/route.js +1 -1
  85. package/.next/server/app/api/nodes/[id]/route.js +1 -1
  86. package/.next/server/app/api/nodes/positions/route.js +1 -1
  87. package/.next/server/app/api/nodes/route.js +1 -1
  88. package/.next/server/app/api/nodes/subtasks/route.js +1 -1
  89. package/.next/server/app/api/notes/[id]/route.js +1 -1
  90. package/.next/server/app/api/notes/route.js +1 -1
  91. package/.next/server/app/api/open/route.js +1 -1
  92. package/.next/server/app/api/plan/annotations/route.js +2 -2
  93. package/.next/server/app/api/plan/approve/route.js +1 -1
  94. package/.next/server/app/api/plan/history/route.js +1 -1
  95. package/.next/server/app/api/plan/markdown/route.js +1 -1
  96. package/.next/server/app/api/plan/presence/route.js +1 -1
  97. package/.next/server/app/api/plan/route.js +1 -1
  98. package/.next/server/app/api/plan/verdict/route.js +1 -1
  99. package/.next/server/app/api/preferences/route.js +1 -1
  100. package/.next/server/app/api/project-meta/route.js +1 -1
  101. package/.next/server/app/api/reset/route.js +1 -1
  102. package/.next/server/app/api/scope-guard/check/route.js +2 -2
  103. package/.next/server/app/api/share/create/route.js +1 -1
  104. package/.next/server/app/api/share/route.js +1 -1
  105. package/.next/server/app/api/stream/route.js +2 -2
  106. package/.next/server/app/api/tab/nav/route.js +1 -1
  107. package/.next/server/app/api/tab/presence/route.js +1 -1
  108. package/.next/server/app/api/tab/view/route.js +1 -0
  109. package/.next/server/app/api/tab/view/route.js.nft.json +1 -0
  110. package/.next/server/app/api/tab/view/route_client-reference-manifest.js +1 -0
  111. package/.next/server/app/api/telemetry/route.js +1 -1
  112. package/.next/server/app/api/telemetry/stats/route.js +1 -1
  113. package/.next/server/app/api/version/route.js +1 -1
  114. package/.next/server/app/api/workspace/activate/route.js +1 -1
  115. package/.next/server/app/api/workspace/route.js +1 -1
  116. package/.next/server/app/apple-icon.png/route.js +1 -1
  117. package/.next/server/app/docs/page.js +2 -2
  118. package/.next/server/app/docs/page_client-reference-manifest.js +1 -1
  119. package/.next/server/app/docs.html +1 -1
  120. package/.next/server/app/docs.rsc +12 -12
  121. package/.next/server/app/docs.segments/_full.segment.rsc +12 -12
  122. package/.next/server/app/docs.segments/_head.segment.rsc +1 -1
  123. package/.next/server/app/docs.segments/_index.segment.rsc +12 -12
  124. package/.next/server/app/docs.segments/_tree.segment.rsc +2 -2
  125. package/.next/server/app/docs.segments/docs/__PAGE__.segment.rsc +1 -1
  126. package/.next/server/app/docs.segments/docs.segment.rsc +1 -1
  127. package/.next/server/app/help/page.js +2 -2
  128. package/.next/server/app/help/page_client-reference-manifest.js +1 -1
  129. package/.next/server/app/help.html +1 -1
  130. package/.next/server/app/help.rsc +12 -12
  131. package/.next/server/app/help.segments/_full.segment.rsc +12 -12
  132. package/.next/server/app/help.segments/_head.segment.rsc +1 -1
  133. package/.next/server/app/help.segments/_index.segment.rsc +12 -12
  134. package/.next/server/app/help.segments/_tree.segment.rsc +2 -2
  135. package/.next/server/app/help.segments/help/__PAGE__.segment.rsc +1 -1
  136. package/.next/server/app/help.segments/help.segment.rsc +1 -1
  137. package/.next/server/app/icon.svg/route.js +1 -1
  138. package/.next/server/app/index.html +1 -1
  139. package/.next/server/app/index.rsc +12 -12
  140. package/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  141. package/.next/server/app/index.segments/_full.segment.rsc +12 -12
  142. package/.next/server/app/index.segments/_head.segment.rsc +1 -1
  143. package/.next/server/app/index.segments/_index.segment.rsc +12 -12
  144. package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  145. package/.next/server/app/learn/page.js +4 -4
  146. package/.next/server/app/learn/page.js.nft.json +1 -1
  147. package/.next/server/app/learn/page_client-reference-manifest.js +1 -1
  148. package/.next/server/app/map/page.js +2 -2
  149. package/.next/server/app/map/page.js.nft.json +1 -1
  150. package/.next/server/app/map/page_client-reference-manifest.js +1 -1
  151. package/.next/server/app/page.js +2 -2
  152. package/.next/server/app/page_client-reference-manifest.js +1 -1
  153. package/.next/server/app/plan/page.js +3 -3
  154. package/.next/server/app/plan/page.js.nft.json +1 -1
  155. package/.next/server/app/plan/page_client-reference-manifest.js +1 -1
  156. package/.next/server/app/s/[token]/page.js +2 -2
  157. package/.next/server/app/s/[token]/page.js.nft.json +1 -1
  158. package/.next/server/app/s/[token]/page_client-reference-manifest.js +1 -1
  159. package/.next/server/app/settings/page.js +2 -2
  160. package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  161. package/.next/server/app-paths-manifest.json +18 -14
  162. package/.next/server/chunks/2031.js +1 -1
  163. package/.next/server/chunks/3838.js +1 -1
  164. package/.next/server/chunks/4378.js +1 -1
  165. package/.next/server/chunks/5295.js +1 -1
  166. package/.next/server/chunks/8227.js +1 -1
  167. package/.next/server/chunks/8569.js +1 -0
  168. package/.next/server/chunks/8709.js +17 -0
  169. package/.next/server/chunks/9683.js +1 -1
  170. package/.next/server/instrumentation.js +1 -1
  171. package/.next/server/instrumentation.js.nft.json +1 -1
  172. package/.next/server/middleware-build-manifest.js +1 -1
  173. package/.next/server/pages/404.html +1 -1
  174. package/.next/server/pages/500.html +1 -1
  175. package/.next/server/server-reference-manifest.js +1 -1
  176. package/.next/server/server-reference-manifest.json +1 -1
  177. package/.next/static/J6oJS9kOgjsQGP4x5VPu6/_buildManifest.js +1 -0
  178. package/.next/static/chunks/6302-27c904b9f4b65236.js +1 -0
  179. package/.next/static/chunks/app/_global-error/page-18eb7d6678dc0ddd.js +1 -0
  180. package/.next/static/chunks/app/api/ask/answer/route-18eb7d6678dc0ddd.js +1 -0
  181. package/.next/static/chunks/app/api/ask/route-18eb7d6678dc0ddd.js +1 -0
  182. package/.next/static/chunks/app/api/ask/verdict/route-18eb7d6678dc0ddd.js +1 -0
  183. package/.next/static/chunks/app/api/board-annotations/[id]/route-18eb7d6678dc0ddd.js +1 -0
  184. package/.next/static/chunks/app/api/board-annotations/route-18eb7d6678dc0ddd.js +1 -0
  185. package/.next/static/chunks/app/api/board-layout/route-18eb7d6678dc0ddd.js +1 -0
  186. package/.next/static/chunks/app/api/bug-flags/[id]/route-18eb7d6678dc0ddd.js +1 -0
  187. package/.next/static/chunks/app/api/bug-flags/route-18eb7d6678dc0ddd.js +1 -0
  188. package/.next/static/chunks/app/api/changes/comment/answer/route-18eb7d6678dc0ddd.js +1 -0
  189. package/.next/static/chunks/app/api/changes/comment/claim/route-18eb7d6678dc0ddd.js +1 -0
  190. package/.next/static/chunks/app/api/changes/comment/route-18eb7d6678dc0ddd.js +1 -0
  191. package/.next/static/chunks/app/api/changes/quality/route-18eb7d6678dc0ddd.js +1 -0
  192. package/.next/static/chunks/app/api/changes/route-18eb7d6678dc0ddd.js +1 -0
  193. package/.next/static/chunks/app/api/changes/viewed/route-18eb7d6678dc0ddd.js +1 -0
  194. package/.next/static/chunks/app/api/code-graph/position/route-18eb7d6678dc0ddd.js +1 -0
  195. package/.next/static/chunks/app/api/code-graph/route-18eb7d6678dc0ddd.js +1 -0
  196. package/.next/static/chunks/app/api/context/feature/route-18eb7d6678dc0ddd.js +1 -0
  197. package/.next/static/chunks/app/api/context/file/route-18eb7d6678dc0ddd.js +1 -0
  198. package/.next/static/chunks/app/api/context/route-18eb7d6678dc0ddd.js +1 -0
  199. package/.next/static/chunks/app/api/db/arrange/route-18eb7d6678dc0ddd.js +1 -0
  200. package/.next/static/chunks/app/api/db/backfill-access/route-18eb7d6678dc0ddd.js +1 -0
  201. package/.next/static/chunks/app/api/db/position/route-18eb7d6678dc0ddd.js +1 -0
  202. package/.next/static/chunks/app/api/db/prune-planned/route-18eb7d6678dc0ddd.js +1 -0
  203. package/.next/static/chunks/app/api/db/reconcile-endpoints/route-18eb7d6678dc0ddd.js +1 -0
  204. package/.next/static/chunks/app/api/db/relations/[id]/route-18eb7d6678dc0ddd.js +1 -0
  205. package/.next/static/chunks/app/api/db/tables/[id]/route-18eb7d6678dc0ddd.js +1 -0
  206. package/.next/static/chunks/app/api/draft/approve/route-18eb7d6678dc0ddd.js +1 -0
  207. package/.next/static/chunks/app/api/draft/route-18eb7d6678dc0ddd.js +1 -0
  208. package/.next/static/chunks/app/api/draft/status/route-18eb7d6678dc0ddd.js +1 -0
  209. package/.next/static/chunks/app/api/edges/[id]/route-18eb7d6678dc0ddd.js +1 -0
  210. package/.next/static/chunks/app/api/edges/route-18eb7d6678dc0ddd.js +1 -0
  211. package/.next/static/chunks/app/api/endpoints/[id]/route-18eb7d6678dc0ddd.js +1 -0
  212. package/.next/static/chunks/app/api/entities/route-18eb7d6678dc0ddd.js +1 -0
  213. package/.next/static/chunks/app/api/ingest/route-18eb7d6678dc0ddd.js +1 -0
  214. package/.next/static/chunks/app/api/init/route-18eb7d6678dc0ddd.js +1 -0
  215. package/.next/static/chunks/app/api/lesson/close/route-18eb7d6678dc0ddd.js +1 -0
  216. package/.next/static/chunks/app/api/lesson/presence/route-18eb7d6678dc0ddd.js +1 -0
  217. package/.next/static/chunks/app/api/lesson/questions/route-18eb7d6678dc0ddd.js +1 -0
  218. package/.next/static/chunks/app/api/lesson/route-18eb7d6678dc0ddd.js +1 -0
  219. package/.next/static/chunks/app/api/lesson/save/route-18eb7d6678dc0ddd.js +1 -0
  220. package/.next/static/chunks/app/api/lesson/verdict/route-18eb7d6678dc0ddd.js +1 -0
  221. package/.next/static/chunks/app/api/linear/route-18eb7d6678dc0ddd.js +1 -0
  222. package/.next/static/chunks/app/api/linear/scopes/route-18eb7d6678dc0ddd.js +1 -0
  223. package/.next/static/chunks/app/api/linear/sync/route-18eb7d6678dc0ddd.js +1 -0
  224. package/.next/static/chunks/app/api/map/describe/route-18eb7d6678dc0ddd.js +1 -0
  225. package/.next/static/chunks/app/api/map/files/route-18eb7d6678dc0ddd.js +1 -0
  226. package/.next/static/chunks/app/api/map/finish/route-18eb7d6678dc0ddd.js +1 -0
  227. package/.next/static/chunks/app/api/map/route-18eb7d6678dc0ddd.js +1 -0
  228. package/.next/static/chunks/app/api/map/start/route-18eb7d6678dc0ddd.js +1 -0
  229. package/.next/static/chunks/app/api/map/touch-active/route-18eb7d6678dc0ddd.js +1 -0
  230. package/.next/static/chunks/app/api/mention-search/route-18eb7d6678dc0ddd.js +1 -0
  231. package/.next/static/chunks/app/api/nodes/[id]/position/route-18eb7d6678dc0ddd.js +1 -0
  232. package/.next/static/chunks/app/api/nodes/[id]/route-18eb7d6678dc0ddd.js +1 -0
  233. package/.next/static/chunks/app/api/nodes/positions/route-18eb7d6678dc0ddd.js +1 -0
  234. package/.next/static/chunks/app/api/nodes/route-18eb7d6678dc0ddd.js +1 -0
  235. package/.next/static/chunks/app/api/nodes/subtasks/route-18eb7d6678dc0ddd.js +1 -0
  236. package/.next/static/chunks/app/api/notes/[id]/route-18eb7d6678dc0ddd.js +1 -0
  237. package/.next/static/chunks/app/api/notes/route-18eb7d6678dc0ddd.js +1 -0
  238. package/.next/static/chunks/app/api/open/route-18eb7d6678dc0ddd.js +1 -0
  239. package/.next/static/chunks/app/api/plan/annotations/route-18eb7d6678dc0ddd.js +1 -0
  240. package/.next/static/chunks/app/api/plan/approve/route-18eb7d6678dc0ddd.js +1 -0
  241. package/.next/static/chunks/app/api/plan/history/route-18eb7d6678dc0ddd.js +1 -0
  242. package/.next/static/chunks/app/api/plan/markdown/route-18eb7d6678dc0ddd.js +1 -0
  243. package/.next/static/chunks/app/api/plan/presence/route-18eb7d6678dc0ddd.js +1 -0
  244. package/.next/static/chunks/app/api/plan/route-18eb7d6678dc0ddd.js +1 -0
  245. package/.next/static/chunks/app/api/plan/verdict/route-18eb7d6678dc0ddd.js +1 -0
  246. package/.next/static/chunks/app/api/preferences/route-18eb7d6678dc0ddd.js +1 -0
  247. package/.next/static/chunks/app/api/project-meta/route-18eb7d6678dc0ddd.js +1 -0
  248. package/.next/static/chunks/app/api/reset/route-18eb7d6678dc0ddd.js +1 -0
  249. package/.next/static/chunks/app/api/scope-guard/check/route-18eb7d6678dc0ddd.js +1 -0
  250. package/.next/static/chunks/app/api/share/create/route-18eb7d6678dc0ddd.js +1 -0
  251. package/.next/static/chunks/app/api/share/route-18eb7d6678dc0ddd.js +1 -0
  252. package/.next/static/chunks/app/api/stream/route-18eb7d6678dc0ddd.js +1 -0
  253. package/.next/static/chunks/app/api/tab/nav/route-18eb7d6678dc0ddd.js +1 -0
  254. package/.next/static/chunks/app/api/tab/presence/route-18eb7d6678dc0ddd.js +1 -0
  255. package/.next/static/chunks/app/api/tab/view/route-18eb7d6678dc0ddd.js +1 -0
  256. package/.next/static/chunks/app/api/telemetry/route-18eb7d6678dc0ddd.js +1 -0
  257. package/.next/static/chunks/app/api/telemetry/stats/route-18eb7d6678dc0ddd.js +1 -0
  258. package/.next/static/chunks/app/api/version/route-18eb7d6678dc0ddd.js +1 -0
  259. package/.next/static/chunks/app/api/workspace/activate/route-18eb7d6678dc0ddd.js +1 -0
  260. package/.next/static/chunks/app/api/workspace/route-18eb7d6678dc0ddd.js +1 -0
  261. package/.next/static/chunks/app/layout-e728d45f193e3b95.js +1 -0
  262. package/.next/static/chunks/app/learn/page-14a297c6ff4e54f0.js +7 -0
  263. package/.next/static/chunks/app/map/page-91637b0a29494ee5.js +1 -0
  264. package/.next/static/chunks/app/plan/page-d4651c40e3bd751e.js +11 -0
  265. package/.next/static/chunks/app/s/[token]/page-05344f912a83ed60.js +1 -0
  266. package/.next/static/chunks/app/settings/page-7e86fd456b92c248.js +1 -0
  267. package/.next/static/chunks/next/dist/client/components/builtin/app-error-18eb7d6678dc0ddd.js +1 -0
  268. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-18eb7d6678dc0ddd.js +1 -0
  269. package/.next/static/chunks/next/dist/client/components/builtin/not-found-18eb7d6678dc0ddd.js +1 -0
  270. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-18eb7d6678dc0ddd.js +1 -0
  271. package/.next/static/css/570399103dd72653.css +1 -0
  272. package/.next/trace +46 -46
  273. package/.next/trace-build +1 -1
  274. package/.next/types/app/api/linear/route.ts +351 -0
  275. package/.next/types/app/api/linear/scopes/route.ts +351 -0
  276. package/.next/types/app/api/linear/sync/route.ts +351 -0
  277. package/.next/types/app/api/tab/view/route.ts +351 -0
  278. package/.next/types/routes.d.ts +5 -1
  279. package/.next/types/validator.ts +36 -0
  280. package/dist/bin/ask.js +2 -2
  281. package/dist/bin/mcp.js +26 -26
  282. package/dist/bin/remove.js +5 -5
  283. package/dist/bin/stop-hook.js +3 -3
  284. package/drizzle/0009_huge_beast.sql +2 -0
  285. package/drizzle/0010_boring_purifiers.sql +1 -0
  286. package/drizzle/0011_graceful_eternals.sql +2 -0
  287. package/drizzle/0012_tearful_goblin_queen.sql +1 -0
  288. package/drizzle/meta/0009_snapshot.json +1918 -0
  289. package/drizzle/meta/0010_snapshot.json +1925 -0
  290. package/drizzle/meta/0011_snapshot.json +1939 -0
  291. package/drizzle/meta/0012_snapshot.json +1946 -0
  292. package/drizzle/meta/_journal.json +28 -0
  293. package/package.json +1 -1
  294. package/.next/server/chunks/6644.js +0 -1
  295. package/.next/static/CYh2DUsaQ9xKJ4Lq-d95v/_buildManifest.js +0 -1
  296. package/.next/static/chunks/1413-7b007ebe13f71145.js +0 -1
  297. package/.next/static/chunks/app/_global-error/page-d54a69e7dc6b4008.js +0 -1
  298. package/.next/static/chunks/app/api/ask/answer/route-d54a69e7dc6b4008.js +0 -1
  299. package/.next/static/chunks/app/api/ask/route-d54a69e7dc6b4008.js +0 -1
  300. package/.next/static/chunks/app/api/ask/verdict/route-d54a69e7dc6b4008.js +0 -1
  301. package/.next/static/chunks/app/api/board-annotations/[id]/route-d54a69e7dc6b4008.js +0 -1
  302. package/.next/static/chunks/app/api/board-annotations/route-d54a69e7dc6b4008.js +0 -1
  303. package/.next/static/chunks/app/api/board-layout/route-d54a69e7dc6b4008.js +0 -1
  304. package/.next/static/chunks/app/api/bug-flags/[id]/route-d54a69e7dc6b4008.js +0 -1
  305. package/.next/static/chunks/app/api/bug-flags/route-d54a69e7dc6b4008.js +0 -1
  306. package/.next/static/chunks/app/api/changes/comment/answer/route-d54a69e7dc6b4008.js +0 -1
  307. package/.next/static/chunks/app/api/changes/comment/claim/route-d54a69e7dc6b4008.js +0 -1
  308. package/.next/static/chunks/app/api/changes/comment/route-d54a69e7dc6b4008.js +0 -1
  309. package/.next/static/chunks/app/api/changes/quality/route-d54a69e7dc6b4008.js +0 -1
  310. package/.next/static/chunks/app/api/changes/route-d54a69e7dc6b4008.js +0 -1
  311. package/.next/static/chunks/app/api/changes/viewed/route-d54a69e7dc6b4008.js +0 -1
  312. package/.next/static/chunks/app/api/code-graph/position/route-d54a69e7dc6b4008.js +0 -1
  313. package/.next/static/chunks/app/api/code-graph/route-d54a69e7dc6b4008.js +0 -1
  314. package/.next/static/chunks/app/api/context/feature/route-d54a69e7dc6b4008.js +0 -1
  315. package/.next/static/chunks/app/api/context/file/route-d54a69e7dc6b4008.js +0 -1
  316. package/.next/static/chunks/app/api/context/route-d54a69e7dc6b4008.js +0 -1
  317. package/.next/static/chunks/app/api/db/arrange/route-d54a69e7dc6b4008.js +0 -1
  318. package/.next/static/chunks/app/api/db/backfill-access/route-d54a69e7dc6b4008.js +0 -1
  319. package/.next/static/chunks/app/api/db/position/route-d54a69e7dc6b4008.js +0 -1
  320. package/.next/static/chunks/app/api/db/prune-planned/route-d54a69e7dc6b4008.js +0 -1
  321. package/.next/static/chunks/app/api/db/reconcile-endpoints/route-d54a69e7dc6b4008.js +0 -1
  322. package/.next/static/chunks/app/api/db/relations/[id]/route-d54a69e7dc6b4008.js +0 -1
  323. package/.next/static/chunks/app/api/db/tables/[id]/route-d54a69e7dc6b4008.js +0 -1
  324. package/.next/static/chunks/app/api/draft/approve/route-d54a69e7dc6b4008.js +0 -1
  325. package/.next/static/chunks/app/api/draft/route-d54a69e7dc6b4008.js +0 -1
  326. package/.next/static/chunks/app/api/draft/status/route-d54a69e7dc6b4008.js +0 -1
  327. package/.next/static/chunks/app/api/edges/[id]/route-d54a69e7dc6b4008.js +0 -1
  328. package/.next/static/chunks/app/api/edges/route-d54a69e7dc6b4008.js +0 -1
  329. package/.next/static/chunks/app/api/endpoints/[id]/route-d54a69e7dc6b4008.js +0 -1
  330. package/.next/static/chunks/app/api/entities/route-d54a69e7dc6b4008.js +0 -1
  331. package/.next/static/chunks/app/api/ingest/route-d54a69e7dc6b4008.js +0 -1
  332. package/.next/static/chunks/app/api/init/route-d54a69e7dc6b4008.js +0 -1
  333. package/.next/static/chunks/app/api/lesson/close/route-d54a69e7dc6b4008.js +0 -1
  334. package/.next/static/chunks/app/api/lesson/presence/route-d54a69e7dc6b4008.js +0 -1
  335. package/.next/static/chunks/app/api/lesson/questions/route-d54a69e7dc6b4008.js +0 -1
  336. package/.next/static/chunks/app/api/lesson/route-d54a69e7dc6b4008.js +0 -1
  337. package/.next/static/chunks/app/api/lesson/save/route-d54a69e7dc6b4008.js +0 -1
  338. package/.next/static/chunks/app/api/lesson/verdict/route-d54a69e7dc6b4008.js +0 -1
  339. package/.next/static/chunks/app/api/map/describe/route-d54a69e7dc6b4008.js +0 -1
  340. package/.next/static/chunks/app/api/map/files/route-d54a69e7dc6b4008.js +0 -1
  341. package/.next/static/chunks/app/api/map/finish/route-d54a69e7dc6b4008.js +0 -1
  342. package/.next/static/chunks/app/api/map/route-d54a69e7dc6b4008.js +0 -1
  343. package/.next/static/chunks/app/api/map/start/route-d54a69e7dc6b4008.js +0 -1
  344. package/.next/static/chunks/app/api/map/touch-active/route-d54a69e7dc6b4008.js +0 -1
  345. package/.next/static/chunks/app/api/mention-search/route-d54a69e7dc6b4008.js +0 -1
  346. package/.next/static/chunks/app/api/nodes/[id]/position/route-d54a69e7dc6b4008.js +0 -1
  347. package/.next/static/chunks/app/api/nodes/[id]/route-d54a69e7dc6b4008.js +0 -1
  348. package/.next/static/chunks/app/api/nodes/positions/route-d54a69e7dc6b4008.js +0 -1
  349. package/.next/static/chunks/app/api/nodes/route-d54a69e7dc6b4008.js +0 -1
  350. package/.next/static/chunks/app/api/nodes/subtasks/route-d54a69e7dc6b4008.js +0 -1
  351. package/.next/static/chunks/app/api/notes/[id]/route-d54a69e7dc6b4008.js +0 -1
  352. package/.next/static/chunks/app/api/notes/route-d54a69e7dc6b4008.js +0 -1
  353. package/.next/static/chunks/app/api/open/route-d54a69e7dc6b4008.js +0 -1
  354. package/.next/static/chunks/app/api/plan/annotations/route-d54a69e7dc6b4008.js +0 -1
  355. package/.next/static/chunks/app/api/plan/approve/route-d54a69e7dc6b4008.js +0 -1
  356. package/.next/static/chunks/app/api/plan/history/route-d54a69e7dc6b4008.js +0 -1
  357. package/.next/static/chunks/app/api/plan/markdown/route-d54a69e7dc6b4008.js +0 -1
  358. package/.next/static/chunks/app/api/plan/presence/route-d54a69e7dc6b4008.js +0 -1
  359. package/.next/static/chunks/app/api/plan/route-d54a69e7dc6b4008.js +0 -1
  360. package/.next/static/chunks/app/api/plan/verdict/route-d54a69e7dc6b4008.js +0 -1
  361. package/.next/static/chunks/app/api/preferences/route-d54a69e7dc6b4008.js +0 -1
  362. package/.next/static/chunks/app/api/project-meta/route-d54a69e7dc6b4008.js +0 -1
  363. package/.next/static/chunks/app/api/reset/route-d54a69e7dc6b4008.js +0 -1
  364. package/.next/static/chunks/app/api/scope-guard/check/route-d54a69e7dc6b4008.js +0 -1
  365. package/.next/static/chunks/app/api/share/create/route-d54a69e7dc6b4008.js +0 -1
  366. package/.next/static/chunks/app/api/share/route-d54a69e7dc6b4008.js +0 -1
  367. package/.next/static/chunks/app/api/stream/route-d54a69e7dc6b4008.js +0 -1
  368. package/.next/static/chunks/app/api/tab/nav/route-d54a69e7dc6b4008.js +0 -1
  369. package/.next/static/chunks/app/api/tab/presence/route-d54a69e7dc6b4008.js +0 -1
  370. package/.next/static/chunks/app/api/telemetry/route-d54a69e7dc6b4008.js +0 -1
  371. package/.next/static/chunks/app/api/telemetry/stats/route-d54a69e7dc6b4008.js +0 -1
  372. package/.next/static/chunks/app/api/version/route-d54a69e7dc6b4008.js +0 -1
  373. package/.next/static/chunks/app/api/workspace/activate/route-d54a69e7dc6b4008.js +0 -1
  374. package/.next/static/chunks/app/api/workspace/route-d54a69e7dc6b4008.js +0 -1
  375. package/.next/static/chunks/app/layout-3bda91675bae86b9.js +0 -1
  376. package/.next/static/chunks/app/learn/page-0e870de31b83851e.js +0 -7
  377. package/.next/static/chunks/app/map/page-9799c07d55cb594a.js +0 -1
  378. package/.next/static/chunks/app/plan/page-a379b482e8f4f6f7.js +0 -11
  379. package/.next/static/chunks/app/s/[token]/page-ff26413ce3485dda.js +0 -1
  380. package/.next/static/chunks/app/settings/page-a751eabdd933f685.js +0 -1
  381. package/.next/static/chunks/next/dist/client/components/builtin/app-error-d54a69e7dc6b4008.js +0 -1
  382. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-d54a69e7dc6b4008.js +0 -1
  383. package/.next/static/chunks/next/dist/client/components/builtin/not-found-d54a69e7dc6b4008.js +0 -1
  384. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-d54a69e7dc6b4008.js +0 -1
  385. package/.next/static/css/ee94ed0880eabb76.css +0 -1
  386. /package/.next/static/{CYh2DUsaQ9xKJ4Lq-d95v → J6oJS9kOgjsQGP4x5VPu6}/_ssgManifest.js +0 -0
@@ -2,7 +2,7 @@
2
2
  // Do not edit this file manually
3
3
 
4
4
  type AppRoutes = "/" | "/docs" | "/help" | "/learn" | "/map" | "/plan" | "/s/[token]" | "/settings"
5
- type AppRouteHandlerRoutes = "/api/ask" | "/api/ask/answer" | "/api/ask/verdict" | "/api/board-annotations" | "/api/board-annotations/[id]" | "/api/board-layout" | "/api/bug-flags" | "/api/bug-flags/[id]" | "/api/changes" | "/api/changes/comment" | "/api/changes/comment/answer" | "/api/changes/comment/claim" | "/api/changes/quality" | "/api/changes/viewed" | "/api/code-graph" | "/api/code-graph/position" | "/api/context" | "/api/context/feature" | "/api/context/file" | "/api/db/arrange" | "/api/db/backfill-access" | "/api/db/position" | "/api/db/prune-planned" | "/api/db/reconcile-endpoints" | "/api/db/relations/[id]" | "/api/db/tables/[id]" | "/api/draft" | "/api/draft/approve" | "/api/draft/status" | "/api/edges" | "/api/edges/[id]" | "/api/endpoints/[id]" | "/api/entities" | "/api/ingest" | "/api/init" | "/api/lesson" | "/api/lesson/close" | "/api/lesson/presence" | "/api/lesson/questions" | "/api/lesson/save" | "/api/lesson/verdict" | "/api/map" | "/api/map/describe" | "/api/map/files" | "/api/map/finish" | "/api/map/start" | "/api/map/touch-active" | "/api/mention-search" | "/api/nodes" | "/api/nodes/[id]" | "/api/nodes/[id]/position" | "/api/nodes/positions" | "/api/nodes/subtasks" | "/api/notes" | "/api/notes/[id]" | "/api/open" | "/api/plan" | "/api/plan/annotations" | "/api/plan/approve" | "/api/plan/history" | "/api/plan/markdown" | "/api/plan/presence" | "/api/plan/verdict" | "/api/preferences" | "/api/project-meta" | "/api/reset" | "/api/scope-guard/check" | "/api/share" | "/api/share/create" | "/api/stream" | "/api/tab/nav" | "/api/tab/presence" | "/api/telemetry" | "/api/telemetry/stats" | "/api/version" | "/api/workspace" | "/api/workspace/activate"
5
+ type AppRouteHandlerRoutes = "/api/ask" | "/api/ask/answer" | "/api/ask/verdict" | "/api/board-annotations" | "/api/board-annotations/[id]" | "/api/board-layout" | "/api/bug-flags" | "/api/bug-flags/[id]" | "/api/changes" | "/api/changes/comment" | "/api/changes/comment/answer" | "/api/changes/comment/claim" | "/api/changes/quality" | "/api/changes/viewed" | "/api/code-graph" | "/api/code-graph/position" | "/api/context" | "/api/context/feature" | "/api/context/file" | "/api/db/arrange" | "/api/db/backfill-access" | "/api/db/position" | "/api/db/prune-planned" | "/api/db/reconcile-endpoints" | "/api/db/relations/[id]" | "/api/db/tables/[id]" | "/api/draft" | "/api/draft/approve" | "/api/draft/status" | "/api/edges" | "/api/edges/[id]" | "/api/endpoints/[id]" | "/api/entities" | "/api/ingest" | "/api/init" | "/api/lesson" | "/api/lesson/close" | "/api/lesson/presence" | "/api/lesson/questions" | "/api/lesson/save" | "/api/lesson/verdict" | "/api/linear" | "/api/linear/scopes" | "/api/linear/sync" | "/api/map" | "/api/map/describe" | "/api/map/files" | "/api/map/finish" | "/api/map/start" | "/api/map/touch-active" | "/api/mention-search" | "/api/nodes" | "/api/nodes/[id]" | "/api/nodes/[id]/position" | "/api/nodes/positions" | "/api/nodes/subtasks" | "/api/notes" | "/api/notes/[id]" | "/api/open" | "/api/plan" | "/api/plan/annotations" | "/api/plan/approve" | "/api/plan/history" | "/api/plan/markdown" | "/api/plan/presence" | "/api/plan/verdict" | "/api/preferences" | "/api/project-meta" | "/api/reset" | "/api/scope-guard/check" | "/api/share" | "/api/share/create" | "/api/stream" | "/api/tab/nav" | "/api/tab/presence" | "/api/tab/view" | "/api/telemetry" | "/api/telemetry/stats" | "/api/version" | "/api/workspace" | "/api/workspace/activate"
6
6
  type PageRoutes = never
7
7
  type LayoutRoutes = "/"
8
8
  type RedirectRoutes = never
@@ -53,6 +53,9 @@ interface ParamMap {
53
53
  "/api/lesson/questions": {}
54
54
  "/api/lesson/save": {}
55
55
  "/api/lesson/verdict": {}
56
+ "/api/linear": {}
57
+ "/api/linear/scopes": {}
58
+ "/api/linear/sync": {}
56
59
  "/api/map": {}
57
60
  "/api/map/describe": {}
58
61
  "/api/map/files": {}
@@ -84,6 +87,7 @@ interface ParamMap {
84
87
  "/api/stream": {}
85
88
  "/api/tab/nav": {}
86
89
  "/api/tab/presence": {}
90
+ "/api/tab/view": {}
87
91
  "/api/telemetry": {}
88
92
  "/api/telemetry/stats": {}
89
93
  "/api/version": {}
@@ -488,6 +488,33 @@ type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRou
488
488
  type __Unused = __Check
489
489
  }
490
490
 
491
+ // Validate ../../app/api/linear/route.ts
492
+ {
493
+ type __IsExpected<Specific extends RouteHandlerConfig<"/api/linear">> = Specific
494
+ const handler = {} as typeof import("../../app/api/linear/route.js")
495
+ type __Check = __IsExpected<typeof handler>
496
+ // @ts-ignore
497
+ type __Unused = __Check
498
+ }
499
+
500
+ // Validate ../../app/api/linear/scopes/route.ts
501
+ {
502
+ type __IsExpected<Specific extends RouteHandlerConfig<"/api/linear/scopes">> = Specific
503
+ const handler = {} as typeof import("../../app/api/linear/scopes/route.js")
504
+ type __Check = __IsExpected<typeof handler>
505
+ // @ts-ignore
506
+ type __Unused = __Check
507
+ }
508
+
509
+ // Validate ../../app/api/linear/sync/route.ts
510
+ {
511
+ type __IsExpected<Specific extends RouteHandlerConfig<"/api/linear/sync">> = Specific
512
+ const handler = {} as typeof import("../../app/api/linear/sync/route.js")
513
+ type __Check = __IsExpected<typeof handler>
514
+ // @ts-ignore
515
+ type __Unused = __Check
516
+ }
517
+
491
518
  // Validate ../../app/api/map/describe/route.ts
492
519
  {
493
520
  type __IsExpected<Specific extends RouteHandlerConfig<"/api/map/describe">> = Specific
@@ -767,6 +794,15 @@ type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRou
767
794
  type __Unused = __Check
768
795
  }
769
796
 
797
+ // Validate ../../app/api/tab/view/route.ts
798
+ {
799
+ type __IsExpected<Specific extends RouteHandlerConfig<"/api/tab/view">> = Specific
800
+ const handler = {} as typeof import("../../app/api/tab/view/route.js")
801
+ type __Check = __IsExpected<typeof handler>
802
+ // @ts-ignore
803
+ type __Unused = __Check
804
+ }
805
+
770
806
  // Validate ../../app/api/telemetry/route.ts
771
807
  {
772
808
  type __IsExpected<Specific extends RouteHandlerConfig<"/api/telemetry">> = Specific
package/dist/bin/ask.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env bun
2
2
  // @bun
3
- var $Q=Object.defineProperty;var YQ=(Q)=>Q;function GQ(Q,X){this[Q]=YQ.bind(null,X)}var VQ=(Q,X)=>{for(var Z in X)$Q(Q,Z,{get:X[Z],enumerable:!0,configurable:!0,set:GQ.bind(X,Z)})};var E=(Q,X)=>()=>(Q&&(X=Q(Q=0)),X);var S={};VQ(S,{provisionDb:()=>TQ});import{createClient as BQ}from"@libsql/client";import{drizzle as KQ}from"drizzle-orm/libsql";import{migrate as JQ}from"drizzle-orm/libsql/migrator";import{readMigrationFiles as UQ}from"drizzle-orm/migrator";import{dirname as _,join as zQ}from"path";import{fileURLToPath as NQ}from"url";async function T(Q,X){return(await Q.execute({sql:"SELECT 1 FROM sqlite_master WHERE type='table' AND name = ?",args:[X]})).rows.length>0}async function HQ(Q,X){let Z=await Q.execute(`PRAGMA table_info("${X}")`);return new Set(Z.rows.map(($)=>String($.name)))}async function f(Q){if(!await T(Q,"__drizzle_migrations"))return 0;let X=await Q.execute('SELECT count(*) AS n FROM "__drizzle_migrations"');return Number(X.rows[0]?.n??0)}async function CQ(Q){for(let[X,Z]of Object.entries(LQ)){if(!await T(Q,X))continue;let $=await HQ(Q,X);for(let Y of Z){if(!$.has(Y))continue;await Q.execute(`UPDATE "${X}" SET "${Y}" = CAST((julianday("${Y}") - 2440587.5) * 86400000 AS INTEGER) WHERE typeof("${Y}") = 'text'`)}}}async function TQ(Q,X=MQ){let Z=BQ({url:Q});try{await Z.execute("PRAGMA journal_mode = WAL;"),await Z.execute("PRAGMA foreign_keys = ON;"),await Z.execute("PRAGMA busy_timeout = 5000;");let $=await T(Z,"__drizzle_migrations"),Y=await T(Z,"Node"),G=!1;if(Y&&!$){let K=UQ({migrationsFolder:X})[0];if(K)await Z.execute('CREATE TABLE IF NOT EXISTS "__drizzle_migrations" (id SERIAL PRIMARY KEY, hash text NOT NULL, created_at numeric)'),await Z.execute({sql:'INSERT INTO "__drizzle_migrations" ("hash", "created_at") VALUES (?, ?)',args:[K.hash,K.folderMillis]}),G=!0}let V=await f(Z);if(await JQ(KQ(Z),{migrationsFolder:X}),await f(Z)>V)G=!0;return await CQ(Z),{migrated:G}}finally{Z.close()}}var jQ,MQ,LQ;var P=E(async()=>{jQ=_(_(_(NQ(import.meta.url)))),MQ=process.env.BEACON_MIGRATIONS_DIR||zQ(jQ,"drizzle"),LQ={Node:["createdAt","updatedAt"],Note:["createdAt","updatedAt"],DbTable:["createdAt","updatedAt"],Endpoint:["createdAt","updatedAt"],DraftTable:["createdAt"],SyncState:["codeGraphSyncedAt","updatedAt"],AppSetting:["updatedAt"],ProjectMeta:["updatedAt"],CodeFile:["updatedAt"]}});import{mkdirSync as vQ,renameSync as bQ,rmSync as kQ,writeFileSync as uQ}from"fs";import{dirname as gQ}from"path";function wQ(Q,X){vQ(gQ(Q),{recursive:!0});let Z=`${Q}.tmp`;try{uQ(Z,X),bQ(Z,Q)}catch($){throw kQ(Z,{force:!0}),$}}function mQ(Q,X,Z=!1){wQ(Q,JSON.stringify(X,null,Z?2:void 0))}var a=()=>{};var o=1500,i=480000,PX=1800000,yX=3600000,vX=3000;var I=()=>{};import{AsyncLocalStorage as xQ}from"async_hooks";import{spawnSync as EQ}from"child_process";import{createHash as _Q}from"crypto";import{existsSync as v,mkdirSync as M,readFileSync as D,writeFileSync as W}from"fs";import{homedir as b}from"os";import{basename as OQ,join as z,parse as DQ,resolve as y}from"path";function J(){return process.env.BEACON_HOME||z(b(),".beacon")}function F(){return z(J(),"workspaces.json")}function j(Q){return _Q("sha256").update(Q).digest("hex").slice(0,12)}function WQ(Q=process.cwd()){let X=EQ("git",["rev-parse","--show-toplevel"],{cwd:Q,stdio:["ignore","pipe","ignore"]});if(X.status===0){let Z=X.stdout?.toString().trim();if(Z)return Z}return Q}function k(Q){let X=y(Q);return X!==y(b())&&X!==DQ(X).root}function u(){return z(J(),"deleted.json")}function q(){try{let Q=JSON.parse(D(u(),"utf8"));return Array.isArray(Q)?Q:[]}catch{return[]}}function g(Q){M(J(),{recursive:!0}),W(u(),JSON.stringify(Q,null,2))}function w(Q){return q().includes(Q)}function jX(Q){let X=q();if(!X.includes(Q))g([...X,Q])}function FQ(Q){let X=q();if(X.includes(Q))g(X.filter((Z)=>Z!==Q))}function L(Q){return z(J(),Q)}function qQ(Q){return`file:${z(L(Q),"db.sqlite")}`}function H(){try{let Q=JSON.parse(D(F(),"utf8"));return Array.isArray(Q)?Q:[]}catch{return[]}}function R(Q){M(J(),{recursive:!0}),W(F(),JSON.stringify(Q,null,2))}function m(){return H().sort((Q,X)=>X.lastOpenedAt.localeCompare(Q.lastOpenedAt))}function U(Q){return H().find((X)=>X.id===Q)??null}function h(Q,X,Z=new Date().toISOString()){if(!k(Q))throw Error(`beacon: refusing to register a non-repo path as a workspace: ${Q}`);let $=j(Q);if(w($))throw Error(`beacon: workspace ${$} (${Q}) was deleted \u2014 run \`beacon\` or /beacon-init to re-add it`);let Y=H(),G=Y.find((N)=>N.id===$),V={id:$,path:Q,name:X||G?.name||OQ(Q),lastOpenedAt:Z},K=[V,...Y.filter((N)=>N.id!==$)];return M(L($),{recursive:!0}),R(K),V}function MX(Q,X){return FQ(j(Q)),h(Q,X)}function LX(Q,X=new Date().toISOString()){let Z=H(),$=Z.find((Y)=>Y.id===Q);if(!$)return;$.lastOpenedAt=X,R(Z)}function HX(Q){if(R(H().filter((X)=>X.id!==Q)),A()===Q)RQ(m()[0]?.id??null)}function c(){return z(J(),"active")}function A(){try{return D(c(),"utf8").trim()||null}catch{return null}}function RQ(Q){M(J(),{recursive:!0}),W(c(),Q??"")}function AQ(){let Q=A();return Q?U(Q):null}function CX(){let Q=s()??A();return Q?U(Q):null}function TX(Q){return U(Q)?.path??null}function xX(){return v(F())}var l="beacon_ws";function p(Q,X){let Z=Q.headers.get("cookie");if(!Z)return null;for(let $ of Z.split(";")){let Y=$.indexOf("=");if(Y===-1)continue;if($.slice(0,Y).trim()===X)return decodeURIComponent($.slice(Y+1).trim())}return null}function EX(Q){let X=Q.headers.get("x-beacon-workspace");if(X&&U(X))return X;let Z=p(Q,l);if(Z&&U(Z))return Z;return IQ()}function IQ(){let Q=m();return Q.length===1?Q[0].id:null}var d="x-beacon-workspace-path";function _X(Q=process.cwd()){let X=WQ(Q);return{"x-beacon-workspace":j(X),[d]:X}}async function OX(Q){let X=Q.headers.get("x-beacon-workspace");if(X&&U(X))return X;let Z=Q.headers.get(d);if(Z&&k(Z)&&!w(j(Z))&&(!X||j(Z)===X)){let Y=h(Z);return await fQ(Y.id),Y.id}let $=p(Q,l);if($&&U($))return $;return null}var n=new xQ;function DX(Q,X){return Q?n.run(Q,X):X()}function s(){return n.getStore()??null}var O=new Set;function WX(Q){O.delete(z(L(Q),"db.sqlite"))}async function fQ(Q){let X=L(Q),Z=z(X,"db.sqlite"),$=v(Z);if($&&O.has(Z))return{ok:!0,created:!1,migrated:!1};try{M(X,{recursive:!0});let{provisionDb:Y}=await P().then(() => S),G=await Y(qQ(Q));return O.add(Z),{ok:!0,created:!$,migrated:$&&G.migrated}}catch(Y){return{ok:!1,created:!1,migrated:!1,error:Y instanceof Error?Y.message:String(Y)}}}import{connect as SQ}from"net";var r=4319;function PQ(Q,X,Z=400){return new Promise(($)=>{let Y=SQ({host:Q,port:X}),G=!1,V=(K)=>{if(G)return;G=!0,Y.destroy(),$(K)};Y.once("connect",()=>V(!0)),Y.once("error",()=>V(!1)),Y.setTimeout(Z,()=>V(!1))})}async function yQ(Q){for(let X of["127.0.0.1","::1"])if(await PQ(X,Q))return!1;return!0}async function RX(Q,X=20){for(let Z=Q;Z<Q+X;Z++)if(await yQ(Z))return Z;return Q}import{execSync as nQ}from"child_process";import{createHash as sQ}from"crypto";a();I();function t(Q,X){let Z=X.length?X.map((Y)=>`"${Y}"`).join(", "):"(no selection)",$=X.length>1?"these options":"that option";return"ANSWERED_IN_BEACON \u2014 the user answered this in Beacon (not the terminal). "+`For the question "${Q.question}" they selected: ${Z}. `+`This IS their answer \u2014 treat AskUserQuestion as answered with ${$} and continue. Do NOT call AskUserQuestion again for this question.`}function hQ(Q,X={}){let Z=typeof X.file_path==="string"?X.file_path:"",$=(Y)=>Y.length>4000?`${Y.slice(0,4000)}
3
+ var $Q=Object.defineProperty;var YQ=(Q)=>Q;function GQ(Q,X){this[Q]=YQ.bind(null,X)}var VQ=(Q,X)=>{for(var Z in X)$Q(Q,Z,{get:X[Z],enumerable:!0,configurable:!0,set:GQ.bind(X,Z)})};var E=(Q,X)=>()=>(Q&&(X=Q(Q=0)),X);var S={};VQ(S,{provisionDb:()=>TQ});import{createClient as BQ}from"@libsql/client";import{drizzle as KQ}from"drizzle-orm/libsql";import{migrate as JQ}from"drizzle-orm/libsql/migrator";import{readMigrationFiles as UQ}from"drizzle-orm/migrator";import{dirname as _,join as zQ}from"path";import{fileURLToPath as NQ}from"url";async function T(Q,X){return(await Q.execute({sql:"SELECT 1 FROM sqlite_master WHERE type='table' AND name = ?",args:[X]})).rows.length>0}async function HQ(Q,X){let Z=await Q.execute(`PRAGMA table_info("${X}")`);return new Set(Z.rows.map(($)=>String($.name)))}async function f(Q){if(!await T(Q,"__drizzle_migrations"))return 0;let X=await Q.execute('SELECT count(*) AS n FROM "__drizzle_migrations"');return Number(X.rows[0]?.n??0)}async function CQ(Q){for(let[X,Z]of Object.entries(LQ)){if(!await T(Q,X))continue;let $=await HQ(Q,X);for(let Y of Z){if(!$.has(Y))continue;await Q.execute(`UPDATE "${X}" SET "${Y}" = CAST((julianday("${Y}") - 2440587.5) * 86400000 AS INTEGER) WHERE typeof("${Y}") = 'text'`)}}}async function TQ(Q,X=MQ){let Z=BQ({url:Q});try{await Z.execute("PRAGMA journal_mode = WAL;"),await Z.execute("PRAGMA foreign_keys = ON;"),await Z.execute("PRAGMA busy_timeout = 5000;");let $=await T(Z,"__drizzle_migrations"),Y=await T(Z,"Node"),G=!1;if(Y&&!$){let K=UQ({migrationsFolder:X})[0];if(K)await Z.execute('CREATE TABLE IF NOT EXISTS "__drizzle_migrations" (id SERIAL PRIMARY KEY, hash text NOT NULL, created_at numeric)'),await Z.execute({sql:'INSERT INTO "__drizzle_migrations" ("hash", "created_at") VALUES (?, ?)',args:[K.hash,K.folderMillis]}),G=!0}let V=await f(Z);if(await JQ(KQ(Z),{migrationsFolder:X}),await f(Z)>V)G=!0;return await CQ(Z),{migrated:G}}finally{Z.close()}}var jQ,MQ,LQ;var P=E(async()=>{jQ=_(_(_(NQ(import.meta.url)))),MQ=process.env.BEACON_MIGRATIONS_DIR||zQ(jQ,"drizzle"),LQ={Node:["createdAt","updatedAt"],Note:["createdAt","updatedAt"],DbTable:["createdAt","updatedAt"],Endpoint:["createdAt","updatedAt"],DraftTable:["createdAt"],SyncState:["codeGraphSyncedAt","updatedAt"],AppSetting:["updatedAt"],ProjectMeta:["updatedAt"],CodeFile:["updatedAt"]}});import{mkdirSync as vQ,renameSync as bQ,rmSync as kQ,writeFileSync as uQ}from"fs";import{dirname as wQ}from"path";function gQ(Q,X){vQ(wQ(Q),{recursive:!0});let Z=`${Q}.tmp`;try{uQ(Z,X),bQ(Z,Q)}catch($){throw kQ(Z,{force:!0}),$}}function mQ(Q,X,Z=!1){gQ(Q,JSON.stringify(X,null,Z?2:void 0))}var a=()=>{};var r=1500,i=480000,PX=1800000,yX=3600000,vX=3000;var I=()=>{};import{AsyncLocalStorage as xQ}from"async_hooks";import{spawnSync as EQ}from"child_process";import{createHash as _Q}from"crypto";import{existsSync as v,mkdirSync as M,readFileSync as D,writeFileSync as W}from"fs";import{homedir as b}from"os";import{basename as OQ,join as z,parse as DQ,resolve as y}from"path";function J(){return process.env.BEACON_HOME||z(b(),".beacon")}function F(){return z(J(),"workspaces.json")}function j(Q){return _Q("sha256").update(Q).digest("hex").slice(0,12)}function WQ(Q=process.cwd()){let X=EQ("git",["rev-parse","--show-toplevel"],{cwd:Q,stdio:["ignore","pipe","ignore"]});if(X.status===0){let Z=X.stdout?.toString().trim();if(Z)return Z}return Q}function k(Q){let X=y(Q);return X!==y(b())&&X!==DQ(X).root}function u(){return z(J(),"deleted.json")}function R(){try{let Q=JSON.parse(D(u(),"utf8"));return Array.isArray(Q)?Q:[]}catch{return[]}}function w(Q){M(J(),{recursive:!0}),W(u(),JSON.stringify(Q,null,2))}function g(Q){return R().includes(Q)}function jX(Q){let X=R();if(!X.includes(Q))w([...X,Q])}function FQ(Q){let X=R();if(X.includes(Q))w(X.filter((Z)=>Z!==Q))}function L(Q){return z(J(),Q)}function RQ(Q){return`file:${z(L(Q),"db.sqlite")}`}function H(){try{let Q=JSON.parse(D(F(),"utf8"));return Array.isArray(Q)?Q:[]}catch{return[]}}function q(Q){M(J(),{recursive:!0}),W(F(),JSON.stringify(Q,null,2))}function m(){return H().sort((Q,X)=>X.lastOpenedAt.localeCompare(Q.lastOpenedAt))}function U(Q){return H().find((X)=>X.id===Q)??null}function h(Q,X,Z=new Date().toISOString()){if(!k(Q))throw Error(`beacon: refusing to register a non-repo path as a workspace: ${Q}`);let $=j(Q);if(g($))throw Error(`beacon: workspace ${$} (${Q}) was deleted \u2014 run \`beacon\` or /beacon-init to re-add it`);let Y=H(),G=Y.find((N)=>N.id===$),V={id:$,path:Q,name:X||G?.name||OQ(Q),lastOpenedAt:Z},K=[V,...Y.filter((N)=>N.id!==$)];return M(L($),{recursive:!0}),q(K),V}function MX(Q,X){return FQ(j(Q)),h(Q,X)}function LX(Q,X=new Date().toISOString()){let Z=H(),$=Z.find((Y)=>Y.id===Q);if(!$)return;$.lastOpenedAt=X,q(Z)}function HX(Q){if(q(H().filter((X)=>X.id!==Q)),A()===Q)qQ(m()[0]?.id??null)}function c(){return z(J(),"active")}function A(){try{return D(c(),"utf8").trim()||null}catch{return null}}function qQ(Q){M(J(),{recursive:!0}),W(c(),Q??"")}function AQ(){let Q=A();return Q?U(Q):null}function CX(){let Q=s()??A();return Q?U(Q):null}function TX(Q){return U(Q)?.path??null}function xX(){return v(F())}var l="beacon_ws";function p(Q,X){let Z=Q.headers.get("cookie");if(!Z)return null;for(let $ of Z.split(";")){let Y=$.indexOf("=");if(Y===-1)continue;if($.slice(0,Y).trim()===X)return decodeURIComponent($.slice(Y+1).trim())}return null}function EX(Q){let X=Q.headers.get("x-beacon-workspace");if(X&&U(X))return X;let Z=p(Q,l);if(Z&&U(Z))return Z;return IQ()}function IQ(){let Q=m();return Q.length===1?Q[0].id:null}var d="x-beacon-workspace-path";function _X(Q=process.cwd()){let X=WQ(Q);return{"x-beacon-workspace":j(X),[d]:X}}async function OX(Q){let X=Q.headers.get("x-beacon-workspace");if(X&&U(X))return X;let Z=Q.headers.get(d);if(Z&&k(Z)&&!g(j(Z))&&(!X||j(Z)===X)){let Y=h(Z);return await fQ(Y.id),Y.id}let $=p(Q,l);if($&&U($))return $;return null}var n=new xQ;function DX(Q,X){return Q?n.run(Q,X):X()}function s(){return n.getStore()??null}var O=new Set;function WX(Q){O.delete(z(L(Q),"db.sqlite"))}async function fQ(Q){let X=L(Q),Z=z(X,"db.sqlite"),$=v(Z);if($&&O.has(Z))return{ok:!0,created:!1,migrated:!1};try{M(X,{recursive:!0});let{provisionDb:Y}=await P().then(() => S),G=await Y(RQ(Q));return O.add(Z),{ok:!0,created:!$,migrated:$&&G.migrated}}catch(Y){return{ok:!1,created:!1,migrated:!1,error:Y instanceof Error?Y.message:String(Y)}}}import{connect as SQ}from"net";var o=4319;function PQ(Q,X,Z=400){return new Promise(($)=>{let Y=SQ({host:Q,port:X}),G=!1,V=(K)=>{if(G)return;G=!0,Y.destroy(),$(K)};Y.once("connect",()=>V(!0)),Y.once("error",()=>V(!1)),Y.setTimeout(Z,()=>V(!1))})}async function yQ(Q){for(let X of["127.0.0.1","::1"])if(await PQ(X,Q))return!1;return!0}async function qX(Q,X=20){for(let Z=Q;Z<Q+X;Z++)if(await yQ(Z))return Z;return Q}import{execSync as nQ}from"child_process";import{createHash as sQ}from"crypto";a();I();function t(Q,X){let Z=X.length?X.map((Y)=>`"${Y}"`).join(", "):"(no selection)",$=X.length>1?"these options":"that option";return"ANSWERED_IN_BEACON \u2014 the user answered this in Beacon (not the terminal). "+`For the question "${Q.question}" they selected: ${Z}. `+`This IS their answer \u2014 treat AskUserQuestion as answered with ${$} and continue. Do NOT call AskUserQuestion again for this question.`}function hQ(Q,X={}){let Z=typeof X.file_path==="string"?X.file_path:"",$=(Y)=>Y.length>4000?`${Y.slice(0,4000)}
4
4
  \u2026 (truncated)`:Y;switch(Q){case"Bash":return{tool:Q,title:"Run command",preview:$(String(X.command??""))};case"Write":return{tool:Q,title:`Write ${Z}`.trim(),preview:$(String(X.content??""))};case"Edit":return{tool:Q,title:`Edit ${Z}`.trim(),preview:$(`- ${String(X.old_string??"")}
5
- + ${String(X.new_string??"")}`)};case"MultiEdit":{let Y=Array.isArray(X.edits)?X.edits.length:0;return{tool:Q,title:`Edit ${Z}`.trim(),preview:`${Y} edit(s) to ${Z}`}}case"NotebookEdit":{let Y=typeof X.notebook_path==="string"?X.notebook_path:"";return{tool:Q,title:`Edit ${Y}`.trim(),preview:$(String(X.new_source??""))}}default:return{tool:Q,title:Q,preview:$(JSON.stringify(X))}}}function e(Q){let X=Q.tool_name??"";if(Q.hook_event_name==="PreToolUse"&&X==="AskUserQuestion"){let $=Q.tool_input?.questions?.[0];if(!$)return null;return{kind:"question",question:{header:String($.header??""),question:String($.question??""),multiSelect:!!$.multiSelect,options:Array.isArray($.options)?$.options.map((Y)=>{let G=Y;return{label:String(G.label??""),description:G.description?String(G.description):void 0}}):[]}}}if(Q.hook_event_name==="PermissionRequest"&&X&&X!=="ExitPlanMode")return{kind:"approval",approval:hQ(X,Q.tool_input??{})};return null}I();import{readFileSync as cQ}from"fs";import{join as lQ}from"path";function pQ(){try{return JSON.parse(cQ(lQ(J(),"server.json"),"utf8"))}catch{return null}}function QQ(){if(process.env.BEACON_URL)return process.env.BEACON_URL;return`http://localhost:${pQ()?.port||process.env.PORT||r}`}var dQ=["default","acceptEdits","bypassPermissions","auto"];function aX(Q){return typeof Q==="string"&&dQ.includes(Q)}function XQ(Q,X,Z){let $={behavior:"allow"};if(Z&&Object.keys(Z).length>0)$.updatedInput=Z;if(Q)$.updatedPermissions=[{type:"setMode",mode:Q,destination:"session"}];let Y={hookEventName:"PermissionRequest",decision:$};if(X?.trim())Y.additionalContext=X;return{hookSpecificOutput:Y}}var rQ=(Q)=>new Promise((X)=>setTimeout(X,Q));function x(Q){if(Q!==void 0)process.stdout.write(JSON.stringify(Q));process.exit(0)}function C(){x(void 0)}function aQ(Q){return{hookSpecificOutput:{hookEventName:"PreToolUse",permissionDecision:"deny",permissionDecisionReason:Q}}}function oQ(Q){return{hookSpecificOutput:{hookEventName:"PermissionRequest",decision:{behavior:"deny",message:Q}}}}async function iQ(){if(process.stdin.isTTY)return null;let Q="";for await(let X of process.stdin)Q+=X;if(Q=Q.trim(),!Q)return null;try{return JSON.parse(Q)}catch{return null}}function tQ(Q){try{return nQ("git rev-parse --show-toplevel",{cwd:Q||process.cwd(),stdio:["ignore","pipe","ignore"]}).toString().trim()}catch{return Q||process.cwd()}}var eQ=(Q)=>sQ("sha256").update(Q).digest("hex").slice(0,12);(async()=>{let Q=await iQ();if(!Q)C();let X=e(Q);if(!X)C();let Z=QQ(),$=eQ(tQ(Q.cwd)),Y={"content-type":"application/json","x-beacon-workspace":$};if(!await fetch(`${Z}/api/tab/presence`,{headers:Y}).then((B)=>B.ok?B.json():null).then((B)=>!!B?.live).catch(()=>!1))C();await fetch(`${Z}/api/workspace/activate?id=${$}`).catch(()=>{});let V=await fetch(`${Z}/api/ask`,{method:"POST",headers:Y,body:JSON.stringify(X)}).then((B)=>B.ok?B.json():null).catch(()=>null);if(!V||V.loop||!V.id)C();let K=V.id,N=Date.now()+i;while(Date.now()<N){await rQ(o);let B=await fetch(`${Z}/api/ask/verdict?id=${encodeURIComponent(K)}`,{headers:Y}).then((ZQ)=>ZQ.json()).catch(()=>null);if(!B||B.status!=="resolved")continue;if(X.kind==="question")x(aQ(t(X.question,B.resolution.selected??[])));if(B.resolution.decision==="deny")x(oQ("The user denied this action in Beacon."));x(XQ())}C()})();
5
+ + ${String(X.new_string??"")}`)};case"MultiEdit":{let Y=Array.isArray(X.edits)?X.edits.length:0;return{tool:Q,title:`Edit ${Z}`.trim(),preview:`${Y} edit(s) to ${Z}`}}case"NotebookEdit":{let Y=typeof X.notebook_path==="string"?X.notebook_path:"";return{tool:Q,title:`Edit ${Y}`.trim(),preview:$(String(X.new_source??""))}}default:return{tool:Q,title:Q,preview:$(JSON.stringify(X))}}}function e(Q){let X=Q.tool_name??"";if(Q.hook_event_name==="PreToolUse"&&X==="AskUserQuestion"){let $=Q.tool_input?.questions?.[0];if(!$)return null;return{kind:"question",question:{header:String($.header??""),question:String($.question??""),multiSelect:!!$.multiSelect,options:Array.isArray($.options)?$.options.map((Y)=>{let G=Y;return{label:String(G.label??""),description:G.description?String(G.description):void 0}}):[]}}}if(Q.hook_event_name==="PermissionRequest"&&X&&X!=="ExitPlanMode")return{kind:"approval",approval:hQ(X,Q.tool_input??{})};return null}I();import{readFileSync as cQ}from"fs";import{join as lQ}from"path";function pQ(){try{return JSON.parse(cQ(lQ(J(),"server.json"),"utf8"))}catch{return null}}function QQ(){if(process.env.BEACON_URL)return process.env.BEACON_URL;return`http://localhost:${pQ()?.port||process.env.PORT||o}`}var dQ=["default","acceptEdits","bypassPermissions","auto"];function aX(Q){return typeof Q==="string"&&dQ.includes(Q)}function XQ(Q,X,Z){let $={behavior:"allow"};if(Z&&Object.keys(Z).length>0)$.updatedInput=Z;if(Q)$.updatedPermissions=[{type:"setMode",mode:Q,destination:"session"}];let Y={hookEventName:"PermissionRequest",decision:$};if(X?.trim())Y.additionalContext=X;return{hookSpecificOutput:Y}}var oQ=(Q)=>new Promise((X)=>setTimeout(X,Q));function x(Q){if(Q!==void 0)process.stdout.write(JSON.stringify(Q));process.exit(0)}function C(){x(void 0)}function aQ(Q){return{hookSpecificOutput:{hookEventName:"PreToolUse",permissionDecision:"deny",permissionDecisionReason:Q}}}function rQ(Q){return{hookSpecificOutput:{hookEventName:"PermissionRequest",decision:{behavior:"deny",message:Q}}}}async function iQ(){if(process.stdin.isTTY)return null;let Q="";for await(let X of process.stdin)Q+=X;if(Q=Q.trim(),!Q)return null;try{return JSON.parse(Q)}catch{return null}}function tQ(Q){try{return nQ("git rev-parse --show-toplevel",{cwd:Q||process.cwd(),stdio:["ignore","pipe","ignore"]}).toString().trim()}catch{return Q||process.cwd()}}var eQ=(Q)=>sQ("sha256").update(Q).digest("hex").slice(0,12);(async()=>{let Q=await iQ();if(!Q)C();let X=e(Q);if(!X)C();let Z=QQ(),$=eQ(tQ(Q.cwd)),Y={"content-type":"application/json","x-beacon-workspace":$};if(!await fetch(`${Z}/api/tab/view`,{headers:Y}).then((B)=>B.ok?B.json():null).then((B)=>!!B?.live).catch(()=>!1)){if(X.kind==="question"&&Q.transcript_path)await fetch(`${Z}/api/ask`,{method:"POST",headers:Y,body:JSON.stringify({...X,mode:"mirror",transcriptPath:Q.transcript_path}),signal:AbortSignal.timeout(1500)}).catch(()=>{});C()}await fetch(`${Z}/api/workspace/activate?id=${$}`).catch(()=>{});let V=await fetch(`${Z}/api/ask`,{method:"POST",headers:Y,body:JSON.stringify(X)}).then((B)=>B.ok?B.json():null).catch(()=>null);if(!V||V.loop||!V.id)C();let K=V.id,N=Date.now()+i;while(Date.now()<N){await oQ(r);let B=await fetch(`${Z}/api/ask/verdict?id=${encodeURIComponent(K)}`,{headers:Y}).then((ZQ)=>ZQ.json()).catch(()=>null);if(!B||B.status!=="resolved")continue;if(X.kind==="question")x(aQ(t(X.question,B.resolution.selected??[])));if(B.resolution.decision==="deny")x(rQ("The user denied this action in Beacon."));x(XQ())}C()})();