@ai-development-environment/server 0.0.94 → 0.0.95

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 (141) hide show
  1. package/package.json +1 -1
  2. package/prisma-runtime/prisma/migrations/20260827120000_add_command_repository_targets/migration.sql +61 -0
  3. package/prisma-runtime/prisma/schema.prisma +13 -4
  4. package/standalone/.next/BUILD_ID +1 -1
  5. package/standalone/.next/build-manifest.json +3 -3
  6. package/standalone/.next/prerender-manifest.json +3 -3
  7. package/standalone/.next/server/app/[locale]/(auth)/register/page_client-reference-manifest.js +1 -1
  8. package/standalone/.next/server/app/[locale]/(auth)/sign-in/page_client-reference-manifest.js +1 -1
  9. package/standalone/.next/server/app/[locale]/(dashboard)/actions/page_client-reference-manifest.js +1 -1
  10. package/standalone/.next/server/app/[locale]/(dashboard)/actions-cache/page_client-reference-manifest.js +1 -1
  11. package/standalone/.next/server/app/[locale]/(dashboard)/agents/[id]/page_client-reference-manifest.js +1 -1
  12. package/standalone/.next/server/app/[locale]/(dashboard)/agents/page_client-reference-manifest.js +1 -1
  13. package/standalone/.next/server/app/[locale]/(dashboard)/analytics-events/page_client-reference-manifest.js +1 -1
  14. package/standalone/.next/server/app/[locale]/(dashboard)/api-keys/page_client-reference-manifest.js +1 -1
  15. package/standalone/.next/server/app/[locale]/(dashboard)/apps/[appId]/page_client-reference-manifest.js +1 -1
  16. package/standalone/.next/server/app/[locale]/(dashboard)/apps/page_client-reference-manifest.js +1 -1
  17. package/standalone/.next/server/app/[locale]/(dashboard)/build-data/page_client-reference-manifest.js +1 -1
  18. package/standalone/.next/server/app/[locale]/(dashboard)/builds/[buildId]/coverage/page_client-reference-manifest.js +1 -1
  19. package/standalone/.next/server/app/[locale]/(dashboard)/builds/[buildId]/page_client-reference-manifest.js +1 -1
  20. package/standalone/.next/server/app/[locale]/(dashboard)/builds/page_client-reference-manifest.js +1 -1
  21. package/standalone/.next/server/app/[locale]/(dashboard)/changes/page_client-reference-manifest.js +1 -1
  22. package/standalone/.next/server/app/[locale]/(dashboard)/codebases/[codebaseId]/page_client-reference-manifest.js +1 -1
  23. package/standalone/.next/server/app/[locale]/(dashboard)/codebases/page_client-reference-manifest.js +1 -1
  24. package/standalone/.next/server/app/[locale]/(dashboard)/codebases/repositories/[repositoryId]/page_client-reference-manifest.js +1 -1
  25. package/standalone/.next/server/app/[locale]/(dashboard)/commands/[commandId]/edit/page_client-reference-manifest.js +1 -1
  26. package/standalone/.next/server/app/[locale]/(dashboard)/commands/new/page_client-reference-manifest.js +1 -1
  27. package/standalone/.next/server/app/[locale]/(dashboard)/commands/page_client-reference-manifest.js +1 -1
  28. package/standalone/.next/server/app/[locale]/(dashboard)/commands/runs/[runId]/page_client-reference-manifest.js +1 -1
  29. package/standalone/.next/server/app/[locale]/(dashboard)/comments/page_client-reference-manifest.js +1 -1
  30. package/standalone/.next/server/app/[locale]/(dashboard)/console-logs/page_client-reference-manifest.js +1 -1
  31. package/standalone/.next/server/app/[locale]/(dashboard)/costs/page_client-reference-manifest.js +1 -1
  32. package/standalone/.next/server/app/[locale]/(dashboard)/credentials/page_client-reference-manifest.js +1 -1
  33. package/standalone/.next/server/app/[locale]/(dashboard)/devices/[id]/page_client-reference-manifest.js +1 -1
  34. package/standalone/.next/server/app/[locale]/(dashboard)/devices/enroll/page_client-reference-manifest.js +1 -1
  35. package/standalone/.next/server/app/[locale]/(dashboard)/devices/page_client-reference-manifest.js +1 -1
  36. package/standalone/.next/server/app/[locale]/(dashboard)/drafts/page_client-reference-manifest.js +1 -1
  37. package/standalone/.next/server/app/[locale]/(dashboard)/github-cache/entries/[id]/page_client-reference-manifest.js +1 -1
  38. package/standalone/.next/server/app/[locale]/(dashboard)/github-cache/page_client-reference-manifest.js +1 -1
  39. package/standalone/.next/server/app/[locale]/(dashboard)/gitlab/cache/page_client-reference-manifest.js +1 -1
  40. package/standalone/.next/server/app/[locale]/(dashboard)/gitlab/comments/page_client-reference-manifest.js +1 -1
  41. package/standalone/.next/server/app/[locale]/(dashboard)/gitlab/merge-requests/[projectId]/[iid]/page_client-reference-manifest.js +1 -1
  42. package/standalone/.next/server/app/[locale]/(dashboard)/gitlab/merge-requests/page_client-reference-manifest.js +1 -1
  43. package/standalone/.next/server/app/[locale]/(dashboard)/gitlab/pipelines/page_client-reference-manifest.js +1 -1
  44. package/standalone/.next/server/app/[locale]/(dashboard)/gitlab/webhooks/page_client-reference-manifest.js +1 -1
  45. package/standalone/.next/server/app/[locale]/(dashboard)/jira/tickets/[issueKey]/page_client-reference-manifest.js +1 -1
  46. package/standalone/.next/server/app/[locale]/(dashboard)/jira/tickets/page_client-reference-manifest.js +1 -1
  47. package/standalone/.next/server/app/[locale]/(dashboard)/jira-cache/page_client-reference-manifest.js +1 -1
  48. package/standalone/.next/server/app/[locale]/(dashboard)/jira-cache/tickets/[issueKey]/page_client-reference-manifest.js +1 -1
  49. package/standalone/.next/server/app/[locale]/(dashboard)/jira-webhooks/page_client-reference-manifest.js +1 -1
  50. package/standalone/.next/server/app/[locale]/(dashboard)/jobs/[jobId]/page_client-reference-manifest.js +1 -1
  51. package/standalone/.next/server/app/[locale]/(dashboard)/notifications/page_client-reference-manifest.js +1 -1
  52. package/standalone/.next/server/app/[locale]/(dashboard)/page_client-reference-manifest.js +1 -1
  53. package/standalone/.next/server/app/[locale]/(dashboard)/plans/[runId]/page_client-reference-manifest.js +1 -1
  54. package/standalone/.next/server/app/[locale]/(dashboard)/plans/page_client-reference-manifest.js +1 -1
  55. package/standalone/.next/server/app/[locale]/(dashboard)/polling/page_client-reference-manifest.js +1 -1
  56. package/standalone/.next/server/app/[locale]/(dashboard)/prepare/page_client-reference-manifest.js +1 -1
  57. package/standalone/.next/server/app/[locale]/(dashboard)/provisioning-profiles/[profileId]/page_client-reference-manifest.js +1 -1
  58. package/standalone/.next/server/app/[locale]/(dashboard)/provisioning-profiles/page_client-reference-manifest.js +1 -1
  59. package/standalone/.next/server/app/[locale]/(dashboard)/pull-requests/[owner]/[repository]/[number]/page_client-reference-manifest.js +1 -1
  60. package/standalone/.next/server/app/[locale]/(dashboard)/pull-requests/page_client-reference-manifest.js +1 -1
  61. package/standalone/.next/server/app/[locale]/(dashboard)/push-notifications/page_client-reference-manifest.js +1 -1
  62. package/standalone/.next/server/app/[locale]/(dashboard)/runs/new/page_client-reference-manifest.js +1 -1
  63. package/standalone/.next/server/app/[locale]/(dashboard)/sessions/[runId]/page_client-reference-manifest.js +1 -1
  64. package/standalone/.next/server/app/[locale]/(dashboard)/sessions/page_client-reference-manifest.js +1 -1
  65. package/standalone/.next/server/app/[locale]/(dashboard)/settings/page_client-reference-manifest.js +1 -1
  66. package/standalone/.next/server/app/[locale]/(dashboard)/skills/[skillId]/page_client-reference-manifest.js +1 -1
  67. package/standalone/.next/server/app/[locale]/(dashboard)/skills/groups/[groupId]/page_client-reference-manifest.js +1 -1
  68. package/standalone/.next/server/app/[locale]/(dashboard)/skills/groups/page_client-reference-manifest.js +1 -1
  69. package/standalone/.next/server/app/[locale]/(dashboard)/skills/page_client-reference-manifest.js +1 -1
  70. package/standalone/.next/server/app/[locale]/(dashboard)/skills/sync/[runId]/page_client-reference-manifest.js +1 -1
  71. package/standalone/.next/server/app/[locale]/(dashboard)/status/page_client-reference-manifest.js +1 -1
  72. package/standalone/.next/server/app/[locale]/(dashboard)/tools/page_client-reference-manifest.js +1 -1
  73. package/standalone/.next/server/app/[locale]/(dashboard)/unified-events/page_client-reference-manifest.js +1 -1
  74. package/standalone/.next/server/app/[locale]/(dashboard)/usage/page_client-reference-manifest.js +1 -1
  75. package/standalone/.next/server/app/[locale]/(dashboard)/users/page_client-reference-manifest.js +1 -1
  76. package/standalone/.next/server/app/[locale]/(dashboard)/webhooks/page_client-reference-manifest.js +1 -1
  77. package/standalone/.next/server/app/[locale]/(dashboard)/workflows/[workflowId]/edit/page_client-reference-manifest.js +1 -1
  78. package/standalone/.next/server/app/[locale]/(dashboard)/workflows/[workflowId]/page_client-reference-manifest.js +1 -1
  79. package/standalone/.next/server/app/[locale]/(dashboard)/workflows/new/page_client-reference-manifest.js +1 -1
  80. package/standalone/.next/server/app/[locale]/(dashboard)/workflows/page_client-reference-manifest.js +1 -1
  81. package/standalone/.next/server/app/[locale]/(dashboard)/workflows/runs/[runId]/page_client-reference-manifest.js +1 -1
  82. package/standalone/.next/server/app/[locale]/(dashboard)/worktrees/[worktreeId]/page_client-reference-manifest.js +1 -1
  83. package/standalone/.next/server/app/[locale]/(dashboard)/worktrees/page_client-reference-manifest.js +1 -1
  84. package/standalone/.next/server/app/_global-error.html +1 -1
  85. package/standalone/.next/server/app/_global-error.rsc +1 -1
  86. package/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  87. package/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  88. package/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  89. package/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  90. package/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  91. package/standalone/.next/server/app/_not-found.html +1 -1
  92. package/standalone/.next/server/app/_not-found.rsc +1 -1
  93. package/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  94. package/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  95. package/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  96. package/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  97. package/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  98. package/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  99. package/standalone/.next/server/chunks/_086z24j._.js +4 -4
  100. package/standalone/.next/server/chunks/_0_3-lke._.js +11 -4
  101. package/standalone/.next/server/chunks/_0ssmikd._.js +4 -4
  102. package/standalone/.next/server/chunks/_0u02u5f._.js +4 -4
  103. package/standalone/.next/server/chunks/_10b12ij._.js +4 -4
  104. package/standalone/.next/server/chunks/_13gs0b4._.js +4 -4
  105. package/standalone/.next/server/chunks/_16-237k._.js +135 -128
  106. package/standalone/.next/server/chunks/_1exzvxq._.js +4 -4
  107. package/standalone/.next/server/chunks/src_07wif-p._.js +2 -2
  108. package/standalone/.next/server/chunks/src_16int4d._.js +2 -2
  109. package/standalone/.next/server/chunks/ssr/_02a3qdp._.js +2 -2
  110. package/standalone/.next/server/chunks/ssr/_0aaxviu._.js +2 -2
  111. package/standalone/.next/server/chunks/ssr/_0hwiy81._.js +2 -2
  112. package/standalone/.next/server/chunks/ssr/_0s9ey-t._.js +2 -2
  113. package/standalone/.next/server/chunks/ssr/_1-nj75c._.js +2 -2
  114. package/standalone/.next/server/chunks/ssr/_1hmpmb1._.js +2 -2
  115. package/standalone/.next/server/chunks/ssr/_1sy7lqy._.js +2 -2
  116. package/standalone/.next/server/chunks/ssr/_1x0b0dt._.js +2 -2
  117. package/standalone/.next/server/chunks/ssr/messages_de_json_[json]_cjs_1uig1ud._.js +1 -1
  118. package/standalone/.next/server/chunks/ssr/messages_en_json_[json]_cjs_206072-._.js +1 -1
  119. package/standalone/.next/server/chunks/ssr/messages_es_json_[json]_cjs_082yukd._.js +1 -1
  120. package/standalone/.next/server/chunks/ssr/messages_fr_json_[json]_cjs_0j6-w0i._.js +1 -1
  121. package/standalone/.next/server/chunks/ssr/src_components_commands_command-editor_tsx_1xv-unm._.js +2 -2
  122. package/standalone/.next/server/chunks/ssr/src_components_commands_commands-page_tsx_06_w_zo._.js +2 -2
  123. package/standalone/.next/server/chunks/ssr/src_services_auth_index_ts_05c0kh-._.js +1 -1
  124. package/standalone/.next/server/middleware-build-manifest.js +3 -3
  125. package/standalone/.next/server/pages/404.html +1 -1
  126. package/standalone/.next/server/pages/500.html +1 -1
  127. package/standalone/.next/server/server-reference-manifest.js +1 -1
  128. package/standalone/.next/server/server-reference-manifest.json +1 -1
  129. package/standalone/.next/static/chunks/{1uxc996684ia1.js → 0cx5t3vfr-76n.js} +2 -2
  130. package/standalone/.next/static/chunks/{2p5g8a3zowf0_.js → 0epqzwsph7fdf.js} +2 -2
  131. package/standalone/.next/static/chunks/{26b-zxdasv4v9.js → 0nkbgudch1obg.js} +2 -2
  132. package/standalone/.next/static/chunks/{1swfpvhyd8z1z.js → 1a26_z1grse1l.js} +2 -2
  133. package/standalone/.next/static/chunks/1n0fml45e5vyl.js +31 -0
  134. package/standalone/.next/static/chunks/{129bde2z8lln5.js → 1z1h9cni0d-da.js} +2 -2
  135. package/standalone/.next/static/chunks/{0cjz_fvsomcij.js → 210ob5-ghxnkd.js} +5 -5
  136. package/standalone/.next/static/chunks/{31wms4oyajl8q.css → 2dgcd672a-1c9.css} +1 -1
  137. package/standalone/.next/static/chunks/{3--_z6xb9410n.js → 2nhcdoxes77wu.js} +2 -2
  138. package/standalone/.next/static/chunks/01jm7btgy5r3c.js +0 -31
  139. /package/standalone/.next/static/{8PhM4-pUbAs13ht19ZVGl → P2FsAusgn7qhvImDnyMF_}/_buildManifest.js +0 -0
  140. /package/standalone/.next/static/{8PhM4-pUbAs13ht19ZVGl → P2FsAusgn7qhvImDnyMF_}/_clientMiddlewareManifest.js +0 -0
  141. /package/standalone/.next/static/{8PhM4-pUbAs13ht19ZVGl → P2FsAusgn7qhvImDnyMF_}/_ssgManifest.js +0 -0
@@ -1,10 +1,10 @@
1
1
  (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,340953,e=>{"use strict";var t=e.i(843476),a=e.i(271645),r=e.i(30030),n=e.i(820783),s=e.i(326999),i=e.i(981140),d=Object.defineProperty,l=(e,t)=>d(e,"name",{value:t,configurable:!0}),[o,c]=(0,r.createContextScope)("AlertDialog",[s.createDialogScope]),u=(0,s.createDialogScope)(),m=l(e=>{let{__scopeAlertDialog:a,...r}=e,n=u(a);return(0,t.jsx)(s.Root,{...n,...r,modal:!0})},"AlertDialog"),h=a.forwardRef(l(function(e,a){let{__scopeAlertDialog:r,...n}=e,i=u(r);return(0,t.jsx)(s.Trigger,{...i,...n,ref:a})},"AlertDialogTrigger")),p=l(e=>{let{__scopeAlertDialog:a,...r}=e,n=u(a);return(0,t.jsx)(s.Portal,{...n,...r})},"AlertDialogPortal"),x=a.forwardRef(l(function(e,a){let{__scopeAlertDialog:r,...n}=e,i=u(r);return(0,t.jsx)(s.Overlay,{...i,...n,ref:a})},"AlertDialogOverlay")),[g,f]=o("AlertDialogContent"),j=a.forwardRef(l(function(e,r){let{__scopeAlertDialog:d,children:l,...o}=e,c=u(d),m=a.useRef(null),h=(0,n.useComposedRefs)(r,m),p=a.useRef(null);return(0,t.jsx)(g,{scope:d,cancelRef:p,children:(0,t.jsx)(s.Content,{role:"alertdialog",...c,...o,ref:h,onOpenAutoFocus:(0,i.composeEventHandlers)(o.onOpenAutoFocus,e=>{e.preventDefault(),p.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:l})})},"AlertDialogContent")),v=a.forwardRef(l(function(e,a){let{__scopeAlertDialog:r,...n}=e,i=u(r);return(0,t.jsx)(s.Title,{...i,...n,ref:a})},"AlertDialogTitle")),y=a.forwardRef(l(function(e,a){let{__scopeAlertDialog:r,...n}=e,i=u(r);return(0,t.jsx)(s.Description,{...i,...n,ref:a})},"AlertDialogDescription")),N=a.forwardRef(l(function(e,a){let{__scopeAlertDialog:r,...n}=e,i=u(r);return(0,t.jsx)(s.Close,{...i,...n,ref:a})},"AlertDialogAction")),A=a.forwardRef(l(function(e,a){let{__scopeAlertDialog:r,...i}=e,{cancelRef:d}=f("AlertDialogCancel",r),l=u(r),o=(0,n.useComposedRefs)(a,d);return(0,t.jsx)(s.Close,{...l,...i,ref:o})},"AlertDialogCancel"));e.s(["Action",0,N,"AlertDialog",0,m,"AlertDialogAction",0,N,"AlertDialogCancel",0,A,"AlertDialogContent",0,j,"AlertDialogDescription",0,y,"AlertDialogOverlay",0,x,"AlertDialogPortal",0,p,"AlertDialogTitle",0,v,"AlertDialogTrigger",0,h,"Cancel",0,A,"Content",0,j,"Description",0,y,"Overlay",0,x,"Portal",0,p,"Root",0,m,"Title",0,v,"Trigger",0,h,"createAlertDialogScope",0,c],691162);var b=e.i(691162),b=b,C=e.i(975157),k=e.i(519455);function E({...e}){return(0,t.jsx)(b.Root,{"data-slot":"alert-dialog",...e})}function I({...e}){return(0,t.jsx)(b.Trigger,{"data-slot":"alert-dialog-trigger",...e})}function D({...e}){return(0,t.jsx)(b.Portal,{"data-slot":"alert-dialog-portal",...e})}function w({className:e,...a}){return(0,t.jsx)(b.Overlay,{"data-slot":"alert-dialog-overlay",className:(0,C.cn)("fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...a})}function R({className:e,size:a="default",...r}){return(0,t.jsxs)(D,{children:[(0,t.jsx)(w,{}),(0,t.jsx)(b.Content,{"data-slot":"alert-dialog-content","data-size":a,className:(0,C.cn)("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...r})]})}function S({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,C.cn)("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",e),...a})}function T({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,C.cn)("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",e),...a})}function M({className:e,...a}){return(0,t.jsx)(b.Title,{"data-slot":"alert-dialog-title",className:(0,C.cn)("font-heading text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",e),...a})}function O({className:e,...a}){return(0,t.jsx)(b.Description,{"data-slot":"alert-dialog-description",className:(0,C.cn)("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...a})}function _({className:e,variant:a="default",size:r="default",...n}){return(0,t.jsx)(k.Button,{variant:a,size:r,asChild:!0,children:(0,t.jsx)(b.Action,{"data-slot":"alert-dialog-action",className:(0,C.cn)(e),...n})})}function L({className:e,variant:a="outline",size:r="default",...n}){return(0,t.jsx)(k.Button,{variant:a,size:r,asChild:!0,children:(0,t.jsx)(b.Cancel,{"data-slot":"alert-dialog-cancel",className:(0,C.cn)(e),...n})})}e.s(["ConfirmationDialog",0,function({actionLabel:e,cancelLabel:a,description:r,onConfirm:n,onOpenChange:s,open:i,title:d,trigger:l}){return(0,t.jsxs)(E,{onOpenChange:s,open:i,children:[l&&(0,t.jsx)(I,{asChild:!0,children:l}),(0,t.jsxs)(R,{children:[(0,t.jsxs)(S,{children:[(0,t.jsx)(M,{children:d}),(0,t.jsx)(O,{children:r})]}),(0,t.jsxs)(T,{children:[(0,t.jsx)(L,{children:a}),(0,t.jsx)(_,{onClick:()=>void n(),variant:"destructive",children:e})]})]})]})}],340953)},82612,e=>{"use strict";var t=e.i(843476),a=e.i(225913),r=e.i(975157);let n=(0,a.cva)("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",icon:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4"}},defaultVariants:{variant:"default"}});e.s(["Empty",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"empty",className:(0,r.cn)("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance",e),...a})},"EmptyDescription",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"empty-description",className:(0,r.cn)("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",e),...a})},"EmptyHeader",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"empty-header",className:(0,r.cn)("flex max-w-sm flex-col items-center gap-2",e),...a})},"EmptyMedia",0,function({className:e,variant:a="default",...s}){return(0,t.jsx)("div",{"data-slot":"empty-icon","data-variant":a,className:(0,r.cn)(n({variant:a,className:e})),...s})},"EmptyTitle",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"empty-title",className:(0,r.cn)("font-heading text-sm font-medium tracking-tight",e),...a})}])},876561,e=>{"use strict";let t=(0,e.i(456420).default)("archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);e.s(["Archive",0,t],876561)},452330,e=>{"use strict";let t=(0,e.i(456420).default)("code-xml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);e.s(["Code2",0,t],452330)},636162,e=>{"use strict";let t=(0,e.i(456420).default)("apple",[["path",{d:"M12 6.528V3a1 1 0 0 1 1-1h0",key:"11qiee"}],["path",{d:"M18.237 21A15 15 0 0 0 22 11a6 6 0 0 0-10-4.472A6 6 0 0 0 2 11a15.1 15.1 0 0 0 3.763 10 3 3 0 0 0 3.648.648 5.5 5.5 0 0 1 5.178 0A3 3 0 0 0 18.237 21",key:"110c12"}]]);e.s(["Apple",0,t],636162)},687862,671028,e=>{"use strict";var t=e.i(843476);e.i(688194);var a=e.i(636162),r=e.i(456420);let n=(0,r.default)("app-window",[["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}],["path",{d:"M10 4v4",key:"pp8u80"}],["path",{d:"M2 8h20",key:"d11cs7"}],["path",{d:"M6 4v4",key:"1svtjw"}]]);var s=e.i(876561);let i=(0,r.default)("beaker",[["path",{d:"M4.5 3h15",key:"c7n0jr"}],["path",{d:"M6 3v16a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V3",key:"m1uhx7"}],["path",{d:"M6 14h12",key:"4cwo0f"}]]),d=(0,r.default)("box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]),l=(0,r.default)("bug",[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]]);var o=e.i(452330);let c=(0,r.default)("gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);e.s(["Gauge",0,c],671028);var u=e.i(93384);let m=(0,r.default)("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]),h=(0,r.default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);var p=e.i(21357);let x=(0,r.default)("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 g=e.i(584026),f=e.i(986206),j=e.i(328623),v=e.i(604139);let y=(0,r.default)("test-tube",[["path",{d:"M14.5 2v17.5c0 1.4-1.1 2.5-2.5 2.5c-1.4 0-2.5-1.1-2.5-2.5V2",key:"125lnx"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M14.5 16h-5",key:"1ox875"}]]);var N=e.i(747925);let A={apple:a.Apple,"app-window":n,archive:s.Archive,beaker:i,box:d,bug:l,code:o.Code2,gauge:c,hammer:u.Hammer,layers:m,package:h,play:p.Play,rocket:x,shield:g.ShieldCheck,smartphone:f.Smartphone,sparkles:j.Sparkles,terminal:v.Terminal,"test-tube":y,wrench:N.Wrench};e.s(["ConfigurationIcon",0,function({iconKey:e}){if(!e)return null;let a=A[e];return a?(0,t.jsx)(a,{"aria-hidden":!0,className:"size-4"}):null}],687862)},778434,e=>{"use strict";e.s(["AGENT_FIELDS",0,"id name hostname version osVersion architecture cpuModel memoryTotalBytes memoryFreeBytes diskTotalBytes diskFreeBytes capabilities baseRepoDirectory derivedDataLocationMode derivedDataPath buildsDirectory defaultBuildsDirectory effectiveBuildsDirectory connectionStatus ipAddress lastSeenAt disconnectedAt createdAt","JOB_FIELDS",0,"id agentId kind payload status error result timeoutSeconds createdAt startedAt finishedAt updatedAt","JOB_LOG_FIELDS",0,"id jobId sequence stream message createdAt"])},489002,e=>{"use strict";let t=(0,e.i(456420).default)("circle-stop",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]]);e.s(["CircleStop",0,t],489002)},183691,e=>{"use strict";let t=`
2
- id name description script targetKind targetAgentId targetRepositoryId
2
+ id name description script targetKind targetAgentId targetRepositoryIds
3
3
  restartPolicy restartLimit concurrency blocksGitOperations quickActionEnabled quickActionIconKey quickActionButtonVariant
4
4
  notificationsEnabled
5
5
  archivedAt createdAt updatedAt
6
6
  targetAgent { id name hostname connectionStatus capabilities }
7
- targetRepository { id name displayOrigin }
7
+ targetRepositories { id name displayOrigin }
8
8
  `,a=`
9
9
  id displayNumber commandId origin status snapshotName snapshotDescription
10
10
  snapshotScript snapshotTargetKind snapshotRestartPolicy snapshotRestartLimit
@@ -1,31 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,856522,e=>{"use strict";let t=(0,e.i(456420).default)("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"}]]);e.s(["Save",0,t],856522)},876561,e=>{"use strict";let t=(0,e.i(456420).default)("archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);e.s(["Archive",0,t],876561)},452330,e=>{"use strict";let t=(0,e.i(456420).default)("code-xml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);e.s(["Code2",0,t],452330)},636162,e=>{"use strict";let t=(0,e.i(456420).default)("apple",[["path",{d:"M12 6.528V3a1 1 0 0 1 1-1h0",key:"11qiee"}],["path",{d:"M18.237 21A15 15 0 0 0 22 11a6 6 0 0 0-10-4.472A6 6 0 0 0 2 11a15.1 15.1 0 0 0 3.763 10 3 3 0 0 0 3.648.648 5.5 5.5 0 0 1 5.178 0A3 3 0 0 0 18.237 21",key:"110c12"}]]);e.s(["Apple",0,t],636162)},687862,671028,e=>{"use strict";var t=e.i(843476);e.i(688194);var a=e.i(636162),i=e.i(456420);let n=(0,i.default)("app-window",[["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}],["path",{d:"M10 4v4",key:"pp8u80"}],["path",{d:"M2 8h20",key:"d11cs7"}],["path",{d:"M6 4v4",key:"1svtjw"}]]);var s=e.i(876561);let r=(0,i.default)("beaker",[["path",{d:"M4.5 3h15",key:"c7n0jr"}],["path",{d:"M6 3v16a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V3",key:"m1uhx7"}],["path",{d:"M6 14h12",key:"4cwo0f"}]]),c=(0,i.default)("box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]),l=(0,i.default)("bug",[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]]);var d=e.i(452330);let o=(0,i.default)("gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);e.s(["Gauge",0,o],671028);var u=e.i(93384);let m=(0,i.default)("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]),h=(0,i.default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);var p=e.i(21357);let x=(0,i.default)("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 g=e.i(584026),y=e.i(986206),C=e.i(328623),j=e.i(604139);let k=(0,i.default)("test-tube",[["path",{d:"M14.5 2v17.5c0 1.4-1.1 2.5-2.5 2.5c-1.4 0-2.5-1.1-2.5-2.5V2",key:"125lnx"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M14.5 16h-5",key:"1ox875"}]]);var E=e.i(747925);let v={apple:a.Apple,"app-window":n,archive:s.Archive,beaker:r,box:c,bug:l,code:d.Code2,gauge:o,hammer:u.Hammer,layers:m,package:h,play:p.Play,rocket:x,shield:g.ShieldCheck,smartphone:y.Smartphone,sparkles:C.Sparkles,terminal:j.Terminal,"test-tube":k,wrench:E.Wrench};e.s(["ConfigurationIcon",0,function({iconKey:e}){if(!e)return null;let a=v[e];return a?(0,t.jsx)(a,{"aria-hidden":!0,className:"size-4"}):null}],687862)},183691,e=>{"use strict";let t=`
2
- id name description script targetKind targetAgentId targetRepositoryId
3
- restartPolicy restartLimit concurrency blocksGitOperations quickActionEnabled quickActionIconKey quickActionButtonVariant
4
- notificationsEnabled
5
- archivedAt createdAt updatedAt
6
- targetAgent { id name hostname connectionStatus capabilities }
7
- targetRepository { id name displayOrigin }
8
- `,a=`
9
- id displayNumber commandId origin status snapshotName snapshotDescription
10
- snapshotScript snapshotTargetKind snapshotRestartPolicy snapshotRestartLimit
11
- snapshotConcurrency snapshotBlocksGitOperations snapshotNotificationsEnabled snapshot
12
- agentId worktreeId agentName agentHostname worktreePath worktreeBranch
13
- restartCount stopRequested nextRestartAt predecessorRunId error exitCode signal
14
- queuedAt startedAt finishedAt archivedAt createdAt updatedAt
15
- command { id name }
16
- agent { id name hostname connectionStatus capabilities }
17
- worktree { id folder branch highlightColor }
18
- attempts { id attempt status exitCode signal error startedAt finishedAt }
19
- `,i=`
20
- queue {
21
- reason position waitingCount
22
- entries {
23
- id displayNumber name status concurrency queuedAt
24
- holdingTarget blocking currentRun
25
- }
26
- }
27
- `;e.s(["COMMAND_CONCURRENCY_MODES",0,["EXCLUSIVE","NON_EXCLUSIVE","EXCLUDED"],"COMMAND_DEFINITION_FIELDS",0,t,"COMMAND_RUN_FIELDS",0,a,"COMMAND_RUN_QUEUE_FIELDS",0,i,"activeCommandRun",0,e=>["QUEUED","RUNNING","RESTARTING","CANCELLING"].includes(e),"commandConcurrencyKey",0,e=>{switch(e){case"EXCLUSIVE":return"concurrencyExclusive";case"EXCLUDED":return"concurrencyExcluded";default:return"concurrencyNonExclusive"}},"commandOriginKey",0,e=>{switch(e){case"QUICK_ACTION":return"originQuickAction";case"WORKFLOW":return"originWorkflow";case"RERUN":return"originRerun";default:return"originManual"}},"commandQueueReasonKey",0,e=>{switch(e){case"WAITING_FOR_AGENT":return"queuedWaitingForAgent";case"AGENT_OFFLINE":return"queuedAgentOffline";case"WAITING_FOR_PREDECESSOR":return"queuedWaitingForPredecessor";case"RESTART_DELAY":return"queuedRestartDelay";case"TARGET_BUSY":return"queuedTargetBusy";case"QUEUED_BEHIND":return"queuedBehind";default:return"queuedReady"}},"commandRestartKey",0,e=>{switch(e){case"ON_FAILURE":return"onFailure";case"ALWAYS":return"always";default:return"never"}},"commandStatusKey",0,e=>{switch(e){case"QUEUED":return"statusQueued";case"RUNNING":return"statusRunning";case"RESTARTING":return"statusRestarting";case"CANCELLING":return"statusCancelling";case"SUCCEEDED":return"statusSucceeded";case"FAILED":return"statusFailed";case"CANCELLED":return"statusCancelled";case"TIMED_OUT":return"statusTimedOut";default:return"status"}},"commandTargetKey",0,e=>{switch(e){case"ANY_AGENT_HOME":return"anyAgentHome";case"SPECIFIC_AGENT_HOME":return"specificAgentHome";case"REPOSITORY_WORKTREE":return"repositoryWorktree";default:return"anyWorktree"}}])},955370,e=>{"use strict";let t=(0,e.i(456420).default)("circle-off",[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M8.35 2.69A10 10 0 0 1 21.3 15.65",key:"1pfsoa"}],["path",{d:"M19.08 19.08A10 10 0 1 1 4.92 4.92",key:"1ablyi"}]]);e.s(["CircleOff",0,t],955370)},423934,e=>{"use strict";var t=e.i(843476),a=e.i(876561),i=e.i(716327),n=e.i(955370),s=e.i(856522),r=e.i(948148),c=e.i(271645),l=e.i(929592),d=e.i(687862),o=e.i(688194),u=e.i(519455),m=e.i(515288),h=e.i(257428),p=e.i(755146),x=e.i(542450),g=e.i(793479),y=e.i(906197),C=e.i(110204),j=e.i(629288),k=e.i(967489),E=e.i(624687),v=e.i(520133),A=e.i(637611),N=e.i(183691);let I={name:"",description:"",script:"#!/bin/zsh\nset -e\n\n",targetKind:"ANY_WORKTREE",targetAgentId:"",targetRepositoryId:"",restartPolicy:"NEVER",restartLimit:"3",unlimitedRestarts:!1,concurrency:"NON_EXCLUSIVE",blocksGitOperations:!1,quickActionEnabled:!1,quickActionIconKey:"terminal",quickActionButtonVariant:"default",notificationsEnabled:!0};e.s(["CommandEditor",0,function({commandId:e}){let f=(0,r.useTranslations)("commands"),S=(0,r.useTranslations)("builds"),b=(0,v.useRouter)(),[R,O]=(0,c.useState)(I),[M,T]=(0,c.useState)([]),[w,q]=(0,c.useState)([]),[D,L]=(0,c.useState)(!1),[_,K]=(0,c.useState)(!1),[V,G]=(0,c.useState)(null);(0,c.useEffect)(()=>{(0,A.controlPlaneRequest)(`query CommandEditor${e?"($id: ID!)":""} {
28
- agents { id name hostname connectionStatus capabilities }
29
- codebaseOverview { repositories { id name displayOrigin } }
30
- ${e?`commandDefinition(id: $id) { ${N.COMMAND_DEFINITION_FIELDS} }`:""}
31
- }`,e?{id:e}:void 0).then(e=>{if(T(e.agents),q(e.codebaseOverview.repositories),e.commandDefinition){let t=e.commandDefinition;L(!!t.archivedAt),O({name:t.name,description:t.description,script:t.script,targetKind:t.targetKind,targetAgentId:t.targetAgentId??"",targetRepositoryId:t.targetRepositoryId??"",restartPolicy:t.restartPolicy,restartLimit:String(t.restartLimit??3),unlimitedRestarts:null===t.restartLimit,concurrency:t.concurrency,blocksGitOperations:t.blocksGitOperations,quickActionEnabled:t.quickActionEnabled,quickActionIconKey:t.quickActionIconKey,quickActionButtonVariant:t.quickActionButtonVariant,notificationsEnabled:t.notificationsEnabled})}}).catch(e=>G(e instanceof Error?e.message:String(e)))},[e]);let U=(e,t)=>O(a=>({...a,[e]:t})),F=async()=>{K(!0);try{let t={name:R.name,description:R.description,script:R.script,targetKind:R.targetKind,targetAgentId:"SPECIFIC_AGENT_HOME"===R.targetKind?R.targetAgentId:null,targetRepositoryId:"REPOSITORY_WORKTREE"===R.targetKind?R.targetRepositoryId:null,restartPolicy:R.restartPolicy,restartLimit:R.unlimitedRestarts?null:Number(R.restartLimit),concurrency:R.concurrency,blocksGitOperations:R.blocksGitOperations,quickActionEnabled:R.quickActionEnabled,quickActionIconKey:R.quickActionIconKey,quickActionButtonVariant:R.quickActionButtonVariant,notificationsEnabled:R.notificationsEnabled},a=await (0,A.controlPlaneRequest)(e?"mutation UpdateCommand($id: ID!, $input: CommandDefinitionInput!) { updateCommandDefinition(id: $id, input: $input) { id } }":"mutation CreateCommand($input: CommandDefinitionInput!) { createCommandDefinition(input: $input) { id } }",e?{id:e,input:t}:{input:t});b.push(`/commands/${a.updateCommandDefinition?.id??a.createCommandDefinition?.id}/edit`),b.refresh(),G(null)}catch(e){G(e instanceof Error?e.message:String(e))}finally{K(!1)}};return(0,t.jsxs)("div",{className:"mx-auto max-w-4xl space-y-5",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsxs)("div",{className:"mr-auto",children:[(0,t.jsx)("h1",{className:"text-2xl font-semibold",children:e?f("editCommand"):f("newCommand")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:f("editorDescription")})]}),e&&(0,t.jsxs)(u.Button,{variant:"outline",onClick:async()=>{await (0,A.controlPlaneRequest)("mutation ArchiveCommand($id: ID!, $archived: Boolean!) { archiveCommandDefinition(id: $id, archived: $archived) { id } }",{id:e,archived:!D}),L(!D)},children:[(0,t.jsx)(a.Archive,{}),D?f("restore"):f("archive")]}),(0,t.jsxs)(u.Button,{disabled:_,onClick:()=>void F(),children:[(0,t.jsx)(s.Save,{}),_?f("saving"):f("save")]})]}),V&&(0,t.jsx)(l.Alert,{variant:"destructive",children:(0,t.jsx)(l.AlertDescription,{children:V})}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(m.CardHeader,{children:(0,t.jsx)(m.CardTitle,{children:f("command")})}),(0,t.jsxs)(m.CardContent,{className:"grid gap-5",children:[(0,t.jsxs)("div",{className:"grid gap-2",children:[(0,t.jsx)(C.Label,{htmlFor:"command-name",children:f("name")}),(0,t.jsx)(g.Input,{id:"command-name",value:R.name,onChange:e=>U("name",e.target.value)})]}),(0,t.jsxs)("div",{className:"grid gap-2",children:[(0,t.jsx)(C.Label,{htmlFor:"command-description",children:f("commandDescription")}),(0,t.jsx)(E.Textarea,{id:"command-description",value:R.description,onChange:e=>U("description",e.target.value)})]}),(0,t.jsxs)("div",{className:"grid gap-2",children:[(0,t.jsx)(C.Label,{htmlFor:"command-script",children:f("script")}),(0,t.jsx)(E.Textarea,{className:"min-h-64 font-mono text-sm",id:"command-script",spellCheck:!1,value:R.script,onChange:e=>U("script",e.target.value)}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:f("scriptHelp")})]})]})]}),(0,t.jsxs)("div",{className:"grid gap-5 md:grid-cols-2",children:[(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(m.CardHeader,{children:(0,t.jsx)(m.CardTitle,{children:f("target")})}),(0,t.jsxs)(m.CardContent,{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"grid gap-2",children:[(0,t.jsx)(C.Label,{children:f("scope")}),(0,t.jsxs)(k.Select,{value:R.targetKind,onValueChange:e=>U("targetKind",e),children:[(0,t.jsx)(k.SelectTrigger,{children:(0,t.jsx)(k.SelectValue,{})}),(0,t.jsxs)(k.SelectContent,{children:[(0,t.jsx)(k.SelectItem,{value:"ANY_AGENT_HOME",children:f("anyAgentHome")}),(0,t.jsx)(k.SelectItem,{value:"SPECIFIC_AGENT_HOME",children:f("specificAgentHome")}),(0,t.jsx)(k.SelectItem,{value:"ANY_WORKTREE",children:f("anyWorktree")}),(0,t.jsx)(k.SelectItem,{value:"REPOSITORY_WORKTREE",children:f("repositoryWorktree")})]})]})]}),"SPECIFIC_AGENT_HOME"===R.targetKind&&(0,t.jsxs)("div",{className:"grid gap-2",children:[(0,t.jsx)(C.Label,{children:f("agent")}),(0,t.jsxs)(k.Select,{value:R.targetAgentId,onValueChange:e=>U("targetAgentId",e??""),children:[(0,t.jsx)(k.SelectTrigger,{children:(0,t.jsx)(k.SelectValue,{placeholder:f("selectAgent")})}),(0,t.jsx)(k.SelectContent,{children:M.map(e=>(0,t.jsxs)(k.SelectItem,{value:e.id,children:[e.name," · ",e.hostname]},e.id))})]})]}),"REPOSITORY_WORKTREE"===R.targetKind&&(0,t.jsxs)("div",{className:"grid gap-2",children:[(0,t.jsx)(C.Label,{children:f("repository")}),(0,t.jsxs)(k.Select,{value:R.targetRepositoryId,onValueChange:e=>U("targetRepositoryId",e??""),children:[(0,t.jsx)(k.SelectTrigger,{className:"h-auto min-h-8 w-full items-start py-1.5 text-left whitespace-normal data-[size=default]:h-auto *:data-[slot=select-value]:line-clamp-none *:data-[slot=select-value]:min-w-0 *:data-[slot=select-value]:[overflow-wrap:anywhere]",children:(0,t.jsx)(k.SelectValue,{placeholder:f("selectRepository")})}),(0,t.jsx)(k.SelectContent,{children:w.map(e=>(0,t.jsxs)(k.SelectItem,{className:"whitespace-normal [overflow-wrap:anywhere]",value:e.id,children:[e.name," · ",e.displayOrigin]},e.id))})]})]})]})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(m.CardHeader,{children:(0,t.jsx)(m.CardTitle,{children:f("restart")})}),(0,t.jsxs)(m.CardContent,{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"grid gap-2",children:[(0,t.jsx)(C.Label,{children:f("restartPolicy")}),(0,t.jsxs)(k.Select,{value:R.restartPolicy,onValueChange:e=>U("restartPolicy",e),children:[(0,t.jsx)(k.SelectTrigger,{children:(0,t.jsx)(k.SelectValue,{})}),(0,t.jsxs)(k.SelectContent,{children:[(0,t.jsx)(k.SelectItem,{value:"NEVER",children:f("never")}),(0,t.jsx)(k.SelectItem,{value:"ON_FAILURE",children:f("onFailure")}),(0,t.jsx)(k.SelectItem,{value:"ALWAYS",children:f("always")})]})]})]}),(0,t.jsxs)("div",{className:"grid gap-2",children:[(0,t.jsx)(C.Label,{htmlFor:"restart-limit",children:f("restartLimit")}),(0,t.jsx)(g.Input,{disabled:R.unlimitedRestarts,id:"restart-limit",min:0,max:100,type:"number",value:R.restartLimit,onChange:e=>U("restartLimit",e.target.value)})]}),(0,t.jsxs)("label",{className:"flex items-center gap-2 text-sm",children:[(0,t.jsx)(h.Checkbox,{checked:R.unlimitedRestarts,onCheckedChange:e=>U("unlimitedRestarts",!0===e)}),f("unlimited")]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:f("restartHelp")})]})]})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(m.CardHeader,{children:(0,t.jsx)(m.CardTitle,{children:f("concurrency")})}),(0,t.jsxs)(m.CardContent,{className:"space-y-4",children:[(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:f("concurrencyHelp")}),(0,t.jsx)(j.RadioGroup,{onValueChange:e=>{O(t=>({...t,concurrency:e,blocksGitOperations:"EXCLUSIVE"===e}))},value:R.concurrency,children:N.COMMAND_CONCURRENCY_MODES.map(e=>{let a=`command-concurrency-${e}`;return(0,t.jsx)(x.FieldLabel,{className:"w-full cursor-pointer",htmlFor:a,children:(0,t.jsxs)(y.Item,{className:"items-start",size:"sm",variant:"outline",children:[(0,t.jsx)(j.RadioGroupItem,{className:"mt-0.5",id:a,value:e}),(0,t.jsxs)(y.ItemContent,{className:"min-w-0",children:[(0,t.jsx)(y.ItemTitle,{className:"line-clamp-none w-full",children:f((0,N.commandConcurrencyKey)(e))}),(0,t.jsx)(y.ItemDescription,{className:"line-clamp-none",children:f(`${(0,N.commandConcurrencyKey)(e)}Help`)})]})]})},e)})}),(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsxs)("label",{className:"flex items-center gap-2 text-sm",children:[(0,t.jsx)(h.Checkbox,{checked:R.blocksGitOperations,disabled:"EXCLUSIVE"===R.concurrency,onCheckedChange:e=>U("blocksGitOperations",!0===e)}),f("blocksGitOperations")]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:f("EXCLUSIVE"===R.concurrency?"blocksGitOperationsExclusiveHelp":"blocksGitOperationsHelp")})]})]})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(m.CardHeader,{children:(0,t.jsx)(m.CardTitle,{children:f("notifications")})}),(0,t.jsxs)(m.CardContent,{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"flex items-center gap-2 text-sm",children:[(0,t.jsx)(h.Checkbox,{checked:R.notificationsEnabled,onCheckedChange:e=>U("notificationsEnabled",!0===e)}),f("enableNotifications")]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:f("notificationsHelp")})]})]}),(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(m.CardHeader,{children:(0,t.jsx)(m.CardTitle,{children:f("quickAction")})}),(0,t.jsxs)(m.CardContent,{className:"space-y-4",children:[(0,t.jsxs)("label",{className:"flex items-center gap-2 text-sm",children:[(0,t.jsx)(h.Checkbox,{checked:R.quickActionEnabled,onCheckedChange:e=>U("quickActionEnabled",!0===e)}),f("enableQuickAction")]}),(0,t.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2",children:[(0,t.jsxs)("div",{className:"grid gap-2",children:[(0,t.jsx)(C.Label,{htmlFor:"command-quick-action-icon",children:f("icon")}),(0,t.jsxs)(p.DropdownMenu,{children:[(0,t.jsx)(p.DropdownMenuTrigger,{asChild:!0,children:(0,t.jsxs)(u.Button,{"aria-label":`${f("icon")}: ${S(`configurationIcons.${R.quickActionIconKey}`)}`,className:"w-full justify-between",id:"command-quick-action-icon",type:"button",variant:"outline",children:[(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:["none"===R.quickActionIconKey?(0,t.jsx)(n.CircleOff,{className:"size-4 shrink-0"}):(0,t.jsx)(d.ConfigurationIcon,{iconKey:R.quickActionIconKey}),(0,t.jsx)("span",{className:"truncate",children:S(`configurationIcons.${R.quickActionIconKey}`)})]}),(0,t.jsx)(i.ChevronDown,{className:"text-muted-foreground"})]})}),(0,t.jsx)(p.DropdownMenuContent,{align:"start",className:"min-w-56",children:(0,t.jsx)(p.DropdownMenuRadioGroup,{onValueChange:e=>U("quickActionIconKey",e),value:R.quickActionIconKey,children:["none",...o.BUILD_CONFIGURATION_ICON_KEYS].map(e=>(0,t.jsxs)(p.DropdownMenuRadioItem,{value:e,children:["none"===e?(0,t.jsx)(n.CircleOff,{className:"size-4"}):(0,t.jsx)(d.ConfigurationIcon,{iconKey:e}),S(`configurationIcons.${e}`)]},e))})})]})]}),(0,t.jsxs)("div",{className:"grid gap-2",children:[(0,t.jsx)(C.Label,{children:f("style")}),(0,t.jsxs)(k.Select,{value:R.quickActionButtonVariant,onValueChange:e=>U("quickActionButtonVariant",e??"default"),children:[(0,t.jsx)(k.SelectTrigger,{children:(0,t.jsx)(k.SelectValue,{})}),(0,t.jsxs)(k.SelectContent,{children:[(0,t.jsx)(k.SelectItem,{value:"default",children:f("defaultStyle")}),(0,t.jsx)(k.SelectItem,{value:"outline",children:f("outlineStyle")}),(0,t.jsx)(k.SelectItem,{value:"secondary",children:f("secondaryStyle")}),(0,t.jsx)(k.SelectItem,{value:"destructive",children:f("destructiveStyle")})]})]})]})]})]})]})]})}])}]);