trybeacon 0.1.84 → 0.1.86

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 (108) 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 +15 -15
  4. package/.next/build-manifest.json +2 -2
  5. package/.next/prerender-manifest.json +3 -3
  6. package/.next/server/app/@modal/(.)settings/page.js +1 -1
  7. package/.next/server/app/@modal/(.)settings/page.js.nft.json +1 -1
  8. package/.next/server/app/@modal/(.)settings/page_client-reference-manifest.js +1 -1
  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 +1 -1
  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 +26 -27
  23. package/.next/server/app/_not-found.segments/_full.segment.rsc +26 -27
  24. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  25. package/.next/server/app/_not-found.segments/_index.segment.rsc +15 -16
  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/plan/annotations/route.js +2 -2
  30. package/.next/server/app/docs/page.js +1 -1
  31. package/.next/server/app/docs/page.js.nft.json +1 -1
  32. package/.next/server/app/docs/page_client-reference-manifest.js +1 -1
  33. package/.next/server/app/docs.html +1 -1
  34. package/.next/server/app/docs.rsc +29 -30
  35. package/.next/server/app/docs.segments/@modal/__DEFAULT__.segment.rsc +1 -1
  36. package/.next/server/app/docs.segments/_full.segment.rsc +29 -30
  37. package/.next/server/app/docs.segments/_head.segment.rsc +1 -1
  38. package/.next/server/app/docs.segments/_index.segment.rsc +15 -16
  39. package/.next/server/app/docs.segments/_tree.segment.rsc +2 -2
  40. package/.next/server/app/docs.segments/docs/__PAGE__.segment.rsc +1 -1
  41. package/.next/server/app/docs.segments/docs.segment.rsc +1 -1
  42. package/.next/server/app/help/page.js +1 -1
  43. package/.next/server/app/help/page.js.nft.json +1 -1
  44. package/.next/server/app/help/page_client-reference-manifest.js +1 -1
  45. package/.next/server/app/help.html +1 -1
  46. package/.next/server/app/help.rsc +38 -39
  47. package/.next/server/app/help.segments/@modal/__DEFAULT__.segment.rsc +1 -1
  48. package/.next/server/app/help.segments/_full.segment.rsc +38 -39
  49. package/.next/server/app/help.segments/_head.segment.rsc +1 -1
  50. package/.next/server/app/help.segments/_index.segment.rsc +15 -16
  51. package/.next/server/app/help.segments/_tree.segment.rsc +2 -2
  52. package/.next/server/app/help.segments/help/__PAGE__.segment.rsc +1 -1
  53. package/.next/server/app/help.segments/help.segment.rsc +1 -1
  54. package/.next/server/app/index.html +1 -1
  55. package/.next/server/app/index.rsc +27 -29
  56. package/.next/server/app/index.segments/@modal/__DEFAULT__.segment.rsc +1 -1
  57. package/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  58. package/.next/server/app/index.segments/_full.segment.rsc +27 -29
  59. package/.next/server/app/index.segments/_head.segment.rsc +1 -1
  60. package/.next/server/app/index.segments/_index.segment.rsc +15 -16
  61. package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  62. package/.next/server/app/learn/page.js +3 -3
  63. package/.next/server/app/learn/page.js.nft.json +1 -1
  64. package/.next/server/app/learn/page_client-reference-manifest.js +1 -1
  65. package/.next/server/app/map/page.js +1 -1
  66. package/.next/server/app/map/page.js.nft.json +1 -1
  67. package/.next/server/app/map/page_client-reference-manifest.js +1 -1
  68. package/.next/server/app/page.js +1 -1
  69. package/.next/server/app/page.js.nft.json +1 -1
  70. package/.next/server/app/page_client-reference-manifest.js +1 -1
  71. package/.next/server/app/plan/page.js +2 -2
  72. package/.next/server/app/plan/page.js.nft.json +1 -1
  73. package/.next/server/app/plan/page_client-reference-manifest.js +1 -1
  74. package/.next/server/app/s/[token]/page.js +1 -1
  75. package/.next/server/app/s/[token]/page.js.nft.json +1 -1
  76. package/.next/server/app/s/[token]/page_client-reference-manifest.js +1 -1
  77. package/.next/server/app/settings/page.js +1 -1
  78. package/.next/server/app/settings/page.js.nft.json +1 -1
  79. package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  80. package/.next/server/app-paths-manifest.json +15 -15
  81. package/.next/server/chunks/2693.js +5 -5
  82. package/.next/server/chunks/3825.js +1 -1
  83. package/.next/server/chunks/5509.js +1 -0
  84. package/.next/server/chunks/7335.js +1 -0
  85. package/.next/server/middleware-build-manifest.js +1 -1
  86. package/.next/server/pages/404.html +1 -1
  87. package/.next/server/pages/500.html +1 -1
  88. package/.next/server/server-reference-manifest.js +1 -1
  89. package/.next/server/server-reference-manifest.json +1 -1
  90. package/.next/static/chunks/569-bfdcec83011428d3.js +1 -0
  91. package/.next/static/chunks/985-430599029183e18e.js +1 -0
  92. package/.next/static/chunks/app/layout-6af877a2d6717f9e.js +1 -0
  93. package/.next/static/chunks/app/learn/{page-b1bea0ba5fbf4c80.js → page-18821c98beca638e.js} +1 -1
  94. package/.next/static/chunks/app/map/{page-bc44aabbc5a3a261.js → page-278aa8f1b90828be.js} +1 -1
  95. package/.next/static/chunks/app/plan/{page-2be2dee159981532.js → page-6085ec2d97f9c678.js} +2 -2
  96. package/.next/static/chunks/app/s/[token]/{page-dd148c2090094329.js → page-a00e023f723224c1.js} +1 -1
  97. package/.next/static/css/ba104bf801b96933.css +1 -0
  98. package/.next/trace +47 -47
  99. package/.next/trace-build +1 -1
  100. package/package.json +1 -1
  101. package/.next/server/chunks/7999.js +0 -1
  102. package/.next/server/chunks/9979.js +0 -1
  103. package/.next/static/chunks/3748-ffd46534ace96c3d.js +0 -1
  104. package/.next/static/chunks/569-b6c0e292fbfa6038.js +0 -1
  105. package/.next/static/chunks/app/layout-b78f34d56f9d5aea.js +0 -1
  106. package/.next/static/css/95077158c5710c9e.css +0 -1
  107. /package/.next/static/{GCYTD3B9xLkKH9uIwlKD- → DJSoomboyiqKwEIQ7ktag}/_buildManifest.js +0 -0
  108. /package/.next/static/{GCYTD3B9xLkKH9uIwlKD- → DJSoomboyiqKwEIQ7ktag}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- exports.id=3825,exports.ids=[3825],exports.modules={22:(a,b,c)=>{"use strict";c.d(b,{AppearanceCard:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call AppearanceCard() from the server but AppearanceCard is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/beacon/beacon/components/appearance-card.tsx","AppearanceCard")},599:(a,b,c)=>{"use strict";c.d(b,{LinearCard:()=>m});var d=c(48249),e=c(67484),f=c(89216),g=c(35471),h=c(27993),i=c(64034),j=c(26284),k=c(8422),l=c(55056);function m(){let[a,b]=(0,e.useState)(null),[c,m]=(0,e.useState)([]),[n,o]=(0,e.useState)(""),[p,q]=(0,e.useState)(!1),[r,s]=(0,e.useState)(null),[t,u]=(0,e.useState)(!1),[v,w]=(0,e.useState)(!1),x=(0,e.useCallback)(async()=>{let a=await fetch("/api/linear/scopes",{cache:"no-store"}).catch(()=>null);a?.ok&&m((await a.json()).scopes)},[]);async function y(a){q(!0),s(null);try{let c=await fetch("/api/linear",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(a)});if(!c.ok)return s((await c.json().catch(()=>({}))).error??"Something went wrong"),null;let d=await c.json();return b(d),d}finally{q(!1)}}async function z(){!n.trim()||await y({apiKey:n.trim()})&&(o(""),u(!1),await x())}async function A(a){let b=c.find(b=>`${b.kind}:${b.id}`===a);!b||await y({scope:b,enabled:!0})&&w(!1)}async function B(){q(!0),s(null);try{let a=await fetch("/api/linear/sync",{method:"POST"});if(!a.ok)return void s("Sync failed — check the API key and your connection");let c=await a.json().catch(()=>({}));s(c.skipped?c.skipped:`Synced — ${c.created??0} added, ${c.pulled??0} updated, ${c.pushed??0} pushed, ${c.removed??0} removed`);let d=await fetch("/api/linear",{cache:"no-store"}).then(a=>a.ok?a.json():null).catch(()=>null);d&&b(d)}finally{q(!1)}}a?.connected&&a.scope;let C=a?.connected&&a.scope&&!v;return(0,d.jsxs)(i.Zp,{children:[(0,d.jsxs)(i.aR,{children:[(0,d.jsxs)(i.ZB,{className:"flex items-center gap-2 text-base",children:[(0,d.jsx)(f.A,{className:"size-4 text-[var(--accent-2,#ff7a45)]"}),"Linear sync"]}),(0,d.jsx)(i.BT,{children:"Mirror a Linear team or project onto this board and back — create or edit in either place, no double entry. Changes flow both ways within ~a minute (last edit wins). The key stays on this machine."})]}),(0,d.jsxs)(i.Wu,{className:"space-y-3",children:[null==a?(0,d.jsx)("p",{className:"text-xs text-muted-foreground",children:"Loading…"}):!a.connected||t?(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)(k.p,{type:"password",autoComplete:"off",placeholder:"Linear personal API key (lin_api_…)",value:n,onChange:a=>o(a.target.value),onKeyDown:a=>"Enter"===a.key&&void z(),className:"h-9 flex-1"}),(0,d.jsx)(j.$,{size:"sm",disabled:p||!n.trim(),onClick:()=>void z(),children:"Connect"})]}):C?(0,d.jsxs)("div",{className:"space-y-2.5",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1.5 text-sm",children:[(0,d.jsxs)("span",{children:["Mirroring ",(0,d.jsx)("span",{className:"font-medium",children:a.scope.name})," ",(0,d.jsxs)("span",{className:"text-muted-foreground",children:["(",a.scope.kind,")"]})," in"," ",(0,d.jsx)("span",{className:"font-medium",children:a.orgName})]}),!a.enabled&&(0,d.jsx)("span",{className:"text-xs text-amber-400",children:"Paused"})]}),(0,d.jsxs)("button",{type:"button",disabled:p,onClick:()=>void y({onlyMine:!a.onlyMine}),className:"flex items-center gap-2 text-left text-xs text-muted-foreground hover:text-foreground",children:[(0,d.jsx)("span",{className:`flex size-4 items-center justify-center rounded border ${a.onlyMine?"border-[var(--accent-2,#ff7a45)] bg-[var(--accent-2,#ff7a45)]/20 text-[var(--accent-2,#ff7a45)]":"border-border"}`,children:a.onlyMine&&(0,d.jsx)(g.A,{className:"size-3"})}),"Only issues assigned to me"]}),(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2 pt-0.5",children:[(0,d.jsxs)(j.$,{size:"sm",variant:"outline",disabled:p,onClick:()=>void B(),children:[(0,d.jsx)(h.A,{className:`size-3.5 ${p?"animate-spin":""}`}),"Sync now"]}),(0,d.jsx)(j.$,{size:"sm",variant:"ghost",disabled:p,onClick:()=>void y({enabled:!a.enabled}),children:a.enabled?"Pause sync":"Resume sync"}),(0,d.jsx)(j.$,{size:"sm",variant:"ghost",disabled:p,onClick:()=>w(!0),children:"Change scope"}),(0,d.jsx)(j.$,{size:"sm",variant:"ghost",disabled:p,onClick:()=>u(!0),children:"Change key"})]})]}):(0,d.jsxs)("div",{className:"space-y-2",children:[(0,d.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Connected to ",(0,d.jsx)("span",{className:"font-medium text-foreground",children:a.orgName}),a.viewerName&&(0,d.jsxs)(d.Fragment,{children:[" as ",a.viewerName]}),". Which team or project does this repo track?"]}),(0,d.jsxs)(l.l6,{onValueChange:a=>a&&void A(a),children:[(0,d.jsx)(l.bq,{className:"h-9 w-72",children:(0,d.jsx)(l.yv,{placeholder:c.length?"Pick a team or project…":"Loading…"})}),(0,d.jsx)(l.gC,{children:c.map(a=>(0,d.jsxs)(l.eb,{value:`${a.kind}:${a.id}`,children:[a.name," \xb7 ",(0,d.jsx)("span",{className:"text-muted-foreground",children:a.kind})]},`${a.kind}:${a.id}`))})]})]}),r&&(0,d.jsx)("p",{className:"text-xs text-muted-foreground",children:r}),C&&a.lastSyncedAt&&(0,d.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Last synced ",new Date(a.lastSyncedAt).toLocaleString()]})]})]})}},1237:(a,b,c)=>{"use strict";c.d(b,{ContextCard:()=>h});var d=c(48249),e=c(67484),f=c(64034),g=c(26284);function h(){let[a,b]=(0,e.useState)(null),[c,h]=(0,e.useState)(!1);async function i(){h(!0),b(null);try{let a=await fetch("/api/context",{method:"POST"});if(!a.ok)return void b(await a.text());let c=await a.json();b(c.files?.length?`Updated: ${c.files.map(a=>a.split("/").pop()).join(" + ")}`:"Nothing to update")}catch{b("Failed")}finally{h(!1)}}return(0,d.jsxs)(f.Zp,{children:[(0,d.jsxs)(f.aR,{children:[(0,d.jsx)(f.ZB,{className:"text-base",children:"Context for the AI"}),(0,d.jsxs)(f.BT,{children:["Generates ",(0,d.jsx)("span",{className:"font-mono",children:"AGENTS.md"})," (read by Cursor/Codex/Aider) and makes sure ",(0,d.jsx)("span",{className:"font-mono",children:"CLAUDE.md"})," imports it (Claude Code reads CLAUDE.md), from the current map."]})]}),(0,d.jsxs)(f.Wu,{className:"flex flex-wrap items-center gap-3",children:[(0,d.jsx)(g.$,{size:"sm",disabled:c,onClick:i,children:c?"Generating…":"Update AGENTS.md + CLAUDE.md"}),a&&(0,d.jsx)("span",{className:"text-xs text-muted-foreground",children:a})]})]})}},4752:(a,b,c)=>{"use strict";c.d(b,{AppearanceCard:()=>s});var d=c(48249),e=c(67484),f=c(92138),g=c(64034),h=c(33734);c(93484);var i=c(33191);let j=[{value:"top",label:"Top bar",hint:"Grouped pills"},{value:"sidebar",label:"Sidebar",hint:"Labeled rail"}],k="#ff7a45",l={light:{bg:"#eeece6",card:"#ffffff",ink:"#3a3a3a",border:"#dcd9d2"},dark:{bg:"#1f1f22",card:"#2c2c30",ink:"#e6e6e6",border:"#3a3a3f"}},m=[{value:"light",label:"Light"},{value:"dark",label:"Dark"},{value:"auto",label:"Auto"}],n=[{value:"glass",label:"Glass",hint:"Frosted blur"},{value:"tinted",label:"Tinted",hint:"Flat, no blur"},{value:"solid",label:"Solid",hint:"Opaque panels"}];function o({theme:a}){if("auto"===a)return(0,d.jsxs)("span",{className:"relative block h-10 w-full overflow-hidden rounded-md border border-black/10",children:[(0,d.jsx)("span",{className:"absolute inset-0",style:{background:l.light.bg}}),(0,d.jsx)("span",{className:"absolute inset-0",style:{background:l.dark.bg,clipPath:"polygon(100% 0, 100% 100%, 0 100%)"}}),(0,d.jsx)("span",{className:"absolute left-1.5 top-1.5 h-1.5 w-6 rounded-full",style:{background:k}})]});let b=l[a];return(0,d.jsx)("span",{className:"block h-10 w-full overflow-hidden rounded-md border",style:{background:b.bg,borderColor:b.border},children:(0,d.jsxs)("span",{className:"mx-1.5 mt-1.5 flex h-6 flex-col justify-center gap-1 rounded px-1.5",style:{background:b.card,border:`1px solid ${b.border}`},children:[(0,d.jsx)("span",{className:"h-1 w-3/4 rounded-full",style:{background:b.ink,opacity:.55}}),(0,d.jsx)("span",{className:"h-1 w-5 rounded-full",style:{background:k}})]})})}function p({surface:a}){let b="solid"===a?{background:l.dark.card}:"tinted"===a?{background:"rgba(44,44,48,0.72)"}:{background:"linear-gradient(180deg, rgba(255,255,255,0.10), rgba(44,44,48,0.55))",backdropFilter:"blur(3px)"};return(0,d.jsx)("span",{className:"relative block h-10 w-full overflow-hidden rounded-md border border-black/20",style:{backgroundColor:l.dark.bg,backgroundImage:"radial-gradient(rgba(255,255,255,0.22) 1px, transparent 1px)",backgroundSize:"6px 6px"},children:(0,d.jsx)("span",{className:"absolute inset-x-2 top-2 bottom-2 rounded",style:{...b,border:"1px solid rgba(255,255,255,0.12)"}})})}function q({mode:a}){let b=l.dark;return"top"===a?(0,d.jsx)("span",{className:"block h-10 w-full overflow-hidden rounded-md border",style:{background:b.bg,borderColor:b.border},children:(0,d.jsxs)("span",{className:"flex h-3 w-full items-center gap-1 px-1.5",style:{background:b.card,borderBottom:`1px solid ${b.border}`},children:[(0,d.jsx)("span",{className:"h-1 w-4 rounded-full",style:{background:b.ink,opacity:.5}}),(0,d.jsx)("span",{className:"h-1 w-3 rounded-full",style:{background:k}})]})}):(0,d.jsx)("span",{className:"flex h-10 w-full overflow-hidden rounded-md border",style:{background:b.bg,borderColor:b.border},children:(0,d.jsxs)("span",{className:"flex h-full w-[30%] flex-col gap-1 p-1.5",style:{background:b.card,borderRight:`1px solid ${b.border}`},children:[(0,d.jsx)("span",{className:"h-1 w-full rounded-full",style:{background:k}}),(0,d.jsx)("span",{className:"h-1 w-3/4 rounded-full",style:{background:b.ink,opacity:.4}}),(0,d.jsx)("span",{className:"h-1 w-3/4 rounded-full",style:{background:b.ink,opacity:.4}})]})})}function r({selected:a,label:b,hint:c,onClick:e,children:f}){return(0,d.jsxs)("button",{type:"button",onClick:e,"aria-pressed":a,className:(0,i.cn)("flex flex-1 flex-col gap-2 rounded-lg border p-2 text-left transition-colors",a?"border-[var(--accent-2,#ff7a45)] bg-[color-mix(in_oklab,var(--accent-2,#ff7a45)_10%,transparent)]":"border-border hover:bg-[var(--ink-hover)]"),children:[f,(0,d.jsxs)("span",{className:"flex items-center justify-between gap-1 px-0.5",children:[(0,d.jsx)("span",{className:"text-xs font-medium",children:b}),a&&(0,d.jsx)("span",{"aria-hidden":!0,className:"size-1.5 rounded-full bg-[var(--accent-2,#ff7a45)]"})]}),c&&(0,d.jsx)("span",{className:"px-0.5 text-[10px] leading-tight text-muted-foreground",children:c})]})}function s(){let[a,b]=(0,e.useState)(h.SS),[c,i]=(0,e.useState)(h.mn),[k,l]=(0,e.useState)(null),[s,t]=(0,e.useState)(!1);return(0,d.jsxs)(g.Zp,{children:[(0,d.jsxs)(g.aR,{children:[(0,d.jsxs)(g.ZB,{className:"flex items-center gap-2 text-base",children:[(0,d.jsx)(f.A,{className:"size-4 text-[var(--accent-2,#ff7a45)]"}),"Appearance"]}),(0,d.jsx)(g.BT,{children:"Theme and surface for this browser. Changes apply instantly and are remembered here."})]}),(0,d.jsxs)(g.Wu,{className:"space-y-6",children:[(0,d.jsxs)("div",{className:"grid gap-6 lg:grid-cols-2",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"mb-2 text-xs font-medium text-muted-foreground",children:"Theme"}),(0,d.jsx)("div",{className:"flex gap-2",children:m.map(c=>(0,d.jsx)(r,{selected:a===c.value,label:c.label,hint:"auto"===c.value?"Follows your system":void 0,onClick:()=>{var a;b(a=c.value),(0,h.Yl)(a)},children:(0,d.jsx)(o,{theme:c.value})},c.value))})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"mb-2 text-xs font-medium text-muted-foreground",children:"Surface"}),(0,d.jsx)("div",{className:"flex gap-2",children:n.map(a=>(0,d.jsx)(r,{selected:c===a.value,label:a.label,hint:a.hint,onClick:()=>{var b;i(b=a.value),(0,h.S1)(b)},children:(0,d.jsx)(p,{surface:a.value})},a.value))})]})]}),s&&(0,d.jsxs)("div",{className:"border-t border-border pt-5",children:[(0,d.jsx)("p",{className:"mb-1 text-xs font-medium text-muted-foreground",children:"Navigation"}),(0,d.jsx)("p",{className:"mb-3 text-[11px] leading-tight text-muted-foreground/80",children:"Where the desktop app shows navigation."}),(0,d.jsx)("div",{className:"flex max-w-md gap-2",children:j.map(a=>(0,d.jsx)(r,{selected:k===a.value,label:a.label,hint:a.hint,onClick:()=>{var b;l(b=a.value),window.dispatchEvent(new CustomEvent("beacon:shell-set-nav-mode",{detail:{mode:b}}))},children:(0,d.jsx)(q,{mode:a.value})},a.value))})]})]})]})}},6389:(a,b,c)=>{"use strict";c.d(b,{G:()=>G});var d=c(5735),e=c(63059),f=c.n(e),g=c(19912),h=c(2767),i=c(24313),j=c(76499),k=c(89986),l=c(3101),m=c(59726);c(91986);var n=c(89356),o=c(16184);function p(...a){return(0,o.QP)((0,n.$)(a))}function q({className:a,children:b,...c}){return(0,d.jsxs)("div",{className:p("glass relative isolate overflow-hidden",a),...c,children:[(0,d.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,d.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"}}),b]})}function r({className:a,...b}){return(0,d.jsx)(q,{"data-slot":"card",className:p("text-card-foreground flex flex-col gap-6 rounded-2xl py-6",a),...b})}function s({className:a,...b}){return(0,d.jsx)("div",{"data-slot":"card-header",className:p("@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",a),...b})}function t({className:a,...b}){return(0,d.jsx)("div",{"data-slot":"card-title",className:p("leading-none font-semibold",a),...b})}function u({className:a,...b}){return(0,d.jsx)("div",{"data-slot":"card-description",className:p("text-muted-foreground text-sm",a),...b})}function v({className:a,...b}){return(0,d.jsx)("div",{"data-slot":"card-content",className:p("px-6",a),...b})}let w=(0,c(8884).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"}});var x=c(13255),y=c(44919),z=c(98167),A=c(74069),B=c(61681),C=c(22),D=c(6716),E=c(84853);let F="size-3.5";async function G(a){let b=await (0,E.C5)(a),c=(b?(0,D.K4)(b):null)??(0,D.WQ)();return[{id:"appearance",label:"Appearance",group:"General",icon:(0,d.jsx)(g.A,{className:F}),content:(0,d.jsx)(C.AppearanceCard,{})},{id:"agent",label:"Agent",group:"General",icon:(0,d.jsx)(h.A,{className:F}),content:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(A.PermissionModeCard,{}),(0,d.jsxs)(r,{children:[(0,d.jsxs)(s,{children:[(0,d.jsxs)(t,{className:"flex items-center gap-2 text-base",children:[(0,d.jsx)(i.A,{className:"size-4 text-[var(--accent-2,#ff7a45)]"}),"New to Beacon?"]}),(0,d.jsx)(u,{children:"The skills you type, the MCP tools the agent calls on its own, and the hooks that run automatically while you work."})]}),(0,d.jsx)(v,{children:(0,d.jsxs)(f(),{href:"/help",className:p(w({size:"sm"}),"gap-1.5"),children:["How to use Beacon",(0,d.jsx)(j.A,{className:"size-4"})]})})]})]})},{id:"integrations",label:"Integrations",group:"Connections",icon:(0,d.jsx)(k.A,{className:F}),content:(0,d.jsx)(B.LinearCard,{})},{id:"project",label:"Project",group:"Workspace",icon:(0,d.jsx)(l.A,{className:F}),content:(0,d.jsx)(x.ContextCard,{})},{id:"danger",label:"Danger zone",group:"Workspace",icon:(0,d.jsx)(m.A,{className:F}),content:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(y.DangerCard,{}),c&&(0,d.jsx)(z.DeleteWorkspaceCard,{id:c.id,name:c.name})]})}]}},6716:(a,b,c)=>{"use strict";c.d(b,{AV:()=>J,Ck:()=>H,Dk:()=>F,F2:()=>y,FF:()=>l,K4:()=>w,Lm:()=>O,Nx:()=>s,Q8:()=>I,T_:()=>r,UP:()=>B,VB:()=>E,VO:()=>q,WQ:()=>D,X_:()=>L,Y2:()=>v,_g:()=>C,kO:()=>P,oW:()=>i,p1:()=>M,qh:()=>z});var d=c(16698);c(31421);var e=c(77598),f=c(73024),g=c(48161),h=c(76760);function i(){return process.env.BEACON_HOME||(0,h.join)((0,g.homedir)(),".beacon")}function j(){return(0,h.join)(i(),"workspaces.json")}function k(a){return(0,e.createHash)("sha256").update(a).digest("hex").slice(0,12)}function l(a){let b=(0,h.resolve)(a);return b!==(0,h.resolve)((0,g.homedir)())&&b!==(0,h.parse)(b).root}function m(){return(0,h.join)(i(),"deleted.json")}function n(){try{let a=JSON.parse((0,f.readFileSync)(m(),"utf8"));return Array.isArray(a)?a:[]}catch{return[]}}function o(a){(0,f.mkdirSync)(i(),{recursive:!0}),(0,f.writeFileSync)(m(),JSON.stringify(a,null,2))}function p(a){return n().includes(a)}function q(a){let b=n();b.includes(a)||o([...b,a])}function r(a){return(0,h.join)(i(),a)}function s(a){return`file:${(0,h.join)(r(a),"db.sqlite")}`}function t(){try{let a=JSON.parse((0,f.readFileSync)(j(),"utf8"));return Array.isArray(a)?a:[]}catch{return[]}}function u(a){(0,f.mkdirSync)(i(),{recursive:!0}),(0,f.writeFileSync)(j(),JSON.stringify(a,null,2))}function v(){return t().sort((a,b)=>b.lastOpenedAt.localeCompare(a.lastOpenedAt))}function w(a){return t().find(b=>b.id===a)??null}function x(a,b,c=new Date().toISOString()){if(!l(a))throw Error(`beacon: refusing to register a non-repo path as a workspace: ${a}`);let d=k(a);if(p(d))throw Error(`beacon: workspace ${d} (${a}) was deleted — run \`beacon\` or /beacon-init to re-add it`);let e=t(),g=e.find(a=>a.id===d),i={id:d,path:a,name:b||g?.name||(0,h.basename)(a),lastOpenedAt:c},j=[i,...e.filter(a=>a.id!==d)];return(0,f.mkdirSync)(r(d),{recursive:!0}),u(j),i}function y(a,b){var c;let d;return c=k(a),(d=n()).includes(c)&&o(d.filter(a=>a!==c)),x(a,b)}function z(a){u(t().filter(b=>b.id!==a)),B()===a&&C(v()[0]?.id??null)}function A(){return(0,h.join)(i(),"active")}function B(){try{return(0,f.readFileSync)(A(),"utf8").trim()||null}catch{return null}}function C(a){(0,f.mkdirSync)(i(),{recursive:!0}),(0,f.writeFileSync)(A(),a??"")}function D(){let a=B();return a?w(a):null}function E(){let a=M()??B();return a?w(a):null}let F="beacon_ws";function G(a,b){let c=a.headers.get("cookie");if(!c)return null;for(let a of c.split(";")){let c=a.indexOf("=");if(-1!==c&&a.slice(0,c).trim()===b)return decodeURIComponent(a.slice(c+1).trim())}return null}function H(a){let b,c=a.headers.get("x-beacon-workspace");if(c&&w(c))return c;let d=G(a,F);return d&&w(d)?d:1===(b=v()).length?b[0].id:null}let I="x-beacon-workspace-path";async function J(a){let b=a.headers.get("x-beacon-workspace");if(b&&w(b))return b;let c=a.headers.get(I);if(c&&l(c)&&!p(k(c))&&(!b||k(c)===b)){let a=x(c);return await P(a.id),a.id}let d=G(a,F);return d&&w(d)?d:null}let K=new d.AsyncLocalStorage;function L(a,b){return a?K.run(a,b):b()}function M(){return K.getStore()??null}let N=new Set;function O(a){N.delete((0,h.join)(r(a),"db.sqlite"))}async function P(a){let b=r(a),d=(0,h.join)(b,"db.sqlite"),e=(0,f.existsSync)(d);if(e&&N.has(d))return{ok:!0,created:!1,migrated:!1};try{(0,f.mkdirSync)(b,{recursive:!0});let{provisionDb:g}=await Promise.all([c.e(1669),c.e(9884),c.e(5871),c.e(5258)]).then(c.bind(c,35258)),h=await g(s(a));return N.add(d),{ok:!0,created:!e,migrated:e&&h.migrated}}catch(a){return{ok:!1,created:!1,migrated:!1,error:a instanceof Error?a.message:String(a)}}}},8422:(a,b,c)=>{"use strict";c.d(b,{p:()=>f});var d=c(48249);c(67484);var e=c(33191);function f({className:a,type:b,...c}){return(0,d.jsx)("input",{type:b,"data-slot":"input",className:(0,e.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",a),...c})}},13255:(a,b,c)=>{"use strict";c.d(b,{ContextCard:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call ContextCard() from the server but ContextCard is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/beacon/beacon/components/context-card.tsx","ContextCard")},34287:(a,b,c)=>{Promise.resolve().then(c.bind(c,4752)),Promise.resolve().then(c.bind(c,1237)),Promise.resolve().then(c.bind(c,81281)),Promise.resolve().then(c.bind(c,79573)),Promise.resolve().then(c.bind(c,599)),Promise.resolve().then(c.bind(c,95151)),Promise.resolve().then(c.bind(c,86808)),Promise.resolve().then(c.bind(c,70813)),Promise.resolve().then(c.bind(c,10549)),Promise.resolve().then(c.t.bind(c,2116,23))},44919:(a,b,c)=>{"use strict";c.d(b,{DangerCard:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call DangerCard() from the server but DangerCard is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/beacon/beacon/components/danger-card.tsx","DangerCard")},45301:(a,b,c)=>{"use strict";c.d(b,{KS:()=>l,Qq:()=>k,jv:()=>j});var d=c(31421),e=c(77598),f=c(48161),g=c(76760),h=c(6716);let i=null;function j(){if(process.env.BEACON_REPO)return process.env.BEACON_REPO;let a=(0,h.p1)();if(a){let b=(0,h.K4)(a);if(b)return b.path}let b=(0,h.WQ)();if(b)return b.path;if(i)return i;try{let a=(0,d.execSync)("git rev-parse --show-toplevel",{cwd:process.cwd(),stdio:["ignore","pipe","ignore"]}).toString().trim();if(a)return i=a}catch{}return i=(0,g.resolve)(process.cwd(),"../..")}function k(){return(0,g.basename)(j())}function l(){if(process.env.BEACON_DATA_DIR)return process.env.BEACON_DATA_DIR;let a=(0,h.p1)();if(a&&(0,h.K4)(a))return(0,h.T_)(a);let b=(0,h.WQ)();return b?(0,h.T_)(b.id):(0,g.join)((0,f.homedir)(),".beacon",(0,e.createHash)("sha256").update(j()).digest("hex").slice(0,12))}},52351:(a,b,c)=>{"use strict";c.d(b,{$v:()=>w,EO:()=>s,Lt:()=>o,Rx:()=>x,Zr:()=>y,ck:()=>u,r7:()=>v,tv:()=>p,wd:()=>t});var d=c(48249);c(67484);var e=c(71523),f=c(99469),g=c(60388),h=c(74283),i=c(25845),j=c(36902),k=c(64230),l=c(87298),m=c(33191),n=c(26284);function o({...a}){return(0,d.jsx)(e.V,{"data-slot":"alert-dialog",...a})}function p({...a}){return(0,d.jsx)(f.t,{"data-slot":"alert-dialog-trigger",...a})}function q({...a}){return(0,d.jsx)(g.Z,{"data-slot":"alert-dialog-portal",...a})}function r({className:a,...b}){return(0,d.jsx)(h.X,{"data-slot":"alert-dialog-overlay",className:(0,m.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",a),...b})}function s({className:a,size:b="default",...c}){return(0,d.jsxs)(q,{children:[(0,d.jsx)(r,{}),(0,d.jsx)(i.h,{"data-slot":"alert-dialog-content","data-size":b,className:(0,m.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",a),...c})]})}function t({className:a,...b}){return(0,d.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,m.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]",a),...b})}function u({className:a,...b}){return(0,d.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,m.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",a),...b})}function v({className:a,...b}){return(0,d.jsx)(j.L,{"data-slot":"alert-dialog-title",className:(0,m.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",a),...b})}function w({className:a,...b}){return(0,d.jsx)(k.r,{"data-slot":"alert-dialog-description",className:(0,m.cn)("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",a),...b})}function x({className:a,variant:b,size:c,...e}){return(0,d.jsx)(l.H,{"data-slot":"alert-dialog-action",className:(0,m.cn)(a),render:(0,d.jsx)(n.$,{variant:b,size:c}),...e})}function y({className:a,variant:b="outline",size:c="default",...e}){return(0,d.jsx)(l.H,{"data-slot":"alert-dialog-cancel",className:(0,m.cn)(a),render:(0,d.jsx)(n.$,{variant:b,size:c}),...e})}},56922:(a,b,c)=>{"use strict";c.d(b,{pC:()=>d});let d=[{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+)."}]},61681:(a,b,c)=>{"use strict";c.d(b,{LinearCard:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call LinearCard() from the server but LinearCard is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/beacon/beacon/components/linear-card.tsx","LinearCard")},64034:(a,b,c)=>{"use strict";c.d(b,{BT:()=>j,Wu:()=>k,ZB:()=>i,Zp:()=>g,aR:()=>h});var d=c(48249);c(67484);var e=c(33191),f=c(48779);function g({className:a,...b}){return(0,d.jsx)(f.b,{"data-slot":"card",className:(0,e.cn)("text-card-foreground flex flex-col gap-6 rounded-2xl py-6",a),...b})}function h({className:a,...b}){return(0,d.jsx)("div",{"data-slot":"card-header",className:(0,e.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",a),...b})}function i({className:a,...b}){return(0,d.jsx)("div",{"data-slot":"card-title",className:(0,e.cn)("leading-none font-semibold",a),...b})}function j({className:a,...b}){return(0,d.jsx)("div",{"data-slot":"card-description",className:(0,e.cn)("text-muted-foreground text-sm",a),...b})}function k({className:a,...b}){return(0,d.jsx)("div",{"data-slot":"card-content",className:(0,e.cn)("px-6",a),...b})}},73314:(a,b,c)=>{"use strict";c.d(b,{SettingsModal:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call SettingsModal() from the server but SettingsModal is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/beacon/beacon/components/settings/settings-modal.tsx","SettingsModal")},74069:(a,b,c)=>{"use strict";c.d(b,{PermissionModeCard:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call PermissionModeCard() from the server but PermissionModeCard is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/beacon/beacon/components/permission-mode-card.tsx","PermissionModeCard")},78335:()=>{},79573:(a,b,c)=>{"use strict";c.d(b,{DeleteWorkspaceCard:()=>j});var d=c(48249),e=c(67484),f=c(19099),g=c(57684),h=c(64034),i=c(52351);function j({id:a,name:b}){let c=(0,f.useRouter)(),[k,l]=(0,e.useState)(!1);async function m(){l(!0);try{let b=await fetch("/api/workspace",{method:"DELETE",headers:{"content-type":"application/json"},body:JSON.stringify({id:a})});if(b.ok){let{fallbackId:a}=await b.json();document.cookie=a?`beacon_ws=${a}; Path=/; Max-Age=31536000; SameSite=Lax`:"beacon_ws=; Path=/; Max-Age=0; SameSite=Lax",c.refresh()}}finally{l(!1)}}return(0,d.jsxs)(h.Zp,{className:"border-red-500/30",children:[(0,d.jsxs)(h.aR,{children:[(0,d.jsx)(h.ZB,{className:"text-base text-red-400",children:"Delete this workspace"}),(0,d.jsxs)(h.BT,{children:["Removes ",(0,d.jsx)("span",{className:"font-medium text-foreground",children:b})," ","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,d.jsx)(h.Wu,{className:"flex items-center gap-3",children:(0,d.jsxs)(i.Lt,{children:[(0,d.jsxs)(i.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:k,children:[(0,d.jsx)(g.A,{className:"size-4"}),k?"Deleting…":"Delete workspace"]}),(0,d.jsxs)(i.EO,{children:[(0,d.jsxs)(i.wd,{children:[(0,d.jsxs)(i.r7,{children:["Delete workspace “",b,"”?"]}),(0,d.jsx)(i.$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,d.jsxs)(i.ck,{children:[(0,d.jsx)(i.Zr,{children:"Cancel"}),(0,d.jsx)(i.Rx,{onClick:m,className:"bg-red-600 text-white hover:bg-red-500",children:"Yes, delete workspace"})]})]})]})})]})}},81143:(a,b,c)=>{Promise.resolve().then(c.bind(c,22)),Promise.resolve().then(c.bind(c,13255)),Promise.resolve().then(c.bind(c,44919)),Promise.resolve().then(c.bind(c,98167)),Promise.resolve().then(c.bind(c,61681)),Promise.resolve().then(c.bind(c,74069)),Promise.resolve().then(c.bind(c,73314)),Promise.resolve().then(c.bind(c,2739)),Promise.resolve().then(c.bind(c,47613)),Promise.resolve().then(c.t.bind(c,23318,23))},81281:(a,b,c)=>{"use strict";c.d(b,{DangerCard:()=>j});var d=c(48249),e=c(67484),f=c(19099),g=c(57684),h=c(64034),i=c(52351);function j(){let a=(0,f.useRouter)(),[b,c]=(0,e.useState)(!1),[j,k]=(0,e.useState)(!1);async function l(){c(!0);try{(await fetch("/api/reset",{method:"POST"})).ok&&(k(!0),a.refresh())}finally{c(!1)}}return(0,d.jsxs)(h.Zp,{className:"border-red-500/30",children:[(0,d.jsxs)(h.aR,{children:[(0,d.jsx)(h.ZB,{className:"text-base text-red-400",children:"Danger zone"}),(0,d.jsx)(h.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,d.jsxs)(h.Wu,{className:"flex items-center gap-3",children:[(0,d.jsxs)(i.Lt,{children:[(0,d.jsxs)(i.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:b,children:[(0,d.jsx)(g.A,{className:"size-4"}),b?"Erasing…":"Erase all data"]}),(0,d.jsxs)(i.EO,{children:[(0,d.jsxs)(i.wd,{children:[(0,d.jsx)(i.r7,{children:"Erase all data?"}),(0,d.jsx)(i.$v,{children:"This permanently removes the map, the database, drafts, the code graph and the project summary. This action cannot be undone."})]}),(0,d.jsxs)(i.ck,{children:[(0,d.jsx)(i.Zr,{children:"Cancel"}),(0,d.jsx)(i.Rx,{onClick:l,className:"bg-red-600 text-white hover:bg-red-500",children:"Yes, erase everything"})]})]})]}),j&&(0,d.jsx)("span",{className:"text-xs text-red-300",children:"✓ data erased"})]})]})}},84853:(a,b,c)=>{"use strict";c.d(b,{C5:()=>f,KW:()=>g});var d=c(65573),e=c(6716);async function f(a){if(a&&(0,e.K4)(a))return a;let b=(await (0,d.cookies)()).get(e.Dk)?.value;return b&&(0,e.K4)(b)?b:null}let g=f},86808:(a,b,c)=>{"use strict";c.d(b,{SettingsModal:()=>v});var d=c(48249),e=c(76424),f=c(60388),g=c(74283),h=c(25845),i=c(36902),j=c(64230),k=c(87298),l=c(67484),m=c(19099),n=c(29813),o=c(45535),p=c(79291),q=c(79768),r=c(33191);let s=new Set;function t(a){return s.add(a),()=>{s.delete(a)}}let u=()=>!1;function v({sections:a,intercepted:b}){let c=(0,m.useRouter)(),[s,w]=(0,l.useState)(!0),[x,y]=(0,l.useState)(a[0]?.id),[z,A]=(0,l.useState)(""),B=(0,l.useRef)(null),C=(0,l.useSyncExternalStore)(t,u,()=>!1),D=a.find(a=>a.id===x)??a[0],E=(0,l.useMemo)(()=>{let b=z.trim().toLowerCase(),c=[],d=new Map;for(let e of a)(!b||e.label.toLowerCase().includes(b)||e.group.toLowerCase().includes(b))&&(d.has(e.group)||(d.set(e.group,[]),c.push(e.group)),d.get(e.group).push(e));return c.map(a=>({label:a,items:d.get(a)}))},[a,z]);return b&&C?null:(0,d.jsx)(e.D,{open:s,onOpenChange:a=>{a||(w(!1),b?c.back():c.push((0,q.Fj)("/map",(0,q.fk)())))},children:(0,d.jsxs)(f.Z,{children:[(0,d.jsx)(g.X,{className:(0,r.cn)("fixed inset-0 z-50 bg-black/45 supports-backdrop-filter:backdrop-blur-[3px]","duration-150 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0")}),(0,d.jsxs)(h.h,{initialFocus:B,className:(0,r.cn)("glass fixed left-1/2 top-1/2 z-50 flex -translate-x-1/2 -translate-y-1/2 overflow-hidden rounded-2xl outline-none","h-[min(680px,calc(100vh-80px))] w-[min(1000px,calc(100vw-80px))] max-w-[calc(100vw-24px)] max-h-[calc(100vh-24px)]","flex-col sm:flex-row","duration-150 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-[0.98] data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-[0.98]"),style:{boxShadow:"0 40px 120px -32px var(--glass-shadow), 0 12px 40px -20px var(--glass-shadow), inset 0 1px 0 var(--glass-sheen)"},children:[(0,d.jsxs)("aside",{className:"flex shrink-0 flex-col border-b border-border sm:w-[240px] sm:border-b-0 sm:border-r",children:[(0,d.jsxs)("div",{className:"px-4 pt-4",children:[(0,d.jsxs)("div",{className:"mb-2 flex items-center gap-1.5",children:[(0,d.jsx)(p._,{size:14,className:"text-muted-foreground"}),(0,d.jsx)("span",{className:"text-[12px] font-medium tracking-tight text-muted-foreground",children:"Beacon"})]}),(0,d.jsx)(i.L,{className:"text-[15px] font-semibold tracking-tight",children:"Settings"}),(0,d.jsx)(j.r,{className:"sr-only",children:"Change appearance, agent, integration and project settings."})]}),(0,d.jsx)("div",{className:"px-3 pb-2 pt-3",children:(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsx)(n.A,{"aria-hidden":!0,className:"pointer-events-none absolute left-2.5 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground"}),(0,d.jsx)("input",{ref:B,type:"text",value:z,onChange:a=>A(a.target.value),"aria-label":"Search settings",placeholder:"Search settings",className:(0,r.cn)("h-8 w-full rounded-lg border border-border bg-transparent pl-8 pr-2.5 text-[13px] outline-none transition-colors","placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/40")})]})}),(0,d.jsx)("nav",{"aria-label":"Settings sections",className:"flex gap-1 overflow-x-auto px-3 pb-3 sm:flex-1 sm:flex-col sm:gap-0.5 sm:overflow-x-visible sm:overflow-y-auto",children:0===E.length?(0,d.jsx)("p",{className:"px-1 py-2 text-[12px] text-muted-foreground",children:"No settings match."}):E.map(a=>(0,d.jsxs)("div",{className:"shrink-0 sm:mt-3 sm:first:mt-1",children:[(0,d.jsx)("p",{className:"hidden px-2 pb-1 text-[10px] font-semibold uppercase tracking-[0.08em] text-muted-foreground/70 sm:block",children:a.label}),(0,d.jsx)("div",{className:"flex gap-1 sm:flex-col sm:gap-0.5",children:a.items.map(a=>{let b=a.id===x;return(0,d.jsxs)("button",{type:"button","aria-current":b?"page":void 0,onClick:()=>y(a.id),className:(0,r.cn)("group flex shrink-0 items-center gap-2 rounded-lg px-2.5 py-1.5 text-left text-[13px] font-medium transition-colors sm:w-full",b?"bg-[var(--ink-active)] text-foreground":"text-muted-foreground hover:bg-[var(--ink-hover)] hover:text-foreground"),children:[a.icon&&(0,d.jsx)("span",{"aria-hidden":!0,className:(0,r.cn)("shrink-0 transition-colors",b?"text-[var(--accent-2,#ff7a45)]":"text-muted-foreground group-hover:text-foreground"),children:a.icon}),a.label]},a.id)})})]},a.label))})]}),(0,d.jsxs)("div",{className:"relative min-w-0 flex-1 overflow-y-auto",children:[(0,d.jsx)(k.H,{"aria-label":"Close settings",className:(0,r.cn)("absolute right-3 top-3 z-10 flex size-7 items-center justify-center rounded-lg text-muted-foreground transition-colors","hover:bg-[var(--ink-hover)] hover:text-foreground focus-visible:ring-[3px] focus-visible:ring-ring/40 focus-visible:outline-none"),children:(0,d.jsx)(o.A,{className:"size-4"})}),(0,d.jsx)("div",{className:"space-y-4 px-5 py-6 sm:px-7 sm:py-7",children:D?.content})]})]})]})})}},95151:(a,b,c)=>{"use strict";c.d(b,{PermissionModeCard:()=>j});var d=c(48249),e=c(67484),f=c(48581),g=c(64034),h=c(55056),i=c(56922);function j(){let[a,b]=(0,e.useState)("default"),[c,j]=(0,e.useState)(!1);async function k(a){b(a),j(!1),await fetch("/api/preferences",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({planApprovalMode:a})}).catch(()=>{}),j(!0)}let l=i.pC.find(b=>b.value===a);return(0,d.jsxs)(g.Zp,{children:[(0,d.jsxs)(g.aR,{children:[(0,d.jsxs)(g.ZB,{className:"flex items-center gap-2 text-base",children:[(0,d.jsx)(f.A,{className:"size-4 text-emerald-400"}),"Permission mode after approval"]}),(0,d.jsx)(g.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,d.jsxs)(g.Wu,{className:"flex items-center gap-3",children:[(0,d.jsxs)(h.l6,{value:a,onValueChange:a=>a&&void k(a),children:[(0,d.jsx)(h.bq,{className:"h-9 w-64",children:(0,d.jsx)(h.yv,{})}),(0,d.jsx)(h.gC,{children:i.pC.map(a=>(0,d.jsx)(h.eb,{value:a.value,children:a.label},a.value))})]}),l&&(0,d.jsx)("span",{className:"text-xs text-muted-foreground",children:l.description}),c&&(0,d.jsx)("span",{className:"text-xs text-emerald-300",children:"✓ saved"})]})]})}},96487:()=>{},98167:(a,b,c)=>{"use strict";c.d(b,{DeleteWorkspaceCard:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call DeleteWorkspaceCard() from the server but DeleteWorkspaceCard is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/beacon/beacon/components/delete-workspace-card.tsx","DeleteWorkspaceCard")}};
1
+ exports.id=3825,exports.ids=[3825],exports.modules={22:(a,b,c)=>{"use strict";c.d(b,{AppearanceCard:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call AppearanceCard() from the server but AppearanceCard is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/beacon/beacon/components/appearance-card.tsx","AppearanceCard")},599:(a,b,c)=>{"use strict";c.d(b,{LinearCard:()=>m});var d=c(48249),e=c(67484),f=c(89216),g=c(35471),h=c(27993),i=c(64034),j=c(26284),k=c(8422),l=c(55056);function m(){let[a,b]=(0,e.useState)(null),[c,m]=(0,e.useState)([]),[n,o]=(0,e.useState)(""),[p,q]=(0,e.useState)(!1),[r,s]=(0,e.useState)(null),[t,u]=(0,e.useState)(!1),[v,w]=(0,e.useState)(!1),x=(0,e.useCallback)(async()=>{let a=await fetch("/api/linear/scopes",{cache:"no-store"}).catch(()=>null);a?.ok&&m((await a.json()).scopes)},[]);async function y(a){q(!0),s(null);try{let c=await fetch("/api/linear",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(a)});if(!c.ok)return s((await c.json().catch(()=>({}))).error??"Something went wrong"),null;let d=await c.json();return b(d),d}finally{q(!1)}}async function z(){!n.trim()||await y({apiKey:n.trim()})&&(o(""),u(!1),await x())}async function A(a){let b=c.find(b=>`${b.kind}:${b.id}`===a);!b||await y({scope:b,enabled:!0})&&w(!1)}async function B(){q(!0),s(null);try{let a=await fetch("/api/linear/sync",{method:"POST"});if(!a.ok)return void s("Sync failed — check the API key and your connection");let c=await a.json().catch(()=>({}));s(c.skipped?c.skipped:`Synced — ${c.created??0} added, ${c.pulled??0} updated, ${c.pushed??0} pushed, ${c.removed??0} removed`);let d=await fetch("/api/linear",{cache:"no-store"}).then(a=>a.ok?a.json():null).catch(()=>null);d&&b(d)}finally{q(!1)}}a?.connected&&a.scope;let C=a?.connected&&a.scope&&!v;return(0,d.jsxs)(i.Zp,{children:[(0,d.jsxs)(i.aR,{children:[(0,d.jsxs)(i.ZB,{className:"flex items-center gap-2 text-base",children:[(0,d.jsx)(f.A,{className:"size-4 text-[var(--accent-2,#ff7a45)]"}),"Linear sync"]}),(0,d.jsx)(i.BT,{children:"Mirror a Linear team or project onto this board and back — create or edit in either place, no double entry. Changes flow both ways within ~a minute (last edit wins). The key stays on this machine."})]}),(0,d.jsxs)(i.Wu,{className:"space-y-3",children:[null==a?(0,d.jsx)("p",{className:"text-xs text-muted-foreground",children:"Loading…"}):!a.connected||t?(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)(k.p,{type:"password",autoComplete:"off",placeholder:"Linear personal API key (lin_api_…)",value:n,onChange:a=>o(a.target.value),onKeyDown:a=>"Enter"===a.key&&void z(),className:"h-9 flex-1"}),(0,d.jsx)(j.$,{size:"sm",disabled:p||!n.trim(),onClick:()=>void z(),children:"Connect"})]}):C?(0,d.jsxs)("div",{className:"space-y-2.5",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1.5 text-sm",children:[(0,d.jsxs)("span",{children:["Mirroring ",(0,d.jsx)("span",{className:"font-medium",children:a.scope.name})," ",(0,d.jsxs)("span",{className:"text-muted-foreground",children:["(",a.scope.kind,")"]})," in"," ",(0,d.jsx)("span",{className:"font-medium",children:a.orgName})]}),!a.enabled&&(0,d.jsx)("span",{className:"text-xs text-amber-400",children:"Paused"})]}),(0,d.jsxs)("button",{type:"button",disabled:p,onClick:()=>void y({onlyMine:!a.onlyMine}),className:"flex items-center gap-2 text-left text-xs text-muted-foreground hover:text-foreground",children:[(0,d.jsx)("span",{className:`flex size-4 items-center justify-center rounded border ${a.onlyMine?"border-[var(--accent-2,#ff7a45)] bg-[var(--accent-2,#ff7a45)]/20 text-[var(--accent-2,#ff7a45)]":"border-border"}`,children:a.onlyMine&&(0,d.jsx)(g.A,{className:"size-3"})}),"Only issues assigned to me"]}),(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2 pt-0.5",children:[(0,d.jsxs)(j.$,{size:"sm",variant:"outline",disabled:p,onClick:()=>void B(),children:[(0,d.jsx)(h.A,{className:`size-3.5 ${p?"animate-spin":""}`}),"Sync now"]}),(0,d.jsx)(j.$,{size:"sm",variant:"ghost",disabled:p,onClick:()=>void y({enabled:!a.enabled}),children:a.enabled?"Pause sync":"Resume sync"}),(0,d.jsx)(j.$,{size:"sm",variant:"ghost",disabled:p,onClick:()=>w(!0),children:"Change scope"}),(0,d.jsx)(j.$,{size:"sm",variant:"ghost",disabled:p,onClick:()=>u(!0),children:"Change key"})]})]}):(0,d.jsxs)("div",{className:"space-y-2",children:[(0,d.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Connected to ",(0,d.jsx)("span",{className:"font-medium text-foreground",children:a.orgName}),a.viewerName&&(0,d.jsxs)(d.Fragment,{children:[" as ",a.viewerName]}),". Which team or project does this repo track?"]}),(0,d.jsxs)(l.l6,{onValueChange:a=>a&&void A(a),children:[(0,d.jsx)(l.bq,{className:"h-9 w-72",children:(0,d.jsx)(l.yv,{placeholder:c.length?"Pick a team or project…":"Loading…"})}),(0,d.jsx)(l.gC,{children:c.map(a=>(0,d.jsxs)(l.eb,{value:`${a.kind}:${a.id}`,children:[a.name," \xb7 ",(0,d.jsx)("span",{className:"text-muted-foreground",children:a.kind})]},`${a.kind}:${a.id}`))})]})]}),r&&(0,d.jsx)("p",{className:"text-xs text-muted-foreground",children:r}),C&&a.lastSyncedAt&&(0,d.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Last synced ",new Date(a.lastSyncedAt).toLocaleString()]})]})]})}},1237:(a,b,c)=>{"use strict";c.d(b,{ContextCard:()=>h});var d=c(48249),e=c(67484),f=c(64034),g=c(26284);function h(){let[a,b]=(0,e.useState)(null),[c,h]=(0,e.useState)(!1);async function i(){h(!0),b(null);try{let a=await fetch("/api/context",{method:"POST"});if(!a.ok)return void b(await a.text());let c=await a.json();b(c.files?.length?`Updated: ${c.files.map(a=>a.split("/").pop()).join(" + ")}`:"Nothing to update")}catch{b("Failed")}finally{h(!1)}}return(0,d.jsxs)(f.Zp,{children:[(0,d.jsxs)(f.aR,{children:[(0,d.jsx)(f.ZB,{className:"text-base",children:"Context for the AI"}),(0,d.jsxs)(f.BT,{children:["Generates ",(0,d.jsx)("span",{className:"font-mono",children:"AGENTS.md"})," (read by Cursor/Codex/Aider) and makes sure ",(0,d.jsx)("span",{className:"font-mono",children:"CLAUDE.md"})," imports it (Claude Code reads CLAUDE.md), from the current map."]})]}),(0,d.jsxs)(f.Wu,{className:"flex flex-wrap items-center gap-3",children:[(0,d.jsx)(g.$,{size:"sm",disabled:c,onClick:i,children:c?"Generating…":"Update AGENTS.md + CLAUDE.md"}),a&&(0,d.jsx)("span",{className:"text-xs text-muted-foreground",children:a})]})]})}},4752:(a,b,c)=>{"use strict";c.d(b,{AppearanceCard:()=>q});var d=c(48249),e=c(67484),f=c(92138),g=c(64034),h=c(33734),i=c(33191);let j="#ff7a45",k={light:{bg:"#eeece6",card:"#ffffff",ink:"#3a3a3a",border:"#dcd9d2"},dark:{bg:"#1f1f22",card:"#2c2c30",ink:"#e6e6e6",border:"#3a3a3f"}},l=[{value:"light",label:"Light"},{value:"dark",label:"Dark"},{value:"auto",label:"Auto"}],m=[{value:"glass",label:"Glass",hint:"Frosted blur"},{value:"tinted",label:"Tinted",hint:"Flat, no blur"},{value:"solid",label:"Solid",hint:"Opaque panels"}];function n({theme:a}){if("auto"===a)return(0,d.jsxs)("span",{className:"relative block h-10 w-full overflow-hidden rounded-md border border-black/10",children:[(0,d.jsx)("span",{className:"absolute inset-0",style:{background:k.light.bg}}),(0,d.jsx)("span",{className:"absolute inset-0",style:{background:k.dark.bg,clipPath:"polygon(100% 0, 100% 100%, 0 100%)"}}),(0,d.jsx)("span",{className:"absolute left-1.5 top-1.5 h-1.5 w-6 rounded-full",style:{background:j}})]});let b=k[a];return(0,d.jsx)("span",{className:"block h-10 w-full overflow-hidden rounded-md border",style:{background:b.bg,borderColor:b.border},children:(0,d.jsxs)("span",{className:"mx-1.5 mt-1.5 flex h-6 flex-col justify-center gap-1 rounded px-1.5",style:{background:b.card,border:`1px solid ${b.border}`},children:[(0,d.jsx)("span",{className:"h-1 w-3/4 rounded-full",style:{background:b.ink,opacity:.55}}),(0,d.jsx)("span",{className:"h-1 w-5 rounded-full",style:{background:j}})]})})}function o({surface:a}){let b="solid"===a?{background:k.dark.card}:"tinted"===a?{background:"rgba(44,44,48,0.72)"}:{background:"linear-gradient(180deg, rgba(255,255,255,0.10), rgba(44,44,48,0.55))",backdropFilter:"blur(3px)"};return(0,d.jsx)("span",{className:"relative block h-10 w-full overflow-hidden rounded-md border border-black/20",style:{backgroundColor:k.dark.bg,backgroundImage:"radial-gradient(rgba(255,255,255,0.22) 1px, transparent 1px)",backgroundSize:"6px 6px"},children:(0,d.jsx)("span",{className:"absolute inset-x-2 top-2 bottom-2 rounded",style:{...b,border:"1px solid rgba(255,255,255,0.12)"}})})}function p({selected:a,label:b,hint:c,onClick:e,children:f}){return(0,d.jsxs)("button",{type:"button",onClick:e,"aria-pressed":a,className:(0,i.cn)("flex flex-1 flex-col gap-2 rounded-lg border p-2 text-left transition-colors",a?"border-[var(--accent-2,#ff7a45)] bg-[color-mix(in_oklab,var(--accent-2,#ff7a45)_10%,transparent)]":"border-border hover:bg-[var(--ink-hover)]"),children:[f,(0,d.jsxs)("span",{className:"flex items-center justify-between gap-1 px-0.5",children:[(0,d.jsx)("span",{className:"text-xs font-medium",children:b}),a&&(0,d.jsx)("span",{"aria-hidden":!0,className:"size-1.5 rounded-full bg-[var(--accent-2,#ff7a45)]"})]}),c&&(0,d.jsx)("span",{className:"px-0.5 text-[10px] leading-tight text-muted-foreground",children:c})]})}function q(){let[a,b]=(0,e.useState)(h.SS),[c,i]=(0,e.useState)(h.mn);return(0,d.jsxs)(g.Zp,{children:[(0,d.jsxs)(g.aR,{children:[(0,d.jsxs)(g.ZB,{className:"flex items-center gap-2 text-base",children:[(0,d.jsx)(f.A,{className:"size-4 text-[var(--accent-2,#ff7a45)]"}),"Appearance"]}),(0,d.jsx)(g.BT,{children:"Theme and surface for this browser. Changes apply instantly and are remembered here."})]}),(0,d.jsx)(g.Wu,{className:"space-y-6",children:(0,d.jsxs)("div",{className:"grid gap-6 lg:grid-cols-2",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"mb-2 text-xs font-medium text-muted-foreground",children:"Theme"}),(0,d.jsx)("div",{className:"flex gap-2",children:l.map(c=>(0,d.jsx)(p,{selected:a===c.value,label:c.label,hint:"auto"===c.value?"Follows your system":void 0,onClick:()=>{var a;b(a=c.value),(0,h.Yl)(a)},children:(0,d.jsx)(n,{theme:c.value})},c.value))})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"mb-2 text-xs font-medium text-muted-foreground",children:"Surface"}),(0,d.jsx)("div",{className:"flex gap-2",children:m.map(a=>(0,d.jsx)(p,{selected:c===a.value,label:a.label,hint:a.hint,onClick:()=>{var b;i(b=a.value),(0,h.S1)(b)},children:(0,d.jsx)(o,{surface:a.value})},a.value))})]})]})})]})}},6389:(a,b,c)=>{"use strict";c.d(b,{G:()=>G});var d=c(5735),e=c(63059),f=c.n(e),g=c(19912),h=c(2767),i=c(24313),j=c(76499),k=c(89986),l=c(3101),m=c(59726);c(91986);var n=c(89356),o=c(16184);function p(...a){return(0,o.QP)((0,n.$)(a))}function q({className:a,children:b,...c}){return(0,d.jsxs)("div",{className:p("glass relative isolate overflow-hidden",a),...c,children:[(0,d.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,d.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"}}),b]})}function r({className:a,...b}){return(0,d.jsx)(q,{"data-slot":"card",className:p("text-card-foreground flex flex-col gap-6 rounded-2xl py-6",a),...b})}function s({className:a,...b}){return(0,d.jsx)("div",{"data-slot":"card-header",className:p("@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",a),...b})}function t({className:a,...b}){return(0,d.jsx)("div",{"data-slot":"card-title",className:p("leading-none font-semibold",a),...b})}function u({className:a,...b}){return(0,d.jsx)("div",{"data-slot":"card-description",className:p("text-muted-foreground text-sm",a),...b})}function v({className:a,...b}){return(0,d.jsx)("div",{"data-slot":"card-content",className:p("px-6",a),...b})}let w=(0,c(8884).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"}});var x=c(13255),y=c(44919),z=c(98167),A=c(74069),B=c(61681),C=c(22),D=c(6716),E=c(84853);let F="size-3.5";async function G(a){let b=await (0,E.C5)(a),c=(b?(0,D.K4)(b):null)??(0,D.WQ)();return[{id:"appearance",label:"Appearance",group:"General",icon:(0,d.jsx)(g.A,{className:F}),content:(0,d.jsx)(C.AppearanceCard,{})},{id:"agent",label:"Agent",group:"General",icon:(0,d.jsx)(h.A,{className:F}),content:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(A.PermissionModeCard,{}),(0,d.jsxs)(r,{children:[(0,d.jsxs)(s,{children:[(0,d.jsxs)(t,{className:"flex items-center gap-2 text-base",children:[(0,d.jsx)(i.A,{className:"size-4 text-[var(--accent-2,#ff7a45)]"}),"New to Beacon?"]}),(0,d.jsx)(u,{children:"The skills you type, the MCP tools the agent calls on its own, and the hooks that run automatically while you work."})]}),(0,d.jsx)(v,{children:(0,d.jsxs)(f(),{href:"/help",className:p(w({size:"sm"}),"gap-1.5"),children:["How to use Beacon",(0,d.jsx)(j.A,{className:"size-4"})]})})]})]})},{id:"integrations",label:"Integrations",group:"Connections",icon:(0,d.jsx)(k.A,{className:F}),content:(0,d.jsx)(B.LinearCard,{})},{id:"project",label:"Project",group:"Workspace",icon:(0,d.jsx)(l.A,{className:F}),content:(0,d.jsx)(x.ContextCard,{})},{id:"danger",label:"Danger zone",group:"Workspace",icon:(0,d.jsx)(m.A,{className:F}),content:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(y.DangerCard,{}),c&&(0,d.jsx)(z.DeleteWorkspaceCard,{id:c.id,name:c.name})]})}]}},6716:(a,b,c)=>{"use strict";c.d(b,{AV:()=>J,Ck:()=>H,Dk:()=>F,F2:()=>y,FF:()=>l,K4:()=>w,Lm:()=>O,Nx:()=>s,Q8:()=>I,T_:()=>r,UP:()=>B,VB:()=>E,VO:()=>q,WQ:()=>D,X_:()=>L,Y2:()=>v,_g:()=>C,kO:()=>P,oW:()=>i,p1:()=>M,qh:()=>z});var d=c(16698);c(31421);var e=c(77598),f=c(73024),g=c(48161),h=c(76760);function i(){return process.env.BEACON_HOME||(0,h.join)((0,g.homedir)(),".beacon")}function j(){return(0,h.join)(i(),"workspaces.json")}function k(a){return(0,e.createHash)("sha256").update(a).digest("hex").slice(0,12)}function l(a){let b=(0,h.resolve)(a);return b!==(0,h.resolve)((0,g.homedir)())&&b!==(0,h.parse)(b).root}function m(){return(0,h.join)(i(),"deleted.json")}function n(){try{let a=JSON.parse((0,f.readFileSync)(m(),"utf8"));return Array.isArray(a)?a:[]}catch{return[]}}function o(a){(0,f.mkdirSync)(i(),{recursive:!0}),(0,f.writeFileSync)(m(),JSON.stringify(a,null,2))}function p(a){return n().includes(a)}function q(a){let b=n();b.includes(a)||o([...b,a])}function r(a){return(0,h.join)(i(),a)}function s(a){return`file:${(0,h.join)(r(a),"db.sqlite")}`}function t(){try{let a=JSON.parse((0,f.readFileSync)(j(),"utf8"));return Array.isArray(a)?a:[]}catch{return[]}}function u(a){(0,f.mkdirSync)(i(),{recursive:!0}),(0,f.writeFileSync)(j(),JSON.stringify(a,null,2))}function v(){return t().sort((a,b)=>b.lastOpenedAt.localeCompare(a.lastOpenedAt))}function w(a){return t().find(b=>b.id===a)??null}function x(a,b,c=new Date().toISOString()){if(!l(a))throw Error(`beacon: refusing to register a non-repo path as a workspace: ${a}`);let d=k(a);if(p(d))throw Error(`beacon: workspace ${d} (${a}) was deleted — run \`beacon\` or /beacon-init to re-add it`);let e=t(),g=e.find(a=>a.id===d),i={id:d,path:a,name:b||g?.name||(0,h.basename)(a),lastOpenedAt:c},j=[i,...e.filter(a=>a.id!==d)];return(0,f.mkdirSync)(r(d),{recursive:!0}),u(j),i}function y(a,b){var c;let d;return c=k(a),(d=n()).includes(c)&&o(d.filter(a=>a!==c)),x(a,b)}function z(a){u(t().filter(b=>b.id!==a)),B()===a&&C(v()[0]?.id??null)}function A(){return(0,h.join)(i(),"active")}function B(){try{return(0,f.readFileSync)(A(),"utf8").trim()||null}catch{return null}}function C(a){(0,f.mkdirSync)(i(),{recursive:!0}),(0,f.writeFileSync)(A(),a??"")}function D(){let a=B();return a?w(a):null}function E(){let a=M()??B();return a?w(a):null}let F="beacon_ws";function G(a,b){let c=a.headers.get("cookie");if(!c)return null;for(let a of c.split(";")){let c=a.indexOf("=");if(-1!==c&&a.slice(0,c).trim()===b)return decodeURIComponent(a.slice(c+1).trim())}return null}function H(a){let b,c=a.headers.get("x-beacon-workspace");if(c&&w(c))return c;let d=G(a,F);return d&&w(d)?d:1===(b=v()).length?b[0].id:null}let I="x-beacon-workspace-path";async function J(a){let b=a.headers.get("x-beacon-workspace");if(b&&w(b))return b;let c=a.headers.get(I);if(c&&l(c)&&!p(k(c))&&(!b||k(c)===b)){let a=x(c);return await P(a.id),a.id}let d=G(a,F);return d&&w(d)?d:null}let K=new d.AsyncLocalStorage;function L(a,b){return a?K.run(a,b):b()}function M(){return K.getStore()??null}let N=new Set;function O(a){N.delete((0,h.join)(r(a),"db.sqlite"))}async function P(a){let b=r(a),d=(0,h.join)(b,"db.sqlite"),e=(0,f.existsSync)(d);if(e&&N.has(d))return{ok:!0,created:!1,migrated:!1};try{(0,f.mkdirSync)(b,{recursive:!0});let{provisionDb:g}=await Promise.all([c.e(1669),c.e(9884),c.e(5871),c.e(5258)]).then(c.bind(c,35258)),h=await g(s(a));return N.add(d),{ok:!0,created:!e,migrated:e&&h.migrated}}catch(a){return{ok:!1,created:!1,migrated:!1,error:a instanceof Error?a.message:String(a)}}}},8422:(a,b,c)=>{"use strict";c.d(b,{p:()=>f});var d=c(48249);c(67484);var e=c(33191);function f({className:a,type:b,...c}){return(0,d.jsx)("input",{type:b,"data-slot":"input",className:(0,e.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",a),...c})}},13255:(a,b,c)=>{"use strict";c.d(b,{ContextCard:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call ContextCard() from the server but ContextCard is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/beacon/beacon/components/context-card.tsx","ContextCard")},34287:(a,b,c)=>{Promise.resolve().then(c.bind(c,4752)),Promise.resolve().then(c.bind(c,1237)),Promise.resolve().then(c.bind(c,81281)),Promise.resolve().then(c.bind(c,79573)),Promise.resolve().then(c.bind(c,599)),Promise.resolve().then(c.bind(c,95151)),Promise.resolve().then(c.bind(c,86808)),Promise.resolve().then(c.bind(c,70813)),Promise.resolve().then(c.bind(c,10549)),Promise.resolve().then(c.t.bind(c,2116,23))},44919:(a,b,c)=>{"use strict";c.d(b,{DangerCard:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call DangerCard() from the server but DangerCard is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/beacon/beacon/components/danger-card.tsx","DangerCard")},45301:(a,b,c)=>{"use strict";c.d(b,{KS:()=>l,Qq:()=>k,jv:()=>j});var d=c(31421),e=c(77598),f=c(48161),g=c(76760),h=c(6716);let i=null;function j(){if(process.env.BEACON_REPO)return process.env.BEACON_REPO;let a=(0,h.p1)();if(a){let b=(0,h.K4)(a);if(b)return b.path}let b=(0,h.WQ)();if(b)return b.path;if(i)return i;try{let a=(0,d.execSync)("git rev-parse --show-toplevel",{cwd:process.cwd(),stdio:["ignore","pipe","ignore"]}).toString().trim();if(a)return i=a}catch{}return i=(0,g.resolve)(process.cwd(),"../..")}function k(){return(0,g.basename)(j())}function l(){if(process.env.BEACON_DATA_DIR)return process.env.BEACON_DATA_DIR;let a=(0,h.p1)();if(a&&(0,h.K4)(a))return(0,h.T_)(a);let b=(0,h.WQ)();return b?(0,h.T_)(b.id):(0,g.join)((0,f.homedir)(),".beacon",(0,e.createHash)("sha256").update(j()).digest("hex").slice(0,12))}},52351:(a,b,c)=>{"use strict";c.d(b,{$v:()=>w,EO:()=>s,Lt:()=>o,Rx:()=>x,Zr:()=>y,ck:()=>u,r7:()=>v,tv:()=>p,wd:()=>t});var d=c(48249);c(67484);var e=c(71523),f=c(99469),g=c(60388),h=c(74283),i=c(25845),j=c(36902),k=c(64230),l=c(87298),m=c(33191),n=c(26284);function o({...a}){return(0,d.jsx)(e.V,{"data-slot":"alert-dialog",...a})}function p({...a}){return(0,d.jsx)(f.t,{"data-slot":"alert-dialog-trigger",...a})}function q({...a}){return(0,d.jsx)(g.Z,{"data-slot":"alert-dialog-portal",...a})}function r({className:a,...b}){return(0,d.jsx)(h.X,{"data-slot":"alert-dialog-overlay",className:(0,m.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",a),...b})}function s({className:a,size:b="default",...c}){return(0,d.jsxs)(q,{children:[(0,d.jsx)(r,{}),(0,d.jsx)(i.h,{"data-slot":"alert-dialog-content","data-size":b,className:(0,m.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",a),...c})]})}function t({className:a,...b}){return(0,d.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,m.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]",a),...b})}function u({className:a,...b}){return(0,d.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,m.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",a),...b})}function v({className:a,...b}){return(0,d.jsx)(j.L,{"data-slot":"alert-dialog-title",className:(0,m.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",a),...b})}function w({className:a,...b}){return(0,d.jsx)(k.r,{"data-slot":"alert-dialog-description",className:(0,m.cn)("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",a),...b})}function x({className:a,variant:b,size:c,...e}){return(0,d.jsx)(l.H,{"data-slot":"alert-dialog-action",className:(0,m.cn)(a),render:(0,d.jsx)(n.$,{variant:b,size:c}),...e})}function y({className:a,variant:b="outline",size:c="default",...e}){return(0,d.jsx)(l.H,{"data-slot":"alert-dialog-cancel",className:(0,m.cn)(a),render:(0,d.jsx)(n.$,{variant:b,size:c}),...e})}},56922:(a,b,c)=>{"use strict";c.d(b,{pC:()=>d});let d=[{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+)."}]},61681:(a,b,c)=>{"use strict";c.d(b,{LinearCard:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call LinearCard() from the server but LinearCard is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/beacon/beacon/components/linear-card.tsx","LinearCard")},64034:(a,b,c)=>{"use strict";c.d(b,{BT:()=>j,Wu:()=>k,ZB:()=>i,Zp:()=>g,aR:()=>h});var d=c(48249);c(67484);var e=c(33191),f=c(48779);function g({className:a,...b}){return(0,d.jsx)(f.b,{"data-slot":"card",className:(0,e.cn)("text-card-foreground flex flex-col gap-6 rounded-2xl py-6",a),...b})}function h({className:a,...b}){return(0,d.jsx)("div",{"data-slot":"card-header",className:(0,e.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",a),...b})}function i({className:a,...b}){return(0,d.jsx)("div",{"data-slot":"card-title",className:(0,e.cn)("leading-none font-semibold",a),...b})}function j({className:a,...b}){return(0,d.jsx)("div",{"data-slot":"card-description",className:(0,e.cn)("text-muted-foreground text-sm",a),...b})}function k({className:a,...b}){return(0,d.jsx)("div",{"data-slot":"card-content",className:(0,e.cn)("px-6",a),...b})}},73314:(a,b,c)=>{"use strict";c.d(b,{SettingsModal:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call SettingsModal() from the server but SettingsModal is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/beacon/beacon/components/settings/settings-modal.tsx","SettingsModal")},74069:(a,b,c)=>{"use strict";c.d(b,{PermissionModeCard:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call PermissionModeCard() from the server but PermissionModeCard is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/beacon/beacon/components/permission-mode-card.tsx","PermissionModeCard")},78335:()=>{},79573:(a,b,c)=>{"use strict";c.d(b,{DeleteWorkspaceCard:()=>j});var d=c(48249),e=c(67484),f=c(19099),g=c(57684),h=c(64034),i=c(52351);function j({id:a,name:b}){let c=(0,f.useRouter)(),[k,l]=(0,e.useState)(!1);async function m(){l(!0);try{let b=await fetch("/api/workspace",{method:"DELETE",headers:{"content-type":"application/json"},body:JSON.stringify({id:a})});if(b.ok){let{fallbackId:a}=await b.json();document.cookie=a?`beacon_ws=${a}; Path=/; Max-Age=31536000; SameSite=Lax`:"beacon_ws=; Path=/; Max-Age=0; SameSite=Lax",c.refresh()}}finally{l(!1)}}return(0,d.jsxs)(h.Zp,{className:"border-red-500/30",children:[(0,d.jsxs)(h.aR,{children:[(0,d.jsx)(h.ZB,{className:"text-base text-red-400",children:"Delete this workspace"}),(0,d.jsxs)(h.BT,{children:["Removes ",(0,d.jsx)("span",{className:"font-medium text-foreground",children:b})," ","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,d.jsx)(h.Wu,{className:"flex items-center gap-3",children:(0,d.jsxs)(i.Lt,{children:[(0,d.jsxs)(i.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:k,children:[(0,d.jsx)(g.A,{className:"size-4"}),k?"Deleting…":"Delete workspace"]}),(0,d.jsxs)(i.EO,{children:[(0,d.jsxs)(i.wd,{children:[(0,d.jsxs)(i.r7,{children:["Delete workspace “",b,"”?"]}),(0,d.jsx)(i.$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,d.jsxs)(i.ck,{children:[(0,d.jsx)(i.Zr,{children:"Cancel"}),(0,d.jsx)(i.Rx,{onClick:m,className:"bg-red-600 text-white hover:bg-red-500",children:"Yes, delete workspace"})]})]})]})})]})}},81143:(a,b,c)=>{Promise.resolve().then(c.bind(c,22)),Promise.resolve().then(c.bind(c,13255)),Promise.resolve().then(c.bind(c,44919)),Promise.resolve().then(c.bind(c,98167)),Promise.resolve().then(c.bind(c,61681)),Promise.resolve().then(c.bind(c,74069)),Promise.resolve().then(c.bind(c,73314)),Promise.resolve().then(c.bind(c,2739)),Promise.resolve().then(c.bind(c,47613)),Promise.resolve().then(c.t.bind(c,23318,23))},81281:(a,b,c)=>{"use strict";c.d(b,{DangerCard:()=>j});var d=c(48249),e=c(67484),f=c(19099),g=c(57684),h=c(64034),i=c(52351);function j(){let a=(0,f.useRouter)(),[b,c]=(0,e.useState)(!1),[j,k]=(0,e.useState)(!1);async function l(){c(!0);try{(await fetch("/api/reset",{method:"POST"})).ok&&(k(!0),a.refresh())}finally{c(!1)}}return(0,d.jsxs)(h.Zp,{className:"border-red-500/30",children:[(0,d.jsxs)(h.aR,{children:[(0,d.jsx)(h.ZB,{className:"text-base text-red-400",children:"Danger zone"}),(0,d.jsx)(h.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,d.jsxs)(h.Wu,{className:"flex items-center gap-3",children:[(0,d.jsxs)(i.Lt,{children:[(0,d.jsxs)(i.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:b,children:[(0,d.jsx)(g.A,{className:"size-4"}),b?"Erasing…":"Erase all data"]}),(0,d.jsxs)(i.EO,{children:[(0,d.jsxs)(i.wd,{children:[(0,d.jsx)(i.r7,{children:"Erase all data?"}),(0,d.jsx)(i.$v,{children:"This permanently removes the map, the database, drafts, the code graph and the project summary. This action cannot be undone."})]}),(0,d.jsxs)(i.ck,{children:[(0,d.jsx)(i.Zr,{children:"Cancel"}),(0,d.jsx)(i.Rx,{onClick:l,className:"bg-red-600 text-white hover:bg-red-500",children:"Yes, erase everything"})]})]})]}),j&&(0,d.jsx)("span",{className:"text-xs text-red-300",children:"✓ data erased"})]})]})}},84853:(a,b,c)=>{"use strict";c.d(b,{C5:()=>f,KW:()=>g});var d=c(65573),e=c(6716);async function f(a){if(a&&(0,e.K4)(a))return a;let b=(await (0,d.cookies)()).get(e.Dk)?.value;return b&&(0,e.K4)(b)?b:null}let g=f},86808:(a,b,c)=>{"use strict";c.d(b,{SettingsModal:()=>v});var d=c(48249),e=c(76424),f=c(60388),g=c(74283),h=c(25845),i=c(36902),j=c(64230),k=c(87298),l=c(67484),m=c(19099),n=c(29813),o=c(45535),p=c(79291),q=c(79768),r=c(33191);let s=new Set;function t(a){return s.add(a),()=>{s.delete(a)}}let u=()=>!1;function v({sections:a,intercepted:b}){let c=(0,m.useRouter)(),[s,w]=(0,l.useState)(!0),[x,y]=(0,l.useState)(a[0]?.id),[z,A]=(0,l.useState)(""),B=(0,l.useRef)(null),C=(0,l.useSyncExternalStore)(t,u,()=>!1),D=a.find(a=>a.id===x)??a[0],E=(0,l.useMemo)(()=>{let b=z.trim().toLowerCase(),c=[],d=new Map;for(let e of a)(!b||e.label.toLowerCase().includes(b)||e.group.toLowerCase().includes(b))&&(d.has(e.group)||(d.set(e.group,[]),c.push(e.group)),d.get(e.group).push(e));return c.map(a=>({label:a,items:d.get(a)}))},[a,z]);return b&&C?null:(0,d.jsx)(e.D,{open:s,onOpenChange:a=>{a||(w(!1),b?c.back():c.push((0,q.Fj)("/map",(0,q.fk)())))},children:(0,d.jsxs)(f.Z,{children:[(0,d.jsx)(g.X,{className:(0,r.cn)("fixed inset-0 z-50 bg-black/45 supports-backdrop-filter:backdrop-blur-[3px]","duration-150 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0")}),(0,d.jsxs)(h.h,{initialFocus:B,className:(0,r.cn)("glass fixed left-1/2 top-1/2 z-50 flex -translate-x-1/2 -translate-y-1/2 overflow-hidden rounded-2xl outline-none","h-[min(680px,calc(100vh-80px))] w-[min(1000px,calc(100vw-80px))] max-w-[calc(100vw-24px)] max-h-[calc(100vh-24px)]","flex-col sm:flex-row","duration-150 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-[0.98] data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-[0.98]"),style:{boxShadow:"0 40px 120px -32px var(--glass-shadow), 0 12px 40px -20px var(--glass-shadow), inset 0 1px 0 var(--glass-sheen)"},children:[(0,d.jsxs)("aside",{className:"flex shrink-0 flex-col border-b border-border sm:w-[240px] sm:border-b-0 sm:border-r",children:[(0,d.jsxs)("div",{className:"px-4 pt-4",children:[(0,d.jsxs)("div",{className:"mb-2 flex items-center gap-1.5",children:[(0,d.jsx)(p._,{size:14,className:"text-muted-foreground"}),(0,d.jsx)("span",{className:"text-[12px] font-medium tracking-tight text-muted-foreground",children:"Beacon"})]}),(0,d.jsx)(i.L,{className:"text-[15px] font-semibold tracking-tight",children:"Settings"}),(0,d.jsx)(j.r,{className:"sr-only",children:"Change appearance, agent, integration and project settings."})]}),(0,d.jsx)("div",{className:"px-3 pb-2 pt-3",children:(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsx)(n.A,{"aria-hidden":!0,className:"pointer-events-none absolute left-2.5 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground"}),(0,d.jsx)("input",{ref:B,type:"text",value:z,onChange:a=>A(a.target.value),"aria-label":"Search settings",placeholder:"Search settings",className:(0,r.cn)("h-8 w-full rounded-lg border border-border bg-transparent pl-8 pr-2.5 text-[13px] outline-none transition-colors","placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/40")})]})}),(0,d.jsx)("nav",{"aria-label":"Settings sections",className:"flex gap-1 overflow-x-auto px-3 pb-3 sm:flex-1 sm:flex-col sm:gap-0.5 sm:overflow-x-visible sm:overflow-y-auto",children:0===E.length?(0,d.jsx)("p",{className:"px-1 py-2 text-[12px] text-muted-foreground",children:"No settings match."}):E.map(a=>(0,d.jsxs)("div",{className:"shrink-0 sm:mt-3 sm:first:mt-1",children:[(0,d.jsx)("p",{className:"hidden px-2 pb-1 text-[10px] font-semibold uppercase tracking-[0.08em] text-muted-foreground/70 sm:block",children:a.label}),(0,d.jsx)("div",{className:"flex gap-1 sm:flex-col sm:gap-0.5",children:a.items.map(a=>{let b=a.id===x;return(0,d.jsxs)("button",{type:"button","aria-current":b?"page":void 0,onClick:()=>y(a.id),className:(0,r.cn)("group flex shrink-0 items-center gap-2 rounded-lg px-2.5 py-1.5 text-left text-[13px] font-medium transition-colors sm:w-full",b?"bg-[var(--ink-active)] text-foreground":"text-muted-foreground hover:bg-[var(--ink-hover)] hover:text-foreground"),children:[a.icon&&(0,d.jsx)("span",{"aria-hidden":!0,className:(0,r.cn)("shrink-0 transition-colors",b?"text-[var(--accent-2,#ff7a45)]":"text-muted-foreground group-hover:text-foreground"),children:a.icon}),a.label]},a.id)})})]},a.label))})]}),(0,d.jsxs)("div",{className:"relative min-w-0 flex-1 overflow-y-auto",children:[(0,d.jsx)(k.H,{"aria-label":"Close settings",className:(0,r.cn)("absolute right-3 top-3 z-10 flex size-7 items-center justify-center rounded-lg text-muted-foreground transition-colors","hover:bg-[var(--ink-hover)] hover:text-foreground focus-visible:ring-[3px] focus-visible:ring-ring/40 focus-visible:outline-none"),children:(0,d.jsx)(o.A,{className:"size-4"})}),(0,d.jsx)("div",{className:"space-y-4 px-5 py-6 sm:px-7 sm:py-7",children:D?.content})]})]})]})})}},95151:(a,b,c)=>{"use strict";c.d(b,{PermissionModeCard:()=>j});var d=c(48249),e=c(67484),f=c(48581),g=c(64034),h=c(55056),i=c(56922);function j(){let[a,b]=(0,e.useState)("default"),[c,j]=(0,e.useState)(!1);async function k(a){b(a),j(!1),await fetch("/api/preferences",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({planApprovalMode:a})}).catch(()=>{}),j(!0)}let l=i.pC.find(b=>b.value===a);return(0,d.jsxs)(g.Zp,{children:[(0,d.jsxs)(g.aR,{children:[(0,d.jsxs)(g.ZB,{className:"flex items-center gap-2 text-base",children:[(0,d.jsx)(f.A,{className:"size-4 text-emerald-400"}),"Permission mode after approval"]}),(0,d.jsx)(g.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,d.jsxs)(g.Wu,{className:"flex items-center gap-3",children:[(0,d.jsxs)(h.l6,{value:a,onValueChange:a=>a&&void k(a),children:[(0,d.jsx)(h.bq,{className:"h-9 w-64",children:(0,d.jsx)(h.yv,{})}),(0,d.jsx)(h.gC,{children:i.pC.map(a=>(0,d.jsx)(h.eb,{value:a.value,children:a.label},a.value))})]}),l&&(0,d.jsx)("span",{className:"text-xs text-muted-foreground",children:l.description}),c&&(0,d.jsx)("span",{className:"text-xs text-emerald-300",children:"✓ saved"})]})]})}},96487:()=>{},98167:(a,b,c)=>{"use strict";c.d(b,{DeleteWorkspaceCard:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call DeleteWorkspaceCard() from the server but DeleteWorkspaceCard is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/beacon/beacon/components/delete-workspace-card.tsx","DeleteWorkspaceCard")}};
@@ -0,0 +1 @@
1
+ exports.id=5509,exports.ids=[5509],exports.modules={5547:(a,b,c)=>{"use strict";c.d(b,{NotesDrawer:()=>B});var d=c(48249),e=c(67484),f=c(92361),g=c(69473),h=c(45535),i=c(39470),j=c(52066),k=c(57684),l=c(48779),m=c(13191),n=c(18252),o=c(92329),p=c(82359),q=c(99086),r=c(18201),s=c(81965),t=c(47161),u=c(86596),v=c(84458);function w({value:a,onChange:b}){let c=(0,m.hG)({extensions:u.II,content:a?(0,u.Gd)(a):void 0,immediatelyRender:!1,editorProps:{attributes:{class:"note-prose focus:outline-none"}},onUpdate:({editor:a})=>b((0,u.Z2)(a.getJSON()))});return c?(0,d.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col",children:[(0,d.jsx)(x,{editor:c}),(0,d.jsx)(m.$Z,{editor:c,className:"min-h-0 flex-1 overflow-y-auto px-1 py-2 text-[14px] leading-relaxed"})]}):null}function x({editor:a}){(0,v.U)(a);let b=()=>a.chain().focus();return(0,d.jsxs)("div",{className:"flex items-center gap-0.5 border-b border-border pb-2",children:[(0,d.jsx)(v.I,{label:"Bold",active:a.isActive("bold"),onClick:()=>b().toggleBold().run(),children:(0,d.jsx)(n.A,{className:"size-4"})}),(0,d.jsx)(v.I,{label:"Italic",active:a.isActive("italic"),onClick:()=>b().toggleItalic().run(),children:(0,d.jsx)(o.A,{className:"size-4"})}),(0,d.jsx)(v.I,{label:"Underline",active:a.isActive("underline"),onClick:()=>b().toggleUnderline().run(),children:(0,d.jsx)(p.A,{className:"size-4"})}),(0,d.jsx)(v.I,{label:"Strikethrough",active:a.isActive("strike"),onClick:()=>b().toggleStrike().run(),children:(0,d.jsx)(q.A,{className:"size-4"})}),(0,d.jsx)("span",{"aria-hidden":!0,className:"mx-1 h-5 w-px bg-border"}),(0,d.jsx)(v.I,{label:"Checklist",active:a.isActive("taskList"),onClick:()=>b().toggleTaskList().run(),children:(0,d.jsx)(r.A,{className:"size-4"})}),(0,d.jsx)(v.I,{label:"Bullet list",active:a.isActive("bulletList"),onClick:()=>b().toggleBulletList().run(),children:(0,d.jsx)(s.A,{className:"size-4"})}),(0,d.jsx)(v.I,{label:"Numbered list",active:a.isActive("orderedList"),onClick:()=>b().toggleOrderedList().run(),children:(0,d.jsx)(t.A,{className:"size-4"})})]})}var y=c(69370),z=c(33191);function A(a){return[...a].sort((a,b)=>a.pinned!==b.pinned?Number(b.pinned)-Number(a.pinned):b.updatedAt.localeCompare(a.updatedAt))}function B(){let{open:a,close:b}=(0,y.b)(),[c,m]=(0,e.useState)([]),[n,o]=(0,e.useState)(null),p=(0,e.useRef)({}),q=(0,e.useRef)({}),r=(0,e.useCallback)(a=>{clearTimeout(p.current[a]);let b=q.current[a];b&&(delete q.current[a],fetch(`/api/notes/${a}`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(b)}).catch(()=>{}))},[]),s=(0,e.useCallback)((a,b)=>{q.current[a]={...q.current[a],...b},clearTimeout(p.current[a]),p.current[a]=setTimeout(()=>r(a),500)},[r]);(0,e.useCallback)(async()=>{try{let a=await fetch("/api/notes",{cache:"no-store"});if(!a.ok)return;let b=await a.json();m(A(b)),o(a=>a??b[0]?.id??null)}catch{}},[]);let t=(0,e.useCallback)(async()=>{let a=await fetch("/api/notes",{method:"POST"}).catch(()=>null);if(!a?.ok)return;let b=await a.json();m(a=>A([b,...a])),o(b.id)},[]),u=(0,e.useCallback)(async a=>{clearTimeout(p.current[a]),delete q.current[a],m(b=>{let c=b.filter(b=>b.id!==a);return o(b=>b===a?c[0]?.id??null:b),c}),await fetch(`/api/notes/${a}`,{method:"DELETE"}).catch(()=>{})},[]),v=(0,e.useCallback)((a,b)=>{m(c=>A(c.map(c=>c.id===a?{...c,...b,updatedAt:new Date().toISOString()}:c))),s(a,b)},[s]),x=(0,e.useCallback)(a=>v(a.id,{pinned:!a.pinned}),[v]),B=c.find(a=>a.id===n)??null;return(0,d.jsx)("div",{"aria-hidden":!a,className:(0,z.cn)("fixed inset-y-0 right-0 z-40 flex transition-transform duration-300 ease-out",a?"translate-x-0":"pointer-events-none translate-x-full"),children:(0,d.jsxs)(l.b,{className:"flex h-full w-[420px] flex-col rounded-l-2xl border-l border-border",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 border-b border-border px-3 py-2.5",children:[(0,d.jsx)(f.A,{className:"size-4 text-[var(--accent-2,#ff7a45)]"}),(0,d.jsx)("span",{className:"text-sm font-semibold tracking-tight",children:"Notes"}),(0,d.jsx)("span",{className:"ml-auto"}),(0,d.jsx)("button",{type:"button",onClick:t,"aria-label":"New note",title:"New note",className:"rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-[var(--ink-hover)] hover:text-foreground",children:(0,d.jsx)(g.A,{className:"size-4"})}),(0,d.jsx)("button",{type:"button",onClick:b,"aria-label":"Close notes",title:"Close",className:"rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-[var(--ink-hover)] hover:text-foreground",children:(0,d.jsx)(h.A,{className:"size-4"})})]}),(0,d.jsx)("div",{className:"max-h-44 shrink-0 overflow-y-auto border-b border-border p-1.5",children:0===c.length?(0,d.jsxs)("p",{className:"px-2 py-3 text-[13px] text-muted-foreground",children:["No notes yet. Hit ",(0,d.jsx)("span",{className:"text-foreground",children:"+"})," to start one."]}):c.map(a=>(0,d.jsxs)("div",{className:(0,z.cn)("group flex items-center gap-1 rounded-md px-2 py-1.5 text-[13px]",a.id===n?"bg-[var(--ink-active)] text-foreground":"text-muted-foreground hover:bg-[var(--ink-hover)]"),children:[(0,d.jsxs)("button",{type:"button",onClick:()=>o(a.id),className:"min-w-0 flex-1 truncate text-left",children:[a.pinned&&(0,d.jsx)(i.A,{className:"mr-1 inline size-3 -translate-y-px"}),a.title||"Untitled"]}),(0,d.jsx)("button",{type:"button",onClick:()=>x(a),"aria-label":a.pinned?"Unpin":"Pin",title:a.pinned?"Unpin":"Pin",className:"rounded p-1 opacity-0 transition hover:bg-[var(--ink-hover)] hover:text-foreground group-hover:opacity-100",children:a.pinned?(0,d.jsx)(j.A,{className:"size-3.5"}):(0,d.jsx)(i.A,{className:"size-3.5"})}),(0,d.jsx)("button",{type:"button",onClick:()=>u(a.id),"aria-label":"Delete note",title:"Delete",className:"rounded p-1 opacity-0 transition hover:bg-[var(--ink-hover)] hover:text-red-300 group-hover:opacity-100",children:(0,d.jsx)(k.A,{className:"size-3.5"})})]},a.id))}),B?(0,d.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col gap-2 p-3",children:[(0,d.jsx)("input",{value:B.title,onChange:a=>v(B.id,{title:a.target.value}),placeholder:"Untitled",className:"w-full bg-transparent text-base font-semibold tracking-tight text-foreground placeholder:text-muted-foreground/60 focus:outline-none"}),(0,d.jsx)(w,{value:B.body,onChange:a=>v(B.id,{body:a})},B.id)]}):(0,d.jsxs)("div",{className:"flex flex-1 items-center justify-center p-6 text-center text-[13px] text-muted-foreground",children:["Select a note, or create one. Then ",(0,d.jsx)("span",{className:"px-1 text-foreground",children:"@"}),"-mention it in your terminal to turn it into features."]})]})})}},7572:(a,b,c)=>{"use strict";c.d(b,{MainRegion:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call MainRegion() from the server but MainRegion is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/beacon/beacon/components/ai/main-region.tsx","MainRegion")},7667:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>e});var d=c(88868);let e=async a=>[{type:"image/png",sizes:"180x180",url:(0,d.fillMetadataSegment)(".",await a.params,"apple-icon.png",!0)+"?f9d64651576bd776"}]},17017:(a,b,c)=>{"use strict";c.d(b,{UpdateBanner:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call UpdateBanner() from the server but UpdateBanner is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/beacon/beacon/components/update-banner.tsx","UpdateBanner")},18060:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,81921,23)),Promise.resolve().then(c.t.bind(c,60440,23)),Promise.resolve().then(c.t.bind(c,84342,23)),Promise.resolve().then(c.t.bind(c,82265,23)),Promise.resolve().then(c.t.bind(c,35421,23)),Promise.resolve().then(c.t.bind(c,61335,23)),Promise.resolve().then(c.t.bind(c,70664,23)),Promise.resolve().then(c.bind(c,74661))},18718:(a,b,c)=>{"use strict";c.d(b,{MainRegion:()=>e});var d=c(48249);function e({children:a}){return(0,d.jsx)("main",{className:"flex flex-1 flex-col",children:a})}},19208:(a,b,c)=>{"use strict";c.d(b,{TabWorkspace:()=>e}),c(67484);var d=c(19099);function e(){return(0,d.useRouter)(),(0,d.usePathname)(),null}c(79768)},25126:(a,b,c)=>{"use strict";c.d(b,{TabWorkspace:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call TabWorkspace() from the server but TabWorkspace is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/beacon/beacon/components/tab-workspace.tsx","TabWorkspace")},26284:(a,b,c)=>{"use strict";c.d(b,{$:()=>i});var d=c(48249),e=c(70813),f=c(21654),g=c(33191);let h=(0,f.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 i({className:a,variant:b="default",size:c="default",...f}){return(0,d.jsx)(e.Button,{"data-slot":"button",className:(0,g.cn)(h({variant:b,size:c,className:a})),...f})}},29086:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,81921,23))},30818:(a,b,c)=>{"use strict";c.d(b,{NotesDrawer:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call NotesDrawer() from the server but NotesDrawer is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/beacon/beacon/components/notes/notes-drawer.tsx","NotesDrawer")},31212:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,95547,23)),Promise.resolve().then(c.t.bind(c,15098,23)),Promise.resolve().then(c.t.bind(c,47644,23)),Promise.resolve().then(c.t.bind(c,33859,23)),Promise.resolve().then(c.t.bind(c,98099,23)),Promise.resolve().then(c.t.bind(c,16237,23)),Promise.resolve().then(c.t.bind(c,98562,23)),Promise.resolve().then(c.t.bind(c,36675,23))},33191:(a,b,c)=>{"use strict";c.d(b,{cn:()=>f});var d=c(99314),e=c(96862);function f(...a){return(0,e.QP)((0,d.$)(a))}},33734:(a,b,c)=>{"use strict";c.d(b,{C3:()=>i,Fc:()=>j,Gq:()=>e,O4:()=>h,S1:()=>l,SS:()=>f,Yl:()=>k,k4:()=>d,mn:()=>g});let d="beacon-theme",e="beacon-surface",f="dark",g="glass";function h(){try{var a;return a=localStorage.getItem(d),"light"===a||"dark"===a||"auto"===a?a:f}catch{return f}}function i(){try{var a;return a=localStorage.getItem(e),"glass"===a||"tinted"===a||"solid"===a?a:g}catch{return g}}function j(a,b){if("u"<typeof document)return;let c=document.documentElement,d="auto"!==a&&"dark"===a;c.dataset.theme=d?"dark":"light",c.classList.toggle("dark",d),c.dataset.surface=b}function k(a){try{localStorage.setItem(d,a)}catch{}j(a,i())}function l(a){try{localStorage.setItem(e,a)}catch{}j(h(),a)}},33814:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,95547,23))},41164:(a,b,c)=>{"use strict";c.d(b,{TopNav:()=>r});var d=c(48249),e=c(67484),f=c(2116),g=c.n(f),h=c(19099),i=c(92361),j=c(79291),k=c(85271),l=c(55056),m=c(33191),n=c(79768);function o({fallback:a}){let[b,c]=(0,e.useState)([]),[f,g]=(0,e.useState)(null);if(0===b.length)return a?(0,d.jsxs)("span",{className:"font-mono text-xs text-muted-foreground",children:["\xb7 ",a]}):null;async function h(a){g(a),(0,n.aE)(a),await Promise.race([fetch("/api/workspace",{method:"POST",headers:{"content-type":"application/json","x-beacon-workspace":a},body:JSON.stringify({id:a}),signal:AbortSignal.timeout(8e3)}).catch(()=>{}),new Promise(a=>setTimeout(a,2500))]);let b=new URLSearchParams(window.location.search);b.set("ws",a),window.location.href=`${window.location.pathname}?${b.toString()}`}let i=b.find(a=>a.id===f);return(0,d.jsxs)(l.l6,{value:f??"",onValueChange:a=>a&&h(a),children:[(0,d.jsxs)(l.bq,{"data-ws-switcher":"",title:i?.name,className:"h-7 max-w-[180px] gap-1.5 rounded-lg border-border bg-[var(--ink-hover)] px-2 text-xs font-medium transition-colors hover:bg-[var(--ink-active)]",children:[(0,d.jsx)(k.A,{className:"size-3.5 shrink-0 text-muted-foreground"}),(0,d.jsx)(l.yv,{children:()=>i?.name??"Project"})]}),(0,d.jsxs)(l.gC,{align:"start",alignItemWithTrigger:!1,sideOffset:6,className:"min-w-[250px] border border-border bg-popover/95 p-1.5 backdrop-blur-xl",children:[(0,d.jsx)("p",{className:"px-2 pt-1 pb-1.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground/70",children:"Workspace"}),b.map(a=>{var b,c;let e,g=a.id===f;return(0,d.jsx)(l.eb,{value:a.id,className:(0,m.cn)("gap-2.5 rounded-lg py-1.5 pr-8 pl-1.5 transition-colors",g&&"bg-[var(--ink-active)]"),children:(0,d.jsxs)("span",{className:"flex items-center gap-2.5",children:[(0,d.jsx)("span",{className:(0,m.cn)("flex size-7 shrink-0 items-center justify-center rounded-md border",g?"border-sky-400/30 bg-sky-400/10 text-sky-300":"border-border bg-[var(--ink-hover)] text-muted-foreground"),children:(0,d.jsx)(k.A,{className:"size-3.5"})}),(0,d.jsxs)("span",{className:"flex min-w-0 flex-col",children:[(0,d.jsx)("span",{className:"truncate text-[13px] font-medium leading-tight text-foreground",children:a.name}),(0,d.jsx)("span",{className:"truncate font-mono text-[10px] leading-tight text-muted-foreground",children:(b=a.path,c=a.name,(e=b.replace(/^\/(Users|home)\/[^/]+/,"~").split("/").filter(Boolean))[e.length-1]===c&&e.pop(),(e.length>3?[e[0],"…",e[e.length-1]]:e).join("/")||"~")})]})]})},a.id)})]})]})}var p=c(69370);let q=[{href:"/plan",label:"Plans"},{href:"/map",label:"Map"},{href:"/learn",label:"Learn"},{href:"/settings",label:"Settings"}];function r({repo:a}){let b=(0,h.usePathname)(),{toggle:c,open:f}=(0,p.b)(),[k,l]=(0,e.useState)(null);return(0,d.jsx)("header",{"data-app-nav":!0,className:"pointer-events-none fixed left-3 top-3 z-30",children:(0,d.jsx)("div",{className:"glass pointer-events-auto flex h-10 items-center gap-1 rounded-full pl-3 pr-1.5",children:(0,d.jsxs)("div",{className:"flex items-center gap-1",children:[(0,d.jsxs)(g(),{href:"/",className:"mr-1 flex items-center gap-2 text-sm font-semibold tracking-tight",children:[(0,d.jsx)(j._,{size:18,className:"text-foreground"}),(0,d.jsx)("span",{className:"hidden lg:inline",children:"Beacon"})]}),(0,d.jsx)("span",{"aria-hidden":!0,className:"mx-1 h-5 w-px bg-border"}),(0,d.jsx)(o,{fallback:a}),(0,d.jsx)("span",{"aria-hidden":!0,className:"mx-1 h-5 w-px bg-border"}),(0,d.jsx)("nav",{className:"flex items-center gap-0.5 text-sm",children:q.map(a=>{let c=b===a.href||b.startsWith(a.href+"/");return(0,d.jsx)(g(),{href:(0,n.Fj)(a.href,k),className:(0,m.cn)("rounded-full px-3 py-1 text-[13px] tracking-tight transition-colors",c?"bg-[var(--ink-active)] text-foreground shadow-[inset_0_1px_0_rgba(255,255,255,0.06)]":"text-muted-foreground hover:bg-[var(--ink-hover)] hover:text-foreground"),children:a.label},a.href)})}),(0,d.jsx)("span",{"aria-hidden":!0,className:"mx-1 h-5 w-px bg-border"}),(0,d.jsx)("button",{type:"button",onClick:c,"aria-pressed":f,"aria-label":"Notes",title:"Notes",className:(0,m.cn)("flex items-center justify-center rounded-full p-1.5 transition-colors",f?"bg-[var(--ink-active)] text-foreground shadow-[inset_0_1px_0_rgba(255,255,255,0.06)]":"text-muted-foreground hover:bg-[var(--ink-hover)] hover:text-foreground"),children:(0,d.jsx)(i.A,{className:"size-4"})})]})})})}},41616:(a,b,c)=>{"use strict";c.d(b,{PlanBar:()=>l});var d=c(48249),e=c(2116),f=c.n(e),g=c(19099),h=c(47352),i=c(49783),j=c(57684),k=c(81166);function l(){let{status:a,discard:b}=(0,k.j)(),c=(0,g.usePathname)();return a.pending&&"/plan"!==c?(0,d.jsx)("div",{className:"pointer-events-none fixed inset-x-0 top-14 z-40 flex justify-center px-2",children:(0,d.jsxs)("div",{className:"pointer-events-auto flex max-w-3xl items-center gap-2 rounded-xl border border-emerald-500/30 bg-card/85 px-3 py-1.5 shadow-lg backdrop-blur supports-[backdrop-filter]:bg-card/70",children:[(0,d.jsx)(h.A,{className:"size-3.5 shrink-0 text-emerald-300"}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"truncate text-[12px] leading-tight text-foreground",children:[(0,d.jsx)("span",{className:"text-emerald-300/80",children:"Plan ready \xb7 "}),a.description||"(no description)"]}),(0,d.jsxs)("div",{className:"text-[10px] leading-tight text-muted-foreground",children:[a.features," feature(s) \xb7 ",a.tables," table(s) \xb7 ",a.endpoints," ","endpoint(s)"]})]}),(0,d.jsxs)(f(),{href:"/plan",className:"flex shrink-0 items-center gap-1 rounded-md border border-emerald-500/40 bg-emerald-500/15 px-2 py-1 text-[11px] font-semibold text-emerald-300 transition-colors hover:bg-emerald-500/25",title:"Open Plannotator + canvases side by side",children:[(0,d.jsx)(i.A,{className:"size-3"})," Open plan"]}),(0,d.jsxs)("button",{onClick:b,className:"flex shrink-0 items-center gap-1 rounded-md px-2 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,d.jsx)(j.A,{className:"size-3"})," Discard"]})]})}):null}},42462:(a,b,c)=>{"use strict";c.d(b,{AskModal:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call AskModal() from the server but AskModal is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/beacon/beacon/components/ask/ask-modal.tsx","AskModal")},47194:(a,b,c)=>{"use strict";c.d(b,{LiveRefresh:()=>e}),c(67484);var d=c(19099);function e(){return(0,d.useRouter)(),null}c(79768)},48136:(a,b,c)=>{"use strict";c.d(b,{PlanProvider:()=>e});var d=c(77943);let e=(0,d.registerClientReference)(function(){throw Error("Attempted to call PlanProvider() from the server but PlanProvider is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/beacon/beacon/components/plan/plan-context.tsx","PlanProvider");(0,d.registerClientReference)(function(){throw Error("Attempted to call usePlan() from the server but usePlan is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/beacon/beacon/components/plan/plan-context.tsx","usePlan")},48779:(a,b,c)=>{"use strict";c.d(b,{b:()=>f});var d=c(48249);c(67484);var e=c(33191);function f({className:a,children:b,...c}){return(0,d.jsxs)("div",{className:(0,e.cn)("glass relative isolate overflow-hidden",a),...c,children:[(0,d.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,d.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"}}),b]})}},48936:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>z,metadata:()=>y});var d=c(5735),e=c(1382),f=c.n(e),g=c(28205),h=c.n(g);c(82704);var i=c(77946),j=c(60867),k=c(25126),l=c(7572),m=c(48136),n=c(81974),o=c(71412),p=c(30818),q=c(42462),r=c(17017),s=c(45301),t=c(73024),u=c(76760);let v=null,w=`(function(){try{var d=document.documentElement,t=localStorage.getItem(${JSON.stringify("beacon-theme")})||${JSON.stringify("dark")},s=localStorage.getItem(${JSON.stringify("beacon-surface")})||${JSON.stringify("glass")},m=t==='dark'||(t==='auto'&&window.matchMedia('(prefers-color-scheme:dark)').matches);d.dataset.theme=m?'dark':'light';d.classList.toggle('dark',m);d.dataset.surface=s;}catch(e){}})();`;var x=c(80507);let y={title:"Beacon",description:"A local control panel for the repository you're working in"};function z({children:a,modal:b}){return(0,d.jsx)("html",{lang:"en",suppressHydrationWarning:!0,"data-theme":"dark","data-surface":"glass",className:`dark ${f().variable} ${h().variable} h-full antialiased`,children:(0,d.jsxs)("body",{className:"min-h-full flex flex-col bg-background text-foreground",children:[(0,d.jsx)("script",{dangerouslySetInnerHTML:{__html:w}}),"1"===process.env.BEACON_PUBLIC||"1"===process.env.VERCEL?a:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(x.AppearanceSync,{}),(0,d.jsx)(j.LiveRefresh,{}),(0,d.jsx)(k.TabWorkspace,{}),(0,d.jsxs)(o.NotesProvider,{children:[(0,d.jsxs)(m.PlanProvider,{children:[(0,d.jsx)(i.TopNav,{repo:(0,s.Qq)()}),(0,d.jsx)(l.MainRegion,{children:a}),b,(0,d.jsx)(n.PlanBar,{})]}),(0,d.jsx)(p.NotesDrawer,{})]}),(0,d.jsx)(q.AskModal,{}),(0,d.jsx)(r.UpdateBanner,{currentVersion:function(){if(null!==v)return v;let a="0.0.0";try{let b=JSON.parse((0,t.readFileSync)((0,u.join)(process.cwd(),"package.json"),"utf8"));"string"==typeof b.version&&(a=b.version)}catch{}return v=a,a}()})]})]})})}},49183:(a,b,c)=>{"use strict";c.d(b,{EO:()=>f,kw:()=>d});let d="https://registry.npmjs.org/trybeacon/latest",e=(process.env.NEXT_PUBLIC_BEACON_SITE_URL??"https://www.trybeacon.sh").replace(/\/$/,""),f=`curl -fsSL ${e}/install.sh | sh`},53267:(a,b,c)=>{Promise.resolve().then(c.bind(c,7572)),Promise.resolve().then(c.bind(c,42462)),Promise.resolve().then(c.bind(c,60867)),Promise.resolve().then(c.bind(c,71412)),Promise.resolve().then(c.bind(c,30818)),Promise.resolve().then(c.bind(c,81974)),Promise.resolve().then(c.bind(c,48136)),Promise.resolve().then(c.bind(c,25126)),Promise.resolve().then(c.bind(c,80507)),Promise.resolve().then(c.bind(c,77946)),Promise.resolve().then(c.bind(c,17017))},55056:(a,b,c)=>{"use strict";c.d(b,{bq:()=>x,eb:()=>z,gC:()=>y,l6:()=>v,yv:()=>w});var d=c(48249);c(67484);var e=c(80336),f=c(11102),g=c(57602),h=c(90586),i=c(13810),j=c(58103),k=c(28879),l=c(90204),m=c(26550),n=c(57859),o=c(56045),p=c(75154),q=c(91464),r=c(33191),s=c(69627),t=c(35471),u=c(85448);let v=e.H;function w({className:a,...b}){return(0,d.jsx)(f.y,{"data-slot":"select-value",className:(0,r.cn)("flex flex-1 text-left",a),...b})}function x({className:a,size:b="default",children:c,...e}){return(0,d.jsxs)(g.b,{"data-slot":"select-trigger","data-size":b,className:(0,r.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",a),...e,children:[c,(0,d.jsx)(h.w,{render:(0,d.jsx)(s.A,{className:"pointer-events-none size-4 text-muted-foreground"})})]})}function y({className:a,children:b,side:c="bottom",sideOffset:e=4,align:f="center",alignOffset:g=0,alignItemWithTrigger:h=!0,...m}){return(0,d.jsx)(i.V,{children:(0,d.jsx)(j.l,{side:c,sideOffset:e,align:f,alignOffset:g,alignItemWithTrigger:h,className:"isolate z-50",children:(0,d.jsxs)(k.t,{"data-slot":"select-content","data-align-trigger":h,className:(0,r.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",a),...m,children:[(0,d.jsx)(A,{}),(0,d.jsx)(l.B,{children:b}),(0,d.jsx)(B,{})]})})})}function z({className:a,children:b,...c}){return(0,d.jsxs)(m.e,{"data-slot":"select-item",className:(0,r.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",a),...c,children:[(0,d.jsx)(n.h,{className:"flex flex-1 shrink-0 gap-2 whitespace-nowrap",children:b}),(0,d.jsx)(o.h,{render:(0,d.jsx)("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center"}),children:(0,d.jsx)(t.A,{className:"pointer-events-none"})})]})}function A({className:a,...b}){return(0,d.jsx)(p.w,{"data-slot":"select-scroll-up-button",className:(0,r.cn)("top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",a),...b,children:(0,d.jsx)(u.A,{})})}function B({className:a,...b}){return(0,d.jsx)(q.d,{"data-slot":"select-scroll-down-button",className:(0,r.cn)("bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",a),...b,children:(0,d.jsx)(s.A,{})})}},59953:(a,b,c)=>{"use strict";c.d(b,{UpdateBanner:()=>k});var d=c(48249),e=c(67484),f=c(95417),g=c(45535),h=c(35471),i=c(20878),j=c(49183);function k({currentVersion:a}){let[b,c]=(0,e.useState)(null),[l,m]=(0,e.useState)(!1);if(!b)return null;let n=async()=>{try{await navigator.clipboard?.writeText(j.EO),m(!0),setTimeout(()=>m(!1),1600)}catch{}};return(0,d.jsx)("div",{className:"pointer-events-none fixed bottom-4 right-4 z-50 flex justify-end",children:(0,d.jsx)("div",{className:"glass pointer-events-auto w-[320px] rounded-xl p-3.5 shadow-xl",children:(0,d.jsxs)("div",{className:"flex items-start gap-2.5",children:[(0,d.jsx)(f.A,{className:"mt-0.5 size-4 shrink-0 text-[#ff7a45]"}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,d.jsx)("p",{className:"text-[13px] font-semibold tracking-tight text-foreground",children:"New version available"}),(0,d.jsx)("button",{type:"button",onClick:()=>{try{localStorage.setItem("beacon:update-dismissed",b)}catch{}c(null)},"aria-label":"Dismiss",className:"shrink-0 rounded-md p-0.5 text-muted-foreground transition-colors hover:bg-[var(--ink-hover)] hover:text-foreground",children:(0,d.jsx)(g.A,{className:"size-3.5"})})]}),(0,d.jsxs)("p",{className:"mt-0.5 text-[11px] text-muted-foreground",children:[a," →"," ",(0,d.jsx)("span",{className:"text-foreground",children:b.replace(/^v/i,"")})," \xb7 update Beacon"]}),(0,d.jsxs)("button",{type:"button",onClick:n,title:"Copy the update command",className:"mt-2.5 flex w-full items-center justify-between gap-2 rounded-lg border border-border bg-black/30 px-2.5 py-1.5 text-left font-mono text-[11px] text-muted-foreground transition-colors hover:border-border hover:text-foreground",children:[(0,d.jsx)("span",{className:"truncate",children:j.EO}),l?(0,d.jsx)(h.A,{className:"size-3.5 shrink-0 text-[#ff7a45]"}):(0,d.jsx)(i.A,{className:"size-3.5 shrink-0"})]})]})]})})})}},60867:(a,b,c)=>{"use strict";c.d(b,{LiveRefresh:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call LiveRefresh() from the server but LiveRefresh is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/beacon/beacon/components/live-refresh.tsx","LiveRefresh")},61837:(a,b,c)=>{"use strict";function d(){return null}function e(){return null}function f(a){let b=new URLSearchParams,c=d();c&&b.set("ws",c);let f=e();for(let[c,d]of(f&&b.set("plan",f),Object.entries(a??{})))""===d?b.delete(c):b.set(c,d);let g=b.toString();return g?`/plan?${g}`:"/plan"}c.d(b,{X0:()=>d,d8:()=>e,rc:()=>f})},69370:(a,b,c)=>{"use strict";c.d(b,{NotesProvider:()=>g,b:()=>h});var d=c(48249),e=c(67484);let f=(0,e.createContext)(null);function g({children:a}){let[b,c]=(0,e.useState)(!1),h=(0,e.useCallback)(()=>c(!0),[]),i=(0,e.useCallback)(()=>c(!1),[]),j=(0,e.useCallback)(()=>c(a=>!a),[]),k=(0,e.useMemo)(()=>({open:b,openDrawer:h,close:i,toggle:j}),[b,h,i,j]);return(0,d.jsx)(f.Provider,{value:k,children:a})}function h(){let a=(0,e.useContext)(f);if(!a)throw Error("useNotes must be used inside NotesProvider");return a}},71412:(a,b,c)=>{"use strict";c.d(b,{NotesProvider:()=>e});var d=c(77943);let e=(0,d.registerClientReference)(function(){throw Error("Attempted to call NotesProvider() from the server but NotesProvider is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/beacon/beacon/components/notes/notes-context.tsx","NotesProvider");(0,d.registerClientReference)(function(){throw Error("Attempted to call useNotes() from the server but useNotes is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/beacon/beacon/components/notes/notes-context.tsx","useNotes")},74619:(a,b,c)=>{"use strict";c.d(b,{$w:()=>g,eo:()=>k,tw:()=>l});var d=c(32891),e=c(54730);let f="beacon://";function g(a){if(!a.startsWith(f))return null;let b=a.slice(f.length),c=b.indexOf("/");return c<0?null:{kind:b.slice(0,c),ref:b.slice(c+1)}}let h={kind:{default:null,parseHTML:a=>a.getAttribute("data-kind"),renderHTML:a=>a.kind?{"data-kind":a.kind}:{}},ref:{default:null,parseHTML:a=>a.getAttribute("data-ref"),renderHTML:a=>a.ref?{"data-ref":a.ref}:{}},label:{default:null,parseHTML:a=>a.getAttribute("data-label")??a.textContent?.replace(/^@/,""),renderHTML:a=>a.label?{"data-label":a.label}:{}}},i=()=>[{tag:"span[data-mention]"}],j=({node:a,HTMLAttributes:b})=>["span",(0,d.KV)({"data-mention":"",class:"beacon-mention"},b),`@${a.attrs.label??""}`],k=d.bP.create({name:"mention",group:"inline",inline:!0,atom:!0,addAttributes:()=>h,parseHTML:i,renderHTML:j,renderMarkdown:a=>{var b,c,d;let e=a.attrs??{};return b=e.kind??"feature",c=e.ref??"",d=e.label??"",`[@${d}](${f}${b}/${c})`}}),l=e.P.extend({name:"mention",addAttributes:()=>h,parseHTML:i,renderHTML:j})},77946:(a,b,c)=>{"use strict";c.d(b,{TopNav:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call TopNav() from the server but TopNav is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/beacon/beacon/components/top-nav.tsx","TopNav")},79291:(a,b,c)=>{"use strict";c.d(b,{_:()=>e});var d=c(48249);function e({size:a=18,className:b}){return(0,d.jsxs)("svg",{width:a,height:a,viewBox:"20 22 56 56",fill:"none",className:b,"aria-hidden":"true",children:[(0,d.jsx)("path",{d:"M48 33 L72.5 73 L23.5 73 Z",fill:"none",stroke:"var(--accent-2, #ff7a45)",strokeWidth:7,strokeLinejoin:"round",strokeLinecap:"round"}),(0,d.jsx)("circle",{cx:"48",cy:"29.5",r:"7",fill:"var(--accent-2, #ff7a45)"})]})}},79768:(a,b,c)=>{"use strict";c.d(b,{Bz:()=>d,Fj:()=>h,aE:()=>f,dh:()=>g,fk:()=>e,q0:()=>i});let d="beacon:tab-ws";function e(){return null}function f(a){try{sessionStorage.setItem(d,a)}catch{}}function g(a){return a?{"x-beacon-workspace":a}:{}}function h(a,b,c){let d=new URLSearchParams;for(let[a,e]of(b&&d.set("ws",b),Object.entries(c??{})))d.set(a,e);let e=d.toString();return e?`${a}?${e}`:a}function i(a,b){if(a.startsWith("/api/"))return!0;try{let c=new URL(a,b);return c.origin===b&&c.pathname.startsWith("/api/")}catch{return!1}}},80507:(a,b,c)=>{"use strict";c.d(b,{AppearanceSync:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call AppearanceSync() from the server but AppearanceSync is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/beacon/beacon/components/theme/appearance-sync.tsx","AppearanceSync")},80765:(a,b,c)=>{"use strict";function d(){return null}c.d(b,{AppearanceSync:()=>d}),c(67484),c(33734)},81166:(a,b,c)=>{"use strict";c.d(b,{PlanProvider:()=>k,j:()=>l});var d=c(48249),e=c(67484),f=c(19099),g=c(79768),h=c(61837);let i={pending:!1,proposedAt:0,tables:0,endpoints:0,features:0},j=(0,e.createContext)(null);function k({children:a}){let b=(0,f.useRouter)(),[c,l]=(0,e.useState)(i),m=(0,e.useCallback)(async()=>{try{let a=await fetch("/api/plan",{method:"GET",cache:"no-store",headers:(0,g.dh)((0,h.X0)())});if(!a.ok)return;let b=await a.json();l(b)}catch{}},[]),n=(0,e.useCallback)(async()=>{await fetch("/api/plan",{method:"DELETE",headers:(0,g.dh)((0,h.X0)())}).catch(()=>{}),l(i),b.refresh()},[b]),o=(0,e.useCallback)(async()=>{await fetch("/api/plan/approve",{method:"POST",headers:(0,g.dh)((0,h.X0)())}).catch(()=>{}),l(i),b.refresh()},[b]);return(0,d.jsx)(j.Provider,{value:{status:c,discard:n,approvePlan:o,refresh:m},children:a})}function l(){let a=(0,e.useContext)(j);if(!a)throw Error("usePlan must be used inside PlanProvider");return a}},81974:(a,b,c)=>{"use strict";c.d(b,{PlanBar:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call PlanBar() from the server but PlanBar is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/beacon/beacon/components/plan/plan-bar.tsx","PlanBar")},82704:()=>{},84458:(a,b,c)=>{"use strict";c.d(b,{I:()=>h,U:()=>g});var d=c(48249),e=c(67484),f=c(33191);function g(a){let[,b]=(0,e.useReducer)(a=>a+1,0)}function h({label:a,active:b,onClick:c,children:e}){return(0,d.jsx)("button",{type:"button","aria-label":a,"aria-pressed":b,title:a,onMouseDown:a=>a.preventDefault(),onClick:c,className:(0,f.cn)("nodrag nopan rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-[var(--ink-hover)] hover:text-foreground",b&&"bg-[var(--ink-active)] text-foreground"),children:e})}},85452:(a,b,c)=>{"use strict";c.d(b,{AskModal:()=>k});var d=c(48249),e=c(67484),f=c(45535),g=c(72597),h=c(26284),i=c(48779),j=c(33191);function k(){let[a,b]=(0,e.useState)(null),[c,k]=(0,e.useState)(new Set),[l,m]=(0,e.useState)(""),[n,o]=(0,e.useState)(!1),p=(0,e.useRef)(null),q=a?.id??null,r=(0,e.useRef)(null);q!==r.current&&(r.current=q,c.size&&k(new Set),l&&m(""));let s=(0,e.useCallback)(async c=>{if(a&&!n){o(!0),p.current=a.id,b(null);try{await fetch("/api/ask/answer",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({id:a.id,...c})})}catch{}finally{o(!1)}}},[a,n]);if(!a)return null;if("mirror"===a.mode&&"question"===a.kind&&a.question)return(0,d.jsx)("div",{className:"fixed right-4 bottom-4 z-[70] w-full max-w-sm",children:(0,d.jsxs)(i.b,{className:"rounded-2xl border border-border/60 p-4 shadow-2xl",children:[(0,d.jsxs)("div",{className:"mb-1 flex items-center justify-between gap-2",children:[(0,d.jsx)("span",{className:"rounded-full bg-muted px-2 py-0.5 text-[0.7rem] font-medium text-muted-foreground",children:a.question.header||"The agent is asking"}),(0,d.jsx)("button",{type:"button",onClick:()=>{p.current=a.id,b(null)},className:"text-muted-foreground transition-colors hover:text-foreground","aria-label":"Dismiss",children:(0,d.jsx)(f.A,{className:"size-4"})})]}),(0,d.jsx)("p",{className:"mb-3 text-sm font-medium text-foreground",children:a.question.question}),(0,d.jsx)("div",{className:"flex flex-col gap-1.5",children:a.question.options.map(a=>(0,d.jsxs)("div",{className:"rounded-lg border border-border bg-background/40 px-3 py-1.5",children:[(0,d.jsx)("span",{className:"text-sm text-foreground",children:a.label}),a.description&&(0,d.jsx)("span",{className:"mt-0.5 block text-xs text-muted-foreground",children:a.description})]},a.label))}),(0,d.jsx)("p",{className:"mt-3 text-[0.7rem] text-muted-foreground",children:"Answer in your terminal — this is a mirror."})]})});let t=()=>l.trim()&&s({selected:[l.trim()]});return(0,d.jsx)("div",{className:"fixed inset-0 z-[70] flex items-center justify-center bg-black/40 p-4 backdrop-blur-sm",children:(0,d.jsx)(i.b,{className:"w-full max-w-lg rounded-2xl border border-border/60 p-5 shadow-2xl",children:"question"===a.kind&&a.question?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"mb-1 flex items-center gap-2",children:[(0,d.jsx)("span",{className:"rounded-full bg-muted px-2 py-0.5 text-[0.7rem] font-medium text-muted-foreground",children:a.question.header||"The agent is asking"}),a.question.multiSelect&&(0,d.jsx)("span",{className:"text-[0.7rem] text-muted-foreground",children:"select all that apply"})]}),(0,d.jsx)("p",{className:"mb-4 text-sm font-medium text-foreground",children:a.question.question}),(0,d.jsx)("div",{className:"flex flex-col gap-2",children:a.question.options.map(b=>{let e=c.has(b.label);return(0,d.jsxs)("button",{type:"button",disabled:n,onClick:()=>{let c;return a.question.multiSelect?(c=b.label,k(a=>{let b=new Set(a);return b.has(c)?b.delete(c):b.add(c),b})):s({selected:[b.label]})},className:(0,j.cn)("rounded-lg border border-border bg-background/40 px-3 py-2 text-left transition-colors hover:bg-muted disabled:opacity-50",e&&"border-primary bg-primary/10"),children:[(0,d.jsx)("span",{className:"text-sm font-medium text-foreground",children:b.label}),b.description&&(0,d.jsx)("span",{className:"mt-0.5 block text-xs text-muted-foreground",children:b.description})]},b.label)})}),(0,d.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,d.jsx)("input",{value:l,disabled:n,onChange:a=>m(a.target.value),onKeyDown:b=>"Enter"===b.key&&!a.question.multiSelect&&t(),placeholder:"Other…",className:"h-8 flex-1 rounded-lg border border-border bg-background/40 px-2.5 text-sm outline-none focus:border-primary"}),a.question.multiSelect?(0,d.jsx)(h.$,{size:"sm",onClick:()=>{let a=[...c,...l.trim()?[l.trim()]:[]];a.length&&s({selected:a})},disabled:n,children:"Submit"}):(0,d.jsx)(h.$,{size:"icon-sm",variant:"outline",onClick:t,disabled:n||!l.trim(),"aria-label":"Submit other",children:(0,d.jsx)(g.A,{})})]})]}):a.approval?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{className:"mb-1 flex items-center gap-2",children:(0,d.jsxs)("span",{className:"rounded-full bg-muted px-2 py-0.5 text-[0.7rem] font-medium text-muted-foreground",children:["Approve ",a.approval.tool]})}),(0,d.jsx)("p",{className:"mb-3 text-sm font-medium text-foreground",children:a.approval.title}),a.approval.preview&&(0,d.jsx)("pre",{className:"mb-4 max-h-64 overflow-auto rounded-lg border border-border bg-background/40 p-3 text-xs whitespace-pre-wrap text-muted-foreground",children:a.approval.preview}),(0,d.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,d.jsx)(h.$,{variant:"destructive",onClick:()=>s({decision:"deny"}),disabled:n,children:"Deny"}),(0,d.jsx)(h.$,{onClick:()=>s({decision:"allow"}),disabled:n,children:"Allow"})]})]}):null})})}},86364:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>e});var d=c(88868);let e=async a=>[{type:"image/svg+xml",sizes:"any",url:(0,d.fillMetadataSegment)(".",await a.params,"icon.svg",!0)+"?bb93a1375ed3c298"}]},86596:(a,b,c)=>{"use strict";c.d(b,{Gd:()=>p,II:()=>l,Pu:()=>m,Z2:()=>o});var d=c(56563),e=c(890),f=c(45348),g=c(69131),h=c(74619);let i=f.z.extend({renderMarkdown:(a,b)=>`<u>${b.renderChildren(a)}</u>`}),j=[d.W.configure({underline:!1}),i,e._0,e.L2.configure({nested:!0})],k=[...j,h.eo],l=k,m=j,n=new g.db({extensions:k});function o(a){return n.serialize(function a(b){return"paragraph"===b.type&&(b.content?.length??0)===0?{...b,content:[{type:"text",text:"​"}]}:Array.isArray(b.content)?{...b,content:b.content.map(a)}:b}(a))}function p(a){return function a(b){if("paragraph"===b.type&&b.content?.length){let a=b.content.every(a=>"text"===a.type),c=b.content.map(a=>a.text??"").join("");if(a&&c.includes("​")&&""===c.replace(/\u200B/g,"").trim())return{...b,content:[]}}return Array.isArray(b.content)?{...b,content:b.content.map(a)}:b}(function a(b){if("text"===b.type){let a=(b.marks??[]).find(a=>"link"===a.type&&"string"==typeof a.attrs?.href),c=a?.attrs?.href?(0,h.$w)(a.attrs.href):null;if(c)return{type:"mention",attrs:{kind:c.kind,ref:c.ref,label:(b.text??"").replace(/^@/,"")}}}return Array.isArray(b.content)?{...b,content:b.content.map(a)}:b}(function a(b){if("text"===b.type&&(b.text??"").includes("<u>"))return{type:"__frag",content:function(a){let b,c=a.text??"",d=a.marks??[],e=/<u>([\s\S]*?)<\/u>/g,f=[],g=0;for(;null!==(b=e.exec(c));)b.index>g&&f.push({...a,text:c.slice(g,b.index)}),f.push({type:"text",text:b[1],marks:[...d,{type:"underline"}]}),g=e.lastIndex;return g<c.length&&f.push({...a,text:c.slice(g)}),f.filter(a=>(a.text??"").length>0)}(b)};if(Array.isArray(b.content)){let c=b.content.flatMap(b=>{let c=a(b);return"__frag"===c.type?c.content:[c]});return{...b,content:c}}return b}(n.parse(a))))}},90219:(a,b,c)=>{Promise.resolve().then(c.bind(c,18718)),Promise.resolve().then(c.bind(c,85452)),Promise.resolve().then(c.bind(c,47194)),Promise.resolve().then(c.bind(c,69370)),Promise.resolve().then(c.bind(c,5547)),Promise.resolve().then(c.bind(c,41616)),Promise.resolve().then(c.bind(c,81166)),Promise.resolve().then(c.bind(c,19208)),Promise.resolve().then(c.bind(c,80765)),Promise.resolve().then(c.bind(c,41164)),Promise.resolve().then(c.bind(c,59953))},90415:(a,b,c)=>{"use strict";function d(){return null}c.r(b),c.d(b,{default:()=>d})}};