@nilsr0711/drydock 0.1.7 → 0.1.8

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 (147) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/app-path-routes-manifest.json +1 -1
  3. package/.next/standalone/.next/build-manifest.json +2 -2
  4. package/.next/standalone/.next/prerender-manifest.json +3 -3
  5. package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  6. package/.next/standalone/.next/server/app/_global-error.html +1 -1
  7. package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
  8. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  9. package/.next/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  10. package/.next/standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  11. package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  12. package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  13. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  14. package/.next/standalone/.next/server/app/_not-found/page.js +2 -2
  15. package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  16. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  17. package/.next/standalone/.next/server/app/adrs/page.js +2 -2
  18. package/.next/standalone/.next/server/app/adrs/page.js.nft.json +1 -1
  19. package/.next/standalone/.next/server/app/adrs/page_client-reference-manifest.js +1 -1
  20. package/.next/standalone/.next/server/app/analytics/page.js +1 -1
  21. package/.next/standalone/.next/server/app/analytics/page.js.nft.json +1 -1
  22. package/.next/standalone/.next/server/app/analytics/page_client-reference-manifest.js +1 -1
  23. package/.next/standalone/.next/server/app/api/control/shutdown/route.js.nft.json +1 -1
  24. package/.next/standalone/.next/server/app/api/cost/export/route.js.nft.json +1 -1
  25. package/.next/standalone/.next/server/app/api/health/route.js +1 -1
  26. package/.next/standalone/.next/server/app/api/health/route.js.nft.json +1 -1
  27. package/.next/standalone/.next/server/app/api/sse/dashboard/route.js +1 -1
  28. package/.next/standalone/.next/server/app/api/sse/dashboard/route.js.nft.json +1 -1
  29. package/.next/standalone/.next/server/app/api/sse/jobs/[id]/route.js.nft.json +1 -1
  30. package/.next/standalone/.next/server/app/api/webhooks/[repoId]/route.js.nft.json +1 -1
  31. package/.next/standalone/.next/server/app/costs/page.js +1 -1
  32. package/.next/standalone/.next/server/app/costs/page.js.nft.json +1 -1
  33. package/.next/standalone/.next/server/app/costs/page_client-reference-manifest.js +1 -1
  34. package/.next/standalone/.next/server/app/jobs/[id]/page.js +3 -3
  35. package/.next/standalone/.next/server/app/jobs/[id]/page.js.nft.json +1 -1
  36. package/.next/standalone/.next/server/app/jobs/[id]/page_client-reference-manifest.js +1 -1
  37. package/.next/standalone/.next/server/app/jobs/page.js +2 -2
  38. package/.next/standalone/.next/server/app/jobs/page.js.nft.json +1 -1
  39. package/.next/standalone/.next/server/app/jobs/page_client-reference-manifest.js +1 -1
  40. package/.next/standalone/.next/server/app/needs-human/page.js +2 -2
  41. package/.next/standalone/.next/server/app/needs-human/page.js.nft.json +1 -1
  42. package/.next/standalone/.next/server/app/needs-human/page_client-reference-manifest.js +1 -1
  43. package/.next/standalone/.next/server/app/page.js +2 -2
  44. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  45. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  46. package/.next/standalone/.next/server/app/prompts/page.js +2 -2
  47. package/.next/standalone/.next/server/app/prompts/page.js.nft.json +1 -1
  48. package/.next/standalone/.next/server/app/prompts/page_client-reference-manifest.js +1 -1
  49. package/.next/standalone/.next/server/app/repos/[id]/page.js +2 -2
  50. package/.next/standalone/.next/server/app/repos/[id]/page.js.nft.json +1 -1
  51. package/.next/standalone/.next/server/app/repos/[id]/page_client-reference-manifest.js +1 -1
  52. package/.next/standalone/.next/server/app/settings/page.js +2 -2
  53. package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
  54. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  55. package/.next/standalone/.next/server/app-paths-manifest.json +1 -1
  56. package/.next/standalone/.next/server/chunks/304.js +1 -1
  57. package/.next/standalone/.next/server/chunks/387.js +34 -0
  58. package/.next/standalone/.next/server/chunks/40.js +1 -1
  59. package/.next/standalone/.next/server/chunks/403.js +1 -0
  60. package/.next/standalone/.next/server/chunks/521.js +1 -1
  61. package/.next/standalone/.next/server/chunks/578.js +1 -1
  62. package/.next/standalone/.next/server/chunks/614.js +2 -2
  63. package/.next/standalone/.next/server/chunks/685.js +1 -0
  64. package/.next/standalone/.next/server/chunks/786.js +1 -1
  65. package/.next/standalone/.next/server/chunks/83.js +1 -1
  66. package/.next/standalone/.next/server/chunks/908.js +1 -1
  67. package/.next/standalone/.next/server/chunks/99.js +14 -11
  68. package/.next/standalone/.next/server/middleware-build-manifest.js +1 -1
  69. package/.next/standalone/.next/server/pages/500.html +1 -1
  70. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  71. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  72. package/.next/standalone/.next/static/chunks/1298-0d60333e56ac8b2c.js +1 -0
  73. package/.next/standalone/.next/static/chunks/3433-ece700d2e393c23b.js +1 -0
  74. package/.next/standalone/.next/static/chunks/3894-4f48e3cc5be58e10.js +1 -0
  75. package/.next/standalone/.next/static/chunks/5080-16cb43874ff5c536.js +1 -0
  76. package/.next/standalone/.next/static/chunks/{1642-a1ea35450c1b5c95.js → 8264-c27834f1552f983a.js} +1 -1
  77. package/.next/{static/chunks/4624-5e23973d35b58ca5.js → standalone/.next/static/chunks/8745-8b3833b3d2afa30c.js} +1 -1
  78. package/.next/standalone/.next/static/chunks/app/adrs/page-0c221fc18d1e89af.js +1 -0
  79. package/.next/standalone/.next/static/chunks/app/costs/{page-24d086bf67620e30.js → page-5d66d93815eea63a.js} +1 -1
  80. package/.next/standalone/.next/static/chunks/app/jobs/[id]/page-6ef8bc39b5181817.js +1 -0
  81. package/.next/standalone/.next/static/chunks/app/jobs/page-98215ec1497b829e.js +1 -0
  82. package/.next/standalone/.next/static/chunks/app/layout-402d4ab34259b89b.js +1 -0
  83. package/.next/standalone/.next/static/chunks/app/needs-human/page-b69ac22856c0a0b1.js +1 -0
  84. package/.next/standalone/.next/static/chunks/app/page-ccefa99d40734a8c.js +1 -0
  85. package/.next/standalone/.next/static/chunks/app/prompts/page-bcd1063eb5d64aa5.js +1 -0
  86. package/.next/standalone/.next/static/chunks/app/repos/[id]/page-2bd4b35a0b28042e.js +1 -0
  87. package/.next/standalone/.next/static/chunks/app/settings/page-13a04ecac139b74c.js +1 -0
  88. package/.next/standalone/.next/static/css/{bdce0893cf6b9cb9.css → 600a5b5311ad42be.css} +1 -1
  89. package/.next/standalone/drizzle/0034_human_instruction.sql +1 -0
  90. package/.next/standalone/drizzle/0035_agent_release.sql +4 -0
  91. package/.next/standalone/mcp-server.cjs +42934 -0
  92. package/.next/standalone/package.json +5 -3
  93. package/.next/static/chunks/1298-0d60333e56ac8b2c.js +1 -0
  94. package/.next/static/chunks/3433-ece700d2e393c23b.js +1 -0
  95. package/.next/static/chunks/3894-4f48e3cc5be58e10.js +1 -0
  96. package/.next/static/chunks/5080-16cb43874ff5c536.js +1 -0
  97. package/.next/static/chunks/{1642-a1ea35450c1b5c95.js → 8264-c27834f1552f983a.js} +1 -1
  98. package/.next/{standalone/.next/static/chunks/4624-5e23973d35b58ca5.js → static/chunks/8745-8b3833b3d2afa30c.js} +1 -1
  99. package/.next/static/chunks/app/adrs/page-0c221fc18d1e89af.js +1 -0
  100. package/.next/static/chunks/app/costs/{page-24d086bf67620e30.js → page-5d66d93815eea63a.js} +1 -1
  101. package/.next/static/chunks/app/jobs/[id]/page-6ef8bc39b5181817.js +1 -0
  102. package/.next/static/chunks/app/jobs/page-98215ec1497b829e.js +1 -0
  103. package/.next/static/chunks/app/layout-402d4ab34259b89b.js +1 -0
  104. package/.next/static/chunks/app/needs-human/page-b69ac22856c0a0b1.js +1 -0
  105. package/.next/static/chunks/app/page-ccefa99d40734a8c.js +1 -0
  106. package/.next/static/chunks/app/prompts/page-bcd1063eb5d64aa5.js +1 -0
  107. package/.next/static/chunks/app/repos/[id]/page-2bd4b35a0b28042e.js +1 -0
  108. package/.next/static/chunks/app/settings/page-13a04ecac139b74c.js +1 -0
  109. package/.next/static/css/{bdce0893cf6b9cb9.css → 600a5b5311ad42be.css} +1 -1
  110. package/README.md +60 -21
  111. package/bin/drydock.mjs +77 -2
  112. package/drizzle/0034_human_instruction.sql +1 -0
  113. package/drizzle/0035_agent_release.sql +4 -0
  114. package/package.json +5 -3
  115. package/.next/standalone/.next/server/chunks/382.js +0 -31
  116. package/.next/standalone/.next/server/chunks/468.js +0 -1
  117. package/.next/standalone/.next/server/chunks/822.js +0 -1
  118. package/.next/standalone/.next/static/chunks/1298-7ac9c00c70b27598.js +0 -1
  119. package/.next/standalone/.next/static/chunks/3433-719d6f55f39342d8.js +0 -1
  120. package/.next/standalone/.next/static/chunks/3894-c7b01dcfcf83d89b.js +0 -1
  121. package/.next/standalone/.next/static/chunks/7690-6dcfd9ae4cbf4e7d.js +0 -1
  122. package/.next/standalone/.next/static/chunks/app/adrs/page-1dfee698ea4c111f.js +0 -1
  123. package/.next/standalone/.next/static/chunks/app/jobs/[id]/page-8a9e4ed64c3303fe.js +0 -1
  124. package/.next/standalone/.next/static/chunks/app/jobs/page-4180ccc9acd3ddba.js +0 -1
  125. package/.next/standalone/.next/static/chunks/app/layout-189fa697d72d1fdf.js +0 -1
  126. package/.next/standalone/.next/static/chunks/app/needs-human/page-e458ffa78c06a6fa.js +0 -1
  127. package/.next/standalone/.next/static/chunks/app/page-add53cbf6d87a3f5.js +0 -1
  128. package/.next/standalone/.next/static/chunks/app/prompts/page-ff6cc30777232933.js +0 -1
  129. package/.next/standalone/.next/static/chunks/app/repos/[id]/page-cd11007841a5d73f.js +0 -1
  130. package/.next/standalone/.next/static/chunks/app/settings/page-280668b9c92e9b48.js +0 -1
  131. package/.next/static/chunks/1298-7ac9c00c70b27598.js +0 -1
  132. package/.next/static/chunks/3433-719d6f55f39342d8.js +0 -1
  133. package/.next/static/chunks/3894-c7b01dcfcf83d89b.js +0 -1
  134. package/.next/static/chunks/7690-6dcfd9ae4cbf4e7d.js +0 -1
  135. package/.next/static/chunks/app/adrs/page-1dfee698ea4c111f.js +0 -1
  136. package/.next/static/chunks/app/jobs/[id]/page-8a9e4ed64c3303fe.js +0 -1
  137. package/.next/static/chunks/app/jobs/page-4180ccc9acd3ddba.js +0 -1
  138. package/.next/static/chunks/app/layout-189fa697d72d1fdf.js +0 -1
  139. package/.next/static/chunks/app/needs-human/page-e458ffa78c06a6fa.js +0 -1
  140. package/.next/static/chunks/app/page-add53cbf6d87a3f5.js +0 -1
  141. package/.next/static/chunks/app/prompts/page-ff6cc30777232933.js +0 -1
  142. package/.next/static/chunks/app/repos/[id]/page-cd11007841a5d73f.js +0 -1
  143. package/.next/static/chunks/app/settings/page-280668b9c92e9b48.js +0 -1
  144. /package/.next/standalone/.next/static/{-sJQutzNDvUvcdmf3YlJA → qSEvPCWIslg9lcxt6XQhl}/_buildManifest.js +0 -0
  145. /package/.next/standalone/.next/static/{-sJQutzNDvUvcdmf3YlJA → qSEvPCWIslg9lcxt6XQhl}/_ssgManifest.js +0 -0
  146. /package/.next/static/{-sJQutzNDvUvcdmf3YlJA → qSEvPCWIslg9lcxt6XQhl}/_buildManifest.js +0 -0
  147. /package/.next/static/{-sJQutzNDvUvcdmf3YlJA → qSEvPCWIslg9lcxt6XQhl}/_ssgManifest.js +0 -0
@@ -1,2 +1,2 @@
1
- (()=>{var a={};a.id=530,a.ids=[530],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},2431:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(71859).A)("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]])},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},7052:(a,b,c)=>{"use strict";c.d(b,{RepoPromptsSection:()=>d});let d=(0,c(34215).registerClientReference)(function(){throw Error("Attempted to call RepoPromptsSection() from the server but RepoPromptsSection 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/drydock/drydock/src/components/repo-prompts-section.tsx","RepoPromptsSection")},7228:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(71859).A)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]])},9804:(a,b,c)=>{"use strict";c.d(b,{RepoPromptsSection:()=>z});var d=c(27905),e=c(47348),f=c(86186),g=c(2431),h=c(75244),i=c(97370),j=c(9324),k=c.n(j),l=c(35924),m=c(9339),n=c(27796),o=c(32029),p=c(60009),q=c(82795),r=c(46553);c(10402);var s=c(73990),t=c(23581);let u=(0,t.createServerReference)("609cdd9a1dbf528a7f2faf706ffbf674d866f06489",t.callServer,void 0,t.findSourceMapURL,"deleteTemplateAction");var v=c(53985),w=c(5270);let x=[{id:"work",name:v._.main,title:"Work prompt",icon:e.A,desc:"Injected when the agent starts an issue."},{id:"triage",name:"triage",title:"Triage prompt",icon:f.A,desc:"Classifies and labels new issues."},{id:"review",name:"review-feedback",title:"Review-feedback prompt",icon:g.A,desc:"Runs when a trusted reviewer comments."}];function y({repo:a,stage:b}){let{success:c,error:e}=(0,r.d)(),[f,g]=(0,l.useState)("standard"),[i,j]=(0,l.useState)(""),[m,t]=(0,l.useState)(""),[v,w]=(0,l.useState)(!1),[x,z]=(0,l.useTransition)(),A=m.trim()!==i.trim(),B=b.icon;return(0,d.jsxs)("div",{className:"rounded-lg border border-border p-4",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,d.jsx)("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-secondary text-muted-foreground",children:(0,d.jsx)(B,{className:"h-4 w-4"})}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("h4",{className:"text-sm font-semibold",children:b.title}),"standard"===f?(0,d.jsx)(n.E,{tone:"neutral",children:"Standard"}):(0,d.jsx)(n.E,{tone:"primary",children:"Custom"})]}),(0,d.jsx)("p",{className:"text-xs text-muted-foreground",children:b.desc})]}),(0,d.jsx)(p.I,{value:f,onChange:function(c){"custom"===c?g("custom"):z(async()=>{try{let c=await u(a.id,b.name);j(c.content),t(c.content),g("standard")}catch(a){e("Failed to revert to standard",a instanceof Error?a.message:String(a))}})},disabled:!v||x,options:[{value:"standard",label:"Standard"},{value:"custom",label:"Custom"}]})]}),"standard"===f?(0,d.jsxs)("div",{className:"mt-3 rounded-lg border border-dashed border-border bg-secondary/30 p-3",children:[(0,d.jsx)("p",{className:"whitespace-pre-wrap font-mono text-xs leading-relaxed text-muted-foreground",children:v?i:"Loading…"}),(0,d.jsxs)("p",{className:"mt-2 inline-flex items-center gap-1.5 text-[11px] text-muted-foreground",children:[(0,d.jsx)(h.A,{className:"h-3 w-3"})," Inherits the global default.",(0,d.jsx)(k(),{href:"/prompts",className:"text-primary hover:underline",children:"Edit the standard →"})]})]}):(0,d.jsxs)("div",{className:"mt-3",children:[(0,d.jsx)(q.T,{value:m,onChange:a=>t(a.target.value),rows:4,disabled:!v||x,className:"font-mono text-xs leading-relaxed"}),(0,d.jsxs)("div",{className:"mt-2 flex items-center justify-end gap-2",children:[(0,d.jsx)(o.$,{size:"sm",variant:"ghost",disabled:!A||x,onClick:()=>t(i),children:"Discard changes"}),(0,d.jsx)(o.$,{size:"sm",disabled:!A||x,onClick:function(){z(async()=>{try{await (0,s.m)({repoId:a.id,name:b.name,content:m}),j(m),c("Prompt saved",`${b.title} \xb7 ${a.name}`)}catch(a){e("Failed to save prompt",a instanceof Error?a.message:String(a))}})},children:"Save override"})]})]})]})}function z({repo:a,className:b}){return(0,d.jsxs)("div",{className:(0,w.cn)("flex flex-col gap-3",b),children:[(0,d.jsxs)(m.F,{tone:"info",icon:i.A,title:"Per-repo prompt overrides",children:["Each stage uses the global"," ",(0,d.jsx)(k(),{href:"/prompts",className:"font-medium text-primary hover:underline",children:"standard prompt"})," ","unless you switch it to ",(0,d.jsx)("span",{className:"font-medium",children:"Custom"})," here. Overrides apply only to ",a.name,"."]}),x.map(b=>(0,d.jsx)(y,{repo:a,stage:b},b.id))]})}},10402:(a,b,c)=>{"use strict";c.d(b,{v:()=>e});var d=c(23581);let e=(0,d.createServerReference)("6030172ec23da9d8d9b85f482f488a3ff5648350ca",d.callServer,void 0,d.findSourceMapURL,"loadTemplateAction")},10519:(a,b,c)=>{"use strict";c.d(b,{RepoWebhookPanel:()=>m});var d=c(27905);let e=(0,c(71859).A)("webhook",[["path",{d:"M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2",key:"q3hayz"}],["path",{d:"m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06",key:"1go1hn"}],["path",{d:"m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8",key:"qlwsc0"}]]);var f=c(35924),g=c(27796),h=c(32029),i=c(37913),j=c(77585),k=c(46553),l=c(70740);function m({repo:a}){let[b,c]=(0,f.useState)(a.webhookSecret??""),[n,o]=(0,f.useState)(!1),[p,q]=(0,f.useState)(`/api/webhooks/${a.id}`),[r,s]=(0,f.useTransition)(),[t,u]=(0,f.useState)(!1),{error:v}=(0,k.d)(),w=(a.webhookSecret??"").length>0,x="gitlab"===a.platform;function y(b){u(!1),s(async()=>{try{await (0,l.u)(a.id,{webhookSecret:b.trim()||null}),u(!0),setTimeout(()=>u(!1),1500)}catch(a){v("Failed to update webhook",a instanceof Error?a.message:String(a))}})}return(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,d.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold",children:[(0,d.jsx)(e,{className:"h-3.5 w-3.5 text-muted-foreground"})," Webhook sync"]}),(0,d.jsx)(g.E,{tone:w?"success":"neutral",children:w?"On":"Off"}),r&&(0,d.jsx)("span",{className:"text-xs text-muted-foreground",children:"Saving…"}),t&&(0,d.jsx)("span",{className:"text-xs text-success",children:"Saved"})]}),(0,d.jsx)(i.D,{label:"Shared secret",htmlFor:"webhook-secret",children:(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)(j.p,{id:"webhook-secret",type:n?"text":"password",value:b,onChange:a=>c(a.target.value),onBlur:()=>{(b.trim()||null)!==(a.webhookSecret??null)&&y(b)},placeholder:"Set a secret to enable webhook delivery",className:"min-w-0 flex-1 font-mono"}),(0,d.jsx)(h.$,{type:"button",variant:"outline",size:"sm",onClick:()=>o(a=>!a),children:n?"Hide":"Show"}),(0,d.jsx)(h.$,{type:"button",variant:"outline",size:"sm",onClick:()=>{let a,b=(a=new Uint8Array(20),crypto.getRandomValues(a),Array.from(a,a=>a.toString(16).padStart(2,"0")).join(""));c(b),o(!0),y(b)},children:"Generate"}),w&&(0,d.jsx)(h.$,{type:"button",variant:"destructive",size:"sm",onClick:()=>{c(""),y("")},children:"Disable"})]})}),(0,d.jsx)(i.D,{label:"Payload URL",htmlFor:"webhook-url",children:(0,d.jsx)(j.p,{id:"webhook-url",readOnly:!0,value:p,onFocus:a=>a.currentTarget.select(),className:"font-mono text-xs"})}),(0,d.jsxs)("p",{className:"text-xs leading-relaxed text-muted-foreground",children:["Opt-in. Polling stays on as the default and continues unchanged whether or not webhooks are configured — the two paths share the same idempotent sync, so a change is never double-processed. Point a ",x?"GitLab":"GitHub"," webhook for"," ",(0,d.jsx)("em",{children:x?"issues, comments and pipelines":"Issues, Issue comments, Check suites, Check runs, Pull request reviews and Pull request review comments"})," ","at the payload URL above with"," ",x?(0,d.jsxs)(d.Fragment,{children:["this secret as the ",(0,d.jsx)("code",{className:"font-mono",children:"Secret token"})]}):(0,d.jsxs)(d.Fragment,{children:["this secret and content type ",(0,d.jsx)("code",{className:"font-mono",children:"application/json"})]}),". Issue events drive the sync. Finished check",x?" (pipeline)":""," events wake the CI babysitter, and review events trigger the review-feedback sweep, so merges and feedback land within seconds instead of at the next poll. Drydock binds"," ",(0,d.jsx)("code",{className:"font-mono",children:"127.0.0.1"}),", so expose the URL through a tunnel or forwarder (e.g. ",(0,d.jsx)("code",{className:"font-mono",children:"cloudflared"}),","," ",(0,d.jsx)("code",{className:"font-mono",children:"ngrok"}),") to receive deliveries. Each delivery is"," ",x?"token-verified":"HMAC-SHA256 signature-verified","; invalid or unsigned payloads are rejected."]})]})}},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},10913:(a,b,c)=>{"use strict";function d(a){return a?`hsl(var(--${a}))`:"hsl(var(--muted-foreground))"}c.d(b,{U:()=>d})},14985:a=>{"use strict";a.exports=require("dns")},15269:(a,b,c)=>{"use strict";c.d(b,{RepoWebhookPanel:()=>d});let d=(0,c(34215).registerClientReference)(function(){throw Error("Attempted to call RepoWebhookPanel() from the server but RepoWebhookPanel 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/drydock/drydock/src/components/repo-webhook-panel.tsx","RepoWebhookPanel")},16698:a=>{"use strict";a.exports=require("node:async_hooks")},17891:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/get-segment-param")},18902:(a,b,c)=>{Promise.resolve().then(c.bind(c,772)),Promise.resolve().then(c.t.bind(c,45030,23)),Promise.resolve().then(c.bind(c,91568)),Promise.resolve().then(c.bind(c,18873)),Promise.resolve().then(c.bind(c,42970)),Promise.resolve().then(c.bind(c,7052)),Promise.resolve().then(c.bind(c,20465)),Promise.resolve().then(c.bind(c,49920)),Promise.resolve().then(c.bind(c,15269)),Promise.resolve().then(c.bind(c,61622)),Promise.resolve().then(c.bind(c,24094))},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},20465:(a,b,c)=>{"use strict";c.d(b,{RepoReleasePanel:()=>d});let d=(0,c(34215).registerClientReference)(function(){throw Error("Attempted to call RepoReleasePanel() from the server but RepoReleasePanel 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/drydock/drydock/src/components/repo-release-panel.tsx","RepoReleasePanel")},21820:a=>{"use strict";a.exports=require("os")},21822:(a,b,c)=>{"use strict";c.d(b,{dm:()=>j,dv:()=>i});var d=c(87383),e=c(25900),f=c(15354),g=c(10913);function h(a,b){return b>0?Math.min(a/b,1):0}function i({value:a,limit:b,size:c=132,label:e="Spend today"}){let j=h(a,b),k=b>0&&a>=b,l=(0,g.U)(k||j>=.95?"destructive":j>=.8?"warning":"primary"),m=(c-18)/2,n=2*Math.PI*m,o=.75*n,p=c/2;return(0,d.jsxs)("div",{className:"flex flex-col items-center",children:[(0,d.jsxs)("div",{className:"relative",style:{width:c,height:.82*c},children:[(0,d.jsxs)("svg",{width:c,height:c,viewBox:`0 0 ${c} ${c}`,style:{transform:"rotate(135deg)"},role:"img","aria-label":`${e}: $${a.toFixed(2)} of $${b.toFixed(0)} limit`,children:[(0,d.jsx)("circle",{cx:p,cy:p,r:m,fill:"none",stroke:"hsl(var(--secondary))",strokeWidth:9,strokeDasharray:`${o} ${n}`,strokeLinecap:"round"}),(0,d.jsx)("circle",{cx:p,cy:p,r:m,fill:"none",stroke:l,strokeWidth:9,strokeDasharray:`${o*j} ${n}`,strokeLinecap:"round"})]}),(0,d.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center pb-1",children:[(0,d.jsxs)("span",{className:"tnum text-[26px] font-semibold leading-none",style:{color:l},children:["$",a.toFixed(2)]}),(0,d.jsxs)("span",{className:"mt-1 text-xs text-muted-foreground tnum",children:["of $",b.toFixed(0)," limit"]})]})]}),(0,d.jsx)("div",{className:"mt-1 flex items-center gap-1.5 text-xs",children:k?(0,d.jsx)(f.E,{tone:"destructive",children:"Limit reached"}):j>=.8?(0,d.jsxs)(f.E,{tone:"warning",children:[Math.round(100*j),"% used"]}):(0,d.jsxs)("span",{className:"text-muted-foreground",children:[e,b>0&&(0,d.jsxs)(d.Fragment,{children:[" \xb7 ",Math.round(100*j),"% of budget"]})]})})]})}function j({value:a,limit:b}){let c=h(a,b),f=b>0&&a>=b||c>=.95?"destructive":c>=.8?"warning":"primary";return(0,d.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,d.jsxs)("div",{className:"flex items-baseline justify-between",children:[(0,d.jsxs)("span",{className:"tnum text-sm font-semibold",children:["$",a.toFixed(2)," ",(0,d.jsxs)("span",{className:"font-normal text-muted-foreground",children:["/ $",b.toFixed(2)]})]}),(0,d.jsx)("span",{className:(0,e.cn)("text-xs font-medium",`text-${f}`),children:b>0?`${Math.round(100*c)}%`:"—"})]}),(0,d.jsx)("div",{className:"h-2 w-full overflow-hidden rounded-full bg-secondary",children:(0,d.jsx)("div",{className:"dd-bar h-full rounded-full",style:{width:`${100*c}%`,backgroundColor:(0,g.U)(f)}})})]})}},21847:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(30285).A)("chart-no-axes-column",[["path",{d:"M5 21v-6",key:"1hz6c0"}],["path",{d:"M12 21V3",key:"1lcnhd"}],["path",{d:"M19 21V9",key:"unv183"}]])},24094:(a,b,c)=>{"use strict";c.d(b,{Sparkline:()=>d});let d=(0,c(34215).registerClientReference)(function(){throw Error("Attempted to call Sparkline() from the server but Sparkline 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/drydock/drydock/src/components/ui/sparkline.tsx","Sparkline")},26713:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/is-bot")},27910:a=>{"use strict";a.exports=require("stream")},28354:a=>{"use strict";a.exports=require("util")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31057:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(30285).A)("git-merge",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]])},31421:a=>{"use strict";a.exports=require("node:child_process")},33873:a=>{"use strict";a.exports=require("path")},34631:a=>{"use strict";a.exports=require("tls")},35264:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(30285).A)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]])},35404:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(71859).A)("tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]])},36121:(a,b,c)=>{"use strict";c.d(b,{L:()=>g});var d=c(27905),e=c(5270);let f={neutral:"bg-secondary text-muted-foreground",primary:"bg-primary/10 text-primary",success:"bg-success-muted text-success",warning:"bg-warning-muted text-warning",destructive:"bg-destructive/10 text-destructive"};function g({icon:a,legend:b,description:c,tone:h="neutral",children:i}){return(0,d.jsxs)("fieldset",{className:"rounded-lg border border-border p-4",children:[(0,d.jsxs)("legend",{className:"flex items-center gap-2 px-1",children:[(0,d.jsx)("span",{className:(0,e.cn)("flex h-6 w-6 items-center justify-center rounded-md",f[h]),children:(0,d.jsx)(a,{className:"h-3.5 w-3.5"})}),(0,d.jsx)("span",{className:"text-sm font-semibold",children:b})]}),c&&(0,d.jsx)("p",{className:"mb-3 mt-1 text-xs text-muted-foreground",children:c}),(0,d.jsx)("div",{className:"flex flex-col gap-3",children:i})]})}},37739:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>ah,dynamic:()=>ag});var d=c(87383),e=c(97496),f=c(30285);let g=(0,f.A)("inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]),h=(0,f.A)("loader",[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]]),i=(0,f.A)("git-pull-request-arrow",[["circle",{cx:"5",cy:"6",r:"3",key:"1qnov2"}],["path",{d:"M5 9v12",key:"ih889a"}],["circle",{cx:"19",cy:"18",r:"3",key:"1qljk2"}],["path",{d:"m15 9-3-3 3-3",key:"1lwv8l"}],["path",{d:"M12 6h5a2 2 0 0 1 2 2v7",key:"1yj91y"}]]);var j=c(31057),k=c(30263),l=c(59810),m=c(57284);let n=(0,f.A)("cpu",[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]]);var o=c(46305),p=c(35264),q=c(21847);let r=(0,f.A)("tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);var s=c(8978),t=c(91568),u=c(94895);let v=(0,f.A)("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]),w=(0,f.A)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]),x=(0,f.A)("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);var y=c(77283),z=c.n(y),A=c(18873),B=c(15354),C=c(46136),D=c(58543),E=c(25900);function F({activeJob:a,recentJobs:b,initialLog:c=[],repoId:e}){return(0,d.jsxs)("div",{className:"space-y-5",children:[(0,d.jsxs)("div",{children:[(0,d.jsxs)("h3",{className:"mb-2 flex items-center gap-2 text-sm font-semibold",children:[(0,d.jsx)(v,{className:"h-3.5 w-3.5 text-muted-foreground"})," Live activity"]}),a?(0,d.jsxs)("div",{className:"space-y-3 rounded-lg border border-border p-3",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)(B.E,{status:a.status}),(0,d.jsxs)(z(),{href:`/jobs/${a.id}`,className:"font-mono text-xs text-muted-foreground hover:text-foreground",children:["#",a.issueNumber]}),(0,d.jsx)(z(),{href:`/jobs/${a.id}`,className:"ml-auto text-xs text-primary hover:underline",children:"Open live log →"})]}),(0,d.jsxs)("dl",{className:"grid grid-cols-2 gap-1 text-xs text-muted-foreground",children:[(0,d.jsxs)("div",{children:["Model: ",(0,D.mM)(a.model)]}),(0,d.jsxs)("div",{className:"tnum",children:["Cost: ",(0,E.UK)(a.costUsd,4)]}),(0,d.jsxs)("div",{className:"tnum",children:["Tokens: ",a.totalInputTokens," in / ",a.totalOutputTokens," out"]})]}),(0,d.jsx)(A.LogViewer,{jobId:a.id,initial:c,active:["working","ci_running","retrying"].includes(a.status)})]}):(0,d.jsx)(C.p,{compact:!0,icon:w,title:"Idle",description:"No job is running in this repo right now. Start an issue from the queue."})]}),(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"mb-2 flex items-center justify-between",children:[(0,d.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold",children:[(0,d.jsx)(x,{className:"h-3.5 w-3.5 text-muted-foreground"})," Recent jobs"]}),void 0!==e&&(0,d.jsx)(z(),{href:`/jobs?repo=${e}`,className:"text-xs text-muted-foreground hover:text-foreground",children:"View all runs →"})]}),0===b.length?(0,d.jsx)(C.p,{compact:!0,icon:x,title:"No jobs yet",description:"Finished runs will appear here once Drydock processes an issue."}):(0,d.jsx)("ul",{className:"flex flex-col gap-0.5",children:b.map(a=>(0,d.jsx)("li",{children:(0,d.jsxs)(z(),{href:`/jobs/${a.id}`,className:"flex w-full items-center gap-2.5 rounded-lg px-2 py-1.5 text-left hover-elevate",children:[(0,d.jsx)(B.E,{status:a.status,className:"shrink-0"}),(0,d.jsxs)("span",{className:"shrink-0 font-mono text-xs text-muted-foreground",children:["#",a.issueNumber]}),(0,d.jsx)("span",{className:"ml-auto tnum shrink-0 text-xs text-muted-foreground",children:(0,E.UK)(a.costUsd)})]})},a.id))})]})]})}let G={accepted:"success",proposed:"primary",pending:"warning",pending_review:"warning",superseded:"neutral",rejected:"destructive",deprecated:"neutral"};function H({adrs:a}){return(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold",children:[(0,d.jsx)(p.A,{className:"h-3.5 w-3.5 text-muted-foreground"})," ADRs"]}),0===a.length?(0,d.jsx)(C.p,{compact:!0,icon:p.A,title:"No ADRs yet",description:"Architecture decision records captured for this repo will appear here."}):(0,d.jsx)("ul",{className:"flex flex-col gap-2",children:a.map(a=>(0,d.jsxs)("li",{className:"flex items-center gap-3 rounded-lg border border-border p-3",children:[(0,d.jsx)(p.A,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,d.jsx)("span",{className:"min-w-0 flex-1 truncate text-sm",children:a.title}),(0,d.jsx)(B.E,{tone:G[a.status]??"neutral",children:a.status})]},a.id))})]})}var I=c(42970),J=c(21822),K=c(24094);function L({todayUsd:a,limitUsd:b,daily:c}){let e=new Map(c.map(a=>[a.day,a.costUsd])),f=function(){let a=[],b=new Date;for(let c=6;c>=0;c--){let d=new Date(b);d.setDate(b.getDate()-c),a.push(`${d.getFullYear()}-${String(d.getMonth()+1).padStart(2,"0")}-${String(d.getDate()).padStart(2,"0")}`)}return a}(),g=[...f].reverse().map(a=>({day:a,costUsd:e.get(a)??0})),h=g.reduce((a,b)=>a+b.costUsd,0),i=f.map(a=>e.get(a)??0);return(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold",children:[(0,d.jsx)(l.A,{className:"h-3.5 w-3.5 text-muted-foreground"})," Cost"]}),(0,d.jsx)(J.dm,{value:a,limit:b}),0===c.length&&0===a?(0,d.jsx)(C.p,{compact:!0,icon:l.A,title:"No spend yet",description:"Costs appear here once jobs run in this repo."}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"rounded-lg border border-border p-3",children:[(0,d.jsxs)("div",{className:"mb-2 flex items-center justify-between text-xs text-muted-foreground",children:[(0,d.jsx)("span",{children:"Last 7 days"}),(0,d.jsx)("span",{className:"tnum",children:(0,E.UK)(h)})]}),i.length>1?(0,d.jsx)(K.Sparkline,{data:i,width:320,height:42,tone:"chart-1",average:!0}):(0,d.jsx)("p",{className:"text-xs text-muted-foreground",children:"Not enough data yet."})]}),(0,d.jsx)("ul",{className:"flex flex-col gap-1 text-sm",children:g.map(a=>(0,d.jsxs)("li",{className:"flex justify-between border-b border-border/50 py-1.5 last:border-0",children:[(0,d.jsx)("span",{className:"text-muted-foreground",children:a.day}),(0,d.jsx)("span",{className:"tnum",children:(0,E.UK)(a.costUsd)})]},a.day))})]})]})}let M=(0,f.A)("rocket",[["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}],["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09",key:"u4xsad"}],["path",{d:"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z",key:"676m9"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05",key:"92ym6u"}]]),N={monitoring:"neutral",healthy:"success",failed:"destructive",repairing:"warning",repaired:"primary",escalated:"destructive"};function O({sessions:a}){return(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold",children:[(0,d.jsx)(M,{className:"h-3.5 w-3.5 text-muted-foreground"})," Deployments"]}),0===a.length?(0,d.jsx)(C.p,{compact:!0,icon:M,title:"No deployment sessions yet",description:"Post-merge deployment monitoring and fixes show up here."}):(0,d.jsx)("ul",{className:"flex flex-col gap-2",children:a.map(a=>(0,d.jsxs)("li",{className:"flex items-center gap-3 rounded-lg border border-border p-3",children:[(0,d.jsxs)(z(),{href:`/jobs/${a.jobId}`,className:"font-mono text-xs text-muted-foreground hover:text-foreground",children:["#",a.issueNumber]}),(0,d.jsx)("span",{className:"rounded-md bg-secondary px-1.5 py-0.5 text-[11px] text-muted-foreground",children:a.platform}),(0,d.jsxs)("span",{className:"font-mono text-sm",children:["PR #",a.prNumber]}),(0,d.jsx)("span",{className:"text-xs text-muted-foreground",children:a.commitSha.slice(0,7)}),(0,d.jsx)(B.E,{tone:N[a.status]??"neutral",children:a.status}),null!=a.followupPrNumber&&(0,d.jsxs)("span",{className:"ml-auto text-xs text-muted-foreground",children:["fix PR #",a.followupPrNumber]})]},a.id))})]})}let P=(0,f.A)("heart-pulse",[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}],["path",{d:"M3.22 13H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27",key:"auskq0"}]]),Q={healed:"success",triaging:"neutral",awaiting_slot:"neutral",repairing:"primary",awaiting_ci:"warning",verifying:"warning",cooldown:"warning",blocked:"destructive",escalated:"destructive",superseded:"neutral"};function R({sessions:a}){return(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold",children:[(0,d.jsx)(P,{className:"h-3.5 w-3.5 text-muted-foreground"})," CI auto-heal"]}),0===a.length?(0,d.jsx)(C.p,{compact:!0,icon:P,title:"No healing sessions yet",description:"When CI fails on a tracked PR, auto-heal attempts surface here."}):(0,d.jsx)("ul",{className:"flex flex-col gap-2",children:a.map(a=>(0,d.jsxs)("li",{className:"flex items-center gap-3 rounded-lg border border-border p-3",children:[(0,d.jsxs)(z(),{href:`/jobs/${a.jobId}`,className:"font-mono text-xs text-muted-foreground hover:text-foreground",children:["#",a.issueNumber]}),(0,d.jsxs)("span",{className:"font-mono text-sm",children:["PR #",a.prNumber]}),(0,d.jsx)("span",{className:"text-xs text-muted-foreground",children:a.headSha.slice(0,7)}),(0,d.jsx)(B.E,{tone:Q[a.status]??"neutral",children:a.status}),(0,d.jsxs)("span",{className:"ml-auto text-xs text-muted-foreground",children:[a.attempts," attempt",1===a.attempts?"":"s"]})]},a.id))})]})}var S=c(7052),T=c(20465),U=c(49920),V=c(15269),W=c(61622),X=c(40847),Y=c(48036),Z=c(2025),$=c(42722),_=c(54304),aa=c(64537),ab=c(74340),ac=c(34666),ad=c(64080),ae=c(8804),af=c(74644);let ag="force-dynamic";async function ah({params:a}){let{id:b}=await a,c=(0,_.m)(Number(b));c||(0,s.notFound)();let f=(0,af.mt)(),v=(0,Z.Lf)(),w={enabled:f.openrouterEnabled,models:(0,ab.Y8)({db:v,freeOnly:f.openrouterFreeModelsOnly}).map(a=>({id:a.id,label:a.name,isFree:a.isFree})),defaultModel:f.openrouterDefaultModel},x=(0,$.Bt)(v,c.repo.id),y=(0,$.i_)(v,c.repo.id).map(a=>({day:a.day,costUsd:a.costUsd})),z=(0,Y.Pe)(void 0,v,c.repo.id),A=c.repo.autoHealCi?(0,ac.ZA)(c.repo.id,v):[],C=c.repo.autoHealDeployments?(0,ad.ED)(c.repo.id,v):[],D=c.repo.releaseEnabled?(0,ae.Dn)(c.repo.id,v):[],E=c.activeJob?v.select().from(aa.jobEvents).where((0,e.eq)(aa.jobEvents.jobId,c.activeJob.id)).all().map(a=>({id:a.id,type:a.type,payload:JSON.parse(a.payload),ts:a.ts})):[],G=c.repo.queueLabel,J=c.issues.filter(a=>{try{let b=JSON.parse(a.labels);return Array.isArray(b)&&b.includes(G)}catch{return!1}}).length,K=v.select().from(aa.jobs).where((0,e.eq)(aa.jobs.repoId,c.repo.id)).all(),M=a=>K.filter(b=>a.includes(b.status)).length,N=M(["working","retrying"]),P=M(["ci_running"]),Q=M(["merged"]),ag=M(["needs_human"]);return(0,d.jsxs)("div",{className:"dd-fade-up",children:[(0,d.jsx)(u.z,{breadcrumb:[{label:"Dashboard",href:"/"},{label:c.repo.name}],title:(0,d.jsx)("span",{className:"font-mono",children:c.repo.name}),subtitle:c.repo.path,actions:(0,d.jsx)(B.E,{tone:"neutral",className:"capitalize",children:c.repo.platform})}),(0,d.jsxs)("div",{className:"mb-6 grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-6",children:[(0,d.jsx)(X.h,{icon:g,label:"Queued",value:J,tone:"primary",active:J>0}),(0,d.jsx)(X.h,{icon:h,label:"Working",value:N,tone:"primary",active:N>0}),(0,d.jsx)(X.h,{icon:i,label:"CI running",value:P,tone:"warning",active:P>0}),(0,d.jsx)(X.h,{icon:j.A,label:"Merged",value:Q,tone:"success",active:!0}),(0,d.jsx)(X.h,{icon:k.A,label:"Needs human",value:ag,tone:"destructive",active:ag>0}),(0,d.jsx)(X.h,{icon:l.A,label:"Spend today",value:`$${x.toFixed(2)}`,tone:"primary",active:!0,sub:`of $${c.repo.dailyCostLimitUsd} limit`})]}),(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)(W.Section,{icon:(0,d.jsx)(m.A,{className:"h-4 w-4"}),title:"Issues",description:"The work queue for this repository — drag to reorder, filter to focus.",tone:"primary",right:(0,d.jsxs)(B.E,{tone:"neutral",children:[c.issues.length," total"]}),children:(0,d.jsx)(t.IssueBoard,{repoId:c.repo.id,queueLabel:c.repo.queueLabel,initialIssues:c.issues,pollIntervalSec:f.pollIntervalSec,defaultModel:c.repo.defaultModel,defaultAgent:c.repo.agent})}),(0,d.jsx)(W.Section,{icon:(0,d.jsx)(n,{className:"h-4 w-4"}),title:"Automation",description:"What Drydock is allowed to do here, grouped by stage. All opt-in.",defaultOpen:!1,children:(0,d.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,d.jsxs)("div",{children:[(0,d.jsxs)("h3",{className:"mb-3 flex items-center gap-2 text-sm font-semibold",children:[(0,d.jsx)(o.A,{className:"h-3.5 w-3.5 text-muted-foreground"})," Repository settings"]}),(0,d.jsx)(U.RepoSettingsBar,{repo:c.repo,openrouter:w})]}),(0,d.jsx)(I.RepoAutomationBar,{repo:c.repo}),(0,d.jsx)(V.RepoWebhookPanel,{repo:c.repo})]})}),(0,d.jsx)(W.Section,{icon:(0,d.jsx)(p.A,{className:"h-4 w-4"}),title:"Prompts",description:"Instructions handed to the agent for this repo — use the global standard or override per stage.",defaultOpen:!1,right:(0,d.jsx)(B.E,{tone:"neutral",children:"3 stages"}),children:(0,d.jsx)(S.RepoPromptsSection,{repo:c.repo})}),(0,d.jsx)(W.Section,{icon:(0,d.jsx)(q.A,{className:"h-4 w-4"}),title:"Activity & costs",description:"Live work, recent jobs, and spend against the daily limit.",children:(0,d.jsxs)("div",{className:"grid gap-6 lg:grid-cols-2",children:[(0,d.jsx)(F,{activeJob:c.activeJob,recentJobs:c.recentJobs,initialLog:E,repoId:c.repo.id}),(0,d.jsx)(L,{todayUsd:x,limitUsd:c.repo.dailyCostLimitUsd,daily:y})]})}),(0,d.jsx)(W.Section,{icon:(0,d.jsx)(r,{className:"h-4 w-4"}),title:"Releases",description:"Published releases, CI healing, deployments, and ADRs.",defaultOpen:!1,children:(0,d.jsxs)("div",{className:"grid gap-6 lg:grid-cols-2",children:[c.repo.releaseEnabled&&(0,d.jsx)(T.RepoReleasePanel,{repoId:c.repo.id,initialRuns:D}),c.repo.autoHealCi&&(0,d.jsx)(R,{sessions:A}),c.repo.autoHealDeployments&&(0,d.jsx)(O,{sessions:C}),(0,d.jsx)(H,{adrs:z})]})})]})]})}},39165:(a,b,c)=>{"use strict";c.d(b,{RepoAutomationBar:()=>D});var d=c(27905),e=c(79432),f=c(86186),g=c(47348);let h=(0,c(71859).A)("heart-pulse",[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}],["path",{d:"M3.22 13H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27",key:"auskq0"}]]);var i=c(35404),j=c(24641),k=c(2431),l=c(35924),m=c(12517),n=c(22842),o=c(9339),p=c(37913),q=c(36121),r=c(77585),s=c(64261),t=c(83557),u=c(82795),v=c(46553),w=c(62164),x=c(33721),y=c(70740);function z(a){try{let b=JSON.parse(a);return Array.isArray(b)?b.filter(a=>"string"==typeof a):[]}catch{return[]}}function A(a){return[...new Set(a.split(/[,\n]/).map(a=>a.trim()).filter(Boolean))]}function B({label:a,help:b,checked:c,onChange:e,children:f}){return(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,d.jsx)(t.d,{checked:c,onChange:e,"aria-label":a}),(0,d.jsx)("span",{className:"text-sm",children:a}),b&&(0,d.jsx)(w.V,{content:b})]}),c&&f&&(0,d.jsx)("div",{className:"dd-fade-up mt-3 grid gap-3 border-l-2 border-border pl-4 sm:grid-cols-2",children:f})]})}function C({label:a,value:b,onChange:c,onBlur:e,help:f}){return(0,d.jsx)(p.D,{label:(0,d.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[a,f&&(0,d.jsx)(w.V,{content:f})]}),children:(0,d.jsx)(r.p,{value:b,onChange:a=>c(a.target.value),onBlur:e,placeholder:"comma-separated",className:"h-8 font-mono text-xs"})})}function D({repo:a}){let[b,c]=(0,l.useState)(a.autoTriageEnabled),[E,F]=(0,l.useState)(a.autoProcessEnabled),[G,H]=(0,l.useState)(a.autoHealCi),[I,J]=(0,l.useState)(a.mergeWithoutChecks),[K,L]=(0,l.useState)(a.autoReviewFeedback),[M,N]=(0,l.useState)(a.autoDecompose),[O,P]=(0,l.useState)(a.planFirst),[Q,R]=(0,l.useState)(a.verifyPr),[S,T]=(0,l.useState)(a.autoPrAudit),[U,V]=(0,l.useState)(a.prAuditAgent??("openrouter"===a.agent?"claude":a.agent)),[W,X]=(0,l.useState)(a.prAuditModel??(a.prAuditAgent&&a.prAuditAgent!==a.agent?(0,x.VJ)(a.prAuditAgent):a.defaultModel)),[Y,Z]=(0,l.useState)(a.prAuditLanguage),[$,_]=(0,l.useState)(a.prAuditPostOnPr),[aa,ab]=(0,l.useState)(a.autoHealDeployments),[ac,ad]=(0,l.useState)(a.releaseEnabled),[ae,af]=(0,l.useState)(a.autoResolveMergeConflicts),[ag,ah]=(0,l.useState)(a.includeProgressReplies),[ai,aj]=(0,l.useState)(z(a.readyLabels).join(", ")),[ak,al]=(0,l.useState)(z(a.blockingLabels).join(", ")),[am,an]=(0,l.useState)(z(a.autoLabelWhitelist).join(", ")),[ao,ap]=(0,l.useState)(z(a.priorityAuthors).join(", ")),[aq,ar]=(0,l.useState)(z(a.trustedReviewers).join(", ")),[as,at]=(0,l.useState)(z(a.trustedBots).join(", ")),[au,av]=(0,l.useState)(z(a.ignoredBots).join(", ")),[aw,ax]=(0,l.useState)(a.minAuthorAssociation),[ay,az]=(0,l.useState)(a.deploymentPlatform??""),[aA,aB]=(0,l.useState)(a.maxAttempts),[aC,aD]=(0,l.useState)(a.escalateModelOnRetry),[aE,aF]=(0,l.useState)("docker"===a.sandbox),[aG,aH]=(0,l.useState)(a.sandboxImage??""),[aI,aJ]=(0,l.useState)(a.sandboxAllowNetwork),[aK,aL]=(0,l.useState)(a.sandboxCpus??""),[aM,aN]=(0,l.useState)(a.sandboxMemory??""),[aO,aP]=(0,l.useState)(a.agentInstructions??""),[aQ,aR]=(0,l.useTransition)(),[aS,aT]=(0,l.useState)(!1),{error:aU}=(0,v.d)();function aV(b){aT(!1),aR(async()=>{try{await (0,y.u)(a.id,b),aT(!0),setTimeout(()=>aT(!1),1500)}catch(a){aU("Failed to update automation",a instanceof Error?a.message:String(a))}})}return(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)(o.F,{tone:"info",icon:e.A,title:"Bounded & configurable",children:"Most stages are off by default and consume paid agent usage; PR review-feedback is on by default and can be turned off below. Drydock auto-merges a PR only once its configured gates pass — and merging a PR with no automated checks at all requires the explicit opt-in below."}),(0,d.jsxs)("div",{className:"grid gap-4 lg:grid-cols-2",children:[(0,d.jsx)(q.L,{icon:f.A,legend:"Triage",tone:"primary",description:"Classify and label brand-new issues.",children:(0,d.jsxs)(B,{label:"Auto-triage new issues",checked:b,onChange:a=>{c(a),aV({autoTriageEnabled:a})},help:"Reads each new issue and applies whitelisted labels. Never processes — only classifies.",children:[(0,d.jsx)(C,{label:"Auto-label whitelist",value:am,onChange:an,onBlur:()=>aV({autoLabelWhitelist:A(am)}),help:"Triage may only apply labels from this list."}),(0,d.jsx)(p.D,{label:(0,d.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:["Act on authors",(0,d.jsx)(w.V,{content:"Restrict automation to issues from trusted authors."})]}),children:(0,d.jsxs)(s.l,{value:aw,onChange:a=>{let b=a.target.value;ax(b),aV({minAuthorAssociation:b})},className:"h-8 text-xs",children:[(0,d.jsx)("option",{value:"approved",children:"Owners / members / collaborators"}),(0,d.jsx)("option",{value:"any",children:"Anyone (public participation)"})]})})]})}),(0,d.jsxs)(q.L,{icon:g.A,legend:"Processing",tone:"primary",description:"Turn ready issues into pull requests.",children:[(0,d.jsxs)(B,{label:"Auto-process ready issues",checked:E,onChange:a=>{F(a),aV({autoProcessEnabled:a})},help:"Works issues that are ready and not blocked, opening a PR for each.",children:[(0,d.jsx)(C,{label:"Ready labels",value:ai,onChange:aj,onBlur:()=>aV({readyLabels:A(ai)}),help:"Only issues carrying one of these labels are eligible."}),(0,d.jsx)(C,{label:"Blocking labels",value:ak,onChange:al,onBlur:()=>aV({blockingLabels:A(ak)}),help:"Any of these labels holds an issue back."}),(0,d.jsx)(C,{label:"Priority authors",value:ao,onChange:ap,onBlur:()=>aV({priorityAuthors:A(ao)}),help:"Issues from these authors jump the queue."}),(0,d.jsx)(p.D,{label:"Max attempts",children:(0,d.jsx)(r.p,{type:"number",min:1,value:aA,onChange:a=>aB(Number(a.target.value)),onBlur:()=>aV({maxAttempts:aA}),className:"h-8 w-24 text-xs"})})]}),(0,d.jsx)(B,{label:"Escalate model on retry",checked:aC,onChange:a=>{aD(a),aV({escalateModelOnRetry:a})},help:"When a failed job is requeued, the next attempt runs the next-stronger model in this agent's ladder (capped at the strongest). Each attempt is priced at the model it actually ran."}),(0,d.jsx)(B,{label:"Decompose large issues",checked:M,onChange:a=>{N(a),aV({autoDecompose:a})},help:"Splits big issues into ordered, tracked subtasks before working them."}),(0,d.jsx)(B,{label:"Plan before implementing",checked:O,onChange:a=>{P(a),aV({planFirst:a})},help:"A read-only planning pass before implementation; the plan is posted on the issue and embedded in the work prompt. Falls back to a normal run on failure."}),(0,d.jsx)(B,{label:"Verify PR satisfies issue",checked:Q,onChange:a=>{R(a),aV({verifyPr:a})},help:"A read-only pass after the PR opens that checks the diff against the issue and flags gaps. Never changes state on failure."}),(0,d.jsxs)(B,{label:"Audit PRs with an AI review",checked:S,onChange:a=>{T(a),aV({autoPrAudit:a})},help:"A read-only, whole-PR review (Bugbot/CodeRabbit style) posted on the issue after the PR opens. Advisory only — it never merges, blocks, or edits anything.",children:[(0,d.jsx)(p.D,{label:(0,d.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:["Audit agent",(0,d.jsx)(w.V,{content:"CLI agent that runs the audit. Switching agents resets the audit model to that agent's default."})]}),children:(0,d.jsx)(m.a,{value:U,onChange:a=>{if("openrouter"===a)return;let b=(0,x.VJ)(a);V(a),X(b),aV({prAuditAgent:a,prAuditModel:b})},className:"h-8 text-xs"})}),(0,d.jsx)(p.D,{label:(0,d.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:["Audit model",(0,d.jsx)(w.V,{content:"Model used for the audit run."})]}),children:(0,d.jsx)(n.o,{value:W,onChange:a=>{X(a),aV({prAuditModel:a})},agent:U,className:"h-8 text-xs"})}),(0,d.jsx)(p.D,{label:(0,d.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:["Review language",(0,d.jsx)(w.V,{content:"Language the review is written in (e.g. en, de, pt-BR). English is the default."})]}),children:(0,d.jsx)(r.p,{value:Y,onChange:a=>Z(a.target.value),onBlur:()=>{let a=Y.trim()||"en";(Z(a),/^[a-zA-Z]{2,8}(-[a-zA-Z0-9]{1,8})*$/.test(a))?aV({prAuditLanguage:a}):aU("Invalid review language",`"${a}" is not a language code — use a simple or BCP 47 code like en, de, or pt-BR.`)},placeholder:"en",className:"h-8 w-24 font-mono text-xs"})}),(0,d.jsxs)("div",{className:"flex items-center gap-2.5 self-end pb-1.5",children:[(0,d.jsx)(t.d,{checked:$,onChange:a=>{_(a),aV({prAuditPostOnPr:a})},"aria-label":"Also comment on the PR"}),(0,d.jsx)("span",{className:"text-sm",children:"Also comment on the PR"}),(0,d.jsx)(w.V,{content:"Mirror the review on the pull request in addition to the issue."})]})]}),(0,d.jsxs)(B,{label:"Address PR review feedback",checked:K,onChange:a=>{L(a),aV({autoReviewFeedback:a})},help:"Runs the mechanical iteration for trusted reviewers and allowlisted bots.",children:[(0,d.jsx)(C,{label:"Trusted reviewers",value:aq,onChange:ar,onBlur:()=>aV({trustedReviewers:A(aq)}),help:"Only feedback from these reviewers is acted on."}),(0,d.jsx)(C,{label:"Trusted bots",value:as,onChange:at,onBlur:()=>aV({trustedBots:A(as)}),help:"Bot reviewers (e.g. cursor[bot]) whose findings are acted on. Bots not listed here are ignored."}),(0,d.jsx)(C,{label:"Ignored bots",value:au,onChange:av,onBlur:()=>aV({ignoredBots:A(au)}),help:"Review comments from these bots are always skipped, even if also listed as trusted."})]}),(0,d.jsx)(B,{label:"Repair trivial merge conflicts",checked:ae,onChange:a=>{af(a),aV({autoResolveMergeConflicts:a})},help:"Rebases and resolves mechanical conflicts; complex ones still escalate."})]}),(0,d.jsxs)(q.L,{icon:h,legend:"CI & deploy healing",tone:"warning",description:"Keep checks and deployments green.",children:[(0,d.jsx)(B,{label:"Auto-heal failing CI",checked:G,onChange:a=>{H(a),aV({autoHealCi:a})},help:"Attempts bounded, verified fixes for failing CI. Never touches external or AI-review checks."}),(0,d.jsx)(B,{label:"Merge PRs with no CI checks",checked:I,onChange:a=>{J(a),aV({mergeWithoutChecks:a})},help:"For repos with manual-only or review-bot-only CI. After the merge-gate settle window, merges a PR that reports no checks at all — with NO automated verification. Leave off unless this repo truly has no automated CI."}),(0,d.jsx)(B,{label:"Heal failed deployments",checked:aa,onChange:a=>{ab(a),aV({autoHealDeployments:a})},help:"Monitors a merged PR's deployment and, on failure, opens a follow-up fix PR with the captured logs.",children:(0,d.jsx)(p.D,{label:"Deployment platform",children:(0,d.jsxs)(s.l,{value:ay,onChange:a=>{let b=a.target.value;az(b),aV({deploymentPlatform:b||null})},className:"h-8 text-xs",children:[(0,d.jsx)("option",{value:"",children:"Auto-detect"}),(0,d.jsx)("option",{value:"vercel",children:"Vercel"}),(0,d.jsx)("option",{value:"railway",children:"Railway"})]})})})]}),(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)(q.L,{icon:i.A,legend:"Releases",tone:"success",description:"Cut releases from merged work.",children:(0,d.jsx)(B,{label:"Manage releases",checked:ac,onChange:a=>{ad(a),aV({releaseEnabled:a})},help:"Evaluates merged PRs since the last tag, picks the semver bump, and publishes — gated by a global kill-switch and fully previewable."})}),(0,d.jsx)(q.L,{icon:j.A,legend:"Sandbox",tone:"warning",description:"Isolate agent execution in a container.",children:(0,d.jsxs)(B,{label:"Run the agent in a container",checked:aE,onChange:a=>{aF(a),aV({sandbox:a?"docker":"none"})},help:"Runs this repo's agent sessions inside a container with the worktree bind-mounted as the only writable host path. Requires Docker or Podman on the host and an image that carries the agent CLI plus the repo's toolchain (devcontainer.json image is used if present). Git push still happens on the host.",children:[(0,d.jsx)(p.D,{label:(0,d.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:["Image override",(0,d.jsx)(w.V,{content:"Container image to run in. Leave blank to use the repo's devcontainer.json image, else the global default image from Settings."})]}),children:(0,d.jsx)(r.p,{value:aG,onChange:a=>aH(a.target.value),onBlur:()=>aV({sandboxImage:aG.trim()||null}),placeholder:"devcontainer / global default",className:"h-8 font-mono text-xs"})}),(0,d.jsx)(p.D,{label:(0,d.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:["Resource caps",(0,d.jsx)(w.V,{content:"Optional --cpus and --memory limits (e.g. 2 and 4g). Leave blank for no limit."})]}),children:(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(r.p,{value:aK,onChange:a=>aL(a.target.value),onBlur:()=>{let a=aK.trim();a&&!/^\d+(\.\d+)?$/.test(a)?aU("Invalid CPU limit","Use a positive number like 0.5, 1, or 2."):aV({sandboxCpus:a||null})},placeholder:"cpus",className:"h-8 w-20 font-mono text-xs"}),(0,d.jsx)(r.p,{value:aM,onChange:a=>aN(a.target.value),onBlur:()=>{let a=aM.trim();a&&!/^\d+(\.\d+)?\s*[bkmg]?$/i.test(a)?aU("Invalid memory limit","Use a value like 512m, 2g, or 4096."):aV({sandboxMemory:a||null})},placeholder:"memory",className:"h-8 w-24 font-mono text-xs"})]})}),(0,d.jsxs)("div",{className:"flex items-center gap-2.5 self-end pb-1.5 sm:col-span-2",children:[(0,d.jsx)(t.d,{checked:aI,onChange:a=>{aJ(a),aV({sandboxAllowNetwork:a})},"aria-label":"Allow network access"}),(0,d.jsx)("span",{className:"text-sm",children:"Allow network access"}),(0,d.jsx)(w.V,{content:"Off (default) runs the container with --network none. Turn on only if the toolchain must fetch dependencies during the run."})]})]})}),(0,d.jsx)(q.L,{icon:k.A,legend:"Notifications",description:"How Drydock talks back on the issue.",children:(0,d.jsx)(B,{label:"Post progress replies",checked:ag,onChange:a=>{ah(a),aV({includeProgressReplies:a})},help:"Comments status updates on the issue as the job advances."})})]})]}),(0,d.jsx)(p.D,{label:"Agent instructions",hint:(0,d.jsxs)(d.Fragment,{children:["Optional. Appended to the work prompt as a dedicated section — coding conventions, “always run pnpm test”, “don’t touch legacy/”, preferred PR style. Max ",4e3," characters; empty leaves the prompt unchanged."]}),children:(0,d.jsx)(u.T,{value:aO,maxLength:4e3,rows:3,onChange:a=>aP(a.target.value),onBlur:()=>aV({agentInstructions:aO.trim()||null}),placeholder:"Per-repo guidance injected into the work prompt…",className:"font-mono text-xs"})}),(0,d.jsx)("div",{"aria-live":"polite",className:"h-4 text-xs text-muted-foreground",children:aQ?"Saving…":aS?"Saved":""})]})}},40847:(a,b,c)=>{"use strict";c.d(b,{h:()=>j});var d=c(87383),e=c(89494),f=c(25900);let g={top:"bottom-full left-1/2 -translate-x-1/2 mb-2",bottom:"top-full left-1/2 -translate-x-1/2 mt-2",right:"left-full top-1/2 -translate-y-1/2 ml-2",left:"right-full top-1/2 -translate-y-1/2 mr-2"};function h({content:a,children:b,side:c="top",className:e}){return(0,d.jsxs)("span",{className:"group/tt relative inline-flex",children:[b,(0,d.jsx)("span",{role:"tooltip",className:(0,f.cn)("pointer-events-none absolute z-50 w-max max-w-[260px] rounded-lg border border-border bg-popover px-2.5 py-1.5 text-xs leading-relaxed text-popover-foreground shadow-lg","translate-y-0.5 opacity-0 transition-all duration-150 group-focus-within/tt:opacity-100 group-hover/tt:translate-y-0 group-hover/tt:opacity-100",g[c],e),children:a})]})}let i={neutral:{chip:"bg-secondary text-muted-foreground",val:"text-foreground",bg:""},primary:{chip:"bg-primary/15 text-primary",val:"text-primary",bg:"bg-primary/[0.04]"},success:{chip:"bg-success-muted text-success",val:"text-success",bg:"bg-success/[0.05]"},warning:{chip:"bg-warning-muted text-warning",val:"text-warning",bg:"bg-warning/[0.05]"},destructive:{chip:"bg-destructive/15 text-destructive",val:"text-destructive",bg:"bg-destructive/[0.05]"}};function j({icon:a,label:b,value:c,sub:g,tone:k="neutral",active:l,onClick:m,hint:n}){let o=!!l&&"neutral"!==k,p=i[k],q=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsx)("span",{className:(0,f.cn)("flex h-8 w-8 items-center justify-center rounded-lg transition-colors",o?p.chip:"bg-secondary text-muted-foreground"),children:a&&(0,d.jsx)(a,{className:"h-4 w-4"})}),n&&(0,d.jsx)("span",{className:"text-muted-foreground/60",children:(0,d.jsx)(h,{content:n,children:(0,d.jsx)(e.A,{className:"h-3.5 w-3.5"})})})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:(0,f.cn)("text-2xl font-semibold tnum tracking-tight",o?p.val:"text-foreground"),children:c}),(0,d.jsx)("div",{className:"mt-0.5 text-[13px] font-medium text-muted-foreground",children:b}),g&&(0,d.jsx)("div",{className:"mt-0.5 text-xs text-muted-foreground/80",children:g})]})]}),r=(0,f.cn)("group relative flex flex-col gap-3 rounded-xl border border-card-border bg-card p-4 text-left shadow-sm transition-colors",o&&p.bg,m&&"hover-elevate focus-ring");return m?(0,d.jsx)("button",{type:"button",onClick:m,className:r,children:q}):(0,d.jsx)("div",{className:r,children:q})}},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},42970:(a,b,c)=>{"use strict";c.d(b,{RepoAutomationBar:()=>d});let d=(0,c(34215).registerClientReference)(function(){throw Error("Attempted to call RepoAutomationBar() from the server but RepoAutomationBar 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/drydock/drydock/src/components/repo-automation-bar.tsx","RepoAutomationBar")},43954:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/interception-routes")},44086:(a,b,c)=>{"use strict";c.d(b,{RepoReleasePanel:()=>o});var d=c(27905),e=c(35404),f=c(35924),g=c(27796),h=c(32029),i=c(25126),j=c(46553),k=c(23581);let l=(0,k.createServerReference)("406aa2a7a1c6a7f04aa6c87ce1e364ef1e61195c82",k.callServer,void 0,k.findSourceMapURL,"previewReleaseAction"),m=(0,k.createServerReference)("4081976aa504ae125cf426e6e894f3e547e6cbb8ee",k.callServer,void 0,k.findSourceMapURL,"publishReleaseAction"),n={detected:"neutral",evaluating:"neutral",proposed:"primary",publishing:"warning",published:"success",skipped:"neutral",error:"destructive"};function o({repoId:a,initialRuns:b}){let[c,k]=(0,f.useState)(b),[p,q]=(0,f.useState)(null),[r,s]=(0,f.useTransition)(),{error:t,success:u,info:v}=(0,j.d)();return(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold",children:[(0,d.jsx)(e.A,{className:"h-3.5 w-3.5 text-muted-foreground"})," Releases"]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)(h.$,{variant:"outline",size:"sm",onClick:function(){s(async()=>{try{q(await l(a))}catch(a){t("Preview failed",a instanceof Error?a.message:String(a))}})},disabled:r,children:"Preview"}),(0,d.jsx)(h.$,{size:"sm",onClick:function(){s(async()=>{try{let b=await m(a);k(b),q(null);let c=b[0];c?.status==="published"?u("Release published",c.tag?`Cut ${c.tag}.`:"A release was cut."):c?.status==="skipped"?v("No release cut","No release was recommended for the latest changes."):c?.status==="error"?t("Publish failed",c.errorMessage??"The release run did not complete."):v("Release started",`Run is ${c?.status??"in progress"}.`)}catch(a){t("Publish failed",a instanceof Error?a.message:String(a))}})},disabled:r,children:"Publish release"})]})]}),p&&(0,d.jsxs)("div",{className:"space-y-2 rounded-lg border border-card-border bg-secondary/30 p-3 text-sm",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,d.jsx)("span",{className:"font-medium",children:"Proposed:"}),(0,d.jsx)(g.E,{tone:"primary",children:p.candidateTag}),(0,d.jsxs)("span",{className:"text-xs text-muted-foreground",children:[p.fromTag?`from ${p.fromTag}`:"first release"," \xb7 ",p.bump," \xb7"," ",p.shouldRelease?"release recommended":"no release recommended"]})]}),(0,d.jsxs)("ul",{className:"flex flex-col gap-0.5 text-xs text-muted-foreground",children:[p.prs.map(a=>(0,d.jsxs)("li",{className:"truncate",children:[(0,d.jsxs)("span",{className:"font-mono",children:["#",a.number]})," ",a.title]},a.number)),0===p.prs.length&&(0,d.jsx)("li",{children:"No unreleased pull requests."})]})]}),0===c.length?(0,d.jsx)(i.p,{compact:!0,icon:e.A,title:"No release runs yet",description:"Preview or publish a release to cut one from your merged work."}):(0,d.jsx)("ul",{className:"flex flex-col gap-2",children:c.map(a=>(0,d.jsxs)("li",{className:"flex items-center gap-3 rounded-lg border border-border p-3",children:[(0,d.jsx)(e.A,{className:"h-3.5 w-3.5 shrink-0 text-success"}),a.tag?(0,d.jsx)("span",{className:"font-mono text-sm font-semibold",children:a.tag}):(0,d.jsx)("span",{className:"text-xs text-muted-foreground",children:a.mode}),a.tag&&(0,d.jsx)("span",{className:"text-xs text-muted-foreground",children:a.mode}),null!=a.triggerPrNumber&&(0,d.jsxs)("span",{className:"text-xs text-muted-foreground",children:["PR #",a.triggerPrNumber]}),(0,d.jsx)(g.E,{tone:n[a.status]??"neutral",children:a.status}),a.errorMessage&&(0,d.jsx)("span",{className:"ml-auto max-w-[40%] truncate text-xs text-destructive",title:a.errorMessage,children:a.errorMessage})]},a.id))})]})}},46019:(a,b,c)=>{"use strict";c.d(b,{EY:()=>h,PS:()=>j,mg:()=>g,vV:()=>i});var d=c(14565),e=c(89642),f=c(24845);async function g(a){let b=(0,f.AI)(a);return(0,e.revalidatePath)("/prompts"),b}async function h(a,b){return(0,f.I7)(a,b),(0,e.revalidatePath)("/prompts"),{content:(0,f.yx)(a,b)}}async function i(a,b){return{content:(0,f.yx)(a,b),versions:(0,f.yO)(a,b).map(a=>({version:a.version,updatedAt:a.updatedAt,content:a.content})),hasRow:!!(0,f.F1)(a,b)}}async function j(a,b,c){let d=(0,f.HF)(a,b,c);return d?{version:d.version,content:d.content,updatedAt:d.updatedAt}:null}(0,c(13897).D)([g,h,i,j]),(0,d.A)(g,"40997a0f75158e6053a9b7c0d68fa06915f0dd55e8",null),(0,d.A)(h,"609cdd9a1dbf528a7f2faf706ffbf674d866f06489",null),(0,d.A)(i,"6030172ec23da9d8d9b85f482f488a3ff5648350ca",null),(0,d.A)(j,"70a15241694fdeaefceedec677b8363d202eb8df32",null)},47348:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(71859).A)("git-pull-request-arrow",[["circle",{cx:"5",cy:"6",r:"3",key:"1qnov2"}],["path",{d:"M5 9v12",key:"ih889a"}],["circle",{cx:"19",cy:"18",r:"3",key:"1qljk2"}],["path",{d:"m15 9-3-3 3-3",key:"1lwv8l"}],["path",{d:"M12 6h5a2 2 0 0 1 2 2v7",key:"1yj91y"}]])},48161:a=>{"use strict";a.exports=require("node:os")},49920:(a,b,c)=>{"use strict";c.d(b,{RepoSettingsBar:()=>d});let d=(0,c(34215).registerClientReference)(function(){throw Error("Attempted to call RepoSettingsBar() from the server but RepoSettingsBar 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/drydock/drydock/src/components/repo-settings-bar.tsx","RepoSettingsBar")},50059:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(71859).A)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]])},50741:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>f});var d=c(87383),e=c(27542);function f(){return(0,d.jsxs)("div",{children:[(0,d.jsx)(e.ym,{breadcrumb:!0}),(0,d.jsx)(e.YC,{className:"mb-6"}),(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)(e.EA,{className:"h-80 rounded-xl"}),[1,2,3,4].map(a=>(0,d.jsx)(e.EA,{className:"h-14 rounded-xl"},a))]})]})}},51455:a=>{"use strict";a.exports=require("node:fs/promises")},53985:(a,b,c)=>{"use strict";c.d(b,{_:()=>d});let d={main:"default",ciFix:"ci-fix",plan:"plan",limitResume:"limit-resume"}},55511:a=>{"use strict";a.exports=require("crypto")},55591:a=>{"use strict";a.exports=require("https")},57284:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(30285).A)("list-checks",[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]])},59810:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(30285).A)("dollar-sign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]])},60009:(a,b,c)=>{"use strict";c.d(b,{I:()=>f});var d=c(27905),e=c(5270);function f({value:a,onChange:b,options:c,size:g="default",disabled:h=!1}){return(0,d.jsx)("div",{className:(0,e.cn)("inline-flex items-center gap-0.5 rounded-lg border border-border bg-secondary/50 p-0.5","sm"===g&&"text-xs"),children:c.map(c=>(0,d.jsx)("button",{type:"button",disabled:h,onClick:()=>b(c.value),className:(0,e.cn)("rounded-md px-2.5 py-1 text-xs font-medium transition-colors focus-ring","disabled:cursor-not-allowed disabled:opacity-50",a===c.value?"bg-card text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:c.label},c.value))})}},61622:(a,b,c)=>{"use strict";c.d(b,{Section:()=>d});let d=(0,c(34215).registerClientReference)(function(){throw Error("Attempted to call Section() from the server but Section 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/drydock/drydock/src/components/ui/section.tsx","Section")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},64137:(a,b,c)=>{"use strict";c.r(b),c.d(b,{"00d40d65ec366596ba0f414253cbf8a8e26ce81760":()=>d.o$,"00f17bccf1224c648f7e7a74f84441484b3c19a422":()=>e.MA,"402b4d0a084d74a542bd5e68a4e346d99a2c2fb656":()=>p,"403fc9b2867e1f720d4d1326cb1ea3c5c67b2fad36":()=>d.AU,"406aa2a7a1c6a7f04aa6c87ce1e364ef1e61195c82":()=>M,"4081976aa504ae125cf426e6e894f3e547e6cbb8ee":()=>N,"40997a0f75158e6053a9b7c0d68fa06915f0dd55e8":()=>E.mg,"40a385ca6c1b8479def93fa7e48a72fcfaf4c58010":()=>e.r6,"40d6ac063e31ed3ee52059d74d9460570a55d99e84":()=>e.$y,"40ea5d9a48c67bf43c3c92eead681338f5513aaa29":()=>d.aE,"40fcc887f9ff7ac5868aa79ea734267acaafdf2939":()=>D.VL,"40fd63aacb5de1dd97754363caf4af17282a4ba203":()=>D.oW,"40ff46484b8d0230f28e7853cff3b0037220bc4029":()=>D.$p,"6003eba99a7cf5bc7fa9967a0706bfa1838924afb2":()=>x,"602dce4b14453b4518567ca38bcc13ce3f3ce76fe4":()=>t,"6030172ec23da9d8d9b85f482f488a3ff5648350ca":()=>E.vV,"607c5a4c4dc706fb3a46264121179bae12a54df26a":()=>u,"60861191b2d2651b7286a7965542afae3ae420dd40":()=>D.u3,"609cdd9a1dbf528a7f2faf706ffbf674d866f06489":()=>E.EY,"60b9133bada35485d05f7b139b053e21ba8b57d7bc":()=>q,"60c4ca7d30a901f49d1379857320b5000765341812":()=>v,"60eabaacff459852d9a4c65318e1f5f3af0f8a1c3c":()=>y,"700903b9129943d3b489d05465990a033f4c419e56":()=>z,"7029508c5f49d4d04208ad53a349fbfe2b749d44de":()=>A,"7072926bc1bfbc88d26c7c57c60193191e2dd21c2d":()=>C,"70782ef64129fb275bd4f420c29400bb22fa476948":()=>w,"7088a73060e2fb01e0e2562c14954015dc541865b3":()=>r,"70a15241694fdeaefceedec677b8363d202eb8df32":()=>E.PS,"70b0e23a05537efb81cb606a449c9bb98467cbd4bd":()=>s,"784d415ac7886ea8db0614d9a993b85b509a5d8999":()=>B});var d=c(37078),e=c(44045),f=c(14565),g=c(89642),h=c(6012),i=c(74929),j=c(67806),k=c(50186),l=c(22287),m=c(20200),n=c(17398),o=c(13897);async function p(a){let b=await (0,k.GX)(a);return(0,g.revalidatePath)(`/repos/${a}`),b}async function q(a,b){(0,k.mU)(a,b),(0,g.revalidatePath)(`/repos/${a}`)}async function r(a,b,c={}){let d=(0,i.L8)(a);if(!d)throw Error(`repo ${a} not found`);if(void 0!==c.model&&!(0,m.WM)(c.model))throw Error(`unknown model id: ${c.model}`);if(void 0!==c.agent&&!(0,h.TU)(c.agent))throw Error(`unknown agent: ${c.agent}`);let e=(0,n.Ix)({repoId:a,issueNumber:b,model:c.model??d.defaultModel,agent:c.agent??d.agent});if(!e)throw Error(`A job for issue #${b} is already active.`);return(0,g.revalidatePath)(`/repos/${a}`),e}async function s(a,b,c={}){let d=await (0,k.xt)(a,b,c);return(0,g.revalidatePath)(`/repos/${a}`),d}async function t(a,b){let c=await (0,k.c1)(a,b);return(0,g.revalidatePath)(`/repos/${a}`),c}async function u(a,b){let c=await (0,k.CY)(a,b);return(0,g.revalidatePath)(`/repos/${a}`),c}async function v(a,b){let c=await (0,k.RC)(a,b);return(0,g.revalidatePath)(`/repos/${a}`),c}async function w(a,b,c){let d=await (0,k.NV)(a,b,c);return(0,g.revalidatePath)(`/repos/${a}`),d}async function x(a,b){let c=(0,i.L8)(a);if(!c)throw Error(`repo ${a} not found`);return(0,j.Ie)(c).viewIssue(b)}async function y(a,b){return(0,l.t0)(a,b)}async function z(a,b,c){let d=(0,i.L8)(a);if(!d)throw Error(`repo ${a} not found`);await (0,j.Ie)(d).editIssue(b,c),(0,g.revalidatePath)(`/repos/${a}`)}async function A(a,b,c){let d=(0,i.L8)(a);if(!d)throw Error(`repo ${a} not found`);await (0,j.Ie)(d).commentIssue(b,c)}async function B(a,b,c,d){await (0,k.Fg)(a,b,c,d),(0,g.revalidatePath)(`/repos/${a}`)}async function C(a,b,c){let d=(0,i.L8)(a);if(!d)throw Error(`repo ${a} not found`);let e=(0,j.Ie)(d);"closed"===c?await e.closeIssue(b):await e.reopenIssue(b),(0,g.revalidatePath)(`/repos/${a}`)}(0,o.D)([p,q,r,s,t,u,v,w,x,y,z,A,B,C]),(0,f.A)(p,"402b4d0a084d74a542bd5e68a4e346d99a2c2fb656",null),(0,f.A)(q,"60b9133bada35485d05f7b139b053e21ba8b57d7bc",null),(0,f.A)(r,"7088a73060e2fb01e0e2562c14954015dc541865b3",null),(0,f.A)(s,"70b0e23a05537efb81cb606a449c9bb98467cbd4bd",null),(0,f.A)(t,"602dce4b14453b4518567ca38bcc13ce3f3ce76fe4",null),(0,f.A)(u,"607c5a4c4dc706fb3a46264121179bae12a54df26a",null),(0,f.A)(v,"60c4ca7d30a901f49d1379857320b5000765341812",null),(0,f.A)(w,"70782ef64129fb275bd4f420c29400bb22fa476948",null),(0,f.A)(x,"6003eba99a7cf5bc7fa9967a0706bfa1838924afb2",null),(0,f.A)(y,"60eabaacff459852d9a4c65318e1f5f3af0f8a1c3c",null),(0,f.A)(z,"700903b9129943d3b489d05465990a033f4c419e56",null),(0,f.A)(A,"7029508c5f49d4d04208ad53a349fbfe2b749d44de",null),(0,f.A)(B,"784d415ac7886ea8db0614d9a993b85b509a5d8999",null),(0,f.A)(C,"7072926bc1bfbc88d26c7c57c60193191e2dd21c2d",null);var D=c(11183),E=c(46019),F=c(95310),G=c(580),H=c(39152),I=c(77058),J=c(19761),K=c(41575);function L(a){let b=(0,F.Lf)(),c=(0,i.L8)(a,b);if(!c)throw Error(`repo ${a} not found`);if(!(0,K.mt)(b).releaseManagementEnabled)throw Error("Release management is disabled globally.");if(!(0,J.A)(c).releaseEnabled)throw Error("Release management is not enabled for this repo.");let d=(0,j.Ie)(c);if("function"!=typeof d.listReleases||"function"!=typeof d.listMergedPrs||"function"!=typeof d.createRelease)throw Error("This repo's forge does not support releases.");let e=(0,h.X$)(c.agent);return{db:b,repo:c,forge:d,provider:e,command:(0,G.m)(e,b),model:c.defaultModel}}async function M(a){let{forge:b,provider:c,command:d,model:e}=L(a);return(0,H.NF)({provider:c,command:d,model:e},a=>(0,H.st)({forge:b,generate:a}))}async function N(a){let{db:b,repo:c,forge:d,provider:e,command:f,model:h}=L(a),i=b.transaction(()=>{let a=(0,I.Fg)(c.id,b);if(a)throw Error(`A release run is already in progress for this repo (run ${a.id}, ${a.status}).`);return(0,I.v0)({repoId:c.id,mode:"manual"},b)});try{await (0,H.NF)({provider:e,command:f,model:h},a=>(0,H.Dl)(i.id,{repo:c,forge:d,db:b,generate:a}))}catch(c){let a=(0,I.tm)(i.id,b);if(a?.status==="detected"){let a=c instanceof Error?c.message:String(c);(0,I.Cq)(i.id,"error",{errorMessage:a.slice(0,500)},b)}throw c}return(0,g.revalidatePath)(`/repos/${a}`),(0,I.Dn)(c.id,b)}(0,o.D)([M,N]),(0,f.A)(M,"406aa2a7a1c6a7f04aa6c87ce1e364ef1e61195c82",null),(0,f.A)(N,"4081976aa504ae125cf426e6e894f3e547e6cbb8ee",null)},65758:(a,b,c)=>{Promise.resolve().then(c.bind(c,87586)),Promise.resolve().then(c.t.bind(c,9324,23)),Promise.resolve().then(c.bind(c,75045)),Promise.resolve().then(c.bind(c,13867)),Promise.resolve().then(c.bind(c,39165)),Promise.resolve().then(c.bind(c,9804)),Promise.resolve().then(c.bind(c,44086)),Promise.resolve().then(c.bind(c,78906)),Promise.resolve().then(c.bind(c,10519)),Promise.resolve().then(c.bind(c,73344)),Promise.resolve().then(c.bind(c,40104))},70722:a=>{"use strict";a.exports=require("next/dist/shared/lib/invariant-error")},70740:(a,b,c)=>{"use strict";c.d(b,{u:()=>e});var d=c(23581);let e=(0,d.createServerReference)("60861191b2d2651b7286a7965542afae3ae420dd40",d.callServer,void 0,d.findSourceMapURL,"updateRepoAction")},73024:a=>{"use strict";a.exports=require("node:fs")},73344:(a,b,c)=>{"use strict";c.d(b,{Section:()=>i});var d=c(27905),e=c(50050),f=c(35924),g=c(5270);let h={neutral:"bg-secondary text-muted-foreground",primary:"bg-primary/10 text-primary",success:"bg-success-muted text-success",warning:"bg-warning-muted text-warning",destructive:"bg-destructive/10 text-destructive"};function i({icon:a,title:b,description:c,defaultOpen:j=!0,right:k,collapsible:l=!0,children:m,tone:n="neutral",id:o}){let[p,q]=(0,f.useState)(j),r=(0,f.useId)(),s=()=>q(a=>!a),t=a&&(0,d.jsx)("span",{className:(0,g.cn)("flex h-8 w-8 shrink-0 items-center justify-center rounded-lg",h[n]),children:a}),u=(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsx)("h2",{className:"text-base font-semibold tracking-tight",children:b}),c&&(0,d.jsx)("p",{className:"text-sm text-muted-foreground",children:c})]});return(0,d.jsxs)("section",{id:o,className:"rounded-xl border border-card-border bg-card shadow-sm",children:[(0,d.jsxs)("div",{className:(0,g.cn)("flex items-center gap-3 p-4",!p&&"rounded-b-xl"),children:[l?(0,d.jsxs)("button",{type:"button",onClick:s,"aria-expanded":p,"aria-controls":r,className:"-m-1.5 flex min-w-0 flex-1 items-center gap-3 rounded-lg p-1.5 text-left hover-elevate focus-ring",children:[t,u]}):(0,d.jsxs)(d.Fragment,{children:[t,u]}),k&&(0,d.jsx)("div",{className:"flex items-center gap-2",children:k}),l&&(0,d.jsx)("button",{type:"button",onClick:s,"aria-label":p?"Collapse section":"Expand section","aria-expanded":p,"aria-controls":r,className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-muted-foreground hover-elevate focus-ring",children:(0,d.jsx)(e.A,{className:(0,g.cn)("h-[18px] w-[18px] transition-transform duration-200",p&&"rotate-180")})})]}),p&&(0,d.jsx)("div",{id:r,className:"dd-fade-up border-t border-card-border p-4 sm:p-5",children:m})]})}},73990:(a,b,c)=>{"use strict";c.d(b,{m:()=>e});var d=c(23581);let e=(0,d.createServerReference)("40997a0f75158e6053a9b7c0d68fa06915f0dd55e8",d.callServer,void 0,d.findSourceMapURL,"saveTemplateAction")},74075:a=>{"use strict";a.exports=require("zlib")},75045:(a,b,c)=>{"use strict";c.d(b,{IssueBoard:()=>ad});var d=c(27905),e=c(71859);let f=(0,e.A)("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]),g=(0,e.A)("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]),h=(0,e.A)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);var i=c(38048),j=c(22096),k=c(7228),l=c(37756),m=c(49616),n=c(35404),o=c(86186),p=c(35924);let q=(0,e.A)("settings-2",[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);var r=c(43682),s=c(50059),t=c(20702),u=c(2431),v=c(12517),w=c(22842),x=c(9339),y=c(27796),z=c(32029),A=c(7420),B=c(51413),C=c(25126),D=c(37913),E=c(77585),F=c(82795),G=c(23581);let H=(0,G.createServerReference)("6003eba99a7cf5bc7fa9967a0706bfa1838924afb2",G.callServer,void 0,G.findSourceMapURL,"viewIssueAction"),I=(0,G.createServerReference)("60eabaacff459852d9a4c65318e1f5f3af0f8a1c3c",G.callServer,void 0,G.findSourceMapURL,"listSubtasksAction"),J=(0,G.createServerReference)("7072926bc1bfbc88d26c7c57c60193191e2dd21c2d",G.callServer,void 0,G.findSourceMapURL,"setIssueStateAction"),K=(0,G.createServerReference)("7088a73060e2fb01e0e2562c14954015dc541865b3",G.callServer,void 0,G.findSourceMapURL,"startIssueAction"),L=(0,G.createServerReference)("602dce4b14453b4518567ca38bcc13ce3f3ce76fe4",G.callServer,void 0,G.findSourceMapURL,"removeFromQueueAction"),M=(0,G.createServerReference)("70b0e23a05537efb81cb606a449c9bb98467cbd4bd",G.callServer,void 0,G.findSourceMapURL,"addToQueueAction"),N=(0,G.createServerReference)("700903b9129943d3b489d05465990a033f4c419e56",G.callServer,void 0,G.findSourceMapURL,"editIssueAction"),O=(0,G.createServerReference)("784d415ac7886ea8db0614d9a993b85b509a5d8999",G.callServer,void 0,G.findSourceMapURL,"setIssueLabelsAction"),P=(0,G.createServerReference)("7029508c5f49d4d04208ad53a349fbfe2b749d44de",G.callServer,void 0,G.findSourceMapURL,"commentIssueAction");var Q=c(33721);let R={pending:{label:"Pending",symbol:"○",tone:"neutral"},in_progress:{label:"In progress",symbol:"◐",tone:"primary"},done:{label:"Done",symbol:"✓",tone:"success"},skipped:{label:"Skipped",symbol:"⊘",tone:"neutral"},deferred:{label:"Deferred",symbol:"⏸",tone:"warning"}};function S({repoId:a,issueNumber:b,open:c,onClose:e,queueLabel:f,defaultModel:g,defaultAgent:h}){let[i,j]=(0,p.useState)(null),[k,l]=(0,p.useState)([]),[m,o]=(0,p.useState)(""),[G,T]=(0,p.useState)(""),[U,V]=(0,p.useState)(""),[W,X]=(0,p.useState)(""),[Y,Z]=(0,p.useState)(g),[$,_]=(0,p.useState)(h),[aa,ab]=(0,p.useState)(null),[ac,ad]=(0,p.useState)(!1),[ae,af]=(0,p.useTransition)();function ag(){null!==b&&(H(a,b).then(j).catch(a=>ab(a.message)),I(a,b).then(l).catch(()=>l([])))}function ah(b){i&&af(()=>{J(a,i.number,b).then(ag).catch(a=>ab(a.message))})}if(null===b)return null;let ai=`issue-modal-title-${b}`;return(0,d.jsxs)(B.l,{open:c,onClose:e,labelledById:ai,children:[(0,d.jsxs)("span",{id:ai,className:"sr-only",children:["Issue #",b]}),aa&&(0,d.jsx)(x.F,{tone:"destructive",className:"mb-3",children:aa}),i?(0,d.jsxs)("div",{className:"space-y-4",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)("span",{className:"text-xs font-mono text-muted-foreground tnum",children:["#",i.number]}),(0,d.jsx)(y.E,{status:i.state}),(0,d.jsx)(z.$,{size:"sm",variant:"outline",className:"ml-auto",disabled:ae,onClick:()=>"open"===i.state?ad(!0):ah("open"),children:"open"===i.state?"Close issue":"Reopen issue"})]}),(0,d.jsxs)("div",{className:"rounded-xl border border-card-border bg-secondary/40 p-4",children:[(0,d.jsxs)("h3",{className:"mb-3 flex items-center gap-2 text-sm font-semibold",children:[(0,d.jsx)(q,{className:"h-3.5 w-3.5 text-muted-foreground"}),"Run settings"]}),(0,d.jsxs)("div",{className:"flex flex-wrap items-end gap-2",children:[(0,d.jsx)(D.D,{label:"Agent",htmlFor:"modal-agent-select",children:(0,d.jsx)(v.a,{id:"modal-agent-select",value:$,onChange:a=>{_(a),Z((0,Q.VJ)(a))}})}),(0,d.jsx)(D.D,{label:"Model",htmlFor:"modal-model-select",children:(0,d.jsx)(w.o,{id:"modal-model-select",value:Y,onChange:Z,agent:$})}),(0,d.jsxs)(z.$,{size:"sm",disabled:ae,onClick:()=>af(()=>{K(a,i.number,{model:Y!==g?Y:void 0,agent:$!==h?$:void 0}).then(()=>e()).catch(a=>ab(a.message))}),children:[(0,d.jsx)(r.A,{}),"Start job now"]}),i.labels.includes(f)?(0,d.jsx)(z.$,{size:"sm",variant:"outline",disabled:ae,onClick:()=>af(()=>{L(a,i.number).then(ag).catch(a=>ab(a.message))}),children:"Dequeue"}):(0,d.jsx)(z.$,{size:"sm",variant:"outline",disabled:ae,onClick:()=>af(()=>{M(a,i.number,{model:Y!==g?Y:void 0,agent:$!==h?$:void 0}).then(ag).catch(a=>ab(a.message))}),children:"Add to queue"})]}),Y!==g||$!==h?(0,d.jsxs)("p",{className:"mt-2 text-xs text-muted-foreground",children:["Override active — repo default:"," ",(0,d.jsx)("span",{className:"font-medium text-foreground",children:g})]}):null]}),(0,d.jsx)(E.p,{value:m,onChange:a=>o(a.target.value),className:"font-medium"}),(0,d.jsx)(F.T,{value:G,onChange:a=>T(a.target.value),rows:8}),(0,d.jsxs)(z.$,{size:"sm",disabled:ae,onClick:()=>af(()=>{N(a,i.number,{title:m,body:G}).then(ag).catch(a=>ab(a.message))}),children:[(0,d.jsx)(s.A,{}),"Save changes"]}),(0,d.jsxs)("div",{children:[(0,d.jsxs)("h3",{className:"mb-2 flex items-center gap-2 text-sm font-semibold",children:[(0,d.jsx)(n.A,{className:"h-3.5 w-3.5 text-muted-foreground"}),"Labels"]}),(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[i.labels.map(b=>(0,d.jsx)("button",{type:"button",title:"Remove label",disabled:ae,className:"rounded-md focus-ring disabled:opacity-50",onClick:()=>af(()=>{O(a,i.number,[],[b]).then(ag).catch(a=>ab(a.message))}),children:(0,d.jsxs)(y.E,{className:"cursor-pointer",children:[b," \xd7"]})},b)),(0,d.jsx)(E.p,{value:W,onChange:a=>X(a.target.value),placeholder:"add label",className:"h-8 w-28 text-xs"}),(0,d.jsx)(z.$,{size:"sm",variant:"outline",disabled:ae||!W.trim(),onClick:()=>af(()=>{O(a,i.number,[W.trim()],[]).then(()=>{X(""),ag()}).catch(a=>ab(a.message))}),children:"Add"})]})]}),k.length>0&&(0,d.jsxs)("div",{children:[(0,d.jsxs)("h3",{className:"mb-2 flex items-center gap-2 text-sm font-semibold",children:[(0,d.jsx)(t.A,{className:"h-3.5 w-3.5 text-muted-foreground"}),"Subtasks (",k.filter(a=>"done"===a.status).length,"/",k.length,")"]}),(0,d.jsx)("ol",{className:"space-y-1.5",children:k.map(a=>{let b=R[a.status]??{label:a.status,symbol:"○",tone:"neutral"},c="done"===a.status||"skipped"===a.status;return(0,d.jsxs)("li",{className:"flex items-center gap-2 rounded-lg border border-card-border bg-secondary/40 px-3 py-1.5 text-sm",children:[(0,d.jsx)("span",{className:"text-muted-foreground","aria-hidden":!0,children:b.symbol}),(0,d.jsx)("span",{className:c?"text-muted-foreground line-through":"",children:a.title}),(0,d.jsx)("span",{className:"ml-auto",children:(0,d.jsx)(y.E,{tone:b.tone,children:b.label})})]},a.id)})})]}),(0,d.jsxs)("div",{children:[(0,d.jsxs)("h3",{className:"mb-2 flex items-center gap-2 text-sm font-semibold",children:[(0,d.jsx)(u.A,{className:"h-3.5 w-3.5 text-muted-foreground"}),"Comments"]}),(0,d.jsxs)("ul",{className:"space-y-2",children:[i.comments.map(a=>(0,d.jsxs)("li",{className:"rounded-lg border border-card-border bg-secondary/40 p-3 text-sm",children:[(0,d.jsxs)("p",{className:"text-xs text-muted-foreground",children:[(0,d.jsx)("span",{className:"font-medium text-foreground",children:a.author})," \xb7 ",a.createdAt]}),(0,d.jsx)("p",{className:"mt-1 whitespace-pre-wrap text-pretty",children:a.body})]},`${a.author}-${a.createdAt}`)),0===i.comments.length&&(0,d.jsx)("li",{children:(0,d.jsx)(C.p,{compact:!0,icon:u.A,title:"No comments yet",description:"Discussion from GitHub shows up here."})})]}),(0,d.jsx)(F.T,{value:U,onChange:a=>V(a.target.value),rows:3,placeholder:"Write a comment…",className:"mt-2"}),(0,d.jsx)(z.$,{size:"sm",className:"mt-2",disabled:ae||!U.trim(),onClick:()=>af(()=>{P(a,i.number,U.trim()).then(()=>{V(""),ag()}).catch(a=>ab(a.message))}),children:"Comment"})]})]}):(0,d.jsx)("p",{className:"text-sm text-muted-foreground",children:"Loading…"}),i&&(0,d.jsx)(A.T,{open:ac,onOpenChange:ad,onConfirm:()=>ah("closed"),title:"Close issue?",description:`This closes #${i.number} on GitHub.`,confirmLabel:"Close issue",variant:"destructive",pending:ae})]})}var T=c(39906),U=c(46553),V=c(62164);let W=(0,G.createServerReference)("402b4d0a084d74a542bd5e68a4e346d99a2c2fb656",G.callServer,void 0,G.findSourceMapURL,"syncRepoIssuesAction"),X=(0,G.createServerReference)("60b9133bada35485d05f7b139b053e21ba8b57d7bc",G.callServer,void 0,G.findSourceMapURL,"reorderIssuesAction"),Y=(0,G.createServerReference)("607c5a4c4dc706fb3a46264121179bae12a54df26a",G.callServer,void 0,G.findSourceMapURL,"bulkAddToQueueAction"),Z=(0,G.createServerReference)("60c4ca7d30a901f49d1379857320b5000765341812",G.callServer,void 0,G.findSourceMapURL,"bulkRemoveFromQueueAction"),$=(0,G.createServerReference)("70782ef64129fb275bd4f420c29400bb22fa476948",G.callServer,void 0,G.findSourceMapURL,"bulkApplyLabelAction");var _=c(5270);function aa(a){try{let b=JSON.parse(a);return Array.isArray(b)?b:[]}catch{return[]}}function ab({issue:a,reorderable:b,queueLabel:c,queueIndex:e,queueSize:k,isDragging:l,isOver:m,isFlash:n,selected:o,pending:p,onToggleSelect:q,onOpen:r,onAddToQueue:s,onRemoveFromQueue:t,onMoveUp:u,onMoveDown:v,onDragStartRow:w,onDragEnterRow:x,onDragEndRow:A,onDropRow:B}){let C=aa(a.labels).filter(a=>a!==c),D=`issue-select-${a.number}`;return(0,d.jsxs)("div",{draggable:!0,onDragStart:b=>{w(),b.dataTransfer.effectAllowed="move";try{b.dataTransfer.setData("text/plain",String(a.number))}catch{}},onDragEnter:x,onDragOver:a=>a.preventDefault(),onDragEnd:A,onDrop:a=>{a.preventDefault(),a.stopPropagation(),B()},className:(0,_.cn)("issue-row group flex items-center gap-3 rounded-lg border border-transparent bg-card px-3 py-2.5 hover-elevate",l&&"opacity-40",m&&"ring-1 ring-primary/70",n&&"bg-success/[0.06] ring-1 ring-success/70"),children:[(0,d.jsx)(f,{"aria-hidden":!0,className:"h-[15px] w-[15px] shrink-0 cursor-grab text-muted-foreground/40 group-hover:text-muted-foreground active:cursor-grabbing"}),(0,d.jsx)(T.S,{id:D,checked:o,onChange:q,"aria-label":`Select #${a.number} for bulk actions`,className:"shrink-0"}),b&&(0,d.jsx)("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-primary text-[11px] font-semibold tabular-nums text-primary-foreground",children:e+1}),(0,d.jsxs)("button",{type:"button",onClick:r,className:"flex min-w-0 flex-1 items-center gap-2 rounded-sm text-left focus-ring",children:[(0,d.jsxs)("span",{className:"shrink-0 font-mono text-xs text-muted-foreground",children:["#",a.number]}),(0,d.jsx)("span",{className:"truncate text-sm group-hover:text-foreground",children:a.title})]}),(0,d.jsxs)("div",{className:"hidden shrink-0 items-center gap-1.5 md:flex",children:[a.triagedAt&&(0,d.jsx)(V.m,{content:"Labels applied by auto-triage — see the issue comment for reasons",children:(0,d.jsx)(y.E,{tone:"primary",children:"auto-triaged"})}),C.slice(0,2).map(a=>(0,d.jsx)("span",{className:"rounded-md bg-secondary px-1.5 py-0.5 text-[11px] text-muted-foreground",children:a},a))]}),(0,d.jsx)("div",{className:"flex shrink-0 items-center gap-0.5",children:b?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(z.$,{type:"button",size:"icon-sm",variant:"ghost","aria-label":`Move #${a.number} up in queue`,disabled:0===e||p,onClick:u,className:"h-7 w-7",children:(0,d.jsx)(g,{})}),(0,d.jsx)(z.$,{type:"button",size:"icon-sm",variant:"ghost","aria-label":`Move #${a.number} down in queue`,disabled:e===k-1||p,onClick:v,className:"h-7 w-7",children:(0,d.jsx)(h,{})}),(0,d.jsx)(z.$,{type:"button",size:"icon-sm",variant:"ghost","aria-label":`Remove #${a.number} from queue`,disabled:p,onClick:t,className:"h-7 w-7 text-destructive hover:text-destructive",children:(0,d.jsx)(i.A,{})})]}):(0,d.jsx)(z.$,{type:"button",size:"icon-sm",variant:"ghost","aria-label":`Add #${a.number} to queue`,disabled:p,onClick:s,className:"h-7 w-7",children:(0,d.jsx)(j.A,{})})})]})}function ac({zone:a,icon:b,title:c,count:e,hint:f,empty:g,emptyDrop:h,dropping:i,isEmpty:j,onDropZone:k,onClearOver:l,children:m}){return(0,d.jsxs)("div",{onDragOver:a=>{a.preventDefault(),a.currentTarget===a.target&&l()},onDrop:a=>{a.preventDefault(),k()},"data-zone":a,className:(0,_.cn)("rounded-xl border p-2 transition-colors",i?"border-dashed border-primary/45 bg-primary/[0.03]":"border-card-border"),children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5",children:[(0,d.jsx)(b,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,d.jsx)("span",{className:"text-sm font-semibold",children:c}),(0,d.jsx)(y.E,{tone:"neutral",children:e}),(0,d.jsx)("span",{className:"ml-auto hidden text-xs text-muted-foreground sm:block",children:f})]}),j?(0,d.jsx)("div",{className:(0,_.cn)("m-1 rounded-lg border border-dashed px-3 py-6 text-center text-xs transition-colors",i?"border-primary/50 text-primary":"border-border text-muted-foreground"),children:i?h:g}):(0,d.jsx)("div",{className:"flex flex-col gap-0.5 p-1",children:m})]})}function ad({repoId:a,queueLabel:b,initialIssues:c,pollIntervalSec:e,defaultModel:g,defaultAgent:h}){let[j,q]=(0,p.useState)(c),[r,s]=(0,p.useState)(""),[t,u]=(0,p.useState)(null),[v,w]=(0,p.useState)(null),[x,y]=(0,p.useState)(null),[A,B]=(0,p.useState)(null),[C,D]=(0,p.useState)(new Set),[F,G]=(0,p.useState)(""),[H,I]=(0,p.useTransition)(),[J,K]=(0,p.useState)(null),{success:N}=(0,U.d)(),O=a=>aa(a.labels).includes(b),P=a=>{let b=r.toLowerCase();return!b||a.title.toLowerCase().includes(b)||String(a.number).includes(b)||aa(a.labels).some(a=>a.toLowerCase().includes(b))},Q=j.filter(a=>!O(a)&&P(a)),R=j.filter(a=>O(a)&&P(a));function T(){u(null),w(null)}function V(){if(null===t)return;let b=j.find(a=>a.number===t),c=b?.title;T(),!b||O(b)||I(()=>{M(a,t).then(a=>{q(a),y(t),setTimeout(()=>y(a=>a===t?null:a),1200),N("Issue queued",`#${t} ${c??""}`.trim())}).catch(a=>K(a.message))})}function ae(){if(null===t)return;let b=j.find(a=>a.number===t);T(),b&&O(b)&&I(()=>{L(a,b.number).then(q).catch(a=>K(a.message))})}function af(){D(new Set)}function ag(a){let b=[...C];0!==b.length&&(K(null),I(()=>{a(b).then(a=>{q(a),af()}).catch(a=>K(a.message))}))}let ah=j.filter(O).map(a=>a.number),ai=null!==t;function aj(c,e){return(0,d.jsx)(ab,{issue:c,reorderable:e,queueLabel:b,queueIndex:ah.indexOf(c.number),queueSize:ah.length,isDragging:t===c.number,isOver:v===c.number&&null!==t&&t!==c.number,isFlash:x===c.number,selected:C.has(c.number),pending:H,onToggleSelect:()=>{var a;return a=c.number,void D(b=>{let c=new Set(b);return c.has(a)?c.delete(a):c.add(a),c})},onOpen:()=>B(c.number),onAddToQueue:()=>{var b;return b=c.number,void I(()=>{M(a,b).then(q).catch(a=>K(a.message))})},onRemoveFromQueue:()=>{var b;return b=c.number,void I(()=>{L(a,b).then(q).catch(a=>K(a.message))})},onMoveUp:()=>{let b;return b=function(a,b){let c=a.indexOf(b);if(c<=0)return a;let d=[...a],e=d[c-1];return d[c-1]=d[c],d[c]=e,d}(ah,c.number),void I(()=>{X(a,b).catch(a=>K(a.message))})},onMoveDown:()=>{let b;return b=function(a,b){let c=a.indexOf(b);if(-1===c||c===a.length-1)return a;let d=[...a],e=d[c+1];return d[c+1]=d[c],d[c]=e,d}(ah,c.number),void I(()=>{X(a,b).catch(a=>K(a.message))})},onDragStartRow:()=>u(c.number),onDragEnterRow:()=>w(c.number),onDragEndRow:T,onDropRow:()=>{let b;!(b=null===t?void 0:j.find(a=>a.number===t))?T():O(b)===e?e?function(b){if(T(),null===t||t===b)return;let c=j.find(a=>a.number===t);if(!c||!O(c))return;let d=function(a,b,c){if(b===c||!a.includes(b))return a;let d=a.filter(a=>a!==b),e=d.indexOf(c);return -1===e?a:(d.splice(e,0,b),d)}(j.filter(O).map(a=>a.number),t,b);I(()=>{X(a,d).catch(a=>K(a.message))})}(c.number):T():e?V():ae()}},c.number)}return(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,d.jsxs)("p",{className:"inline-flex items-center gap-1.5 text-xs text-muted-foreground",children:[(0,d.jsx)(f,{className:"h-3.5 w-3.5"})," Drag to set priority, or drop an issue into the queue to schedule it."]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)("div",{className:"relative w-full sm:w-56",children:[(0,d.jsx)(k.A,{className:"pointer-events-none absolute left-3 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),(0,d.jsx)(E.p,{"aria-label":"Search issues by title or label",value:r,onChange:a=>s(a.target.value),placeholder:"Filter issues",className:"h-8 pl-8 text-xs"})]}),(0,d.jsxs)(z.$,{size:"sm",variant:"outline",disabled:H||0===Q.length,onClick:function(){let b=Q.map(a=>a.number);0!==b.length&&(K(null),I(()=>{Y(a,b).then(q).catch(a=>K(a.message))}))},children:[(0,d.jsx)(l.A,{className:"h-3.5 w-3.5"})," Queue all"]}),(0,d.jsxs)(z.$,{size:"sm",variant:"outline",disabled:H,onClick:function(){K(null),I(()=>{W(a).then(q).catch(a=>K(a.message))})},children:[(0,d.jsx)(m.A,{className:(0,_.cn)("h-3.5 w-3.5",H&&"dd-spin")}),H?"Syncing…":"Refresh"]})]})]}),J&&(0,d.jsx)("p",{role:"alert",className:"text-xs text-destructive",children:J}),C.size>0&&(0,d.jsxs)("div",{className:"dd-fade-up flex flex-wrap items-center gap-2 rounded-xl border border-primary/40 bg-primary/[0.04] p-2",children:[(0,d.jsxs)("span",{className:"px-1 text-sm font-medium",children:[C.size," selected"]}),(0,d.jsxs)(z.$,{size:"sm",variant:"outline",disabled:H,onClick:()=>ag(b=>Y(a,b)),children:[(0,d.jsx)(l.A,{className:"h-3.5 w-3.5"})," Add to queue"]}),(0,d.jsxs)(z.$,{size:"sm",variant:"outline",disabled:H,onClick:()=>ag(b=>Z(a,b)),children:[(0,d.jsx)(i.A,{className:"h-3.5 w-3.5"})," Remove from queue"]}),(0,d.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,d.jsx)(E.p,{"aria-label":"Label to apply to selected issues",value:F,onChange:a=>G(a.target.value),placeholder:"label…",className:"h-8 w-28 text-xs"}),(0,d.jsxs)(z.$,{size:"sm",variant:"outline",disabled:H||""===F.trim(),onClick:()=>{let b=F.trim();ag(c=>$(a,c,b)),G("")},children:[(0,d.jsx)(n.A,{className:"h-3.5 w-3.5"})," Apply label"]})]}),(0,d.jsx)(z.$,{size:"sm",variant:"ghost",className:"ml-auto",disabled:H,onClick:af,children:"Clear"})]}),(0,d.jsx)(ac,{zone:"queue",icon:l.A,title:"Queue",count:R.length,hint:"top = next to run",empty:"Nothing queued. Drag an issue up from the backlog, or use the + button.",emptyDrop:"Drop here",dropping:ai,onDropZone:V,onClearOver:()=>w(null),isEmpty:0===R.length,children:R.map(a=>aj(a,!0))}),(0,d.jsx)(ac,{zone:"backlog",icon:o.A,title:"Backlog \xb7 triage",count:Q.length,hint:"drag up to schedule",empty:"Backlog is empty.",emptyDrop:"Drop here",dropping:ai,onDropZone:ae,onClearOver:()=>w(null),isEmpty:0===Q.length,children:Q.map(a=>aj(a,!1))}),(0,d.jsx)(S,{repoId:a,issueNumber:A,open:null!==A,onClose:()=>B(null),queueLabel:b,defaultModel:g,defaultAgent:h})]})}},76760:a=>{"use strict";a.exports=require("node:path")},77068:a=>{"use strict";a.exports=require("next/dist/shared/lib/size-limit")},77598:a=>{"use strict";a.exports=require("node:crypto")},78906:(a,b,c)=>{"use strict";c.d(b,{RepoSettingsBar:()=>t});var d=c(27905);let e=(0,c(71859).A)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);var f=c(1711),g=c(79432),h=c(35924),i=c(12517),j=c(22842),k=c(37913),l=c(36121),m=c(77585),n=c(83557),o=c(46553),p=c(62164),q=c(33721),r=c(70740);function s({text:a,help:b}){return(0,d.jsxs)("span",{className:"flex items-center gap-1.5",children:[a,(0,d.jsx)(p.V,{content:b})]})}function t({repo:a,openrouter:b}){let[c,u]=(0,h.useState)(a.agent),[v,w]=(0,h.useState)(a.defaultModel),[x,y]=(0,h.useState)(a.dailyCostLimitUsd.toString()),[z,A]=(0,h.useState)(a.maxJobMinutes?.toString()??""),[B,C]=(0,h.useState)(a.maxCiWaitMinutes?.toString()??""),[D,E]=(0,h.useState)(a.mergeGateMinutes.toString()),[F,G]=(0,h.useState)(a.adrGating),[H,I]=(0,h.useState)(a.sequential),[J,K]=(0,h.useTransition)(),[L,M]=(0,h.useState)(!1),{error:N}=(0,o.d)();function O(b){M(!1),K(async()=>{try{await (0,r.u)(a.id,b),M(!0),setTimeout(()=>M(!1),1500)}catch(a){N("Failed to update repository",a instanceof Error?a.message:String(a))}})}function P(a,b){"maxJobMinutes"===a?A(b):C(b);let c=""===b?null:Number(b);(null===c||Number.isInteger(c)&&!(c<0))&&O({[a]:c})}return(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)(l.L,{icon:e,legend:"Agent & model",tone:"primary",description:"Which agent picks up issues in this repo, and the model it defaults to.",children:(0,d.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:[(0,d.jsx)(k.D,{label:(0,d.jsx)(s,{text:"Queue label",help:"Issues carrying this GitHub label enter the repo's processing queue."}),children:(0,d.jsx)("code",{className:"inline-flex h-9 w-fit max-w-full items-center truncate rounded-lg bg-secondary px-3 font-mono text-xs text-muted-foreground",children:a.queueLabel})}),(0,d.jsx)(k.D,{label:(0,d.jsx)(s,{text:"Agent",help:"CLI agent used for new jobs in this repo."}),htmlFor:"repo-agent-select",children:(0,d.jsx)(i.a,{id:"repo-agent-select",value:c,onChange:function(a){let c="openrouter"===a?b.defaultModel||(b.models[0]?.id??""):(0,q.VJ)(a);"openrouter"===a&&""===c?N("No synced OpenRouter models","Refresh the catalog in Settings first."):(u(a),w(c),O({agent:a,defaultModel:c}))},agents:b.enabled||"openrouter"===c?["claude","codex","openrouter"]:["claude","codex"]})}),(0,d.jsx)(k.D,{label:(0,d.jsx)(s,{text:"Model",help:"Default model for new jobs — switching agents resets it to that agent's default."}),htmlFor:"repo-model-select",children:(0,d.jsx)(j.o,{id:"repo-model-select",value:v,onChange:function(a){w(a),O({defaultModel:a})},agent:c,openrouterModels:b.models})})]})}),(0,d.jsx)(l.L,{icon:f.A,legend:"Limits & timing",tone:"warning",description:"Spend and runtime guardrails for jobs in this repo.",children:(0,d.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-4",children:[(0,d.jsx)(k.D,{label:(0,d.jsx)(s,{text:"Daily limit ($)",help:"Hard cap on agent spend per day for this repo. New jobs wait once the cap is hit."}),htmlFor:"repo-daily-limit",children:(0,d.jsx)(m.p,{id:"repo-daily-limit",type:"number",min:0,step:1,value:x,onChange:a=>{var b;let c;return y(b=a.target.value),c=Number(b),void(""!==b.trim()&&Number.isFinite(c)&&!(c<0)&&O({dailyCostLimitUsd:c}))}})}),(0,d.jsx)(k.D,{label:(0,d.jsx)(s,{text:"Max job minutes",help:"Abort jobs that run longer than this. Leave empty to use the global default."}),htmlFor:"repo-max-job-minutes",children:(0,d.jsx)(m.p,{id:"repo-max-job-minutes",type:"number",min:0,step:1,value:z,onChange:a=>P("maxJobMinutes",a.target.value),placeholder:"Global default"})}),(0,d.jsx)(k.D,{label:(0,d.jsx)(s,{text:"Max CI wait minutes",help:"How long to wait for CI before giving up. Leave empty to use the global default."}),htmlFor:"repo-max-ci-wait-minutes",children:(0,d.jsx)(m.p,{id:"repo-max-ci-wait-minutes",type:"number",min:0,step:1,value:B,onChange:a=>P("maxCiWaitMinutes",a.target.value),placeholder:"Global default"})}),(0,d.jsx)(k.D,{label:(0,d.jsx)(s,{text:"Merge gate minutes",help:"Hold the auto-merge after green CI so late bot or human reviews can land first. 0 merges immediately."}),htmlFor:"repo-merge-gate-minutes",children:(0,d.jsx)(m.p,{id:"repo-merge-gate-minutes",type:"number",min:0,step:1,value:D,onChange:a=>{var b;let c;return E(b=a.target.value),c=Number(b),void(""!==b&&Number.isInteger(c)&&!(c<0)&&O({mergeGateMinutes:c}))},placeholder:"0 = merge on green"})})]})}),(0,d.jsx)(l.L,{icon:g.A,legend:"Gates",description:"Checks that hold work before it lands.",children:(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-x-6 gap-y-3",children:[(0,d.jsxs)("span",{className:"flex items-center gap-2",children:[(0,d.jsxs)("label",{htmlFor:"repo-adr-gate",className:"flex items-center gap-2 text-sm",children:[(0,d.jsx)(n.d,{id:"repo-adr-gate",checked:F,onChange:function(a){G(a),O({adrGating:a})},"aria-label":"ADR gate"}),"ADR gate"]}),(0,d.jsx)(p.V,{content:"Hold the merge while ADRs await review — the job parks as needs-human until pending decisions are approved."})]}),(0,d.jsxs)("span",{className:"flex items-center gap-2",children:[(0,d.jsxs)("label",{htmlFor:"repo-sequential",className:"flex items-center gap-2 text-sm",children:[(0,d.jsx)(n.d,{id:"repo-sequential",checked:H,onChange:function(a){I(a),O({sequential:a})},"aria-label":"Sequential (wait for merge)"}),"Sequential"]}),(0,d.jsx)(p.V,{content:"Process one issue at a time — wait for the open PR to merge before starting the next job."})]}),(0,d.jsx)("span",{"aria-live":"polite",className:"ml-auto text-xs text-muted-foreground",children:J?"Saving…":L?"Saved":""})]})})]})}},79432:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(71859).A)("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},79551:a=>{"use strict";a.exports=require("url")},79646:a=>{"use strict";a.exports=require("child_process")},81630:a=>{"use strict";a.exports=require("http")},86186:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(71859).A)("wand-sparkles",[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]])},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87088:(a,b,c)=>{"use strict";c.r(b),c.d(b,{__next_app__:()=>O,handler:()=>Q,routeModule:()=>P});var d=c(67153),e=c(36918),f=c(70662),g=c(87911),h=c(80125),i=c(76229),j=c(41644),k=c(80381),l=c(79821),m=c(57831),n=c(45413),o=c(93971),p=c(36443),q=c(86194),r=c(261),s=c(73430),t=c(25867),u=c(26713),v=c(3911),w=c(49620),x=c(40744),y=c(72329),z=c(1167),A=c(84325),B=c(10069),C=c(86439),D=c(77068),E=c(76821),F=c(41861),G=c(76631),H=c(98022),I=c(70722),J=c(59281),K=c(43954),L=c(17891),M={};for(let a in G)0>["default","__next_app__","routeModule","handler"].indexOf(a)&&(M[a]=()=>G[a]);c.d(b,M);let N={children:["",{children:["repos",{children:["[id]",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(c.bind(c,37739)),"/home/runner/work/drydock/drydock/src/app/repos/[id]/page.tsx"]}]},{loading:[()=>Promise.resolve().then(c.bind(c,50741)),"/home/runner/work/drydock/drydock/src/app/repos/[id]/loading.tsx"],"global-error":[()=>Promise.resolve().then(c.bind(c,81811)),"/home/runner/work/drydock/drydock/src/app/global-error.tsx"]},[]]},{"global-error":[()=>Promise.resolve().then(c.bind(c,81811)),"/home/runner/work/drydock/drydock/src/app/global-error.tsx"]},[]]},{layout:[()=>Promise.resolve().then(c.bind(c,66025)),"/home/runner/work/drydock/drydock/src/app/layout.tsx"],error:[()=>Promise.resolve().then(c.bind(c,43705)),"/home/runner/work/drydock/drydock/src/app/error.tsx"],loading:[()=>Promise.resolve().then(c.bind(c,51231)),"/home/runner/work/drydock/drydock/src/app/loading.tsx"],"global-error":[()=>Promise.resolve().then(c.bind(c,81811)),"/home/runner/work/drydock/drydock/src/app/global-error.tsx"],"not-found":[()=>Promise.resolve().then(c.bind(c,37803)),"/home/runner/work/drydock/drydock/src/app/not-found.tsx"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,80902,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,96305,23)),"next/dist/client/components/builtin/unauthorized.js"]},[]]}.children,O={require:c,loadChunk:()=>Promise.resolve()},P=new d.AppPageRouteModule({definition:{kind:e.RouteKind.APP_PAGE,page:"/repos/[id]/page",pathname:"/repos/[id]",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:N},distDir:".next",relativeProjectDir:""});async function Q(a,b,d){var M,R,S,T,U;d.requestMeta&&(0,h.setRequestMeta)(a,d.requestMeta),P.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let V=!!(0,h.getRequestMeta)(a,"minimalMode"),W="/repos/[id]/page";"/index"===W&&(W="/");let X=await P.prepare(a,b,{srcPage:W,multiZoneDraftMode:!1});if(!X)return b.statusCode=400,b.end("Bad Request"),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let{buildId:Y,query:Z,params:$,pageIsDynamic:_,buildManifest:aa,nextFontManifest:ab,reactLoadableManifest:ac,serverActionsManifest:ad,clientReferenceManifest:ae,subresourceIntegrityManifest:af,prerenderManifest:ag,isDraftMode:ah,resolvedPathname:ai,revalidateOnlyGenerated:aj,routerServerContext:ak,nextConfig:al,parsedUrl:am,interceptionRoutePatterns:an,deploymentId:ao,clientAssetToken:ap}=X,aq=(0,r.normalizeAppPath)(W),{isOnDemandRevalidate:ar}=X,as=al.experimental.ppr&&!al.cacheComponents&&(0,K.isInterceptionRouteAppPath)(ai)?null:P.match(ai,ag),at=(null==as?void 0:as.route)??null,au=!!ag.routes[ai],av=a.headers["user-agent"]||"",aw=(0,u.getBotType)(av),ax=(0,q.isHtmlBotRequest)(a),ay=(0,h.getRequestMeta)(a,"isPrefetchRSCRequest")??"1"===a.headers[t.NEXT_ROUTER_PREFETCH_HEADER],az=(0,h.getRequestMeta)(a,"isRSCRequest")??(0,n.f)(a.headers[t.RSC_HEADER]),aA=(0,s.getIsPossibleServerAction)(a),aB=(0,m.checkIsAppPPREnabled)(al.experimental.ppr),aC=a.headers[y.NEXT_RESUME_STATE_LENGTH_HEADER];if(!(0,h.getRequestMeta)(a,"postponed")&&V&&aB&&aA&&aC&&"string"==typeof aC){let e=parseInt(aC,10),{maxPostponedStateSize:f,maxPostponedStateSizeBytes:g}=(0,E.getMaxPostponedStateSize)(al.experimental.maxPostponedStateSize);if(!isNaN(e)&&e>0){if(e>g)return b.statusCode=413,b.end((0,E.getPostponedStateExceededErrorMessage)(f)),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let i="1 MB",j=(null==(U=al.experimental.serverActions)?void 0:U.bodySizeLimit)??i,k=e+(j!==i?c(46174).parse(j):1048576),l=await (0,E.readBodyWithSizeLimit)(a,k);if(null===l)return b.statusCode=413,b.end("Request body exceeded limit. To configure the body size limit for Server Actions, see: https://nextjs.org/docs/app/api-reference/next-config-js/serverActions#bodysizelimit"),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;if(l.length>=e){let b=l.subarray(0,e).toString("utf8");(0,h.addRequestMeta)(a,"postponed",b);let c=l.subarray(e);(0,h.addRequestMeta)(a,"actionBody",c)}else throw Object.defineProperty(Error(`invariant: expected ${e} bytes of postponed state but only received ${l.length} bytes`),"__NEXT_ERROR_CODE",{value:"E979",enumerable:!1,configurable:!0})}}if(!(0,h.getRequestMeta)(a,"postponed")&&aB&&"1"===a.headers[y.NEXT_RESUME_HEADER]&&"POST"===a.method){let{maxPostponedStateSize:c,maxPostponedStateSizeBytes:e}=(0,E.getMaxPostponedStateSize)(al.experimental.maxPostponedStateSize),f=await (0,E.readBodyWithSizeLimit)(a,e);if(null===f)return b.statusCode=413,b.end((0,E.getPostponedStateExceededErrorMessage)(c)),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let g=f.toString("utf8");(0,h.addRequestMeta)(a,"postponed",g)}let aD=!0===P.isDev||!0===al.experimental.exposeTestingApiInProductionBuild,aE=aD&&("1"===a.headers[t.NEXT_INSTANT_PREFETCH_HEADER]||!(0,n.f)(a.headers[t.RSC_HEADER])&&"string"==typeof a.headers.cookie&&a.headers.cookie.includes(t.NEXT_INSTANT_TEST_COOKIE+"=")),aF=(aB||aE)&&((null==(M=ag.routes[aq]??ag.dynamicRoutes[aq])?void 0:M.renderingMode)==="PARTIALLY_STATIC"||aE&&(aD||(null==ak?void 0:ak.experimentalTestProxy)===!0)),aG=aE&&aF,aH=aG&&!0===P.isDev,aI=!1,aJ=aF?(0,h.getRequestMeta)(a,"postponed"):void 0,aK=null==(R=ag.routes[ai])?void 0:R.prefetchDataRoute,aL=aF&&az&&!ay&&!aK;V&&(aL=aL&&!!aJ);let aM=(0,h.getRequestMeta)(a,"segmentPrefetchRSCRequest"),aN=(!aw||!aF)&&(!av||(0,q.shouldServeStreamingMetadata)(av,al.htmlLimitedBots)),aO=!!((at||au||ag.routes[aq])&&!(aw&&aF)),aP=aF&&!0===al.cacheComponents,aQ=!0===P.isDev||!aO||"string"==typeof aJ||(aP&&(0,h.getRequestMeta)(a,"onCacheEntryV2")?aL&&!V:aL),aR=!!aw&&aF,aS=(null==at?void 0:at.remainingPrerenderableParams)??[],aT=(null==at?void 0:at.fallback)===null&&((null==(S=at.fallbackRootParams)?void 0:S.length)??0)>0,aU=null;if(!ah&&aO&&!aQ&&!aA&&!aJ&&!aL){let a=as?"string"==typeof(null==at?void 0:at.fallback)?at.fallback:as.source:null;if(!0===al.experimental.partialFallbacks&&a&&(null==at?void 0:at.fallbackRouteParams)&&!aT){if(aS.length>0){let b,c=(b=new Map(aS.map(a=>[a.paramName,a])),a.split("/").map(a=>{let c=(0,L.getSegmentParam)(a);if(!c)return a;let d=b.get(c.paramName);if(!d)return a;let e=null==$?void 0:$[d.paramName];if(!e)return a;let f=Array.isArray(e)?e.map(a=>encodeURIComponent(a)).join("/"):encodeURIComponent(e);return a.replace((0,o.buildDynamicSegmentPlaceholder)(d),f)}).join("/")||"/");aU=c!==a?c:null}}else aU=ai}let aV=aU;!aV&&(P.isDev||aO&&_&&(null==at?void 0:at.fallbackRouteParams)&&!aA)&&(aV=ai),P.isDev||ah||!aO||!az||aL||(0,k.d)(a.headers);let aW={...G,tree:N,handler:Q,routeModule:P,__next_app__:O};ad&&ae&&(0,p.setManifestsSingleton)({page:W,clientReferenceManifest:ae,serverActionsManifest:ad});let aX=a.method||"GET",aY=(0,g.getTracer)(),aZ=aY.getActiveScopeSpan(),a$=!!(null==ak?void 0:ak.isWrappedByNextServer),a_=!0===al.experimental.partialFallbacks&&aS.length>0?(null==at||null==(T=at.fallbackRouteParams)?void 0:T.filter(a=>!aS.some(b=>b.paramName===a.paramName)))??[]:[],a0=async()=>((null==ak?void 0:ak.render404)?await ak.render404(a,b,am,!1):b.end("This page could not be found"),null);try{let k,m=P.getVaryHeader(ai,an);b.setHeader("Vary",m);let n=async(c,d)=>{let e=new l.NodeNextRequest(a),f=new l.NodeNextResponse(b);return P.render(e,f,d).finally(()=>{if(!c)return;c.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let a=aY.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==i.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let d=a.get("next.route");if(d){let a=`${aX} ${d}`;c.setAttributes({"next.route":d,"http.route":d,"next.span_name":a}),c.updateName(a),k&&k!==c&&(k.setAttribute("http.route",d),k.updateName(a))}else c.updateName(`${aX} ${W}`)})},p=(0,h.getRequestMeta)(a,"incrementalCache")||await P.getIncrementalCache(a,al,ag,V);null==p||p.resetRequestCache(),globalThis.__incrementalCache=p;let q=async({span:e,postponed:f,fallbackRouteParams:g,forceStaticRender:i})=>{let k={query:Z,params:$,page:aq,sharedContext:{buildId:Y,deploymentId:ao,clientAssetToken:ap},serverComponentsHmrCache:(0,h.getRequestMeta)(a,"serverComponentsHmrCache"),fallbackRouteParams:g,renderOpts:{App:()=>null,Document:()=>null,pageConfig:{},ComponentMod:aW,Component:(0,j.T)(aW),params:$,routeModule:P,page:W,postponed:f,shouldWaitOnAllReady:aR,serveStreamingMetadata:aN,supportsDynamicResponse:"string"==typeof f||aQ,buildManifest:aa,nextFontManifest:ab,reactLoadableManifest:ac,subresourceIntegrityManifest:af,setCacheStatus:null==ak?void 0:ak.setCacheStatus,setIsrStatus:null==ak?void 0:ak.setIsrStatus,setReactDebugChannel:null==ak?void 0:ak.setReactDebugChannel,sendErrorsToBrowser:null==ak?void 0:ak.sendErrorsToBrowser,dir:c(33873).join(process.cwd(),P.relativeProjectDir),isDraftMode:ah,botType:aw,isOnDemandRevalidate:ar,isPossibleServerAction:aA,assetPrefix:al.assetPrefix,nextConfigOutput:al.output,crossOrigin:al.crossOrigin,trailingSlash:al.trailingSlash,images:al.images,previewProps:ag.preview,enableTainting:al.experimental.taint,htmlLimitedBots:al.htmlLimitedBots,reactMaxHeadersLength:al.reactMaxHeadersLength,multiZoneDraftMode:!1,incrementalCache:p,cacheLifeProfiles:al.cacheLife,basePath:al.basePath,serverActions:al.experimental.serverActions,logServerFunctions:"object"==typeof al.logging&&!!al.logging.serverFunctions,...aG||aH||aI?{isBuildTimePrerendering:!0,supportsDynamicResponse:!1,isStaticGeneration:!0,isDebugDynamicAccesses:aH}:{},cacheComponents:!!al.cacheComponents,experimental:{isRoutePPREnabled:aF,expireTime:al.expireTime,staleTimes:al.experimental.staleTimes,dynamicOnHover:!!al.experimental.dynamicOnHover,optimisticRouting:!!al.experimental.optimisticRouting,inlineCss:!!al.experimental.inlineCss,prefetchInlining:al.experimental.prefetchInlining??!1,authInterrupts:!!al.experimental.authInterrupts,cachedNavigations:!!al.experimental.cachedNavigations,clientTraceMetadata:al.experimental.clientTraceMetadata||[],clientParamParsingOrigins:al.experimental.clientParamParsingOrigins,maxPostponedStateSizeBytes:(0,D.parseMaxPostponedStateSize)(al.experimental.maxPostponedStateSize)},waitUntil:d.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:()=>{},onInstrumentationRequestError:(b,c,d,e)=>P.onRequestError(a,b,d,e,ak),err:(0,h.getRequestMeta)(a,"invokeError")}};i&&(k.renderOpts.supportsDynamicResponse=!1);let l=await n(e,k),{metadata:m}=l,{cacheControl:o,headers:q={},fetchTags:r,fetchMetrics:s}=m;if(r&&(q[y.NEXT_CACHE_TAGS_HEADER]=r),a.fetchMetrics=s,aO&&(null==o?void 0:o.revalidate)===0&&!P.isDev&&!aF){let a=m.staticBailoutInfo,b=Object.defineProperty(Error(`Page changed from static to dynamic at runtime ${ai}${(null==a?void 0:a.description)?`, reason: ${a.description}`:""}
2
- see more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`),"__NEXT_ERROR_CODE",{value:"E132",enumerable:!1,configurable:!0});if(null==a?void 0:a.stack){let c=a.stack;b.stack=b.message+c.substring(c.indexOf("\n"))}throw b}return{value:{kind:v.CachedRouteKind.APP_PAGE,html:l,headers:q,rscData:m.flightData,postponed:m.postponed,status:m.statusCode,segmentData:m.segmentData},cacheControl:o}},r=async({hasResolved:c,previousCacheEntry:g,isRevalidating:i,span:j,forceStaticRender:k=!1})=>{let l=!1===P.isDev,m=c||b.writableEnded;try{var n;let f;if(ar&&aj&&!g&&!V)return(null==ak?void 0:ak.render404)?await ak.render404(a,b):(b.statusCode=404,b.end("This page could not be found")),null;if(at&&(f=(0,w.parseFallbackField)(at.fallback)),!0===al.experimental.partialFallbacks&&(null==at?void 0:at.fallback)===null&&!aT&&aS.length>0&&(f=w.FallbackMode.PRERENDER),f===w.FallbackMode.PRERENDER&&(0,u.isBot)(av)&&(!aF||ax)&&(f=w.FallbackMode.BLOCKING_STATIC_RENDER),(null==g?void 0:g.isStale)===-1&&(ar=!0),ar&&(f!==w.FallbackMode.NOT_FOUND||g)&&(f=w.FallbackMode.BLOCKING_STATIC_RENDER),!V&&f!==w.FallbackMode.BLOCKING_STATIC_RENDER&&aV&&!m&&!ah&&_&&(l||!au)){if((l||at)&&f===w.FallbackMode.NOT_FOUND){if(al.adapterPath)return await a0();throw new C.NoFallbackError}if(aF&&(al.cacheComponents?!aL:!az)){let b=l&&"string"==typeof(null==at?void 0:at.fallback)?at.fallback:aq,f=(l||aG)&&(null==at?void 0:at.fallbackRouteParams)?(0,o.createOpaqueFallbackRouteParams)(at.fallbackRouteParams):aI?(0,o.getFallbackRouteParams)(aq,P):null;aG&&f&&(0,h.addRequestMeta)(a,"fallbackParams",f);let g=await P.handleResponse({cacheKey:b,req:a,nextConfig:al,routeKind:e.RouteKind.APP_PAGE,isFallback:!0,prerenderManifest:ag,isRoutePPREnabled:aF,responseGenerator:async()=>q({span:j,postponed:void 0,fallbackRouteParams:f,forceStaticRender:!0}),waitUntil:d.waitUntil,isMinimalMode:V});if(null===g)return null;if(g)return V||!aF||!(aS.length>0)||!0!==al.experimental.partialFallbacks||!aU||!p||ar||aI||aD||aE||ay||(0,J.scheduleOnNextTick)(async()=>{let b=P.getResponseCache(a);try{await b.revalidate(aU,p,aF,!1,a=>q({span:a.span,postponed:void 0,fallbackRouteParams:a_.length>0?(0,o.createOpaqueFallbackRouteParams)(a_):null,forceStaticRender:!0}),null,c,d.waitUntil)}catch(a){console.error("Error revalidating the page in the background",a)}}),delete g.cacheControl,g}}let s=ar||i||!aJ?void 0:aJ;if(aP&&!V&&p&&(aL||aA)&&!k){let b=await p.get(ai,{kind:v.IncrementalCacheKind.APP_PAGE,isRoutePPREnabled:!0,isFallback:!1});b&&b.value&&b.value.kind===v.CachedRouteKind.APP_PAGE&&(s=b.value.postponed,b&&(-1===b.isStale||!0===b.isStale)&&(0,J.scheduleOnNextTick)(async()=>{let b=P.getResponseCache(a);try{await b.revalidate(ai,p,aF,!1,a=>r({...a,forceStaticRender:!0}),null,c,d.waitUntil)}catch(a){console.error("Error revalidating the page in the background",a)}}))}if((aG||aH)&&void 0!==s)return{cacheControl:{revalidate:1,expire:void 0},value:{kind:v.CachedRouteKind.PAGES,html:x.default.EMPTY,pageData:{},headers:void 0,status:void 0}};let t=!P.isDev&&_&&(null==at?void 0:at.fallbackRouteParams)?(0,o.getPlaceholderFallbackRouteParams)($,at.fallbackRouteParams):null,y=t&&t.length>0?t:null==at?void 0:at.fallbackRouteParams,z=null!=t&&t.length>0,A=null;if(al.cacheComponents&&(null==at?void 0:at.fallbackRouteParams)){let b=(0,h.getRequestMeta)(a,"resolvedRouteParamKeys");b&&b.size>0&&(A=at.fallbackRouteParams.filter(a=>!b.has(a.paramName)))}let B=(l&&(0,h.getRequestMeta)(a,"renderFallbackShell")||z||aG&&!au)&&y?(0,o.createOpaqueFallbackRouteParams)(y):A&&A.length>0&&A.length<((null==at||null==(n=at.fallbackRouteParams)?void 0:n.length)??0)?(0,o.createOpaqueFallbackRouteParams)(A):aI?(0,o.getFallbackRouteParams)(aq,P):null;if((l||aG)&&al.cacheComponents&&!au&&(null==at?void 0:at.fallbackRouteParams)){let b=(0,o.createOpaqueFallbackRouteParams)(y??at.fallbackRouteParams);b&&(0,h.addRequestMeta)(a,"fallbackParams",b)}return q({span:j,postponed:s,fallbackRouteParams:B,forceStaticRender:k})}catch(b){throw(null==g?void 0:g.isStale)&&await P.onRequestError(a,b,{routerKind:"App Router",routePath:W,routeType:"render",revalidateReason:(0,f.c)({isStaticGeneration:aO,isOnDemandRevalidate:ar})},!1,ak),b}},s=async c=>{var f,g,i,j,k,l;let m,n=await P.handleResponse({cacheKey:aU,responseGenerator:a=>r({span:c,...a}),routeKind:e.RouteKind.APP_PAGE,isOnDemandRevalidate:ar,isRoutePPREnabled:aF,req:a,nextConfig:al,prerenderManifest:ag,waitUntil:d.waitUntil,isMinimalMode:V});if(ah&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate"),P.isDev&&b.setHeader("Cache-Control","no-cache, must-revalidate"),!n){if(aU)throw Object.defineProperty(Error("invariant: cache entry required but not generated"),"__NEXT_ERROR_CODE",{value:"E62",enumerable:!1,configurable:!0});return null}if((null==(f=n.value)?void 0:f.kind)!==v.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant app-page handler received invalid cache entry ${null==(i=n.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E707",enumerable:!1,configurable:!0});let o="string"==typeof n.value.postponed;az&&!aA&&ao&&b.setHeader(y.NEXT_NAV_DEPLOYMENT_ID_HEADER,ao),aO&&!aL&&(!o||ay)&&(V||b.setHeader("x-nextjs-cache",ar?"REVALIDATED":n.isMiss?"MISS":n.isStale?"STALE":"HIT"),b.setHeader(t.NEXT_IS_PRERENDER_HEADER,"1"));let{value:p}=n;if(aJ)m={revalidate:0,expire:void 0};else if(aL)m={revalidate:0,expire:void 0};else if(!P.isDev)if(ah)m={revalidate:0,expire:void 0};else if(aO){if(n.cacheControl)if("number"==typeof n.cacheControl.revalidate){if(n.cacheControl.revalidate<1)throw Object.defineProperty(Error(`Invalid revalidate configuration provided: ${n.cacheControl.revalidate} < 1`),"__NEXT_ERROR_CODE",{value:"E22",enumerable:!1,configurable:!0});m={revalidate:n.cacheControl.revalidate,expire:(null==(j=n.cacheControl)?void 0:j.expire)??al.expireTime}}else m={revalidate:y.CACHE_ONE_YEAR_SECONDS,expire:void 0}}else b.getHeader("Cache-Control")||(m={revalidate:0,expire:void 0});if(n.cacheControl=m,"string"==typeof aM&&(null==p?void 0:p.kind)===v.CachedRouteKind.APP_PAGE&&p.segmentData){b.setHeader(t.NEXT_DID_POSTPONE_HEADER,"2");let c=null==(k=p.headers)?void 0:k[y.NEXT_CACHE_TAGS_HEADER];V&&aO&&c&&"string"==typeof c&&b.setHeader(y.NEXT_CACHE_TAGS_HEADER,c);let d=p.segmentData.get(aM);return void 0!==d?(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.fromStatic(d,t.RSC_CONTENT_TYPE_HEADER),cacheControl:n.cacheControl}):(b.statusCode=204,(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.EMPTY,cacheControl:n.cacheControl}))}let s=aP?(0,h.getRequestMeta)(a,"onCacheEntryV2")??(0,h.getRequestMeta)(a,"onCacheEntry"):(0,h.getRequestMeta)(a,"onCacheEntry");if(s){let b=(0,h.getRequestMeta)(a,"initURL")??a.url,c=b?(null==(l=(0,F.parseUrl)(b))?void 0:l.pathname)??b:void 0;if(await s(n,{url:c}))return null}if(p.headers){let a={...p.headers};for(let[c,d]of(V&&aO||delete a[y.NEXT_CACHE_TAGS_HEADER],Object.entries(a)))if(void 0!==d)if(Array.isArray(d))for(let a of d)b.appendHeader(c,a);else"number"==typeof d&&(d=d.toString()),b.appendHeader(c,d)}let u=null==(g=p.headers)?void 0:g[y.NEXT_CACHE_TAGS_HEADER];if(V&&aO&&u&&"string"==typeof u&&b.setHeader(y.NEXT_CACHE_TAGS_HEADER,u),!p.status||az&&aF||(b.statusCode=p.status),!V&&p.status&&H.RedirectStatusCode[p.status]&&az&&(b.statusCode=200),o&&!aL&&b.setHeader(t.NEXT_DID_POSTPONE_HEADER,"1"),az&&!ah){if(void 0===p.rscData){if(p.html.contentType!==t.RSC_CONTENT_TYPE_HEADER)if(al.cacheComponents)return b.statusCode=404,(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.EMPTY,cacheControl:n.cacheControl});else throw Object.defineProperty(new I.InvariantError(`Expected RSC response, got ${p.html.contentType}`),"__NEXT_ERROR_CODE",{value:"E789",enumerable:!1,configurable:!0});return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:p.html,cacheControl:n.cacheControl})}return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.fromStatic(p.rscData,t.RSC_CONTENT_TYPE_HEADER),cacheControl:n.cacheControl})}let w=p.html;if(aE&&aG){let c=!0===P.isDev?crypto.randomUUID():null;return w.pipeThrough(await (0,A.createInstantTestScriptInsertionTransformStream)(c)),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}})}if(!o||V||az)return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:n.cacheControl});if(aG||aH)return w.push(new ReadableStream({start(a){a.enqueue(z.ENCODED_TAGS.CLOSED.BODY_AND_HTML),a.close()}})),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}});let C=new TransformStream;return w.push(C.readable),q({span:c,postponed:p.postponed,fallbackRouteParams:null,forceStaticRender:!1}).then(async a=>{var b,c;if(!a)throw Object.defineProperty(Error("Invariant: expected a result to be returned"),"__NEXT_ERROR_CODE",{value:"E463",enumerable:!1,configurable:!0});if((null==(b=a.value)?void 0:b.kind)!==v.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant: expected a page response, got ${null==(c=a.value)?void 0:c.kind}`),"__NEXT_ERROR_CODE",{value:"E305",enumerable:!1,configurable:!0});await a.value.html.pipeTo(C.writable)}).catch(a=>{C.writable.abort(a).catch(a=>{console.error("couldn't abort transformer",a)})}),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}})};if(!a$||!aZ)return k=aY.getActiveScopeSpan(),await aY.withPropagatedContext(a.headers,()=>aY.trace(i.BaseServerSpan.handleRequest,{spanName:`${aX} ${W}`,kind:g.SpanKind.SERVER,attributes:{"http.method":aX,"http.target":a.url}},s),void 0,!a$);await s(aZ)}catch(b){throw b instanceof C.NoFallbackError||await P.onRequestError(a,b,{routerKind:"App Router",routePath:W,routeType:"render",revalidateReason:(0,f.c)({isStaticGeneration:aO,isOnDemandRevalidate:ar})},!1,ak),b}}},87550:a=>{"use strict";a.exports=require("better-sqlite3")},91568:(a,b,c)=>{"use strict";c.d(b,{IssueBoard:()=>d});let d=(0,c(34215).registerClientReference)(function(){throw Error("Attempted to call IssueBoard() from the server but IssueBoard 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/drydock/drydock/src/components/issue-board.tsx","IssueBoard")},91645:a=>{"use strict";a.exports=require("net")},94735:a=>{"use strict";a.exports=require("events")}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[699,980,661,374,606,822,521,304,947,382,83,786,578,40],()=>b(b.s=87088));module.exports=c})();
1
+ (()=>{var a={};a.id=530,a.ids=[530],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},2431:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(71859).A)("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]])},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},7052:(a,b,c)=>{"use strict";c.d(b,{RepoPromptsSection:()=>d});let d=(0,c(34215).registerClientReference)(function(){throw Error("Attempted to call RepoPromptsSection() from the server but RepoPromptsSection 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/drydock/drydock/src/components/repo-prompts-section.tsx","RepoPromptsSection")},7228:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(71859).A)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]])},10519:(a,b,c)=>{"use strict";c.d(b,{RepoWebhookPanel:()=>m});var d=c(27905);let e=(0,c(71859).A)("webhook",[["path",{d:"M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2",key:"q3hayz"}],["path",{d:"m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06",key:"1go1hn"}],["path",{d:"m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8",key:"qlwsc0"}]]);var f=c(35924),g=c(27796),h=c(32029),i=c(37913),j=c(77585),k=c(46553),l=c(41370);function m({repo:a}){let[b,c]=(0,f.useState)(a.webhookSecret??""),[n,o]=(0,f.useState)(!1),[p,q]=(0,f.useState)(`/api/webhooks/${a.id}`),[r,s]=(0,f.useTransition)(),[t,u]=(0,f.useState)(!1),{error:v}=(0,k.d)(),w=(a.webhookSecret??"").length>0,x="gitlab"===a.platform;function y(b){u(!1),s(async()=>{try{await (0,l.u)(a.id,{webhookSecret:b.trim()||null}),u(!0),setTimeout(()=>u(!1),1500)}catch(a){v("Failed to update webhook",a instanceof Error?a.message:String(a))}})}return(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,d.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold",children:[(0,d.jsx)(e,{className:"h-3.5 w-3.5 text-muted-foreground"})," Webhook sync"]}),(0,d.jsx)(g.E,{tone:w?"success":"neutral",children:w?"On":"Off"}),r&&(0,d.jsx)("span",{className:"text-xs text-muted-foreground",children:"Saving…"}),t&&(0,d.jsx)("span",{className:"text-xs text-success",children:"Saved"})]}),(0,d.jsx)(i.D,{label:"Shared secret",htmlFor:"webhook-secret",children:(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)(j.p,{id:"webhook-secret",type:n?"text":"password",value:b,onChange:a=>c(a.target.value),onBlur:()=>{(b.trim()||null)!==(a.webhookSecret??null)&&y(b)},placeholder:"Set a secret to enable webhook delivery",className:"min-w-0 flex-1 font-mono"}),(0,d.jsx)(h.$,{type:"button",variant:"outline",size:"sm",onClick:()=>o(a=>!a),children:n?"Hide":"Show"}),(0,d.jsx)(h.$,{type:"button",variant:"outline",size:"sm",onClick:()=>{let a,b=(a=new Uint8Array(20),crypto.getRandomValues(a),Array.from(a,a=>a.toString(16).padStart(2,"0")).join(""));c(b),o(!0),y(b)},children:"Generate"}),w&&(0,d.jsx)(h.$,{type:"button",variant:"destructive",size:"sm",onClick:()=>{c(""),y("")},children:"Disable"})]})}),(0,d.jsx)(i.D,{label:"Payload URL",htmlFor:"webhook-url",children:(0,d.jsx)(j.p,{id:"webhook-url",readOnly:!0,value:p,onFocus:a=>a.currentTarget.select(),className:"font-mono text-xs"})}),(0,d.jsxs)("p",{className:"text-xs leading-relaxed text-muted-foreground",children:["Opt-in. Polling stays on as the default and continues unchanged whether or not webhooks are configured — the two paths share the same idempotent sync, so a change is never double-processed. Point a ",x?"GitLab":"GitHub"," webhook for"," ",(0,d.jsx)("em",{children:x?"issues, comments and pipelines":"Issues, Issue comments, Check suites, Check runs, Pull request reviews and Pull request review comments"})," ","at the payload URL above with"," ",x?(0,d.jsxs)(d.Fragment,{children:["this secret as the ",(0,d.jsx)("code",{className:"font-mono",children:"Secret token"})]}):(0,d.jsxs)(d.Fragment,{children:["this secret and content type ",(0,d.jsx)("code",{className:"font-mono",children:"application/json"})]}),". Issue events drive the sync. Finished check",x?" (pipeline)":""," events wake the CI babysitter, and review events trigger the review-feedback sweep, so merges and feedback land within seconds instead of at the next poll. Drydock binds"," ",(0,d.jsx)("code",{className:"font-mono",children:"127.0.0.1"}),", so expose the URL through a tunnel or forwarder (e.g. ",(0,d.jsx)("code",{className:"font-mono",children:"cloudflared"}),","," ",(0,d.jsx)("code",{className:"font-mono",children:"ngrok"}),") to receive deliveries. Each delivery is"," ",x?"token-verified":"HMAC-SHA256 signature-verified","; invalid or unsigned payloads are rejected."]})]})}},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},10913:(a,b,c)=>{"use strict";function d(a){return a?`hsl(var(--${a}))`:"hsl(var(--muted-foreground))"}c.d(b,{U:()=>d})},14985:a=>{"use strict";a.exports=require("dns")},15269:(a,b,c)=>{"use strict";c.d(b,{RepoWebhookPanel:()=>d});let d=(0,c(34215).registerClientReference)(function(){throw Error("Attempted to call RepoWebhookPanel() from the server but RepoWebhookPanel 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/drydock/drydock/src/components/repo-webhook-panel.tsx","RepoWebhookPanel")},16698:a=>{"use strict";a.exports=require("node:async_hooks")},17891:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/get-segment-param")},18902:(a,b,c)=>{Promise.resolve().then(c.bind(c,772)),Promise.resolve().then(c.t.bind(c,45030,23)),Promise.resolve().then(c.bind(c,91568)),Promise.resolve().then(c.bind(c,18873)),Promise.resolve().then(c.bind(c,42970)),Promise.resolve().then(c.bind(c,7052)),Promise.resolve().then(c.bind(c,20465)),Promise.resolve().then(c.bind(c,49920)),Promise.resolve().then(c.bind(c,15269)),Promise.resolve().then(c.bind(c,61622)),Promise.resolve().then(c.bind(c,24094))},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},20465:(a,b,c)=>{"use strict";c.d(b,{RepoReleasePanel:()=>d});let d=(0,c(34215).registerClientReference)(function(){throw Error("Attempted to call RepoReleasePanel() from the server but RepoReleasePanel 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/drydock/drydock/src/components/repo-release-panel.tsx","RepoReleasePanel")},21820:a=>{"use strict";a.exports=require("os")},21822:(a,b,c)=>{"use strict";c.d(b,{dm:()=>i,dv:()=>h});var d=c(87383),e=c(15354),f=c(10913);function g(a,b){return b>0?Math.min(a/b,1):0}function h({value:a,limit:b,size:c=132,label:i="Spend today"}){let j=g(a,b),k=b<=0,l=b>0&&a>=b,m=(0,f.U)(l||j>=.95?"destructive":j>=.8?"warning":"primary"),n=(c-18)/2,o=2*Math.PI*n,p=.75*o,q=c/2;return(0,d.jsxs)("div",{className:"flex flex-col items-center",children:[(0,d.jsxs)("div",{className:"relative",style:{width:c,height:.82*c},children:[(0,d.jsxs)("svg",{width:c,height:c,viewBox:`0 0 ${c} ${c}`,style:{transform:"rotate(135deg)"},role:"img","aria-label":k?`${i}: $${a.toFixed(2)}, no daily limit`:`${i}: $${a.toFixed(2)} of $${b.toFixed(0)} limit`,children:[(0,d.jsx)("circle",{cx:q,cy:q,r:n,fill:"none",stroke:"hsl(var(--secondary))",strokeWidth:9,strokeDasharray:`${p} ${o}`,strokeLinecap:"round"}),(0,d.jsx)("circle",{cx:q,cy:q,r:n,fill:"none",stroke:m,strokeWidth:9,strokeDasharray:`${p*j} ${o}`,strokeLinecap:"round"})]}),(0,d.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center pb-1",children:[(0,d.jsxs)("span",{className:"tnum text-[26px] font-semibold leading-none",style:{color:m},children:["$",a.toFixed(2)]}),(0,d.jsx)("span",{className:"mt-1 text-xs text-muted-foreground tnum",children:k?"Unlimited":`of $${b.toFixed(0)} limit`})]})]}),(0,d.jsx)("div",{className:"mt-1 flex items-center gap-1.5 text-xs",children:l?(0,d.jsx)(e.E,{tone:"destructive",children:"Limit reached"}):j>=.8?(0,d.jsxs)(e.E,{tone:"warning",children:[Math.round(100*j),"% used"]}):(0,d.jsxs)("span",{className:"text-muted-foreground",children:[i,b>0&&(0,d.jsxs)(d.Fragment,{children:[" \xb7 ",Math.round(100*j),"% of budget"]})]})})]})}function i({value:a,limit:b}){let c=g(a,b),e=b<=0,h=b>0&&a>=b||c>=.95?"destructive":c>=.8?"warning":"primary";return(0,d.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,d.jsxs)("div",{className:"flex items-baseline justify-between",children:[(0,d.jsxs)("span",{className:"tnum text-sm font-semibold",children:["$",a.toFixed(2)," ",(0,d.jsx)("span",{className:"font-normal text-muted-foreground",children:e?"spent":`/ $${b.toFixed(2)}`})]}),(0,d.jsx)("span",{className:"text-xs font-medium",style:{color:e?"hsl(var(--muted-foreground))":(0,f.U)(h)},children:e?"Unlimited":`${Math.round(100*c)}%`})]}),(0,d.jsx)("div",{className:"h-2 w-full overflow-hidden rounded-full bg-secondary",children:(0,d.jsx)("div",{className:"dd-bar h-full rounded-full",style:{width:`${100*c}%`,backgroundColor:(0,f.U)(h)}})})]})}},21847:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(30285).A)("chart-no-axes-column",[["path",{d:"M5 21v-6",key:"1hz6c0"}],["path",{d:"M12 21V3",key:"1lcnhd"}],["path",{d:"M19 21V9",key:"unv183"}]])},23116:(a,b,c)=>{"use strict";c.d(b,{IssueBoard:()=>ad});var d=c(27905),e=c(71859);let f=(0,e.A)("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]),g=(0,e.A)("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]),h=(0,e.A)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);var i=c(38048),j=c(22096),k=c(7228),l=c(37756),m=c(49616),n=c(35404),o=c(86186),p=c(35924);let q=(0,e.A)("settings-2",[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);var r=c(43682),s=c(50059),t=c(20702),u=c(2431),v=c(12517),w=c(22842),x=c(9339),y=c(27796),z=c(32029),A=c(7420),B=c(51413),C=c(25126),D=c(37913),E=c(77585),F=c(82795),G=c(23581);let H=(0,G.createServerReference)("60bfc6a4e9198e720685caff573a7c5530a932a94f",G.callServer,void 0,G.findSourceMapURL,"viewIssueAction"),I=(0,G.createServerReference)("600ca3f9aed305deff553aa1c08ae69c32101f71eb",G.callServer,void 0,G.findSourceMapURL,"listSubtasksAction"),J=(0,G.createServerReference)("708d1d0749ba8c93e5e26085ef0883036c5af73828",G.callServer,void 0,G.findSourceMapURL,"setIssueStateAction"),K=(0,G.createServerReference)("705dd05198465a33025d7f1fd10a27c13aa9ab1356",G.callServer,void 0,G.findSourceMapURL,"startIssueAction"),L=(0,G.createServerReference)("60f2603084b627a41de1c34572ea57f5fb9f7e9eb0",G.callServer,void 0,G.findSourceMapURL,"removeFromQueueAction"),M=(0,G.createServerReference)("70bb4f3ecb7a6c8f3133963d877578f05ea5896840",G.callServer,void 0,G.findSourceMapURL,"addToQueueAction"),N=(0,G.createServerReference)("7034e56b6a85b637cae1780477310c00f2443f19df",G.callServer,void 0,G.findSourceMapURL,"editIssueAction"),O=(0,G.createServerReference)("7806e06ea35c6a19d41bfdff0323bd8c5fc6dd1418",G.callServer,void 0,G.findSourceMapURL,"setIssueLabelsAction"),P=(0,G.createServerReference)("70740ab13f87a56643190340bfd3dda772e4c0b827",G.callServer,void 0,G.findSourceMapURL,"commentIssueAction");var Q=c(33721);let R={pending:{label:"Pending",symbol:"○",tone:"neutral"},in_progress:{label:"In progress",symbol:"◐",tone:"primary"},done:{label:"Done",symbol:"✓",tone:"success"},skipped:{label:"Skipped",symbol:"⊘",tone:"neutral"},deferred:{label:"Deferred",symbol:"⏸",tone:"warning"}};function S({repoId:a,issueNumber:b,open:c,onClose:e,queueLabel:f,defaultModel:g,defaultAgent:h}){let[i,j]=(0,p.useState)(null),[k,l]=(0,p.useState)([]),[m,o]=(0,p.useState)(""),[G,T]=(0,p.useState)(""),[U,V]=(0,p.useState)(""),[W,X]=(0,p.useState)(""),[Y,Z]=(0,p.useState)(g),[$,_]=(0,p.useState)(h),[aa,ab]=(0,p.useState)(null),[ac,ad]=(0,p.useState)(!1),[ae,af]=(0,p.useTransition)();function ag(){null!==b&&(H(a,b).then(j).catch(a=>ab(a.message)),I(a,b).then(l).catch(()=>l([])))}function ah(b){i&&af(()=>{J(a,i.number,b).then(ag).catch(a=>ab(a.message))})}if(null===b)return null;let ai=`issue-modal-title-${b}`;return(0,d.jsxs)(B.l,{open:c,onClose:e,labelledById:ai,children:[(0,d.jsxs)("span",{id:ai,className:"sr-only",children:["Issue #",b]}),aa&&(0,d.jsx)(x.F,{tone:"destructive",className:"mb-3",children:aa}),i?(0,d.jsxs)("div",{className:"space-y-4",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)("span",{className:"text-xs font-mono text-muted-foreground tnum",children:["#",i.number]}),(0,d.jsx)(y.E,{status:i.state}),(0,d.jsx)(z.$,{size:"sm",variant:"outline",className:"ml-auto",disabled:ae,onClick:()=>"open"===i.state?ad(!0):ah("open"),children:"open"===i.state?"Close issue":"Reopen issue"})]}),(0,d.jsxs)("div",{className:"rounded-xl border border-card-border bg-secondary/40 p-4",children:[(0,d.jsxs)("h3",{className:"mb-3 flex items-center gap-2 text-sm font-semibold",children:[(0,d.jsx)(q,{className:"h-3.5 w-3.5 text-muted-foreground"}),"Run settings"]}),(0,d.jsxs)("div",{className:"flex flex-wrap items-end gap-2",children:[(0,d.jsx)(D.D,{label:"Agent",htmlFor:"modal-agent-select",children:(0,d.jsx)(v.a,{id:"modal-agent-select",value:$,onChange:a=>{_(a),Z((0,Q.VJ)(a))}})}),(0,d.jsx)(D.D,{label:"Model",htmlFor:"modal-model-select",children:(0,d.jsx)(w.o,{id:"modal-model-select",value:Y,onChange:Z,agent:$})}),(0,d.jsxs)(z.$,{size:"sm",disabled:ae,onClick:()=>af(()=>{K(a,i.number,{model:Y!==g?Y:void 0,agent:$!==h?$:void 0}).then(()=>e()).catch(a=>ab(a.message))}),children:[(0,d.jsx)(r.A,{}),"Start job now"]}),i.labels.includes(f)?(0,d.jsx)(z.$,{size:"sm",variant:"outline",disabled:ae,onClick:()=>af(()=>{L(a,i.number).then(ag).catch(a=>ab(a.message))}),children:"Dequeue"}):(0,d.jsx)(z.$,{size:"sm",variant:"outline",disabled:ae,onClick:()=>af(()=>{M(a,i.number,{model:Y!==g?Y:void 0,agent:$!==h?$:void 0}).then(ag).catch(a=>ab(a.message))}),children:"Add to queue"})]}),Y!==g||$!==h?(0,d.jsxs)("p",{className:"mt-2 text-xs text-muted-foreground",children:["Override active — repo default:"," ",(0,d.jsx)("span",{className:"font-medium text-foreground",children:g})]}):null]}),(0,d.jsx)(E.p,{value:m,onChange:a=>o(a.target.value),className:"font-medium"}),(0,d.jsx)(F.T,{value:G,onChange:a=>T(a.target.value),rows:8}),(0,d.jsxs)(z.$,{size:"sm",disabled:ae,onClick:()=>af(()=>{N(a,i.number,{title:m,body:G}).then(ag).catch(a=>ab(a.message))}),children:[(0,d.jsx)(s.A,{}),"Save changes"]}),(0,d.jsxs)("div",{children:[(0,d.jsxs)("h3",{className:"mb-2 flex items-center gap-2 text-sm font-semibold",children:[(0,d.jsx)(n.A,{className:"h-3.5 w-3.5 text-muted-foreground"}),"Labels"]}),(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[i.labels.map(b=>(0,d.jsx)("button",{type:"button",title:"Remove label",disabled:ae,className:"rounded-md focus-ring disabled:opacity-50",onClick:()=>af(()=>{O(a,i.number,[],[b]).then(ag).catch(a=>ab(a.message))}),children:(0,d.jsxs)(y.E,{className:"cursor-pointer",children:[b," \xd7"]})},b)),(0,d.jsx)(E.p,{value:W,onChange:a=>X(a.target.value),placeholder:"add label",className:"h-8 w-28 text-xs"}),(0,d.jsx)(z.$,{size:"sm",variant:"outline",disabled:ae||!W.trim(),onClick:()=>af(()=>{O(a,i.number,[W.trim()],[]).then(()=>{X(""),ag()}).catch(a=>ab(a.message))}),children:"Add"})]})]}),k.length>0&&(0,d.jsxs)("div",{children:[(0,d.jsxs)("h3",{className:"mb-2 flex items-center gap-2 text-sm font-semibold",children:[(0,d.jsx)(t.A,{className:"h-3.5 w-3.5 text-muted-foreground"}),"Subtasks (",k.filter(a=>"done"===a.status).length,"/",k.length,")"]}),(0,d.jsx)("ol",{className:"space-y-1.5",children:k.map(a=>{let b=R[a.status]??{label:a.status,symbol:"○",tone:"neutral"},c="done"===a.status||"skipped"===a.status;return(0,d.jsxs)("li",{className:"flex items-center gap-2 rounded-lg border border-card-border bg-secondary/40 px-3 py-1.5 text-sm",children:[(0,d.jsx)("span",{className:"text-muted-foreground","aria-hidden":!0,children:b.symbol}),(0,d.jsx)("span",{className:c?"text-muted-foreground line-through":"",children:a.title}),(0,d.jsx)("span",{className:"ml-auto",children:(0,d.jsx)(y.E,{tone:b.tone,children:b.label})})]},a.id)})})]}),(0,d.jsxs)("div",{children:[(0,d.jsxs)("h3",{className:"mb-2 flex items-center gap-2 text-sm font-semibold",children:[(0,d.jsx)(u.A,{className:"h-3.5 w-3.5 text-muted-foreground"}),"Comments"]}),(0,d.jsxs)("ul",{className:"space-y-2",children:[i.comments.map(a=>(0,d.jsxs)("li",{className:"rounded-lg border border-card-border bg-secondary/40 p-3 text-sm",children:[(0,d.jsxs)("p",{className:"text-xs text-muted-foreground",children:[(0,d.jsx)("span",{className:"font-medium text-foreground",children:a.author})," \xb7 ",a.createdAt]}),(0,d.jsx)("p",{className:"mt-1 whitespace-pre-wrap text-pretty",children:a.body})]},`${a.author}-${a.createdAt}`)),0===i.comments.length&&(0,d.jsx)("li",{children:(0,d.jsx)(C.p,{compact:!0,icon:u.A,title:"No comments yet",description:"Discussion from GitHub shows up here."})})]}),(0,d.jsx)(F.T,{value:U,onChange:a=>V(a.target.value),rows:3,placeholder:"Write a comment…",className:"mt-2"}),(0,d.jsx)(z.$,{size:"sm",className:"mt-2",disabled:ae||!U.trim(),onClick:()=>af(()=>{P(a,i.number,U.trim()).then(()=>{V(""),ag()}).catch(a=>ab(a.message))}),children:"Comment"})]})]}):(0,d.jsx)("p",{className:"text-sm text-muted-foreground",children:"Loading…"}),i&&(0,d.jsx)(A.T,{open:ac,onOpenChange:ad,onConfirm:()=>ah("closed"),title:"Close issue?",description:`This closes #${i.number} on GitHub.`,confirmLabel:"Close issue",variant:"destructive",pending:ae})]})}var T=c(39906),U=c(46553),V=c(62164);let W=(0,G.createServerReference)("4026f0528b2614bf0f86e26130dec15566806d14b7",G.callServer,void 0,G.findSourceMapURL,"syncRepoIssuesAction"),X=(0,G.createServerReference)("607cbf245f927265ee1d526fbaeba8f82cb6dc87f5",G.callServer,void 0,G.findSourceMapURL,"reorderIssuesAction"),Y=(0,G.createServerReference)("6041c2d0995dee6589d5169a8bd20dcbbd34657513",G.callServer,void 0,G.findSourceMapURL,"bulkAddToQueueAction"),Z=(0,G.createServerReference)("600dd489bfb6fb6413e5ba79921f49e69284931103",G.callServer,void 0,G.findSourceMapURL,"bulkRemoveFromQueueAction"),$=(0,G.createServerReference)("70c679f3f6d45c5a5b456ead89b69f651429528b33",G.callServer,void 0,G.findSourceMapURL,"bulkApplyLabelAction");var _=c(5270);function aa(a){try{let b=JSON.parse(a);return Array.isArray(b)?b:[]}catch{return[]}}function ab({issue:a,reorderable:b,queueLabel:c,queueIndex:e,queueSize:k,isDragging:l,isOver:m,isFlash:n,selected:o,pending:p,onToggleSelect:q,onOpen:r,onAddToQueue:s,onRemoveFromQueue:t,onMoveUp:u,onMoveDown:v,onDragStartRow:w,onDragEnterRow:x,onDragEndRow:A,onDropRow:B}){let C=aa(a.labels).filter(a=>a!==c),D=`issue-select-${a.number}`;return(0,d.jsxs)("div",{draggable:!0,onDragStart:b=>{w(),b.dataTransfer.effectAllowed="move";try{b.dataTransfer.setData("text/plain",String(a.number))}catch{}},onDragEnter:x,onDragOver:a=>a.preventDefault(),onDragEnd:A,onDrop:a=>{a.preventDefault(),a.stopPropagation(),B()},className:(0,_.cn)("issue-row group flex items-center gap-3 rounded-lg border border-transparent bg-card px-3 py-2.5 hover-elevate",l&&"opacity-40",m&&"ring-1 ring-primary/70",n&&"bg-success/[0.06] ring-1 ring-success/70"),children:[(0,d.jsx)(f,{"aria-hidden":!0,className:"h-[15px] w-[15px] shrink-0 cursor-grab text-muted-foreground/40 group-hover:text-muted-foreground active:cursor-grabbing"}),(0,d.jsx)(T.S,{id:D,checked:o,onChange:q,"aria-label":`Select #${a.number} for bulk actions`,className:"shrink-0"}),b&&(0,d.jsx)("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-primary text-[11px] font-semibold tabular-nums text-primary-foreground",children:e+1}),(0,d.jsxs)("button",{type:"button",onClick:r,className:"flex min-w-0 flex-1 items-center gap-2 rounded-sm text-left focus-ring",children:[(0,d.jsxs)("span",{className:"shrink-0 font-mono text-xs text-muted-foreground",children:["#",a.number]}),(0,d.jsx)("span",{className:"truncate text-sm group-hover:text-foreground",children:a.title})]}),(0,d.jsxs)("div",{className:"hidden shrink-0 items-center gap-1.5 md:flex",children:[a.triagedAt&&(0,d.jsx)(V.m,{content:"Labels applied by auto-triage — see the issue comment for reasons",children:(0,d.jsx)(y.E,{tone:"primary",children:"auto-triaged"})}),C.slice(0,2).map(a=>(0,d.jsx)("span",{className:"rounded-md bg-secondary px-1.5 py-0.5 text-[11px] text-muted-foreground",children:a},a))]}),(0,d.jsx)("div",{className:"flex shrink-0 items-center gap-0.5",children:b?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(z.$,{type:"button",size:"icon-sm",variant:"ghost","aria-label":`Move #${a.number} up in queue`,disabled:0===e||p,onClick:u,className:"h-7 w-7",children:(0,d.jsx)(g,{})}),(0,d.jsx)(z.$,{type:"button",size:"icon-sm",variant:"ghost","aria-label":`Move #${a.number} down in queue`,disabled:e===k-1||p,onClick:v,className:"h-7 w-7",children:(0,d.jsx)(h,{})}),(0,d.jsx)(z.$,{type:"button",size:"icon-sm",variant:"ghost","aria-label":`Remove #${a.number} from queue`,disabled:p,onClick:t,className:"h-7 w-7 text-destructive hover:text-destructive",children:(0,d.jsx)(i.A,{})})]}):(0,d.jsx)(z.$,{type:"button",size:"icon-sm",variant:"ghost","aria-label":`Add #${a.number} to queue`,disabled:p,onClick:s,className:"h-7 w-7",children:(0,d.jsx)(j.A,{})})})]})}function ac({zone:a,icon:b,title:c,count:e,hint:f,empty:g,emptyDrop:h,dropping:i,isEmpty:j,onDropZone:k,onClearOver:l,children:m}){return(0,d.jsxs)("div",{onDragOver:a=>{a.preventDefault(),a.currentTarget===a.target&&l()},onDrop:a=>{a.preventDefault(),k()},"data-zone":a,className:(0,_.cn)("rounded-xl border p-2 transition-colors",i?"border-dashed border-primary/45 bg-primary/[0.03]":"border-card-border"),children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5",children:[(0,d.jsx)(b,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,d.jsx)("span",{className:"text-sm font-semibold",children:c}),(0,d.jsx)(y.E,{tone:"neutral",children:e}),(0,d.jsx)("span",{className:"ml-auto hidden text-xs text-muted-foreground sm:block",children:f})]}),j?(0,d.jsx)("div",{className:(0,_.cn)("m-1 rounded-lg border border-dashed px-3 py-6 text-center text-xs transition-colors",i?"border-primary/50 text-primary":"border-border text-muted-foreground"),children:i?h:g}):(0,d.jsx)("div",{className:"flex flex-col gap-0.5 p-1",children:m})]})}function ad({repoId:a,queueLabel:b,initialIssues:c,pollIntervalSec:e,defaultModel:g,defaultAgent:h}){let[j,q]=(0,p.useState)(c),[r,s]=(0,p.useState)(""),[t,u]=(0,p.useState)(null),[v,w]=(0,p.useState)(null),[x,y]=(0,p.useState)(null),[A,B]=(0,p.useState)(null),[C,D]=(0,p.useState)(new Set),[F,G]=(0,p.useState)(""),[H,I]=(0,p.useTransition)(),[J,K]=(0,p.useState)(null),{success:N}=(0,U.d)(),O=a=>aa(a.labels).includes(b),P=a=>{let b=r.toLowerCase();return!b||a.title.toLowerCase().includes(b)||String(a.number).includes(b)||aa(a.labels).some(a=>a.toLowerCase().includes(b))},Q=j.filter(a=>!O(a)&&P(a)),R=j.filter(a=>O(a)&&P(a));function T(){u(null),w(null)}function V(){if(null===t)return;let b=j.find(a=>a.number===t),c=b?.title;T(),!b||O(b)||I(()=>{M(a,t).then(a=>{q(a),y(t),setTimeout(()=>y(a=>a===t?null:a),1200),N("Issue queued",`#${t} ${c??""}`.trim())}).catch(a=>K(a.message))})}function ae(){if(null===t)return;let b=j.find(a=>a.number===t);T(),b&&O(b)&&I(()=>{L(a,b.number).then(q).catch(a=>K(a.message))})}function af(){D(new Set)}function ag(a){let b=[...C];0!==b.length&&(K(null),I(()=>{a(b).then(a=>{q(a),af()}).catch(a=>K(a.message))}))}let ah=j.filter(O).map(a=>a.number),ai=null!==t;function aj(c,e){return(0,d.jsx)(ab,{issue:c,reorderable:e,queueLabel:b,queueIndex:ah.indexOf(c.number),queueSize:ah.length,isDragging:t===c.number,isOver:v===c.number&&null!==t&&t!==c.number,isFlash:x===c.number,selected:C.has(c.number),pending:H,onToggleSelect:()=>{var a;return a=c.number,void D(b=>{let c=new Set(b);return c.has(a)?c.delete(a):c.add(a),c})},onOpen:()=>B(c.number),onAddToQueue:()=>{var b;return b=c.number,void I(()=>{M(a,b).then(q).catch(a=>K(a.message))})},onRemoveFromQueue:()=>{var b;return b=c.number,void I(()=>{L(a,b).then(q).catch(a=>K(a.message))})},onMoveUp:()=>{let b;return b=function(a,b){let c=a.indexOf(b);if(c<=0)return a;let d=[...a],e=d[c-1];return d[c-1]=d[c],d[c]=e,d}(ah,c.number),void I(()=>{X(a,b).catch(a=>K(a.message))})},onMoveDown:()=>{let b;return b=function(a,b){let c=a.indexOf(b);if(-1===c||c===a.length-1)return a;let d=[...a],e=d[c+1];return d[c+1]=d[c],d[c]=e,d}(ah,c.number),void I(()=>{X(a,b).catch(a=>K(a.message))})},onDragStartRow:()=>u(c.number),onDragEnterRow:()=>w(c.number),onDragEndRow:T,onDropRow:()=>{let b;!(b=null===t?void 0:j.find(a=>a.number===t))?T():O(b)===e?e?function(b){if(T(),null===t||t===b)return;let c=j.find(a=>a.number===t);if(!c||!O(c))return;let d=function(a,b,c){if(b===c||!a.includes(b))return a;let d=a.filter(a=>a!==b),e=d.indexOf(c);return -1===e?a:(d.splice(e,0,b),d)}(j.filter(O).map(a=>a.number),t,b);I(()=>{X(a,d).catch(a=>K(a.message))})}(c.number):T():e?V():ae()}},c.number)}return(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,d.jsxs)("p",{className:"inline-flex items-center gap-1.5 text-xs text-muted-foreground",children:[(0,d.jsx)(f,{className:"h-3.5 w-3.5"})," Drag to set priority, or drop an issue into the queue to schedule it."]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)("div",{className:"relative w-full sm:w-56",children:[(0,d.jsx)(k.A,{className:"pointer-events-none absolute left-3 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),(0,d.jsx)(E.p,{"aria-label":"Search issues by title or label",value:r,onChange:a=>s(a.target.value),placeholder:"Filter issues",className:"h-8 pl-8 text-xs"})]}),(0,d.jsxs)(z.$,{size:"sm",variant:"outline",disabled:H||0===Q.length,onClick:function(){let b=Q.map(a=>a.number);0!==b.length&&(K(null),I(()=>{Y(a,b).then(q).catch(a=>K(a.message))}))},children:[(0,d.jsx)(l.A,{className:"h-3.5 w-3.5"})," Queue all"]}),(0,d.jsxs)(z.$,{size:"sm",variant:"outline",disabled:H,onClick:function(){K(null),I(()=>{W(a).then(q).catch(a=>K(a.message))})},children:[(0,d.jsx)(m.A,{className:(0,_.cn)("h-3.5 w-3.5",H&&"dd-spin")}),H?"Syncing…":"Refresh"]})]})]}),J&&(0,d.jsx)("p",{role:"alert",className:"text-xs text-destructive",children:J}),C.size>0&&(0,d.jsxs)("div",{className:"dd-fade-up flex flex-wrap items-center gap-2 rounded-xl border border-primary/40 bg-primary/[0.04] p-2",children:[(0,d.jsxs)("span",{className:"px-1 text-sm font-medium",children:[C.size," selected"]}),(0,d.jsxs)(z.$,{size:"sm",variant:"outline",disabled:H,onClick:()=>ag(b=>Y(a,b)),children:[(0,d.jsx)(l.A,{className:"h-3.5 w-3.5"})," Add to queue"]}),(0,d.jsxs)(z.$,{size:"sm",variant:"outline",disabled:H,onClick:()=>ag(b=>Z(a,b)),children:[(0,d.jsx)(i.A,{className:"h-3.5 w-3.5"})," Remove from queue"]}),(0,d.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,d.jsx)(E.p,{"aria-label":"Label to apply to selected issues",value:F,onChange:a=>G(a.target.value),placeholder:"label…",className:"h-8 w-28 text-xs"}),(0,d.jsxs)(z.$,{size:"sm",variant:"outline",disabled:H||""===F.trim(),onClick:()=>{let b=F.trim();ag(c=>$(a,c,b)),G("")},children:[(0,d.jsx)(n.A,{className:"h-3.5 w-3.5"})," Apply label"]})]}),(0,d.jsx)(z.$,{size:"sm",variant:"ghost",className:"ml-auto",disabled:H,onClick:af,children:"Clear"})]}),(0,d.jsx)(ac,{zone:"queue",icon:l.A,title:"Queue",count:R.length,hint:"top = next to run",empty:"Nothing queued. Drag an issue up from the backlog, or use the + button.",emptyDrop:"Drop here",dropping:ai,onDropZone:V,onClearOver:()=>w(null),isEmpty:0===R.length,children:R.map(a=>aj(a,!0))}),(0,d.jsx)(ac,{zone:"backlog",icon:o.A,title:"Backlog \xb7 triage",count:Q.length,hint:"drag up to schedule",empty:"Backlog is empty.",emptyDrop:"Drop here",dropping:ai,onDropZone:ae,onClearOver:()=>w(null),isEmpty:0===Q.length,children:Q.map(a=>aj(a,!1))}),(0,d.jsx)(S,{repoId:a,issueNumber:A,open:null!==A,onClose:()=>B(null),queueLabel:b,defaultModel:g,defaultAgent:h})]})}},24094:(a,b,c)=>{"use strict";c.d(b,{Sparkline:()=>d});let d=(0,c(34215).registerClientReference)(function(){throw Error("Attempted to call Sparkline() from the server but Sparkline 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/drydock/drydock/src/components/ui/sparkline.tsx","Sparkline")},25327:(a,b,c)=>{"use strict";c.d(b,{m:()=>e});var d=c(23581);let e=(0,d.createServerReference)("40d0ed456c31628dcf5070ac77f7f36aa9ddb3e3da",d.callServer,void 0,d.findSourceMapURL,"saveTemplateAction")},26713:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/is-bot")},27910:a=>{"use strict";a.exports=require("stream")},28354:a=>{"use strict";a.exports=require("util")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31057:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(30285).A)("git-merge",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]])},31421:a=>{"use strict";a.exports=require("node:child_process")},33873:a=>{"use strict";a.exports=require("path")},34631:a=>{"use strict";a.exports=require("tls")},35264:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(30285).A)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]])},35404:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(71859).A)("tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]])},36121:(a,b,c)=>{"use strict";c.d(b,{L:()=>g});var d=c(27905),e=c(5270);let f={neutral:"bg-secondary text-muted-foreground",primary:"bg-primary/10 text-primary",success:"bg-success-muted text-success",warning:"bg-warning-muted text-warning",destructive:"bg-destructive/10 text-destructive"};function g({icon:a,legend:b,description:c,tone:h="neutral",children:i}){return(0,d.jsxs)("fieldset",{className:"rounded-lg border border-border p-4",children:[(0,d.jsxs)("legend",{className:"flex items-center gap-2 px-1",children:[(0,d.jsx)("span",{className:(0,e.cn)("flex h-6 w-6 items-center justify-center rounded-md",f[h]),children:(0,d.jsx)(a,{className:"h-3.5 w-3.5"})}),(0,d.jsx)("span",{className:"text-sm font-semibold",children:b})]}),c&&(0,d.jsx)("p",{className:"mb-3 mt-1 text-xs text-muted-foreground",children:c}),(0,d.jsx)("div",{className:"flex flex-col gap-3",children:i})]})}},37739:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>ah,dynamic:()=>ag});var d=c(87383),e=c(97496),f=c(30285);let g=(0,f.A)("inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]),h=(0,f.A)("loader",[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]]),i=(0,f.A)("git-pull-request-arrow",[["circle",{cx:"5",cy:"6",r:"3",key:"1qnov2"}],["path",{d:"M5 9v12",key:"ih889a"}],["circle",{cx:"19",cy:"18",r:"3",key:"1qljk2"}],["path",{d:"m15 9-3-3 3-3",key:"1lwv8l"}],["path",{d:"M12 6h5a2 2 0 0 1 2 2v7",key:"1yj91y"}]]);var j=c(31057),k=c(30263),l=c(59810),m=c(57284);let n=(0,f.A)("cpu",[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]]);var o=c(46305),p=c(35264),q=c(21847);let r=(0,f.A)("tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);var s=c(8978),t=c(91568),u=c(94895);let v=(0,f.A)("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]),w=(0,f.A)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]),x=(0,f.A)("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);var y=c(77283),z=c.n(y),A=c(18873),B=c(15354),C=c(46136),D=c(58543),E=c(25900);function F({activeJob:a,recentJobs:b,initialLog:c=[],repoId:e}){return(0,d.jsxs)("div",{className:"space-y-5",children:[(0,d.jsxs)("div",{children:[(0,d.jsxs)("h3",{className:"mb-2 flex items-center gap-2 text-sm font-semibold",children:[(0,d.jsx)(v,{className:"h-3.5 w-3.5 text-muted-foreground"})," Live activity"]}),a?(0,d.jsxs)("div",{className:"space-y-3 rounded-lg border border-border p-3",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)(B.E,{status:a.status}),(0,d.jsx)(z(),{href:`/jobs/${a.id}`,className:"font-mono text-xs text-muted-foreground hover:text-foreground",children:"release"===a.kind?"Release":`#${a.issueNumber}`}),(0,d.jsx)(z(),{href:`/jobs/${a.id}`,className:"ml-auto text-xs text-primary hover:underline",children:"Open live log →"})]}),(0,d.jsxs)("dl",{className:"grid grid-cols-2 gap-1 text-xs text-muted-foreground",children:[(0,d.jsxs)("div",{children:["Model: ",(0,D.mM)(a.model)]}),(0,d.jsxs)("div",{className:"tnum",children:["Cost: ",(0,E.UK)(a.costUsd,4)]}),(0,d.jsxs)("div",{className:"tnum",children:["Tokens: ",a.totalInputTokens," in / ",a.totalOutputTokens," out"]})]}),(0,d.jsx)(A.LogViewer,{jobId:a.id,initial:c,active:["working","ci_running","retrying"].includes(a.status)})]}):(0,d.jsx)(C.p,{compact:!0,icon:w,title:"Idle",description:"No job is running in this repo right now. Start an issue from the queue."})]}),(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"mb-2 flex items-center justify-between",children:[(0,d.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold",children:[(0,d.jsx)(x,{className:"h-3.5 w-3.5 text-muted-foreground"})," Recent jobs"]}),void 0!==e&&(0,d.jsx)(z(),{href:`/jobs?repo=${e}`,className:"text-xs text-muted-foreground hover:text-foreground",children:"View all runs →"})]}),0===b.length?(0,d.jsx)(C.p,{compact:!0,icon:x,title:"No jobs yet",description:"Finished runs will appear here once Drydock processes an issue."}):(0,d.jsx)("ul",{className:"flex flex-col gap-0.5",children:b.map(a=>(0,d.jsx)("li",{children:(0,d.jsxs)(z(),{href:`/jobs/${a.id}`,className:"flex w-full items-center gap-2.5 rounded-lg px-2 py-1.5 text-left hover-elevate",children:[(0,d.jsx)(B.E,{status:a.status,className:"shrink-0"}),(0,d.jsx)("span",{className:"shrink-0 font-mono text-xs text-muted-foreground",children:"release"===a.kind?"Release":`#${a.issueNumber}`}),(0,d.jsx)("span",{className:"ml-auto tnum shrink-0 text-xs text-muted-foreground",children:(0,E.UK)(a.costUsd)})]})},a.id))})]})]})}let G={accepted:"success",proposed:"primary",pending:"warning",pending_review:"warning",superseded:"neutral",rejected:"destructive",deprecated:"neutral"};function H({adrs:a}){return(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold",children:[(0,d.jsx)(p.A,{className:"h-3.5 w-3.5 text-muted-foreground"})," ADRs"]}),0===a.length?(0,d.jsx)(C.p,{compact:!0,icon:p.A,title:"No ADRs yet",description:"Architecture decision records captured for this repo will appear here."}):(0,d.jsx)("ul",{className:"flex flex-col gap-2",children:a.map(a=>(0,d.jsxs)("li",{className:"flex items-center gap-3 rounded-lg border border-border p-3",children:[(0,d.jsx)(p.A,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,d.jsx)("span",{className:"min-w-0 flex-1 truncate text-sm",children:a.title}),(0,d.jsx)(B.E,{tone:G[a.status]??"neutral",children:a.status})]},a.id))})]})}var I=c(42970),J=c(21822),K=c(24094);function L({todayUsd:a,limitUsd:b,daily:c}){let e=new Map(c.map(a=>[a.day,a.costUsd])),f=function(){let a=[],b=new Date;for(let c=6;c>=0;c--){let d=new Date(b);d.setDate(b.getDate()-c),a.push(`${d.getFullYear()}-${String(d.getMonth()+1).padStart(2,"0")}-${String(d.getDate()).padStart(2,"0")}`)}return a}(),g=[...f].reverse().map(a=>({day:a,costUsd:e.get(a)??0})),h=g.reduce((a,b)=>a+b.costUsd,0),i=f.map(a=>e.get(a)??0);return(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold",children:[(0,d.jsx)(l.A,{className:"h-3.5 w-3.5 text-muted-foreground"})," Cost"]}),(0,d.jsx)(J.dm,{value:a,limit:b}),0===c.length&&0===a?(0,d.jsx)(C.p,{compact:!0,icon:l.A,title:"No spend yet",description:"Costs appear here once jobs run in this repo."}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"rounded-lg border border-border p-3",children:[(0,d.jsxs)("div",{className:"mb-2 flex items-center justify-between text-xs text-muted-foreground",children:[(0,d.jsx)("span",{children:"Last 7 days"}),(0,d.jsx)("span",{className:"tnum",children:(0,E.UK)(h)})]}),i.length>1?(0,d.jsx)(K.Sparkline,{data:i,width:320,height:42,tone:"chart-1",average:!0}):(0,d.jsx)("p",{className:"text-xs text-muted-foreground",children:"Not enough data yet."})]}),(0,d.jsx)("ul",{className:"flex flex-col gap-1 text-sm",children:g.map(a=>(0,d.jsxs)("li",{className:"flex justify-between border-b border-border/50 py-1.5 last:border-0",children:[(0,d.jsx)("span",{className:"text-muted-foreground",children:a.day}),(0,d.jsx)("span",{className:"tnum",children:(0,E.UK)(a.costUsd)})]},a.day))})]})]})}let M=(0,f.A)("rocket",[["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}],["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09",key:"u4xsad"}],["path",{d:"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z",key:"676m9"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05",key:"92ym6u"}]]),N={monitoring:"neutral",healthy:"success",failed:"destructive",repairing:"warning",repaired:"primary",escalated:"destructive"};function O({sessions:a}){return(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold",children:[(0,d.jsx)(M,{className:"h-3.5 w-3.5 text-muted-foreground"})," Deployments"]}),0===a.length?(0,d.jsx)(C.p,{compact:!0,icon:M,title:"No deployment sessions yet",description:"Post-merge deployment monitoring and fixes show up here."}):(0,d.jsx)("ul",{className:"flex flex-col gap-2",children:a.map(a=>(0,d.jsxs)("li",{className:"flex items-center gap-3 rounded-lg border border-border p-3",children:[(0,d.jsxs)(z(),{href:`/jobs/${a.jobId}`,className:"font-mono text-xs text-muted-foreground hover:text-foreground",children:["#",a.issueNumber]}),(0,d.jsx)("span",{className:"rounded-md bg-secondary px-1.5 py-0.5 text-[11px] text-muted-foreground",children:a.platform}),(0,d.jsxs)("span",{className:"font-mono text-sm",children:["PR #",a.prNumber]}),(0,d.jsx)("span",{className:"text-xs text-muted-foreground",children:a.commitSha.slice(0,7)}),(0,d.jsx)(B.E,{tone:N[a.status]??"neutral",children:a.status}),null!=a.followupPrNumber&&(0,d.jsxs)("span",{className:"ml-auto text-xs text-muted-foreground",children:["fix PR #",a.followupPrNumber]})]},a.id))})]})}let P=(0,f.A)("heart-pulse",[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}],["path",{d:"M3.22 13H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27",key:"auskq0"}]]),Q={healed:"success",triaging:"neutral",awaiting_slot:"neutral",repairing:"primary",awaiting_ci:"warning",verifying:"warning",cooldown:"warning",blocked:"destructive",escalated:"destructive",superseded:"neutral"};function R({sessions:a}){return(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold",children:[(0,d.jsx)(P,{className:"h-3.5 w-3.5 text-muted-foreground"})," CI auto-heal"]}),0===a.length?(0,d.jsx)(C.p,{compact:!0,icon:P,title:"No healing sessions yet",description:"When CI fails on a tracked PR, auto-heal attempts surface here."}):(0,d.jsx)("ul",{className:"flex flex-col gap-2",children:a.map(a=>(0,d.jsxs)("li",{className:"flex items-center gap-3 rounded-lg border border-border p-3",children:[(0,d.jsxs)(z(),{href:`/jobs/${a.jobId}`,className:"font-mono text-xs text-muted-foreground hover:text-foreground",children:["#",a.issueNumber]}),(0,d.jsxs)("span",{className:"font-mono text-sm",children:["PR #",a.prNumber]}),(0,d.jsx)("span",{className:"text-xs text-muted-foreground",children:a.headSha.slice(0,7)}),(0,d.jsx)(B.E,{tone:Q[a.status]??"neutral",children:a.status}),(0,d.jsxs)("span",{className:"ml-auto text-xs text-muted-foreground",children:[a.attempts," attempt",1===a.attempts?"":"s"]})]},a.id))})]})}var S=c(7052),T=c(20465),U=c(49920),V=c(15269),W=c(61622),X=c(40847),Y=c(48036),Z=c(2025),$=c(42722),_=c(54304),aa=c(64537),ab=c(74340),ac=c(34666),ad=c(64080),ae=c(8804),af=c(74644);let ag="force-dynamic";async function ah({params:a}){let{id:b}=await a,c=(0,_.m)(Number(b));c||(0,s.notFound)();let f=(0,af.mt)(),v=(0,Z.Lf)(),w={enabled:f.openrouterEnabled,models:(0,ab.Y8)({db:v,freeOnly:f.openrouterFreeModelsOnly}).map(a=>({id:a.id,label:a.name,isFree:a.isFree})),defaultModel:f.openrouterDefaultModel},x=(0,$.Bt)(v,c.repo.id),y=(0,$.i_)(v,c.repo.id).map(a=>({day:a.day,costUsd:a.costUsd})),z=(0,Y.Pe)(void 0,v,c.repo.id),A=c.repo.autoHealCi?(0,ac.ZA)(c.repo.id,v):[],C=c.repo.autoHealDeployments?(0,ad.ED)(c.repo.id,v):[],D=c.repo.releaseEnabled?(0,ae.Dn)(c.repo.id,v):[],E=c.activeJob?v.select().from(aa.jobEvents).where((0,e.eq)(aa.jobEvents.jobId,c.activeJob.id)).all().map(a=>({id:a.id,type:a.type,payload:JSON.parse(a.payload),ts:a.ts})):[],G=c.repo.queueLabel,J=c.issues.filter(a=>{try{let b=JSON.parse(a.labels);return Array.isArray(b)&&b.includes(G)}catch{return!1}}).length,K=v.select().from(aa.jobs).where((0,e.eq)(aa.jobs.repoId,c.repo.id)).all(),M=a=>K.filter(b=>a.includes(b.status)).length,N=M(["working","retrying"]),P=M(["ci_running"]),Q=M(["merged"]),ag=M(["needs_human"]);return(0,d.jsxs)("div",{className:"dd-fade-up",children:[(0,d.jsx)(u.z,{breadcrumb:[{label:"Dashboard",href:"/"},{label:c.repo.name}],title:(0,d.jsx)("span",{className:"font-mono",children:c.repo.name}),subtitle:c.repo.path,actions:(0,d.jsx)(B.E,{tone:"neutral",className:"capitalize",children:c.repo.platform})}),(0,d.jsxs)("div",{className:"mb-6 grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-6",children:[(0,d.jsx)(X.h,{icon:g,label:"Queued",value:J,tone:"primary",active:J>0}),(0,d.jsx)(X.h,{icon:h,label:"Working",value:N,tone:"primary",active:N>0}),(0,d.jsx)(X.h,{icon:i,label:"CI running",value:P,tone:"warning",active:P>0}),(0,d.jsx)(X.h,{icon:j.A,label:"Merged",value:Q,tone:"success",active:!0}),(0,d.jsx)(X.h,{icon:k.A,label:"Needs human",value:ag,tone:"destructive",active:ag>0}),(0,d.jsx)(X.h,{icon:l.A,label:"Spend today",value:`$${x.toFixed(2)}`,tone:"primary",active:!0,sub:c.repo.dailyCostLimitUsd>0?`of $${c.repo.dailyCostLimitUsd} limit`:"no daily limit"})]}),(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)(W.Section,{icon:(0,d.jsx)(m.A,{className:"h-4 w-4"}),title:"Issues",description:"The work queue for this repository — drag to reorder, filter to focus.",tone:"primary",right:(0,d.jsxs)(B.E,{tone:"neutral",children:[c.issues.length," total"]}),children:(0,d.jsx)(t.IssueBoard,{repoId:c.repo.id,queueLabel:c.repo.queueLabel,initialIssues:c.issues,pollIntervalSec:f.pollIntervalSec,defaultModel:c.repo.defaultModel,defaultAgent:c.repo.agent})}),(0,d.jsx)(W.Section,{icon:(0,d.jsx)(n,{className:"h-4 w-4"}),title:"Automation",description:"What Drydock is allowed to do here, grouped by stage. All opt-in.",defaultOpen:!1,children:(0,d.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,d.jsxs)("div",{children:[(0,d.jsxs)("h3",{className:"mb-3 flex items-center gap-2 text-sm font-semibold",children:[(0,d.jsx)(o.A,{className:"h-3.5 w-3.5 text-muted-foreground"})," Repository settings"]}),(0,d.jsx)(U.RepoSettingsBar,{repo:c.repo,openrouter:w})]}),(0,d.jsx)(I.RepoAutomationBar,{repo:c.repo}),(0,d.jsx)(V.RepoWebhookPanel,{repo:c.repo})]})}),(0,d.jsx)(W.Section,{icon:(0,d.jsx)(p.A,{className:"h-4 w-4"}),title:"Prompts",description:"Instructions handed to the agent for this repo — use the global standard or override per stage.",defaultOpen:!1,right:(0,d.jsx)(B.E,{tone:"neutral",children:"3 stages"}),children:(0,d.jsx)(S.RepoPromptsSection,{repo:c.repo})}),(0,d.jsx)(W.Section,{icon:(0,d.jsx)(q.A,{className:"h-4 w-4"}),title:"Activity & costs",description:"Live work, recent jobs, and spend against the daily limit.",children:(0,d.jsxs)("div",{className:"grid gap-6 lg:grid-cols-2",children:[(0,d.jsx)(F,{activeJob:c.activeJob,recentJobs:c.recentJobs,initialLog:E,repoId:c.repo.id}),(0,d.jsx)(L,{todayUsd:x,limitUsd:c.repo.dailyCostLimitUsd,daily:y})]})}),(0,d.jsx)(W.Section,{icon:(0,d.jsx)(r,{className:"h-4 w-4"}),title:"Releases",description:"Published releases, CI healing, deployments, and ADRs.",defaultOpen:!1,children:(0,d.jsxs)("div",{className:"grid gap-6 lg:grid-cols-2",children:[c.repo.releaseEnabled&&(0,d.jsx)(T.RepoReleasePanel,{repoId:c.repo.id,initialRuns:D}),c.repo.autoHealCi&&(0,d.jsx)(R,{sessions:A}),c.repo.autoHealDeployments&&(0,d.jsx)(O,{sessions:C}),(0,d.jsx)(H,{adrs:z})]})})]})]})}},39165:(a,b,c)=>{"use strict";c.d(b,{RepoAutomationBar:()=>D});var d=c(27905),e=c(79432),f=c(86186),g=c(47348);let h=(0,c(71859).A)("heart-pulse",[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}],["path",{d:"M3.22 13H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27",key:"auskq0"}]]);var i=c(35404),j=c(24641),k=c(2431),l=c(35924),m=c(12517),n=c(22842),o=c(9339),p=c(37913),q=c(36121),r=c(77585),s=c(64261),t=c(83557),u=c(82795),v=c(46553),w=c(62164),x=c(33721),y=c(41370);function z(a){try{let b=JSON.parse(a);return Array.isArray(b)?b.filter(a=>"string"==typeof a):[]}catch{return[]}}function A(a){return[...new Set(a.split(/[,\n]/).map(a=>a.trim()).filter(Boolean))]}function B({label:a,help:b,checked:c,onChange:e,children:f}){return(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,d.jsx)(t.d,{checked:c,onChange:e,"aria-label":a}),(0,d.jsx)("span",{className:"text-sm",children:a}),b&&(0,d.jsx)(w.V,{content:b})]}),c&&f&&(0,d.jsx)("div",{className:"dd-fade-up mt-3 grid gap-3 border-l-2 border-border pl-4 sm:grid-cols-2",children:f})]})}function C({label:a,value:b,onChange:c,onBlur:e,help:f}){return(0,d.jsx)(p.D,{label:(0,d.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[a,f&&(0,d.jsx)(w.V,{content:f})]}),children:(0,d.jsx)(r.p,{value:b,onChange:a=>c(a.target.value),onBlur:e,placeholder:"comma-separated",className:"h-8 font-mono text-xs"})})}function D({repo:a}){let[b,c]=(0,l.useState)(a.autoTriageEnabled),[E,F]=(0,l.useState)(a.autoProcessEnabled),[G,H]=(0,l.useState)(a.autoHealCi),[I,J]=(0,l.useState)(a.mergeWithoutChecks),[K,L]=(0,l.useState)(a.autoReviewFeedback),[M,N]=(0,l.useState)(a.autoDecompose),[O,P]=(0,l.useState)(a.planFirst),[Q,R]=(0,l.useState)(a.verifyPr),[S,T]=(0,l.useState)(a.autoPrAudit),[U,V]=(0,l.useState)(a.prAuditAgent??("openrouter"===a.agent?"claude":a.agent)),[W,X]=(0,l.useState)(a.prAuditModel??(a.prAuditAgent&&a.prAuditAgent!==a.agent?(0,x.VJ)(a.prAuditAgent):a.defaultModel)),[Y,Z]=(0,l.useState)(a.prAuditLanguage),[$,_]=(0,l.useState)(a.prAuditPostOnPr),[aa,ab]=(0,l.useState)(a.autoHealDeployments),[ac,ad]=(0,l.useState)(a.releaseEnabled),[ae,af]=(0,l.useState)(a.autoResolveMergeConflicts),[ag,ah]=(0,l.useState)(a.includeProgressReplies),[ai,aj]=(0,l.useState)(z(a.readyLabels).join(", ")),[ak,al]=(0,l.useState)(z(a.blockingLabels).join(", ")),[am,an]=(0,l.useState)(z(a.autoLabelWhitelist).join(", ")),[ao,ap]=(0,l.useState)(z(a.priorityAuthors).join(", ")),[aq,ar]=(0,l.useState)(z(a.trustedReviewers).join(", ")),[as,at]=(0,l.useState)(z(a.trustedBots).join(", ")),[au,av]=(0,l.useState)(z(a.ignoredBots).join(", ")),[aw,ax]=(0,l.useState)(a.minAuthorAssociation),[ay,az]=(0,l.useState)(a.deploymentPlatform??""),[aA,aB]=(0,l.useState)(a.maxAttempts),[aC,aD]=(0,l.useState)(a.escalateModelOnRetry),[aE,aF]=(0,l.useState)("docker"===a.sandbox),[aG,aH]=(0,l.useState)(a.sandboxImage??""),[aI,aJ]=(0,l.useState)(a.sandboxAllowNetwork),[aK,aL]=(0,l.useState)(a.sandboxCpus??""),[aM,aN]=(0,l.useState)(a.sandboxMemory??""),[aO,aP]=(0,l.useState)(a.agentInstructions??""),[aQ,aR]=(0,l.useTransition)(),[aS,aT]=(0,l.useState)(!1),{error:aU}=(0,v.d)();function aV(b){aT(!1),aR(async()=>{try{await (0,y.u)(a.id,b),aT(!0),setTimeout(()=>aT(!1),1500)}catch(a){aU("Failed to update automation",a instanceof Error?a.message:String(a))}})}return(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)(o.F,{tone:"info",icon:e.A,title:"Bounded & configurable",children:"Most stages are off by default and consume paid agent usage; PR review-feedback is on by default and can be turned off below. Drydock auto-merges a PR only once its configured gates pass — and merging a PR with no automated checks at all requires the explicit opt-in below."}),(0,d.jsxs)("div",{className:"grid gap-4 lg:grid-cols-2",children:[(0,d.jsx)(q.L,{icon:f.A,legend:"Triage",tone:"primary",description:"Classify and label brand-new issues.",children:(0,d.jsxs)(B,{label:"Auto-triage new issues",checked:b,onChange:a=>{c(a),aV({autoTriageEnabled:a})},help:"Reads each new issue and applies whitelisted labels. Never processes — only classifies.",children:[(0,d.jsx)(C,{label:"Auto-label whitelist",value:am,onChange:an,onBlur:()=>aV({autoLabelWhitelist:A(am)}),help:"Triage may only apply labels from this list."}),(0,d.jsx)(p.D,{label:(0,d.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:["Act on authors",(0,d.jsx)(w.V,{content:"Restrict automation to issues from trusted authors."})]}),children:(0,d.jsxs)(s.l,{value:aw,onChange:a=>{let b=a.target.value;ax(b),aV({minAuthorAssociation:b})},className:"h-8 text-xs",children:[(0,d.jsx)("option",{value:"approved",children:"Owners / members / collaborators"}),(0,d.jsx)("option",{value:"any",children:"Anyone (public participation)"})]})})]})}),(0,d.jsxs)(q.L,{icon:g.A,legend:"Processing",tone:"primary",description:"Turn ready issues into pull requests.",children:[(0,d.jsxs)(B,{label:"Auto-process ready issues",checked:E,onChange:a=>{F(a),aV({autoProcessEnabled:a})},help:"Works issues that are ready and not blocked, opening a PR for each.",children:[(0,d.jsx)(C,{label:"Ready labels",value:ai,onChange:aj,onBlur:()=>aV({readyLabels:A(ai)}),help:"Only issues carrying one of these labels are eligible."}),(0,d.jsx)(C,{label:"Blocking labels",value:ak,onChange:al,onBlur:()=>aV({blockingLabels:A(ak)}),help:"Any of these labels holds an issue back."}),(0,d.jsx)(C,{label:"Priority authors",value:ao,onChange:ap,onBlur:()=>aV({priorityAuthors:A(ao)}),help:"Issues from these authors jump the queue."}),(0,d.jsx)(p.D,{label:"Max attempts",children:(0,d.jsx)(r.p,{type:"number",min:1,value:aA,onChange:a=>aB(Number(a.target.value)),onBlur:()=>aV({maxAttempts:aA}),className:"h-8 w-24 text-xs"})})]}),(0,d.jsx)(B,{label:"Escalate model on retry",checked:aC,onChange:a=>{aD(a),aV({escalateModelOnRetry:a})},help:"When a failed job is requeued, the next attempt runs the next-stronger model in this agent's ladder (capped at the strongest). Each attempt is priced at the model it actually ran."}),(0,d.jsx)(B,{label:"Decompose large issues",checked:M,onChange:a=>{N(a),aV({autoDecompose:a})},help:"Splits big issues into ordered, tracked subtasks before working them."}),(0,d.jsx)(B,{label:"Plan before implementing",checked:O,onChange:a=>{P(a),aV({planFirst:a})},help:"A read-only planning pass before implementation; the plan is posted on the issue and embedded in the work prompt. Falls back to a normal run on failure."}),(0,d.jsx)(B,{label:"Verify PR satisfies issue",checked:Q,onChange:a=>{R(a),aV({verifyPr:a})},help:"A read-only pass after the PR opens that checks the diff against the issue and flags gaps. Never changes state on failure."}),(0,d.jsxs)(B,{label:"Audit PRs with an AI review",checked:S,onChange:a=>{T(a),aV({autoPrAudit:a})},help:"A read-only, whole-PR review (Bugbot/CodeRabbit style) posted on the issue after the PR opens. Advisory only — it never merges, blocks, or edits anything.",children:[(0,d.jsx)(p.D,{label:(0,d.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:["Audit agent",(0,d.jsx)(w.V,{content:"CLI agent that runs the audit. Switching agents resets the audit model to that agent's default."})]}),children:(0,d.jsx)(m.a,{value:U,onChange:a=>{if("openrouter"===a)return;let b=(0,x.VJ)(a);V(a),X(b),aV({prAuditAgent:a,prAuditModel:b})},className:"h-8 text-xs"})}),(0,d.jsx)(p.D,{label:(0,d.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:["Audit model",(0,d.jsx)(w.V,{content:"Model used for the audit run."})]}),children:(0,d.jsx)(n.o,{value:W,onChange:a=>{X(a),aV({prAuditModel:a})},agent:U,className:"h-8 text-xs"})}),(0,d.jsx)(p.D,{label:(0,d.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:["Review language",(0,d.jsx)(w.V,{content:"Language the review is written in (e.g. en, de, pt-BR). English is the default."})]}),children:(0,d.jsx)(r.p,{value:Y,onChange:a=>Z(a.target.value),onBlur:()=>{let a=Y.trim()||"en";(Z(a),/^[a-zA-Z]{2,8}(-[a-zA-Z0-9]{1,8})*$/.test(a))?aV({prAuditLanguage:a}):aU("Invalid review language",`"${a}" is not a language code — use a simple or BCP 47 code like en, de, or pt-BR.`)},placeholder:"en",className:"h-8 w-24 font-mono text-xs"})}),(0,d.jsxs)("div",{className:"flex items-center gap-2.5 self-end pb-1.5",children:[(0,d.jsx)(t.d,{checked:$,onChange:a=>{_(a),aV({prAuditPostOnPr:a})},"aria-label":"Also comment on the PR"}),(0,d.jsx)("span",{className:"text-sm",children:"Also comment on the PR"}),(0,d.jsx)(w.V,{content:"Mirror the review on the pull request in addition to the issue."})]})]}),(0,d.jsxs)(B,{label:"Address PR review feedback",checked:K,onChange:a=>{L(a),aV({autoReviewFeedback:a})},help:"Runs the mechanical iteration for trusted reviewers and allowlisted bots.",children:[(0,d.jsx)(C,{label:"Trusted reviewers",value:aq,onChange:ar,onBlur:()=>aV({trustedReviewers:A(aq)}),help:"Only feedback from these reviewers is acted on."}),(0,d.jsx)(C,{label:"Trusted bots",value:as,onChange:at,onBlur:()=>aV({trustedBots:A(as)}),help:"Bot reviewers (e.g. cursor[bot]) whose findings are acted on. Bots not listed here are ignored."}),(0,d.jsx)(C,{label:"Ignored bots",value:au,onChange:av,onBlur:()=>aV({ignoredBots:A(au)}),help:"Review comments from these bots are always skipped, even if also listed as trusted."})]}),(0,d.jsx)(B,{label:"Repair trivial merge conflicts",checked:ae,onChange:a=>{af(a),aV({autoResolveMergeConflicts:a})},help:"Rebases and resolves mechanical conflicts; complex ones still escalate."})]}),(0,d.jsxs)(q.L,{icon:h,legend:"CI & deploy healing",tone:"warning",description:"Keep checks and deployments green.",children:[(0,d.jsx)(B,{label:"Auto-heal failing CI",checked:G,onChange:a=>{H(a),aV({autoHealCi:a})},help:"Attempts bounded, verified fixes for failing CI. Never touches external or AI-review checks."}),(0,d.jsx)(B,{label:"Merge PRs with no CI checks",checked:I,onChange:a=>{J(a),aV({mergeWithoutChecks:a})},help:"For repos with manual-only or review-bot-only CI. After the merge-gate settle window, merges a PR that reports no checks at all — with NO automated verification. Leave off unless this repo truly has no automated CI."}),(0,d.jsx)(B,{label:"Heal failed deployments",checked:aa,onChange:a=>{ab(a),aV({autoHealDeployments:a})},help:"Monitors a merged PR's deployment and, on failure, opens a follow-up fix PR with the captured logs.",children:(0,d.jsx)(p.D,{label:"Deployment platform",children:(0,d.jsxs)(s.l,{value:ay,onChange:a=>{let b=a.target.value;az(b),aV({deploymentPlatform:b||null})},className:"h-8 text-xs",children:[(0,d.jsx)("option",{value:"",children:"Auto-detect"}),(0,d.jsx)("option",{value:"vercel",children:"Vercel"}),(0,d.jsx)("option",{value:"railway",children:"Railway"})]})})})]}),(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)(q.L,{icon:i.A,legend:"Releases",tone:"success",description:"Cut releases from merged work.",children:(0,d.jsx)(B,{label:"Manage releases",checked:ac,onChange:a=>{ad(a),aV({releaseEnabled:a})},help:"Evaluates merged PRs since the last tag, picks the semver bump, and publishes — gated by a global kill-switch and fully previewable."})}),(0,d.jsx)(q.L,{icon:j.A,legend:"Sandbox",tone:"warning",description:"Isolate agent execution in a container.",children:(0,d.jsxs)(B,{label:"Run the agent in a container",checked:aE,onChange:a=>{aF(a),aV({sandbox:a?"docker":"none"})},help:"Runs this repo's agent sessions inside a container with the worktree bind-mounted as the only writable host path. Requires Docker or Podman on the host and an image that carries the agent CLI plus the repo's toolchain (devcontainer.json image is used if present). Git push still happens on the host.",children:[(0,d.jsx)(p.D,{label:(0,d.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:["Image override",(0,d.jsx)(w.V,{content:"Container image to run in. Leave blank to use the repo's devcontainer.json image, else the global default image from Settings."})]}),children:(0,d.jsx)(r.p,{value:aG,onChange:a=>aH(a.target.value),onBlur:()=>aV({sandboxImage:aG.trim()||null}),placeholder:"devcontainer / global default",className:"h-8 font-mono text-xs"})}),(0,d.jsx)(p.D,{label:(0,d.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:["Resource caps",(0,d.jsx)(w.V,{content:"Optional --cpus and --memory limits (e.g. 2 and 4g). Leave blank for no limit."})]}),children:(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(r.p,{value:aK,onChange:a=>aL(a.target.value),onBlur:()=>{let a=aK.trim();a&&!/^\d+(\.\d+)?$/.test(a)?aU("Invalid CPU limit","Use a positive number like 0.5, 1, or 2."):aV({sandboxCpus:a||null})},placeholder:"cpus",className:"h-8 w-20 font-mono text-xs"}),(0,d.jsx)(r.p,{value:aM,onChange:a=>aN(a.target.value),onBlur:()=>{let a=aM.trim();a&&!/^\d+(\.\d+)?\s*[bkmg]?$/i.test(a)?aU("Invalid memory limit","Use a value like 512m, 2g, or 4096."):aV({sandboxMemory:a||null})},placeholder:"memory",className:"h-8 w-24 font-mono text-xs"})]})}),(0,d.jsxs)("div",{className:"flex items-center gap-2.5 self-end pb-1.5 sm:col-span-2",children:[(0,d.jsx)(t.d,{checked:aI,onChange:a=>{aJ(a),aV({sandboxAllowNetwork:a})},"aria-label":"Allow network access"}),(0,d.jsx)("span",{className:"text-sm",children:"Allow network access"}),(0,d.jsx)(w.V,{content:"Off (default) runs the container with --network none. Turn on only if the toolchain must fetch dependencies during the run."})]})]})}),(0,d.jsx)(q.L,{icon:k.A,legend:"Notifications",description:"How Drydock talks back on the issue.",children:(0,d.jsx)(B,{label:"Post progress replies",checked:ag,onChange:a=>{ah(a),aV({includeProgressReplies:a})},help:"Comments status updates on the issue as the job advances."})})]})]}),(0,d.jsx)(p.D,{label:"Agent instructions",hint:(0,d.jsxs)(d.Fragment,{children:["Optional. Appended to the work prompt as a dedicated section — coding conventions, “always run pnpm test”, “don’t touch legacy/”, preferred PR style. Max ",4e3," characters; empty leaves the prompt unchanged."]}),children:(0,d.jsx)(u.T,{value:aO,maxLength:4e3,rows:3,onChange:a=>aP(a.target.value),onBlur:()=>aV({agentInstructions:aO.trim()||null}),placeholder:"Per-repo guidance injected into the work prompt…",className:"font-mono text-xs"})}),(0,d.jsx)("div",{"aria-live":"polite",className:"h-4 text-xs text-muted-foreground",children:aQ?"Saving…":aS?"Saved":""})]})}},40847:(a,b,c)=>{"use strict";c.d(b,{h:()=>j});var d=c(87383),e=c(89494),f=c(25900);let g={top:"bottom-full left-1/2 -translate-x-1/2 mb-2",bottom:"top-full left-1/2 -translate-x-1/2 mt-2",right:"left-full top-1/2 -translate-y-1/2 ml-2",left:"right-full top-1/2 -translate-y-1/2 mr-2"};function h({content:a,children:b,side:c="top",className:e}){return(0,d.jsxs)("span",{className:"group/tt relative inline-flex",children:[b,(0,d.jsx)("span",{role:"tooltip",className:(0,f.cn)("pointer-events-none absolute z-50 w-max max-w-[260px] rounded-lg border border-border bg-popover px-2.5 py-1.5 text-xs leading-relaxed text-popover-foreground shadow-lg","translate-y-0.5 opacity-0 transition-all duration-150 group-focus-within/tt:opacity-100 group-hover/tt:translate-y-0 group-hover/tt:opacity-100",g[c],e),children:a})]})}let i={neutral:{chip:"bg-secondary text-muted-foreground",val:"text-foreground",bg:""},primary:{chip:"bg-primary/15 text-primary",val:"text-primary",bg:"bg-primary/[0.04]"},success:{chip:"bg-success-muted text-success",val:"text-success",bg:"bg-success/[0.05]"},warning:{chip:"bg-warning-muted text-warning",val:"text-warning",bg:"bg-warning/[0.05]"},destructive:{chip:"bg-destructive/15 text-destructive",val:"text-destructive",bg:"bg-destructive/[0.05]"}};function j({icon:a,label:b,value:c,sub:g,tone:k="neutral",active:l,onClick:m,hint:n}){let o=!!l&&"neutral"!==k,p=i[k],q=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsx)("span",{className:(0,f.cn)("flex h-8 w-8 items-center justify-center rounded-lg transition-colors",o?p.chip:"bg-secondary text-muted-foreground"),children:a&&(0,d.jsx)(a,{className:"h-4 w-4"})}),n&&(0,d.jsx)("span",{className:"text-muted-foreground/60",children:(0,d.jsx)(h,{content:n,children:(0,d.jsx)(e.A,{className:"h-3.5 w-3.5"})})})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("div",{className:(0,f.cn)("text-2xl font-semibold tnum tracking-tight",o?p.val:"text-foreground"),children:c}),(0,d.jsx)("div",{className:"mt-0.5 text-[13px] font-medium text-muted-foreground",children:b}),g&&(0,d.jsx)("div",{className:"mt-0.5 text-xs text-muted-foreground/80",children:g})]})]}),r=(0,f.cn)("group relative flex flex-col gap-3 rounded-xl border border-card-border bg-card p-4 text-left shadow-sm transition-colors",o&&p.bg,m&&"hover-elevate focus-ring");return m?(0,d.jsx)("button",{type:"button",onClick:m,className:r,children:q}):(0,d.jsx)("div",{className:r,children:q})}},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},41370:(a,b,c)=>{"use strict";c.d(b,{u:()=>e});var d=c(23581);let e=(0,d.createServerReference)("6063ba09cc8699dbe59614be2e2226c31ca7ce358c",d.callServer,void 0,d.findSourceMapURL,"updateRepoAction")},42970:(a,b,c)=>{"use strict";c.d(b,{RepoAutomationBar:()=>d});let d=(0,c(34215).registerClientReference)(function(){throw Error("Attempted to call RepoAutomationBar() from the server but RepoAutomationBar 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/drydock/drydock/src/components/repo-automation-bar.tsx","RepoAutomationBar")},43954:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/interception-routes")},46019:(a,b,c)=>{"use strict";c.d(b,{EY:()=>h,PS:()=>j,mg:()=>g,vV:()=>i});var d=c(14565),e=c(89642),f=c(24845);async function g(a){let b=(0,f.AI)(a);return(0,e.revalidatePath)("/prompts"),b}async function h(a,b){return(0,f.I7)(a,b),(0,e.revalidatePath)("/prompts"),{content:(0,f.yx)(a,b)}}async function i(a,b){return{content:(0,f.yx)(a,b),versions:(0,f.yO)(a,b).map(a=>({version:a.version,updatedAt:a.updatedAt,content:a.content})),hasRow:!!(0,f.F1)(a,b)}}async function j(a,b,c){let d=(0,f.HF)(a,b,c);return d?{version:d.version,content:d.content,updatedAt:d.updatedAt}:null}(0,c(13897).D)([g,h,i,j]),(0,d.A)(g,"40d0ed456c31628dcf5070ac77f7f36aa9ddb3e3da",null),(0,d.A)(h,"60b6ff98e28beaeccd416e3860ceb475e6178bd7f6",null),(0,d.A)(i,"60b7269a8fbc0c82a2a92bf13f3e77bf81a0438629",null),(0,d.A)(j,"7026d4c7063aa6d7b3edc7c7bfa99d38506910c65d",null)},47348:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(71859).A)("git-pull-request-arrow",[["circle",{cx:"5",cy:"6",r:"3",key:"1qnov2"}],["path",{d:"M5 9v12",key:"ih889a"}],["circle",{cx:"19",cy:"18",r:"3",key:"1qljk2"}],["path",{d:"m15 9-3-3 3-3",key:"1lwv8l"}],["path",{d:"M12 6h5a2 2 0 0 1 2 2v7",key:"1yj91y"}]])},48161:a=>{"use strict";a.exports=require("node:os")},49920:(a,b,c)=>{"use strict";c.d(b,{RepoSettingsBar:()=>d});let d=(0,c(34215).registerClientReference)(function(){throw Error("Attempted to call RepoSettingsBar() from the server but RepoSettingsBar 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/drydock/drydock/src/components/repo-settings-bar.tsx","RepoSettingsBar")},50059:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(71859).A)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]])},50741:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>f});var d=c(87383),e=c(27542);function f(){return(0,d.jsxs)("div",{children:[(0,d.jsx)(e.ym,{breadcrumb:!0}),(0,d.jsx)(e.YC,{className:"mb-6"}),(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)(e.EA,{className:"h-80 rounded-xl"}),[1,2,3,4].map(a=>(0,d.jsx)(e.EA,{className:"h-14 rounded-xl"},a))]})]})}},51455:a=>{"use strict";a.exports=require("node:fs/promises")},53985:(a,b,c)=>{"use strict";c.d(b,{_:()=>d});let d={main:"default",ciFix:"ci-fix",plan:"plan",limitResume:"limit-resume",humanResume:"human-resume",prFormat:"pr-format",release:"release"}},55511:a=>{"use strict";a.exports=require("crypto")},55591:a=>{"use strict";a.exports=require("https")},56156:(a,b,c)=>{"use strict";c.d(b,{RepoPromptsSection:()=>A});var d=c(27905),e=c(47348),f=c(86186),g=c(2431);let h=(0,c(71859).A)("rocket",[["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}],["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09",key:"u4xsad"}],["path",{d:"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z",key:"676m9"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05",key:"92ym6u"}]]);var i=c(75244),j=c(97370),k=c(9324),l=c.n(k),m=c(35924),n=c(9339),o=c(27796),p=c(32029),q=c(60009),r=c(82795),s=c(46553);c(69063);var t=c(25327),u=c(23581);let v=(0,u.createServerReference)("60b6ff98e28beaeccd416e3860ceb475e6178bd7f6",u.callServer,void 0,u.findSourceMapURL,"deleteTemplateAction");var w=c(53985),x=c(5270);let y=[{id:"work",name:w._.main,title:"Work prompt",icon:e.A,desc:"Injected when the agent starts an issue."},{id:"triage",name:"triage",title:"Triage prompt",icon:f.A,desc:"Classifies and labels new issues."},{id:"review",name:"review-feedback",title:"Review-feedback prompt",icon:g.A,desc:"Runs when a trusted reviewer comments."},{id:"release",name:w._.release,title:"Release prompt",icon:h,desc:"Drives the manual agent-run release (issue #256)."}];function z({repo:a,stage:b}){let{success:c,error:e}=(0,s.d)(),[f,g]=(0,m.useState)("standard"),[h,j]=(0,m.useState)(""),[k,n]=(0,m.useState)(""),[u,w]=(0,m.useState)(!1),[x,y]=(0,m.useTransition)(),A=k.trim()!==h.trim(),B=b.icon;return(0,d.jsxs)("div",{className:"rounded-lg border border-border p-4",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,d.jsx)("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-secondary text-muted-foreground",children:(0,d.jsx)(B,{className:"h-4 w-4"})}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("h4",{className:"text-sm font-semibold",children:b.title}),"standard"===f?(0,d.jsx)(o.E,{tone:"neutral",children:"Standard"}):(0,d.jsx)(o.E,{tone:"primary",children:"Custom"})]}),(0,d.jsx)("p",{className:"text-xs text-muted-foreground",children:b.desc})]}),(0,d.jsx)(q.I,{value:f,onChange:function(c){"custom"===c?g("custom"):y(async()=>{try{let c=await v(a.id,b.name);j(c.content),n(c.content),g("standard")}catch(a){e("Failed to revert to standard",a instanceof Error?a.message:String(a))}})},disabled:!u||x,options:[{value:"standard",label:"Standard"},{value:"custom",label:"Custom"}]})]}),"standard"===f?(0,d.jsxs)("div",{className:"mt-3 rounded-lg border border-dashed border-border bg-secondary/30 p-3",children:[(0,d.jsx)("p",{className:"whitespace-pre-wrap font-mono text-xs leading-relaxed text-muted-foreground",children:u?h:"Loading…"}),(0,d.jsxs)("p",{className:"mt-2 inline-flex items-center gap-1.5 text-[11px] text-muted-foreground",children:[(0,d.jsx)(i.A,{className:"h-3 w-3"})," Inherits the global default.",(0,d.jsx)(l(),{href:"/prompts",className:"text-primary hover:underline",children:"Edit the standard →"})]})]}):(0,d.jsxs)("div",{className:"mt-3",children:[(0,d.jsx)(r.T,{value:k,onChange:a=>n(a.target.value),rows:4,disabled:!u||x,className:"font-mono text-xs leading-relaxed"}),(0,d.jsxs)("div",{className:"mt-2 flex items-center justify-end gap-2",children:[(0,d.jsx)(p.$,{size:"sm",variant:"ghost",disabled:!A||x,onClick:()=>n(h),children:"Discard changes"}),(0,d.jsx)(p.$,{size:"sm",disabled:!A||x,onClick:function(){y(async()=>{try{await (0,t.m)({repoId:a.id,name:b.name,content:k}),j(k),c("Prompt saved",`${b.title} \xb7 ${a.name}`)}catch(a){e("Failed to save prompt",a instanceof Error?a.message:String(a))}})},children:"Save override"})]})]})]})}function A({repo:a,className:b}){return(0,d.jsxs)("div",{className:(0,x.cn)("flex flex-col gap-3",b),children:[(0,d.jsxs)(n.F,{tone:"info",icon:j.A,title:"Per-repo prompt overrides",children:["Each stage uses the global"," ",(0,d.jsx)(l(),{href:"/prompts",className:"font-medium text-primary hover:underline",children:"standard prompt"})," ","unless you switch it to ",(0,d.jsx)("span",{className:"font-medium",children:"Custom"})," here. Overrides apply only to ",a.name,"."]}),y.map(b=>(0,d.jsx)(z,{repo:a,stage:b},b.id))]})}},57284:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(30285).A)("list-checks",[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]])},59810:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(30285).A)("dollar-sign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]])},60009:(a,b,c)=>{"use strict";c.d(b,{I:()=>f});var d=c(27905),e=c(5270);function f({value:a,onChange:b,options:c,size:g="default",disabled:h=!1}){return(0,d.jsx)("div",{className:(0,e.cn)("inline-flex items-center gap-0.5 rounded-lg border border-border bg-secondary/50 p-0.5","sm"===g&&"text-xs"),children:c.map(c=>(0,d.jsx)("button",{type:"button",disabled:h,onClick:()=>b(c.value),className:(0,e.cn)("rounded-md px-2.5 py-1 text-xs font-medium transition-colors focus-ring","disabled:cursor-not-allowed disabled:opacity-50",a===c.value?"bg-card text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:c.label},c.value))})}},61622:(a,b,c)=>{"use strict";c.d(b,{Section:()=>d});let d=(0,c(34215).registerClientReference)(function(){throw Error("Attempted to call Section() from the server but Section 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/drydock/drydock/src/components/ui/section.tsx","Section")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},65526:(a,b,c)=>{"use strict";c.r(b),c.d(b,{"009d49b83ab645c28233698c3b30baa0ac488a8a4e":()=>e.MA,"00ba57b24c8b2b63a3f8d024c1179a22985e3c1498":()=>d.o$,"400b7e089db13cfc69fd6459bffc9c6112ef81686e":()=>e.$y,"4011b5d0d4c63392153fa485aa233d3eadab9f0dd4":()=>d.aE,"4019943bfa9a0288b6786a93f2589e93d0152c128a":()=>D.$p,"401ed7f2aec9cb13a9c4e0c0f96e83da25339c4532":()=>D.VL,"4026f0528b2614bf0f86e26130dec15566806d14b7":()=>p,"408661ae95bb85088d4d1d5532832884c3ef46ad93":()=>O,"409efe1a3bff188eaa2b6b087cce4556beacffc0ff":()=>e.r6,"40c701bb35c6a62006db7b0779321ce27f5694c299":()=>M,"40d0ed456c31628dcf5070ac77f7f36aa9ddb3e3da":()=>E.mg,"40d1c525b258968980aaae0a9bf2878e346d3df086":()=>d.AU,"40e34b1c56c3ec2528eb186fe6af16f17926387d93":()=>D.oW,"40f92338c73d614bd0527cd78cdae6c7e089b5bcb2":()=>N,"600ca3f9aed305deff553aa1c08ae69c32101f71eb":()=>y,"600dd489bfb6fb6413e5ba79921f49e69284931103":()=>v,"6041c2d0995dee6589d5169a8bd20dcbbd34657513":()=>u,"60482939859b9e9fdac549e6eb1834a56792443488":()=>d.D5,"6063ba09cc8699dbe59614be2e2226c31ca7ce358c":()=>D.u3,"607cbf245f927265ee1d526fbaeba8f82cb6dc87f5":()=>q,"60b6ff98e28beaeccd416e3860ceb475e6178bd7f6":()=>E.EY,"60b7269a8fbc0c82a2a92bf13f3e77bf81a0438629":()=>E.vV,"60bfc6a4e9198e720685caff573a7c5530a932a94f":()=>x,"60f2603084b627a41de1c34572ea57f5fb9f7e9eb0":()=>t,"7026d4c7063aa6d7b3edc7c7bfa99d38506910c65d":()=>E.PS,"7034e56b6a85b637cae1780477310c00f2443f19df":()=>z,"705dd05198465a33025d7f1fd10a27c13aa9ab1356":()=>r,"70740ab13f87a56643190340bfd3dda772e4c0b827":()=>A,"708d1d0749ba8c93e5e26085ef0883036c5af73828":()=>C,"70bb4f3ecb7a6c8f3133963d877578f05ea5896840":()=>s,"70c679f3f6d45c5a5b456ead89b69f651429528b33":()=>w,"7806e06ea35c6a19d41bfdff0323bd8c5fc6dd1418":()=>B});var d=c(75047),e=c(44045),f=c(14565),g=c(89642),h=c(6012),i=c(74929),j=c(67806),k=c(50186),l=c(22287),m=c(20200),n=c(17398),o=c(13897);async function p(a){let b=await (0,k.GX)(a);return(0,g.revalidatePath)(`/repos/${a}`),b}async function q(a,b){(0,k.mU)(a,b),(0,g.revalidatePath)(`/repos/${a}`)}async function r(a,b,c={}){let d=(0,i.L8)(a);if(!d)throw Error(`repo ${a} not found`);if(void 0!==c.model&&!(0,m.WM)(c.model))throw Error(`unknown model id: ${c.model}`);if(void 0!==c.agent&&!(0,h.TU)(c.agent))throw Error(`unknown agent: ${c.agent}`);let e=(0,n.Ix)({repoId:a,issueNumber:b,model:c.model??d.defaultModel,agent:c.agent??d.agent});if(!e)throw Error(`A job for issue #${b} is already active.`);return(0,g.revalidatePath)(`/repos/${a}`),e}async function s(a,b,c={}){let d=await (0,k.xt)(a,b,c);return(0,g.revalidatePath)(`/repos/${a}`),d}async function t(a,b){let c=await (0,k.c1)(a,b);return(0,g.revalidatePath)(`/repos/${a}`),c}async function u(a,b){let c=await (0,k.CY)(a,b);return(0,g.revalidatePath)(`/repos/${a}`),c}async function v(a,b){let c=await (0,k.RC)(a,b);return(0,g.revalidatePath)(`/repos/${a}`),c}async function w(a,b,c){let d=await (0,k.NV)(a,b,c);return(0,g.revalidatePath)(`/repos/${a}`),d}async function x(a,b){let c=(0,i.L8)(a);if(!c)throw Error(`repo ${a} not found`);return(0,j.Ie)(c).viewIssue(b)}async function y(a,b){return(0,l.t0)(a,b)}async function z(a,b,c){let d=(0,i.L8)(a);if(!d)throw Error(`repo ${a} not found`);await (0,j.Ie)(d).editIssue(b,c),(0,g.revalidatePath)(`/repos/${a}`)}async function A(a,b,c){let d=(0,i.L8)(a);if(!d)throw Error(`repo ${a} not found`);await (0,j.Ie)(d).commentIssue(b,c)}async function B(a,b,c,d){await (0,k.Fg)(a,b,c,d),(0,g.revalidatePath)(`/repos/${a}`)}async function C(a,b,c){let d=(0,i.L8)(a);if(!d)throw Error(`repo ${a} not found`);let e=(0,j.Ie)(d);"closed"===c?await e.closeIssue(b):await e.reopenIssue(b),(0,g.revalidatePath)(`/repos/${a}`)}(0,o.D)([p,q,r,s,t,u,v,w,x,y,z,A,B,C]),(0,f.A)(p,"4026f0528b2614bf0f86e26130dec15566806d14b7",null),(0,f.A)(q,"607cbf245f927265ee1d526fbaeba8f82cb6dc87f5",null),(0,f.A)(r,"705dd05198465a33025d7f1fd10a27c13aa9ab1356",null),(0,f.A)(s,"70bb4f3ecb7a6c8f3133963d877578f05ea5896840",null),(0,f.A)(t,"60f2603084b627a41de1c34572ea57f5fb9f7e9eb0",null),(0,f.A)(u,"6041c2d0995dee6589d5169a8bd20dcbbd34657513",null),(0,f.A)(v,"600dd489bfb6fb6413e5ba79921f49e69284931103",null),(0,f.A)(w,"70c679f3f6d45c5a5b456ead89b69f651429528b33",null),(0,f.A)(x,"60bfc6a4e9198e720685caff573a7c5530a932a94f",null),(0,f.A)(y,"600ca3f9aed305deff553aa1c08ae69c32101f71eb",null),(0,f.A)(z,"7034e56b6a85b637cae1780477310c00f2443f19df",null),(0,f.A)(A,"70740ab13f87a56643190340bfd3dda772e4c0b827",null),(0,f.A)(B,"7806e06ea35c6a19d41bfdff0323bd8c5fc6dd1418",null),(0,f.A)(C,"708d1d0749ba8c93e5e26085ef0883036c5af73828",null);var D=c(11183),E=c(46019),F=c(95310),G=c(580),H=c(39152),I=c(77058),J=c(19761),K=c(41575);function L(a){let b=(0,F.Lf)(),c=(0,i.L8)(a,b);if(!c)throw Error(`repo ${a} not found`);if(!(0,K.mt)(b).releaseManagementEnabled)throw Error("Release management is disabled globally.");if(!(0,J.A)(c).releaseEnabled)throw Error("Release management is not enabled for this repo.");let d=(0,j.Ie)(c);if("function"!=typeof d.listReleases||"function"!=typeof d.listMergedPrs||"function"!=typeof d.createRelease)throw Error("This repo's forge does not support releases.");let e=(0,h.X$)(c.agent);return{db:b,repo:c,forge:d,provider:e,command:(0,G.m)(e,b),model:c.defaultModel}}async function M(a){let{forge:b,provider:c,command:d,model:e}=L(a);return(0,H.NF)({provider:c,command:d,model:e},a=>(0,H.st)({forge:b,generate:a}))}async function N(a){let{db:b,repo:c,forge:d,provider:e,command:f,model:h}=L(a),i=b.transaction(()=>{let a=(0,I.Fg)(c.id,b);if(a)throw Error(`A release run is already in progress for this repo (run ${a.id}, ${a.status}).`);return(0,I.v0)({repoId:c.id,mode:"manual"},b)});try{await (0,H.NF)({provider:e,command:f,model:h},a=>(0,H.Dl)(i.id,{repo:c,forge:d,db:b,generate:a}))}catch(c){let a=(0,I.tm)(i.id,b);if(a?.status==="detected"){let a=c instanceof Error?c.message:String(c);(0,I.Cq)(i.id,"error",{errorMessage:a.slice(0,500)},b)}throw c}return(0,g.revalidatePath)(`/repos/${a}`),(0,I.Dn)(c.id,b)}async function O(a){let{db:b,repo:c}=L(a);if("claude"!==c.agent)throw Error("Agent-driven release currently supports the Claude agent only.");let d=b.transaction(()=>{let a=(0,I.Fg)(c.id,b);if(a)throw Error(`A release run is already in progress for this repo (run ${a.id}, ${a.status}).`);let d=(0,n.Ix)({repoId:c.id,issueNumber:0,kind:"release",agent:c.agent,model:c.defaultModel,dedupeKey:`release:${c.id}`},b);if(!d)throw Error("A release job is already in progress for this repo.");return(0,I.v0)({repoId:c.id,mode:"agent",jobId:d.id},b),d});return(0,g.revalidatePath)(`/repos/${a}`),{jobId:d.id,runs:(0,I.Dn)(c.id,b)}}(0,o.D)([M,N,O]),(0,f.A)(M,"40c701bb35c6a62006db7b0779321ce27f5694c299",null),(0,f.A)(N,"40f92338c73d614bd0527cd78cdae6c7e089b5bcb2",null),(0,f.A)(O,"408661ae95bb85088d4d1d5532832884c3ef46ad93",null)},65758:(a,b,c)=>{Promise.resolve().then(c.bind(c,87586)),Promise.resolve().then(c.t.bind(c,9324,23)),Promise.resolve().then(c.bind(c,23116)),Promise.resolve().then(c.bind(c,13867)),Promise.resolve().then(c.bind(c,39165)),Promise.resolve().then(c.bind(c,56156)),Promise.resolve().then(c.bind(c,87739)),Promise.resolve().then(c.bind(c,78906)),Promise.resolve().then(c.bind(c,10519)),Promise.resolve().then(c.bind(c,73344)),Promise.resolve().then(c.bind(c,40104))},69063:(a,b,c)=>{"use strict";c.d(b,{v:()=>e});var d=c(23581);let e=(0,d.createServerReference)("60b7269a8fbc0c82a2a92bf13f3e77bf81a0438629",d.callServer,void 0,d.findSourceMapURL,"loadTemplateAction")},70722:a=>{"use strict";a.exports=require("next/dist/shared/lib/invariant-error")},73024:a=>{"use strict";a.exports=require("node:fs")},73344:(a,b,c)=>{"use strict";c.d(b,{Section:()=>i});var d=c(27905),e=c(50050),f=c(35924),g=c(5270);let h={neutral:"bg-secondary text-muted-foreground",primary:"bg-primary/10 text-primary",success:"bg-success-muted text-success",warning:"bg-warning-muted text-warning",destructive:"bg-destructive/10 text-destructive"};function i({icon:a,title:b,description:c,defaultOpen:j=!0,right:k,collapsible:l=!0,children:m,tone:n="neutral",id:o}){let[p,q]=(0,f.useState)(j),r=(0,f.useId)(),s=()=>q(a=>!a),t=a&&(0,d.jsx)("span",{className:(0,g.cn)("flex h-8 w-8 shrink-0 items-center justify-center rounded-lg",h[n]),children:a}),u=(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsx)("h2",{className:"text-base font-semibold tracking-tight",children:b}),c&&(0,d.jsx)("p",{className:"text-sm text-muted-foreground",children:c})]});return(0,d.jsxs)("section",{id:o,className:"rounded-xl border border-card-border bg-card shadow-sm",children:[(0,d.jsxs)("div",{className:(0,g.cn)("flex items-center gap-3 p-4",!p&&"rounded-b-xl"),children:[l?(0,d.jsxs)("button",{type:"button",onClick:s,"aria-expanded":p,"aria-controls":r,className:"-m-1.5 flex min-w-0 flex-1 items-center gap-3 rounded-lg p-1.5 text-left hover-elevate focus-ring",children:[t,u]}):(0,d.jsxs)(d.Fragment,{children:[t,u]}),k&&(0,d.jsx)("div",{className:"flex items-center gap-2",children:k}),l&&(0,d.jsx)("button",{type:"button",onClick:s,"aria-label":p?"Collapse section":"Expand section","aria-expanded":p,"aria-controls":r,className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-muted-foreground hover-elevate focus-ring",children:(0,d.jsx)(e.A,{className:(0,g.cn)("h-[18px] w-[18px] transition-transform duration-200",p&&"rotate-180")})})]}),p&&(0,d.jsx)("div",{id:r,className:"dd-fade-up border-t border-card-border p-4 sm:p-5",children:m})]})}},74075:a=>{"use strict";a.exports=require("zlib")},76760:a=>{"use strict";a.exports=require("node:path")},77068:a=>{"use strict";a.exports=require("next/dist/shared/lib/size-limit")},77598:a=>{"use strict";a.exports=require("node:crypto")},78906:(a,b,c)=>{"use strict";c.d(b,{RepoSettingsBar:()=>t});var d=c(27905);let e=(0,c(71859).A)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);var f=c(1711),g=c(79432),h=c(35924),i=c(12517),j=c(22842),k=c(37913),l=c(36121),m=c(77585),n=c(83557),o=c(46553),p=c(62164),q=c(33721),r=c(41370);function s({text:a,help:b}){return(0,d.jsxs)("span",{className:"flex items-center gap-1.5",children:[a,(0,d.jsx)(p.V,{content:b})]})}function t({repo:a,openrouter:b}){let[c,u]=(0,h.useState)(a.agent),[v,w]=(0,h.useState)(a.defaultModel),[x,y]=(0,h.useState)(a.dailyCostLimitUsd.toString()),[z,A]=(0,h.useState)(a.maxJobMinutes?.toString()??""),[B,C]=(0,h.useState)(a.maxCiWaitMinutes?.toString()??""),[D,E]=(0,h.useState)(a.mergeGateMinutes.toString()),[F,G]=(0,h.useState)(a.adrGating),[H,I]=(0,h.useState)(a.sequential),[J,K]=(0,h.useTransition)(),[L,M]=(0,h.useState)(!1),{error:N}=(0,o.d)();function O(b){M(!1),K(async()=>{try{await (0,r.u)(a.id,b),M(!0),setTimeout(()=>M(!1),1500)}catch(a){N("Failed to update repository",a instanceof Error?a.message:String(a))}})}function P(a,b){"maxJobMinutes"===a?A(b):C(b);let c=""===b?null:Number(b);(null===c||Number.isInteger(c)&&!(c<0))&&O({[a]:c})}return(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)(l.L,{icon:e,legend:"Agent & model",tone:"primary",description:"Which agent picks up issues in this repo, and the model it defaults to.",children:(0,d.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:[(0,d.jsx)(k.D,{label:(0,d.jsx)(s,{text:"Queue label",help:"Issues carrying this GitHub label enter the repo's processing queue."}),children:(0,d.jsx)("code",{className:"inline-flex h-9 w-fit max-w-full items-center truncate rounded-lg bg-secondary px-3 font-mono text-xs text-muted-foreground",children:a.queueLabel})}),(0,d.jsx)(k.D,{label:(0,d.jsx)(s,{text:"Agent",help:"CLI agent used for new jobs in this repo."}),htmlFor:"repo-agent-select",children:(0,d.jsx)(i.a,{id:"repo-agent-select",value:c,onChange:function(a){let c="openrouter"===a?b.defaultModel||(b.models[0]?.id??""):(0,q.VJ)(a);"openrouter"===a&&""===c?N("No synced OpenRouter models","Refresh the catalog in Settings first."):(u(a),w(c),O({agent:a,defaultModel:c}))},agents:b.enabled||"openrouter"===c?["claude","codex","openrouter"]:["claude","codex"]})}),(0,d.jsx)(k.D,{label:(0,d.jsx)(s,{text:"Model",help:"Default model for new jobs — switching agents resets it to that agent's default."}),htmlFor:"repo-model-select",children:(0,d.jsx)(j.o,{id:"repo-model-select",value:v,onChange:function(a){w(a),O({defaultModel:a})},agent:c,openrouterModels:b.models})})]})}),(0,d.jsx)(l.L,{icon:f.A,legend:"Limits & timing",tone:"warning",description:"Spend and runtime guardrails for jobs in this repo.",children:(0,d.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-4",children:[(0,d.jsx)(k.D,{label:(0,d.jsx)(s,{text:"Daily limit ($)",help:"Hard cap on agent spend per day for this repo. New jobs wait once the cap is hit. 0 = off (unlimited)."}),htmlFor:"repo-daily-limit",children:(0,d.jsx)(m.p,{id:"repo-daily-limit",type:"number",min:0,step:1,value:x,onChange:a=>{var b;let c;return y(b=a.target.value),c=Number(b),void(""!==b.trim()&&Number.isFinite(c)&&!(c<0)&&O({dailyCostLimitUsd:c}))}})}),(0,d.jsx)(k.D,{label:(0,d.jsx)(s,{text:"Max job minutes",help:"Abort jobs that run longer than this. Leave empty to use the global default."}),htmlFor:"repo-max-job-minutes",children:(0,d.jsx)(m.p,{id:"repo-max-job-minutes",type:"number",min:0,step:1,value:z,onChange:a=>P("maxJobMinutes",a.target.value),placeholder:"Global default"})}),(0,d.jsx)(k.D,{label:(0,d.jsx)(s,{text:"Max CI wait minutes",help:"How long to wait for CI before giving up. Leave empty to use the global default."}),htmlFor:"repo-max-ci-wait-minutes",children:(0,d.jsx)(m.p,{id:"repo-max-ci-wait-minutes",type:"number",min:0,step:1,value:B,onChange:a=>P("maxCiWaitMinutes",a.target.value),placeholder:"Global default"})}),(0,d.jsx)(k.D,{label:(0,d.jsx)(s,{text:"Merge gate minutes",help:"Hold the auto-merge after green CI so late bot or human reviews can land first. 0 merges immediately."}),htmlFor:"repo-merge-gate-minutes",children:(0,d.jsx)(m.p,{id:"repo-merge-gate-minutes",type:"number",min:0,step:1,value:D,onChange:a=>{var b;let c;return E(b=a.target.value),c=Number(b),void(""!==b&&Number.isInteger(c)&&!(c<0)&&O({mergeGateMinutes:c}))},placeholder:"0 = merge on green"})})]})}),(0,d.jsx)(l.L,{icon:g.A,legend:"Gates",description:"Checks that hold work before it lands.",children:(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-x-6 gap-y-3",children:[(0,d.jsxs)("span",{className:"flex items-center gap-2",children:[(0,d.jsxs)("label",{htmlFor:"repo-adr-gate",className:"flex items-center gap-2 text-sm",children:[(0,d.jsx)(n.d,{id:"repo-adr-gate",checked:F,onChange:function(a){G(a),O({adrGating:a})},"aria-label":"ADR gate"}),"ADR gate"]}),(0,d.jsx)(p.V,{content:"Hold the merge while ADRs await review — the job parks as needs-human until pending decisions are approved."})]}),(0,d.jsxs)("span",{className:"flex items-center gap-2",children:[(0,d.jsxs)("label",{htmlFor:"repo-sequential",className:"flex items-center gap-2 text-sm",children:[(0,d.jsx)(n.d,{id:"repo-sequential",checked:H,onChange:function(a){I(a),O({sequential:a})},"aria-label":"Sequential (wait for merge)"}),"Sequential"]}),(0,d.jsx)(p.V,{content:"Process one issue at a time — wait for the open PR to merge before starting the next job."})]}),(0,d.jsx)("span",{"aria-live":"polite",className:"ml-auto text-xs text-muted-foreground",children:J?"Saving…":L?"Saved":""})]})})]})}},79432:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(71859).A)("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},79551:a=>{"use strict";a.exports=require("url")},79646:a=>{"use strict";a.exports=require("child_process")},81630:a=>{"use strict";a.exports=require("http")},86186:(a,b,c)=>{"use strict";c.d(b,{A:()=>d});let d=(0,c(71859).A)("wand-sparkles",[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]])},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87088:(a,b,c)=>{"use strict";c.r(b),c.d(b,{__next_app__:()=>O,handler:()=>Q,routeModule:()=>P});var d=c(67153),e=c(36918),f=c(70662),g=c(87911),h=c(80125),i=c(76229),j=c(41644),k=c(80381),l=c(79821),m=c(57831),n=c(45413),o=c(93971),p=c(36443),q=c(86194),r=c(261),s=c(73430),t=c(25867),u=c(26713),v=c(3911),w=c(49620),x=c(40744),y=c(72329),z=c(1167),A=c(84325),B=c(10069),C=c(86439),D=c(77068),E=c(76821),F=c(41861),G=c(76631),H=c(98022),I=c(70722),J=c(59281),K=c(43954),L=c(17891),M={};for(let a in G)0>["default","__next_app__","routeModule","handler"].indexOf(a)&&(M[a]=()=>G[a]);c.d(b,M);let N={children:["",{children:["repos",{children:["[id]",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(c.bind(c,37739)),"/home/runner/work/drydock/drydock/src/app/repos/[id]/page.tsx"]}]},{loading:[()=>Promise.resolve().then(c.bind(c,50741)),"/home/runner/work/drydock/drydock/src/app/repos/[id]/loading.tsx"],"global-error":[()=>Promise.resolve().then(c.bind(c,81811)),"/home/runner/work/drydock/drydock/src/app/global-error.tsx"]},[]]},{"global-error":[()=>Promise.resolve().then(c.bind(c,81811)),"/home/runner/work/drydock/drydock/src/app/global-error.tsx"]},[]]},{layout:[()=>Promise.resolve().then(c.bind(c,66025)),"/home/runner/work/drydock/drydock/src/app/layout.tsx"],error:[()=>Promise.resolve().then(c.bind(c,43705)),"/home/runner/work/drydock/drydock/src/app/error.tsx"],loading:[()=>Promise.resolve().then(c.bind(c,51231)),"/home/runner/work/drydock/drydock/src/app/loading.tsx"],"global-error":[()=>Promise.resolve().then(c.bind(c,81811)),"/home/runner/work/drydock/drydock/src/app/global-error.tsx"],"not-found":[()=>Promise.resolve().then(c.bind(c,37803)),"/home/runner/work/drydock/drydock/src/app/not-found.tsx"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,80902,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,96305,23)),"next/dist/client/components/builtin/unauthorized.js"]},[]]}.children,O={require:c,loadChunk:()=>Promise.resolve()},P=new d.AppPageRouteModule({definition:{kind:e.RouteKind.APP_PAGE,page:"/repos/[id]/page",pathname:"/repos/[id]",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:N},distDir:".next",relativeProjectDir:""});async function Q(a,b,d){var M,R,S,T,U;d.requestMeta&&(0,h.setRequestMeta)(a,d.requestMeta),P.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let V=!!(0,h.getRequestMeta)(a,"minimalMode"),W="/repos/[id]/page";"/index"===W&&(W="/");let X=await P.prepare(a,b,{srcPage:W,multiZoneDraftMode:!1});if(!X)return b.statusCode=400,b.end("Bad Request"),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let{buildId:Y,query:Z,params:$,pageIsDynamic:_,buildManifest:aa,nextFontManifest:ab,reactLoadableManifest:ac,serverActionsManifest:ad,clientReferenceManifest:ae,subresourceIntegrityManifest:af,prerenderManifest:ag,isDraftMode:ah,resolvedPathname:ai,revalidateOnlyGenerated:aj,routerServerContext:ak,nextConfig:al,parsedUrl:am,interceptionRoutePatterns:an,deploymentId:ao,clientAssetToken:ap}=X,aq=(0,r.normalizeAppPath)(W),{isOnDemandRevalidate:ar}=X,as=al.experimental.ppr&&!al.cacheComponents&&(0,K.isInterceptionRouteAppPath)(ai)?null:P.match(ai,ag),at=(null==as?void 0:as.route)??null,au=!!ag.routes[ai],av=a.headers["user-agent"]||"",aw=(0,u.getBotType)(av),ax=(0,q.isHtmlBotRequest)(a),ay=(0,h.getRequestMeta)(a,"isPrefetchRSCRequest")??"1"===a.headers[t.NEXT_ROUTER_PREFETCH_HEADER],az=(0,h.getRequestMeta)(a,"isRSCRequest")??(0,n.f)(a.headers[t.RSC_HEADER]),aA=(0,s.getIsPossibleServerAction)(a),aB=(0,m.checkIsAppPPREnabled)(al.experimental.ppr),aC=a.headers[y.NEXT_RESUME_STATE_LENGTH_HEADER];if(!(0,h.getRequestMeta)(a,"postponed")&&V&&aB&&aA&&aC&&"string"==typeof aC){let e=parseInt(aC,10),{maxPostponedStateSize:f,maxPostponedStateSizeBytes:g}=(0,E.getMaxPostponedStateSize)(al.experimental.maxPostponedStateSize);if(!isNaN(e)&&e>0){if(e>g)return b.statusCode=413,b.end((0,E.getPostponedStateExceededErrorMessage)(f)),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let i="1 MB",j=(null==(U=al.experimental.serverActions)?void 0:U.bodySizeLimit)??i,k=e+(j!==i?c(46174).parse(j):1048576),l=await (0,E.readBodyWithSizeLimit)(a,k);if(null===l)return b.statusCode=413,b.end("Request body exceeded limit. To configure the body size limit for Server Actions, see: https://nextjs.org/docs/app/api-reference/next-config-js/serverActions#bodysizelimit"),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;if(l.length>=e){let b=l.subarray(0,e).toString("utf8");(0,h.addRequestMeta)(a,"postponed",b);let c=l.subarray(e);(0,h.addRequestMeta)(a,"actionBody",c)}else throw Object.defineProperty(Error(`invariant: expected ${e} bytes of postponed state but only received ${l.length} bytes`),"__NEXT_ERROR_CODE",{value:"E979",enumerable:!1,configurable:!0})}}if(!(0,h.getRequestMeta)(a,"postponed")&&aB&&"1"===a.headers[y.NEXT_RESUME_HEADER]&&"POST"===a.method){let{maxPostponedStateSize:c,maxPostponedStateSizeBytes:e}=(0,E.getMaxPostponedStateSize)(al.experimental.maxPostponedStateSize),f=await (0,E.readBodyWithSizeLimit)(a,e);if(null===f)return b.statusCode=413,b.end((0,E.getPostponedStateExceededErrorMessage)(c)),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let g=f.toString("utf8");(0,h.addRequestMeta)(a,"postponed",g)}let aD=!0===P.isDev||!0===al.experimental.exposeTestingApiInProductionBuild,aE=aD&&("1"===a.headers[t.NEXT_INSTANT_PREFETCH_HEADER]||!(0,n.f)(a.headers[t.RSC_HEADER])&&"string"==typeof a.headers.cookie&&a.headers.cookie.includes(t.NEXT_INSTANT_TEST_COOKIE+"=")),aF=(aB||aE)&&((null==(M=ag.routes[aq]??ag.dynamicRoutes[aq])?void 0:M.renderingMode)==="PARTIALLY_STATIC"||aE&&(aD||(null==ak?void 0:ak.experimentalTestProxy)===!0)),aG=aE&&aF,aH=aG&&!0===P.isDev,aI=!1,aJ=aF?(0,h.getRequestMeta)(a,"postponed"):void 0,aK=null==(R=ag.routes[ai])?void 0:R.prefetchDataRoute,aL=aF&&az&&!ay&&!aK;V&&(aL=aL&&!!aJ);let aM=(0,h.getRequestMeta)(a,"segmentPrefetchRSCRequest"),aN=(!aw||!aF)&&(!av||(0,q.shouldServeStreamingMetadata)(av,al.htmlLimitedBots)),aO=!!((at||au||ag.routes[aq])&&!(aw&&aF)),aP=aF&&!0===al.cacheComponents,aQ=!0===P.isDev||!aO||"string"==typeof aJ||(aP&&(0,h.getRequestMeta)(a,"onCacheEntryV2")?aL&&!V:aL),aR=!!aw&&aF,aS=(null==at?void 0:at.remainingPrerenderableParams)??[],aT=(null==at?void 0:at.fallback)===null&&((null==(S=at.fallbackRootParams)?void 0:S.length)??0)>0,aU=null;if(!ah&&aO&&!aQ&&!aA&&!aJ&&!aL){let a=as?"string"==typeof(null==at?void 0:at.fallback)?at.fallback:as.source:null;if(!0===al.experimental.partialFallbacks&&a&&(null==at?void 0:at.fallbackRouteParams)&&!aT){if(aS.length>0){let b,c=(b=new Map(aS.map(a=>[a.paramName,a])),a.split("/").map(a=>{let c=(0,L.getSegmentParam)(a);if(!c)return a;let d=b.get(c.paramName);if(!d)return a;let e=null==$?void 0:$[d.paramName];if(!e)return a;let f=Array.isArray(e)?e.map(a=>encodeURIComponent(a)).join("/"):encodeURIComponent(e);return a.replace((0,o.buildDynamicSegmentPlaceholder)(d),f)}).join("/")||"/");aU=c!==a?c:null}}else aU=ai}let aV=aU;!aV&&(P.isDev||aO&&_&&(null==at?void 0:at.fallbackRouteParams)&&!aA)&&(aV=ai),P.isDev||ah||!aO||!az||aL||(0,k.d)(a.headers);let aW={...G,tree:N,handler:Q,routeModule:P,__next_app__:O};ad&&ae&&(0,p.setManifestsSingleton)({page:W,clientReferenceManifest:ae,serverActionsManifest:ad});let aX=a.method||"GET",aY=(0,g.getTracer)(),aZ=aY.getActiveScopeSpan(),a$=!!(null==ak?void 0:ak.isWrappedByNextServer),a_=!0===al.experimental.partialFallbacks&&aS.length>0?(null==at||null==(T=at.fallbackRouteParams)?void 0:T.filter(a=>!aS.some(b=>b.paramName===a.paramName)))??[]:[],a0=async()=>((null==ak?void 0:ak.render404)?await ak.render404(a,b,am,!1):b.end("This page could not be found"),null);try{let k,m=P.getVaryHeader(ai,an);b.setHeader("Vary",m);let n=async(c,d)=>{let e=new l.NodeNextRequest(a),f=new l.NodeNextResponse(b);return P.render(e,f,d).finally(()=>{if(!c)return;c.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let a=aY.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==i.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let d=a.get("next.route");if(d){let a=`${aX} ${d}`;c.setAttributes({"next.route":d,"http.route":d,"next.span_name":a}),c.updateName(a),k&&k!==c&&(k.setAttribute("http.route",d),k.updateName(a))}else c.updateName(`${aX} ${W}`)})},p=(0,h.getRequestMeta)(a,"incrementalCache")||await P.getIncrementalCache(a,al,ag,V);null==p||p.resetRequestCache(),globalThis.__incrementalCache=p;let q=async({span:e,postponed:f,fallbackRouteParams:g,forceStaticRender:i})=>{let k={query:Z,params:$,page:aq,sharedContext:{buildId:Y,deploymentId:ao,clientAssetToken:ap},serverComponentsHmrCache:(0,h.getRequestMeta)(a,"serverComponentsHmrCache"),fallbackRouteParams:g,renderOpts:{App:()=>null,Document:()=>null,pageConfig:{},ComponentMod:aW,Component:(0,j.T)(aW),params:$,routeModule:P,page:W,postponed:f,shouldWaitOnAllReady:aR,serveStreamingMetadata:aN,supportsDynamicResponse:"string"==typeof f||aQ,buildManifest:aa,nextFontManifest:ab,reactLoadableManifest:ac,subresourceIntegrityManifest:af,setCacheStatus:null==ak?void 0:ak.setCacheStatus,setIsrStatus:null==ak?void 0:ak.setIsrStatus,setReactDebugChannel:null==ak?void 0:ak.setReactDebugChannel,sendErrorsToBrowser:null==ak?void 0:ak.sendErrorsToBrowser,dir:c(33873).join(process.cwd(),P.relativeProjectDir),isDraftMode:ah,botType:aw,isOnDemandRevalidate:ar,isPossibleServerAction:aA,assetPrefix:al.assetPrefix,nextConfigOutput:al.output,crossOrigin:al.crossOrigin,trailingSlash:al.trailingSlash,images:al.images,previewProps:ag.preview,enableTainting:al.experimental.taint,htmlLimitedBots:al.htmlLimitedBots,reactMaxHeadersLength:al.reactMaxHeadersLength,multiZoneDraftMode:!1,incrementalCache:p,cacheLifeProfiles:al.cacheLife,basePath:al.basePath,serverActions:al.experimental.serverActions,logServerFunctions:"object"==typeof al.logging&&!!al.logging.serverFunctions,...aG||aH||aI?{isBuildTimePrerendering:!0,supportsDynamicResponse:!1,isStaticGeneration:!0,isDebugDynamicAccesses:aH}:{},cacheComponents:!!al.cacheComponents,experimental:{isRoutePPREnabled:aF,expireTime:al.expireTime,staleTimes:al.experimental.staleTimes,dynamicOnHover:!!al.experimental.dynamicOnHover,optimisticRouting:!!al.experimental.optimisticRouting,inlineCss:!!al.experimental.inlineCss,prefetchInlining:al.experimental.prefetchInlining??!1,authInterrupts:!!al.experimental.authInterrupts,cachedNavigations:!!al.experimental.cachedNavigations,clientTraceMetadata:al.experimental.clientTraceMetadata||[],clientParamParsingOrigins:al.experimental.clientParamParsingOrigins,maxPostponedStateSizeBytes:(0,D.parseMaxPostponedStateSize)(al.experimental.maxPostponedStateSize)},waitUntil:d.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:()=>{},onInstrumentationRequestError:(b,c,d,e)=>P.onRequestError(a,b,d,e,ak),err:(0,h.getRequestMeta)(a,"invokeError")}};i&&(k.renderOpts.supportsDynamicResponse=!1);let l=await n(e,k),{metadata:m}=l,{cacheControl:o,headers:q={},fetchTags:r,fetchMetrics:s}=m;if(r&&(q[y.NEXT_CACHE_TAGS_HEADER]=r),a.fetchMetrics=s,aO&&(null==o?void 0:o.revalidate)===0&&!P.isDev&&!aF){let a=m.staticBailoutInfo,b=Object.defineProperty(Error(`Page changed from static to dynamic at runtime ${ai}${(null==a?void 0:a.description)?`, reason: ${a.description}`:""}
2
+ see more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`),"__NEXT_ERROR_CODE",{value:"E132",enumerable:!1,configurable:!0});if(null==a?void 0:a.stack){let c=a.stack;b.stack=b.message+c.substring(c.indexOf("\n"))}throw b}return{value:{kind:v.CachedRouteKind.APP_PAGE,html:l,headers:q,rscData:m.flightData,postponed:m.postponed,status:m.statusCode,segmentData:m.segmentData},cacheControl:o}},r=async({hasResolved:c,previousCacheEntry:g,isRevalidating:i,span:j,forceStaticRender:k=!1})=>{let l=!1===P.isDev,m=c||b.writableEnded;try{var n;let f;if(ar&&aj&&!g&&!V)return(null==ak?void 0:ak.render404)?await ak.render404(a,b):(b.statusCode=404,b.end("This page could not be found")),null;if(at&&(f=(0,w.parseFallbackField)(at.fallback)),!0===al.experimental.partialFallbacks&&(null==at?void 0:at.fallback)===null&&!aT&&aS.length>0&&(f=w.FallbackMode.PRERENDER),f===w.FallbackMode.PRERENDER&&(0,u.isBot)(av)&&(!aF||ax)&&(f=w.FallbackMode.BLOCKING_STATIC_RENDER),(null==g?void 0:g.isStale)===-1&&(ar=!0),ar&&(f!==w.FallbackMode.NOT_FOUND||g)&&(f=w.FallbackMode.BLOCKING_STATIC_RENDER),!V&&f!==w.FallbackMode.BLOCKING_STATIC_RENDER&&aV&&!m&&!ah&&_&&(l||!au)){if((l||at)&&f===w.FallbackMode.NOT_FOUND){if(al.adapterPath)return await a0();throw new C.NoFallbackError}if(aF&&(al.cacheComponents?!aL:!az)){let b=l&&"string"==typeof(null==at?void 0:at.fallback)?at.fallback:aq,f=(l||aG)&&(null==at?void 0:at.fallbackRouteParams)?(0,o.createOpaqueFallbackRouteParams)(at.fallbackRouteParams):aI?(0,o.getFallbackRouteParams)(aq,P):null;aG&&f&&(0,h.addRequestMeta)(a,"fallbackParams",f);let g=await P.handleResponse({cacheKey:b,req:a,nextConfig:al,routeKind:e.RouteKind.APP_PAGE,isFallback:!0,prerenderManifest:ag,isRoutePPREnabled:aF,responseGenerator:async()=>q({span:j,postponed:void 0,fallbackRouteParams:f,forceStaticRender:!0}),waitUntil:d.waitUntil,isMinimalMode:V});if(null===g)return null;if(g)return V||!aF||!(aS.length>0)||!0!==al.experimental.partialFallbacks||!aU||!p||ar||aI||aD||aE||ay||(0,J.scheduleOnNextTick)(async()=>{let b=P.getResponseCache(a);try{await b.revalidate(aU,p,aF,!1,a=>q({span:a.span,postponed:void 0,fallbackRouteParams:a_.length>0?(0,o.createOpaqueFallbackRouteParams)(a_):null,forceStaticRender:!0}),null,c,d.waitUntil)}catch(a){console.error("Error revalidating the page in the background",a)}}),delete g.cacheControl,g}}let s=ar||i||!aJ?void 0:aJ;if(aP&&!V&&p&&(aL||aA)&&!k){let b=await p.get(ai,{kind:v.IncrementalCacheKind.APP_PAGE,isRoutePPREnabled:!0,isFallback:!1});b&&b.value&&b.value.kind===v.CachedRouteKind.APP_PAGE&&(s=b.value.postponed,b&&(-1===b.isStale||!0===b.isStale)&&(0,J.scheduleOnNextTick)(async()=>{let b=P.getResponseCache(a);try{await b.revalidate(ai,p,aF,!1,a=>r({...a,forceStaticRender:!0}),null,c,d.waitUntil)}catch(a){console.error("Error revalidating the page in the background",a)}}))}if((aG||aH)&&void 0!==s)return{cacheControl:{revalidate:1,expire:void 0},value:{kind:v.CachedRouteKind.PAGES,html:x.default.EMPTY,pageData:{},headers:void 0,status:void 0}};let t=!P.isDev&&_&&(null==at?void 0:at.fallbackRouteParams)?(0,o.getPlaceholderFallbackRouteParams)($,at.fallbackRouteParams):null,y=t&&t.length>0?t:null==at?void 0:at.fallbackRouteParams,z=null!=t&&t.length>0,A=null;if(al.cacheComponents&&(null==at?void 0:at.fallbackRouteParams)){let b=(0,h.getRequestMeta)(a,"resolvedRouteParamKeys");b&&b.size>0&&(A=at.fallbackRouteParams.filter(a=>!b.has(a.paramName)))}let B=(l&&(0,h.getRequestMeta)(a,"renderFallbackShell")||z||aG&&!au)&&y?(0,o.createOpaqueFallbackRouteParams)(y):A&&A.length>0&&A.length<((null==at||null==(n=at.fallbackRouteParams)?void 0:n.length)??0)?(0,o.createOpaqueFallbackRouteParams)(A):aI?(0,o.getFallbackRouteParams)(aq,P):null;if((l||aG)&&al.cacheComponents&&!au&&(null==at?void 0:at.fallbackRouteParams)){let b=(0,o.createOpaqueFallbackRouteParams)(y??at.fallbackRouteParams);b&&(0,h.addRequestMeta)(a,"fallbackParams",b)}return q({span:j,postponed:s,fallbackRouteParams:B,forceStaticRender:k})}catch(b){throw(null==g?void 0:g.isStale)&&await P.onRequestError(a,b,{routerKind:"App Router",routePath:W,routeType:"render",revalidateReason:(0,f.c)({isStaticGeneration:aO,isOnDemandRevalidate:ar})},!1,ak),b}},s=async c=>{var f,g,i,j,k,l;let m,n=await P.handleResponse({cacheKey:aU,responseGenerator:a=>r({span:c,...a}),routeKind:e.RouteKind.APP_PAGE,isOnDemandRevalidate:ar,isRoutePPREnabled:aF,req:a,nextConfig:al,prerenderManifest:ag,waitUntil:d.waitUntil,isMinimalMode:V});if(ah&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate"),P.isDev&&b.setHeader("Cache-Control","no-cache, must-revalidate"),!n){if(aU)throw Object.defineProperty(Error("invariant: cache entry required but not generated"),"__NEXT_ERROR_CODE",{value:"E62",enumerable:!1,configurable:!0});return null}if((null==(f=n.value)?void 0:f.kind)!==v.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant app-page handler received invalid cache entry ${null==(i=n.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E707",enumerable:!1,configurable:!0});let o="string"==typeof n.value.postponed;az&&!aA&&ao&&b.setHeader(y.NEXT_NAV_DEPLOYMENT_ID_HEADER,ao),aO&&!aL&&(!o||ay)&&(V||b.setHeader("x-nextjs-cache",ar?"REVALIDATED":n.isMiss?"MISS":n.isStale?"STALE":"HIT"),b.setHeader(t.NEXT_IS_PRERENDER_HEADER,"1"));let{value:p}=n;if(aJ)m={revalidate:0,expire:void 0};else if(aL)m={revalidate:0,expire:void 0};else if(!P.isDev)if(ah)m={revalidate:0,expire:void 0};else if(aO){if(n.cacheControl)if("number"==typeof n.cacheControl.revalidate){if(n.cacheControl.revalidate<1)throw Object.defineProperty(Error(`Invalid revalidate configuration provided: ${n.cacheControl.revalidate} < 1`),"__NEXT_ERROR_CODE",{value:"E22",enumerable:!1,configurable:!0});m={revalidate:n.cacheControl.revalidate,expire:(null==(j=n.cacheControl)?void 0:j.expire)??al.expireTime}}else m={revalidate:y.CACHE_ONE_YEAR_SECONDS,expire:void 0}}else b.getHeader("Cache-Control")||(m={revalidate:0,expire:void 0});if(n.cacheControl=m,"string"==typeof aM&&(null==p?void 0:p.kind)===v.CachedRouteKind.APP_PAGE&&p.segmentData){b.setHeader(t.NEXT_DID_POSTPONE_HEADER,"2");let c=null==(k=p.headers)?void 0:k[y.NEXT_CACHE_TAGS_HEADER];V&&aO&&c&&"string"==typeof c&&b.setHeader(y.NEXT_CACHE_TAGS_HEADER,c);let d=p.segmentData.get(aM);return void 0!==d?(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.fromStatic(d,t.RSC_CONTENT_TYPE_HEADER),cacheControl:n.cacheControl}):(b.statusCode=204,(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.EMPTY,cacheControl:n.cacheControl}))}let s=aP?(0,h.getRequestMeta)(a,"onCacheEntryV2")??(0,h.getRequestMeta)(a,"onCacheEntry"):(0,h.getRequestMeta)(a,"onCacheEntry");if(s){let b=(0,h.getRequestMeta)(a,"initURL")??a.url,c=b?(null==(l=(0,F.parseUrl)(b))?void 0:l.pathname)??b:void 0;if(await s(n,{url:c}))return null}if(p.headers){let a={...p.headers};for(let[c,d]of(V&&aO||delete a[y.NEXT_CACHE_TAGS_HEADER],Object.entries(a)))if(void 0!==d)if(Array.isArray(d))for(let a of d)b.appendHeader(c,a);else"number"==typeof d&&(d=d.toString()),b.appendHeader(c,d)}let u=null==(g=p.headers)?void 0:g[y.NEXT_CACHE_TAGS_HEADER];if(V&&aO&&u&&"string"==typeof u&&b.setHeader(y.NEXT_CACHE_TAGS_HEADER,u),!p.status||az&&aF||(b.statusCode=p.status),!V&&p.status&&H.RedirectStatusCode[p.status]&&az&&(b.statusCode=200),o&&!aL&&b.setHeader(t.NEXT_DID_POSTPONE_HEADER,"1"),az&&!ah){if(void 0===p.rscData){if(p.html.contentType!==t.RSC_CONTENT_TYPE_HEADER)if(al.cacheComponents)return b.statusCode=404,(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.EMPTY,cacheControl:n.cacheControl});else throw Object.defineProperty(new I.InvariantError(`Expected RSC response, got ${p.html.contentType}`),"__NEXT_ERROR_CODE",{value:"E789",enumerable:!1,configurable:!0});return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:p.html,cacheControl:n.cacheControl})}return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:x.default.fromStatic(p.rscData,t.RSC_CONTENT_TYPE_HEADER),cacheControl:n.cacheControl})}let w=p.html;if(aE&&aG){let c=!0===P.isDev?crypto.randomUUID():null;return w.pipeThrough(await (0,A.createInstantTestScriptInsertionTransformStream)(c)),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}})}if(!o||V||az)return(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:n.cacheControl});if(aG||aH)return w.push(new ReadableStream({start(a){a.enqueue(z.ENCODED_TAGS.CLOSED.BODY_AND_HTML),a.close()}})),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}});let C=new TransformStream;return w.push(C.readable),q({span:c,postponed:p.postponed,fallbackRouteParams:null,forceStaticRender:!1}).then(async a=>{var b,c;if(!a)throw Object.defineProperty(Error("Invariant: expected a result to be returned"),"__NEXT_ERROR_CODE",{value:"E463",enumerable:!1,configurable:!0});if((null==(b=a.value)?void 0:b.kind)!==v.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant: expected a page response, got ${null==(c=a.value)?void 0:c.kind}`),"__NEXT_ERROR_CODE",{value:"E305",enumerable:!1,configurable:!0});await a.value.html.pipeTo(C.writable)}).catch(a=>{C.writable.abort(a).catch(a=>{console.error("couldn't abort transformer",a)})}),(0,B.sendRenderResult)({req:a,res:b,generateEtags:al.generateEtags,poweredByHeader:al.poweredByHeader,result:w,cacheControl:{revalidate:0,expire:void 0}})};if(!a$||!aZ)return k=aY.getActiveScopeSpan(),await aY.withPropagatedContext(a.headers,()=>aY.trace(i.BaseServerSpan.handleRequest,{spanName:`${aX} ${W}`,kind:g.SpanKind.SERVER,attributes:{"http.method":aX,"http.target":a.url}},s),void 0,!a$);await s(aZ)}catch(b){throw b instanceof C.NoFallbackError||await P.onRequestError(a,b,{routerKind:"App Router",routePath:W,routeType:"render",revalidateReason:(0,f.c)({isStaticGeneration:aO,isOnDemandRevalidate:ar})},!1,ak),b}}},87550:a=>{"use strict";a.exports=require("better-sqlite3")},87739:(a,b,c)=>{"use strict";c.d(b,{RepoReleasePanel:()=>t});var d=c(27905),e=c(35404),f=c(60501),g=c(9324),h=c.n(g),i=c(21747),j=c(35924),k=c(27796),l=c(32029),m=c(25126),n=c(46553),o=c(23581);let p=(0,o.createServerReference)("40c701bb35c6a62006db7b0779321ce27f5694c299",o.callServer,void 0,o.findSourceMapURL,"previewReleaseAction"),q=(0,o.createServerReference)("40f92338c73d614bd0527cd78cdae6c7e089b5bcb2",o.callServer,void 0,o.findSourceMapURL,"publishReleaseAction"),r=(0,o.createServerReference)("408661ae95bb85088d4d1d5532832884c3ef46ad93",o.callServer,void 0,o.findSourceMapURL,"startReleaseAction"),s={detected:"neutral",evaluating:"neutral",proposed:"primary",publishing:"warning",published:"success",skipped:"neutral",error:"destructive"};function t({repoId:a,initialRuns:b}){let[c,g]=(0,j.useState)(b),[o,u]=(0,j.useState)(null),[v,w]=(0,j.useTransition)(),{error:x,success:y,info:z}=(0,n.d)(),A=(0,i.useRouter)();return(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-semibold",children:[(0,d.jsx)(e.A,{className:"h-3.5 w-3.5 text-muted-foreground"})," Releases"]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)(l.$,{variant:"outline",size:"sm",onClick:function(){w(async()=>{try{u(await p(a))}catch(a){x("Preview failed",a instanceof Error?a.message:String(a))}})},disabled:v,children:"Preview"}),(0,d.jsx)(l.$,{variant:"outline",size:"sm",onClick:function(){w(async()=>{try{let b=await q(a);g(b),u(null);let c=b[0];c?.status==="published"?y("Release published",c.tag?`Cut ${c.tag}.`:"A release was cut."):c?.status==="skipped"?z("No release cut","No release was recommended for the latest changes."):c?.status==="error"?x("Publish failed",c.errorMessage??"The release run did not complete."):z("Release started",`Run is ${c?.status??"in progress"}.`)}catch(a){x("Publish failed",a instanceof Error?a.message:String(a))}})},disabled:v,children:"Publish release"}),(0,d.jsxs)(l.$,{size:"sm",onClick:function(){w(async()=>{try{let{jobId:b,runs:c}=await r(a);g(c),u(null),z("Release started","An agent is figuring out and running this repo's release."),A.push(`/jobs/${b}`)}catch(a){x("Release failed to start",a instanceof Error?a.message:String(a))}})},disabled:v,children:[(0,d.jsx)(f.A,{className:"h-3.5 w-3.5"})," Run release (agent)"]})]})]}),o&&(0,d.jsxs)("div",{className:"space-y-2 rounded-lg border border-card-border bg-secondary/30 p-3 text-sm",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,d.jsx)("span",{className:"font-medium",children:"Proposed:"}),(0,d.jsx)(k.E,{tone:"primary",children:o.candidateTag}),(0,d.jsxs)("span",{className:"text-xs text-muted-foreground",children:[o.fromTag?`from ${o.fromTag}`:"first release"," \xb7 ",o.bump," \xb7"," ",o.shouldRelease?"release recommended":"no release recommended"]})]}),(0,d.jsxs)("ul",{className:"flex flex-col gap-0.5 text-xs text-muted-foreground",children:[o.prs.map(a=>(0,d.jsxs)("li",{className:"truncate",children:[(0,d.jsxs)("span",{className:"font-mono",children:["#",a.number]})," ",a.title]},a.number)),0===o.prs.length&&(0,d.jsx)("li",{children:"No unreleased pull requests."})]})]}),0===c.length?(0,d.jsx)(m.p,{compact:!0,icon:e.A,title:"No release runs yet",description:"Preview or publish a release to cut one from your merged work."}):(0,d.jsx)("ul",{className:"flex flex-col gap-2",children:c.map(a=>(0,d.jsxs)("li",{className:"flex items-center gap-3 rounded-lg border border-border p-3",children:[(0,d.jsx)(e.A,{className:"h-3.5 w-3.5 shrink-0 text-success"}),a.tag?(0,d.jsx)("span",{className:"font-mono text-sm font-semibold",children:a.tag}):(0,d.jsx)("span",{className:"text-xs text-muted-foreground",children:a.mode}),a.tag&&(0,d.jsx)("span",{className:"text-xs text-muted-foreground",children:a.mode}),null!=a.triggerPrNumber&&(0,d.jsxs)("span",{className:"text-xs text-muted-foreground",children:["PR #",a.triggerPrNumber]}),null!=a.jobId&&(0,d.jsx)(h(),{href:`/jobs/${a.jobId}`,className:"text-xs text-primary underline-offset-2 hover:underline",children:"job log"}),(0,d.jsx)(k.E,{tone:s[a.status]??"neutral",children:a.status}),a.errorMessage&&(0,d.jsx)("span",{className:"ml-auto max-w-[40%] truncate text-xs text-destructive",title:a.errorMessage,children:a.errorMessage})]},a.id))})]})}},91568:(a,b,c)=>{"use strict";c.d(b,{IssueBoard:()=>d});let d=(0,c(34215).registerClientReference)(function(){throw Error("Attempted to call IssueBoard() from the server but IssueBoard 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/drydock/drydock/src/components/issue-board.tsx","IssueBoard")},91645:a=>{"use strict";a.exports=require("net")},94735:a=>{"use strict";a.exports=require("events")}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[699,980,661,374,606,403,521,304,947,387,83,786,578,40],()=>b(b.s=87088));module.exports=c})();