@whoz-oss/coday-client 0.0.0-workstream-forge.232 → 0.0.0-workstream-forge.234

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 (84) hide show
  1. package/browser/chunk-2gGq060a.js +1 -0
  2. package/browser/chunk-58tiRI-H.js +1 -0
  3. package/browser/chunk-6YBD0GhT.js +1 -0
  4. package/browser/{chunk-B8baUEmT.js → chunk-AtCYApei.js} +1 -1
  5. package/browser/chunk-B1xRCZ-V.js +1 -0
  6. package/browser/{chunk-BPdkZgsT.js → chunk-B97Q0PCu.js} +1 -1
  7. package/browser/chunk-BHKhFWCm.js +1 -0
  8. package/browser/chunk-BLevlpuu.js +1 -0
  9. package/browser/chunk-BRekDeCw.js +1 -0
  10. package/browser/chunk-BUfak7ZR.js +1 -0
  11. package/browser/chunk-BZQ9JxtK.js +1 -0
  12. package/browser/chunk-BjniM4kn.js +1 -0
  13. package/browser/{chunk-DjcIrFfd.js → chunk-BlPBulzu.js} +1 -1
  14. package/browser/chunk-Bqg4NsQw.js +1 -0
  15. package/browser/{chunk-WDJc7xVn.js → chunk-BtAgB7lp.js} +1 -1
  16. package/browser/chunk-BwLhUg85.js +1 -0
  17. package/browser/chunk-C4CShhcg.js +1 -0
  18. package/browser/chunk-C4FZ3_Nh.js +1 -0
  19. package/browser/chunk-C57r8bJB.js +1 -0
  20. package/browser/chunk-CHLgsXpc.js +1 -0
  21. package/browser/chunk-CWww3DEx.js +2 -0
  22. package/browser/chunk-CYwBGwuM.js +1 -0
  23. package/browser/chunk-Cii8kID2.js +2 -0
  24. package/browser/chunk-CjEtYpc7.js +1 -0
  25. package/browser/{chunk-CMPqP2EF.js → chunk-CrvFTHbA.js} +1 -1
  26. package/browser/{chunk-Rh-neiKa.js → chunk-CseRCWgR.js} +1 -1
  27. package/browser/chunk-Ct896VFa.js +1 -0
  28. package/browser/chunk-CyEpqhHA.js +1 -0
  29. package/browser/{chunk-BCYFEsQY.js → chunk-D2h70wlj.js} +1 -1
  30. package/browser/chunk-D5fiBKR6.js +1 -0
  31. package/browser/{chunk-CRfz50nT.js → chunk-DFkt8tY0.js} +1 -1
  32. package/browser/chunk-DKN9kTwu.js +1 -0
  33. package/browser/chunk-DKkNMT3S.js +1 -0
  34. package/browser/chunk-DMaZtyPG.js +1 -0
  35. package/browser/chunk-DRUw-4Lk.js +1 -0
  36. package/browser/chunk-Dz39nB4A.js +1 -0
  37. package/browser/chunk-KQaRB5fZ.js +1 -0
  38. package/browser/chunk-NuH8shYm.js +1 -0
  39. package/browser/chunk-OhgFuyjp.js +1 -0
  40. package/browser/chunk-TWv3ObgU.js +1 -0
  41. package/browser/chunk-XnJGN0OJ.js +2 -0
  42. package/browser/chunk-bCI6skcH.js +674 -0
  43. package/browser/{chunk-c_qjGPOd.js → chunk-d7XsX4kM.js} +1 -1
  44. package/browser/{chunk-DSTjQyTQ.js → chunk-iEPxdwNo.js} +1 -1
  45. package/browser/{chunk-BxwRgKBY.js → chunk-paKwZTsF.js} +1 -1
  46. package/browser/chunk-pbgW0Sdk.js +1 -0
  47. package/browser/index.html +1 -1
  48. package/browser/{main-HPRR3LFL.js → main-PUOSMZMX.js} +17 -17
  49. package/package.json +1 -1
  50. package/browser/chunk-B0vz8knv.js +0 -1
  51. package/browser/chunk-BC-t1LQ0.js +0 -1
  52. package/browser/chunk-BNLt7aDq.js +0 -1
  53. package/browser/chunk-BNhQCDMY.js +0 -1
  54. package/browser/chunk-BY5vmyDB.js +0 -1
  55. package/browser/chunk-Bg86ht3w.js +0 -1
  56. package/browser/chunk-Bkx1jNbv.js +0 -1
  57. package/browser/chunk-BxOB3DD8.js +0 -2
  58. package/browser/chunk-Bzech8Jm.js +0 -1
  59. package/browser/chunk-C25EGaCF.js +0 -1
  60. package/browser/chunk-CQwT3hLh.js +0 -1
  61. package/browser/chunk-Cet942zR.js +0 -1
  62. package/browser/chunk-CfEqRYpx.js +0 -1
  63. package/browser/chunk-Cmclgb-D.js +0 -2
  64. package/browser/chunk-CsW8J3QQ.js +0 -1
  65. package/browser/chunk-CyyVQAzK.js +0 -1
  66. package/browser/chunk-D02C8Sxz.js +0 -1
  67. package/browser/chunk-D2NMPGa5.js +0 -1
  68. package/browser/chunk-D4KiawUp.js +0 -1
  69. package/browser/chunk-D55dWwKm.js +0 -1
  70. package/browser/chunk-D9bz-8U4.js +0 -1
  71. package/browser/chunk-DIPHL1c9.js +0 -1
  72. package/browser/chunk-DJT7DUkW.js +0 -674
  73. package/browser/chunk-DW4fRjPY.js +0 -1
  74. package/browser/chunk-DWT2_U7s.js +0 -1
  75. package/browser/chunk-DbgTR-la.js +0 -1
  76. package/browser/chunk-DhxW6por.js +0 -2
  77. package/browser/chunk-Dosu1Uyt.js +0 -1
  78. package/browser/chunk-Ds9gmUVT.js +0 -1
  79. package/browser/chunk-Kc_v3nWb.js +0 -1
  80. package/browser/chunk-W2Auog5Y.js +0 -1
  81. package/browser/chunk-WqgsE68d.js +0 -1
  82. package/browser/chunk-tvgu7LYE.js +0 -1
  83. package/browser/chunk-vMe5ZNxR.js +0 -1
  84. package/browser/chunk-ynoqb-D_.js +0 -1
@@ -0,0 +1 @@
1
+ import {e}from'./chunk-C6dIhkYp.js';import {n}from'./chunk-CfgXrte_.js';import {v}from'./chunk-BwLhUg85.js';import {O}from'./chunk-CseRCWgR.js';import {g,W as W$1,q as F,I as we,H as J,$ as $i,K as U$1,ad as ne$1,a1 as ga,aa as br,v as vw,E as Es,Q as vg,a as hl,x as xC,j as jw,P as dg,b as BE,c as Bw,t as eC,F as Fg,U as Uw,k as $w,s as Dl,Y as Yw,l as lg,u as pf,w as hf}from'./main-PUOSMZMX.js';import {z as k,O as O$1,i as at,h as hn,I as Io,l as ko,P,B as P$1}from'./chunk-bCI6skcH.js';import'./chunk-2gGq060a.js';var Q=(n,e)=>e.key;function W(n,e){if(n&1&&(Es(0,"p",3),xC(1),hl()),n&2){let t=eC();BE(),Fg(t.deletion.error());}}function X(n,e){n&1&&(Es(0,"p",4),xC(1,"Loading integrations\u2026"),hl());}function Z(n,e){n&1&&(Es(0,"p",5),xC(1,"No integrations available."),hl());}function ee(n,e){n&1&&(Es(0,"p",4),xC(1,"No integrations match the current filter."),hl());}function te(n,e){n&1&&(Es(0,"ds-tag",20),xC(1,"YAML"),hl(),Es(2,"ds-tag",21),xC(3,"Read-only"),hl());}function ne(n,e){if(n&1){let t=Yw();Es(0,"button",22),vg("click",function(){pf(t);let s=eC().$implicit,c=eC(2);return hf(c.view(s))}),xC(1,"View"),hl();}if(n&2){let t=eC().$implicit;lg("aria-label","View "+t.config.name);}}function ie(n,e){if(n&1){let t=Yw();Es(0,"button",22),vg("click",function(){pf(t);let s=eC(3).$implicit,c=eC(2);return hf(c.edit(s))}),xC(1," Edit "),hl();}if(n&2){let t=eC(3).$implicit;lg("aria-label","Edit "+t.config.name);}}function oe(n,e){if(n&1){let t=Yw();Es(0,"button",22),vg("click",function(){pf(t);let s=eC(2).$implicit,c=eC(2);return hf(c.duplicate(s))}),xC(1," Duplicate "),hl(),jw(2,ie,2,1,"button",19);}if(n&2){let t=eC(2).$implicit;lg("aria-label","Duplicate "+t.config.name),BE(2),Bw(t.canEdit?2:-1);}}function ae(n,e){if(n&1){let t=Yw();Es(0,"agentos-row-delete-action",25),vg("deleteRequested",function(){pf(t);let s=eC(2).$implicit,c=eC(2);return hf(c.deletion.request(s.key))})("deleteConfirmed",function(){pf(t);let s=eC(2).$implicit,c=eC(2);return hf(c.confirmDelete(s))})("deleteCancelled",function(){pf(t);let s=eC(4);return hf(s.deletion.cancel())}),hl();}if(n&2){let t=eC(2).$implicit,a=eC(2);dg("rowKey",t.key)("rowLabel",t.config.name)("state",a.deletion);}}function re(n,e){n&1&&(Es(0,"button",24),xC(1,"Inherited"),hl());}function le(n,e){if(n&1&&(jw(0,oe,3,2),jw(1,ae,1,3,"agentos-row-delete-action",23),jw(2,re,2,0,"button",24)),n&2){let t=eC().$implicit,a=eC(2);Bw(a.deletion.confirmingId()!==t.key?0:-1),BE(),Bw(t.canDelete?1:-1),BE(),Bw(!t.canEdit&&!t.canDelete?2:-1);}}function se(n,e){if(n&1&&(Es(0,"tr",9)(1,"td",12),xC(2),hl(),Es(3,"td",13),xC(4),hl(),Es(5,"td",14)(6,"div",15)(7,"ds-tag",16),xC(8),hl(),jw(9,te,4,0),hl()(),Es(10,"td",17)(11,"div",18),jw(12,ne,2,1,"button",19)(13,le,3,3),hl()()()),n&2){let t=e.$implicit;BE(2),Fg(t.config.name),BE(2),Dl(" ",t.config.integrationType," "),BE(3),dg("variant",t.scopeLabel==="Platform"?"neutral":t.scopeLabel==="Personal"?"outline":"accent"),BE(),Dl(" ",t.scopeLabel," "),BE(),Bw(t.source==="FILESYSTEM"?9:-1),BE(3),Bw(t.source==="FILESYSTEM"?12:13);}}function ce(n,e){if(n&1&&(Es(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),xC(5,"Name"),hl(),Es(6,"th",10),xC(7,"Type"),hl(),Es(8,"th",10),xC(9,"Scope"),hl(),Es(10,"th",10)(11,"span",11),xC(12,"Actions"),hl()()()(),Es(13,"tbody",8),Uw(14,se,14,6,"tr",9,Q),hl()()()),n&2){let t=eC();BE(14),$w(t.rowFilter.filteredRows());}}var U=class n$1{route=g(W$1);router=g(F);destroyRef=g(we);state=g(O);namespaceRole=g(v);namespaceApi=g(J);namespaceId=this.route.snapshot.params.namespaceId;namespaceName=$i("this namespace");isAdmin=$i(false);isLoading=$i(true);rows=$i([]);deletion=k();rowFilter=O$1(this.rows,e=>[e.config.name,e.config.integrationType,e.scopeLabel,e.source].join(" "));ngOnInit(){this.state.setNamespace(this.namespaceId),this.namespaceId&&this.namespaceApi.getByIdNamespace(this.namespaceId).pipe(U$1(this.destroyRef)).subscribe({next:e=>this.namespaceName.set(e.name)}),this.route.paramMap.pipe(ne$1(e=>e.get("namespaceId")??""),ga(e=>e?this.namespaceRole.isAdminOfNamespace$(e):br(false)),U$1(this.destroyRef)).subscribe(e=>this.isAdmin.set(e)),this.state.vm$.pipe(U$1(this.destroyRef)).subscribe({next:e=>{this.rows.set(this.toRows(e)),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"integrations","new"],{queryParams:{scope:n(this.isAdmin())}});}view(e){e.config.id&&this.router.navigate(["/agentos",this.namespaceId,"integrations",e.config.id,"view"]);}edit(e){!e.canEdit||!e.config.id||this.router.navigate(["/agentos",this.namespaceId,"integrations",e.config.id,"edit"],{queryParams:{scope:e.scope}});}duplicate(e){if(e.source==="FILESYSTEM"||!e.config.id)return;let a=(e.scope==="platform"||e.scope==="namespace")&&!this.isAdmin()?"userOnNs":e.scope;this.router.navigate(["/agentos",this.namespaceId,"integrations","new"],{queryParams:{scope:a,template:e.config.id,templateScope:e.scope}});}confirmDelete(e){!e.canDelete||!e.config.id||this.deletion.execute(e.key,{request$:this.state.delete(e.config.id,e.scope).pipe(U$1(this.destroyRef)),errorMessage:`Deleting "${e.config.name}" failed. Try again.`});}toRows(e){return [...this.mapScope(e.platform,"platform","Platform",true),...this.mapScope(e.namespace,"namespace","Namespace",!this.isAdmin()),...this.mapScope(e.userOnNs,"userOnNs","Personal",false),...this.mapScope(e.userGlobal,"userGlobal","Personal",false)]}mapScope(e$1,t,a,s){return e$1.map((c,z)=>{let h=e(c),w=h==="NEO4J"&&!s;return {key:`${t}:${c.id??z}`,config:c,scope:t,scopeLabel:a,source:h,canEdit:w,canDelete:w}})}static \u0275fac=function(t){return new(t||n$1)};static \u0275cmp=vw({type:n$1,selectors:[["agentos-integrations-all-scopes"]],decls:9,vars:4,consts:[["title","Integrations",3,"description"],["label","Filter integrations","placeholder","Filter integrations\u2026",3,"queryChange","query"],["dsButton","","variant","primary","type","button",3,"click"],["role","alert",1,"settings-table__error"],["role","status",1,"settings-table__status"],[1,"settings-table__status"],[1,"settings-table__wrap"],["dsTable","","role","table","aria-label","Integrations"],["role","rowgroup"],["role","row"],["role","columnheader"],[1,"sr-only"],["role","cell","data-label","Name","data-title","",1,"settings-table__name"],["role","cell","data-label","Type",1,"settings-table__secondary"],["role","cell","data-label","Scope"],[1,"settings-table__tags"],[3,"variant"],["role","cell","data-label","Actions","data-actions",""],[1,"settings-table__actions"],["type","button"],["variant","neutral"],["variant","outline"],["type","button",3,"click"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"rowKey","rowLabel","state"],["type","button","disabled",""],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"deleteRequested","deleteConfirmed","deleteCancelled","rowKey","rowLabel","state"]],template:function(t,a){t&1&&(Es(0,"ds-section-header",0)(1,"agentos-table-filter",1),vg("queryChange",function(c){return a.rowFilter.query.set(c)}),hl(),Es(2,"button",2),vg("click",function(){return a.openCreateForm()}),xC(3,"New integration"),hl()(),jw(4,W,2,1,"p",3),jw(5,X,2,0,"p",4)(6,Z,2,0,"p",5)(7,ee,2,0,"p",4)(8,ce,16,0,"div",6)),t&2&&(dg("description","Integrations for "+a.namespaceName()+", including entries inherited from the platform."),BE(),dg("query",a.rowFilter.query()),BE(3),Bw(a.deletion.error()?4:-1),BE(),Bw(a.isLoading()?5:a.rows().length===0?6:a.rowFilter.filteredRows().length===0?7:8));},dependencies:[at,hn,Io,ko,P,P$1],encapsulation:2})};export{U as IntegrationsAllScopesComponent};
@@ -0,0 +1,2 @@
1
+ import {I}from'./chunk-DFkt8tY0.js';import {g,W,aW as L,I as we,$ as $i,r as rT,aX as Be,ac as by,K as U,a2 as ha,aa as br,v as vw,E as Es,f as fg,j as jw,a as hl,Q as vg,b as BE,c as Bw,P as dg,x as xC,Y as Yw,R as MI,U as Uw,t as eC,S as xI,k as $w,s as Dl,as as Pg,u as pf,w as hf,F as Fg}from'./main-PUOSMZMX.js';import {a6 as id,b as bo,x as xo,L as Lt,u as vn,G as Gt,m as mo,a8 as da,ac as Ni,d as pn,h as hn,e as cn,r as ln,g as dn,C as mn,i as at,j as an,t as rn}from'./chunk-bCI6skcH.js';import'./chunk-2gGq060a.js';var oe=(i,t)=>t.id;function ae(i,t){i&1&&(Es(0,"p",1),xC(1,"Loading\u2026"),hl());}function se(i,t){if(i&1&&(Es(0,"ds-notice"),xC(1),hl()),i&2){let e=eC(2);BE(),Fg(e.errorMessage());}}function re(i,t){if(i&1){let e=Yw();Es(0,"div")(1,"button",23),vg("click",function(){pf(e);let s=eC(2);return hf(s.retryLoad())}),xC(2,"Retry loading"),hl()();}}function ce(i,t){if(i&1&&(fg(0,"br"),xC(1)),i&2){let e=eC(3);BE(),Dl("",e.association()?.checkoutFailureReason," ");}}function de(i,t){if(i&1&&(Es(0,"ds-notice",3),xC(1),jw(2,ce,2,1),hl()),i&2){let e=eC(2);dg("tone",e.checkoutStatus()===e.CheckoutStatus.FAILED?"error":e.checkoutStatus()===e.CheckoutStatus.READY?"success":"neutral"),BE(),Dl(" Repository: ",e.checkoutStatus()," "),BE(),Bw(e.association()?.checkoutFailureReason?2:-1);}}function le(i,t){if(i&1&&(Es(0,"option",12),xC(1),hl()),i&2){let e=t.$implicit,c=eC(2);dg("value",e.id),BE(),Pg("",e.name," (",c.authTypeLabel(e.authType),")");}}function me(i,t){i&1&&(Es(0,"p",13),xC(1," No usable auth setting in this namespace. Create a BEARER_TOKEN one first. "),hl());}function pe(i,t){if(i&1){let e=Yw();Es(0,"button",24),vg("click",function(){pf(e);let s=eC(2);return hf(s.remove())}),xC(1," Remove association "),hl();}if(i&2){let e=eC(2);dg("disabled",!e.associationLoaded()||e.isSaving());}}function ue(i,t){if(i&1){let e=Yw();jw(0,se,2,1,"ds-notice"),jw(1,re,3,0,"div"),jw(2,de,3,3,"ds-notice",3),Es(3,"ds-fieldset",4)(4,"ds-form-field",5)(5,"input",6),vg("ngModelChange",function(s){pf(e);let u=eC();return hf(u.repositoryUrl.set(s))}),hl(),MI(),hl(),Es(6,"ds-form-field",7)(7,"input",8),vg("ngModelChange",function(s){pf(e);let u=eC();return hf(u.mainBranch.set(s))}),hl(),MI(),hl(),Es(8,"ds-form-field",9)(9,"select",10),vg("ngModelChange",function(s){pf(e);let u=eC();return hf(u.serviceAuthSettingId.set(s))}),Es(10,"option",11),xC(11,"Select an auth setting\u2026"),hl(),Uw(12,le,2,3,"option",12,oe),hl(),MI(),jw(14,me,2,0,"p",13),hl()(),Es(15,"ds-fieldset",14)(16,"div",15)(17,"label",16)(18,"input",17),vg("ngModelChange",function(s){pf(e);let u=eC();return hf(u.autoWorktree.set(s))}),hl(),MI(),xC(19," Offer a worktree to every new top-level case "),hl(),Es(20,"p",18),xC(21," The creator checks the box when creating the case; it is unchecked by default, and a case created without it has no Git. Applies to cases created from now on: turning this on later never equips existing cases, and turning it off never removes a worktree already created. "),hl()(),Es(22,"ds-form-field",19)(23,"input",20),vg("ngModelChange",function(s){pf(e);let u=eC();return hf(u.setupCommand.set(s))}),hl(),MI(),Es(24,"p",13),xC(25," Runs on the server, as the service user, in each new worktree. It executes code from the branch \u2014 prefer a command that disables lifecycle scripts. "),hl()()(),Es(26,"ds-form-actions")(27,"button",21),vg("click",function(){pf(e);let s=eC();return hf(s.save())}),xC(28),hl(),jw(29,pe,2,1,"button",22),hl();}if(i&2){let e=eC();Bw(e.errorMessage()?0:-1),BE(),Bw(e.associationLoaded()?-1:1),BE(),Bw(e.isAssociated()&&e.checkoutStatus()?2:-1),BE(),dg("disabled",!e.associationLoaded()||e.isSaving()),BE(2),dg("ngModel",e.repositoryUrl()),xI(),BE(2),dg("ngModel",e.mainBranch()),xI(),BE(2),dg("ngModel",e.serviceAuthSettingId()),xI(),BE(3),$w(e.eligibleAuthSettings()),BE(2),Bw(e.eligibleAuthSettings().length===0?14:-1),BE(),dg("disabled",!e.associationLoaded()||e.isSaving()),BE(3),dg("ngModel",e.autoWorktree()),xI(),BE(5),dg("ngModel",e.setupCommand()),xI(),BE(4),dg("disabled",!e.canSave()),BE(),Dl(" ",e.isSaving()?"Saving\u2026":e.isAssociated()?"Update":"Associate"," "),BE(),Bw(e.isAssociated()?29:-1);}}var ge=["BearerTokenAuthSetting","BasicAuthAuthSetting","ApiKeyAuthSetting"],he={BearerTokenAuthSetting:"token",BasicAuthAuthSetting:"basic auth",ApiKeyAuthSetting:"API key"},ne=class i{route=g(W);gitApi=g(L);authSettingState=g(I);destroyRef=g(we);isLoading=$i(true);isSaving=$i(false);confirmingRemove=$i(false);associationLoaded=$i(false);errorMessage=$i(null);association=$i(null);authSettings=$i([]);repositoryUrl=$i("");mainBranch=$i("main");serviceAuthSettingId=$i("");autoWorktree=$i(false);setupCommand=$i("");namespaceId="";isAssociated=rT(()=>this.association()?.associated===true);eligibleAuthSettings=rT(()=>this.authSettings().filter(t=>ge.includes(t.authType)));authTypeLabel(t){return he[t??""]??t??"unknown"}canSave=rT(()=>this.associationLoaded()&&!this.isLoading()&&!this.isSaving()&&this.repositoryUrl().trim().length>0&&this.serviceAuthSettingId().length>0);checkoutStatus=rT(()=>this.association()?.checkoutStatus??null);CheckoutStatus=Be;ngOnInit(){this.namespaceId=this.route.snapshot.paramMap.get("namespaceId")??"",this.load();}retryLoad(){this.isLoading()||this.isSaving()||this.load();}load(){this.isLoading.set(true),this.associationLoaded.set(false),this.errorMessage.set(null),by({association:this.gitApi.getAssociationNamespaceGit(this.namespaceId),authSettings:this.authSettingState.loadNamespaceSettings(this.namespaceId)}).pipe(U(this.destroyRef)).subscribe({next:({association:t,authSettings:e})=>{this.authSettings.set(e??[]),this.acceptAssociation(t),this.isLoading.set(false);},error:t=>{console.error("Failed to load the Git repository settings",t),this.errorMessage.set(this.messageOf(t)),this.isLoading.set(false);}});}acceptAssociation(t){this.association.set(t);let e=t?.associated===false||t?.associated===true&&typeof t.repositoryUrl=="string"&&typeof t.mainBranch=="string"&&typeof t.serviceAuthSettingId=="string"&&typeof t.autoWorktreeForRootCases=="boolean"&&(t.setupCommand==null||typeof t.setupCommand=="string");this.associationLoaded.set(e),e?this.applyToForm(t):this.errorMessage.set("The repository settings could not be loaded completely. Retry before making changes.");}applyToForm(t){this.repositoryUrl.set(t.repositoryUrl??""),this.mainBranch.set(t.mainBranch??"main"),this.serviceAuthSettingId.set(t.serviceAuthSettingId??""),this.autoWorktree.set(t.autoWorktreeForRootCases??false),this.setupCommand.set(t.setupCommand??"");}save(){this.canSave()&&(this.isSaving.set(true),this.errorMessage.set(null),this.gitApi.setAssociationNamespaceGit(this.namespaceId,{repositoryUrl:this.repositoryUrl().trim(),mainBranch:this.mainBranch().trim()||void 0,serviceAuthSettingId:this.serviceAuthSettingId(),autoWorktreeForRootCases:this.autoWorktree(),setupCommand:this.setupCommand().trim()||void 0}).pipe(U(this.destroyRef),ha(t=>(console.error("Failed to save the Git association",t),this.errorMessage.set(this.messageOf(t)),this.isSaving.set(false),br(null)))).subscribe(t=>{t&&this.acceptAssociation(t),this.isSaving.set(false);}));}remove(){!this.associationLoaded()||this.isLoading()||this.isSaving()||!this.isAssociated()||this.confirmingRemove.set(true);}confirmRemove(){this.confirmingRemove.set(false),!(!this.associationLoaded()||this.isLoading()||this.isSaving()||!this.isAssociated())&&(this.isSaving.set(true),this.gitApi.removeAssociationNamespaceGit(this.namespaceId).pipe(U(this.destroyRef),ha(t=>(console.error("Failed to remove the Git association",t),this.errorMessage.set(this.messageOf(t)),this.isSaving.set(false),br(null)))).subscribe(t=>{t&&this.acceptAssociation(t),this.isSaving.set(false);}));}messageOf(t){return t.error?.message??t.message??"Unexpected error"}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=vw({type:i,selectors:[["agentos-namespace-git"]],decls:5,vars:2,consts:[["title","Git repository","description","Associating a repository enables Git workspaces for this namespace. When worktree creation is enabled, the new-case form offers a worktree, and a case created with one gets a repo/ directory shared by its sub-cases. Namespace files remain shared documents outside Git. Agents create branches and pull requests in their workflows."],[1,"ds-hint"],["title","Remove the repository association?","message","Existing workspaces keep their worktree.","confirmLabel","Remove","cancelLabel","Cancel",3,"confirmed","cancelled","open"],[3,"tone"],["legend","Repository",3,"disabled"],["label","Repository URL","controlId","git-url","hint","HTTPS only, without credentials in the URL."],["dsControl","","id","git-url","type","url","placeholder","https://forge.example/org/project.git","name","repositoryUrl",3,"ngModelChange","ngModel"],["label","Main branch","controlId","git-branch","hint","New worktrees start at this branch\u2019s commit, without creating a branch."],["dsControl","","id","git-branch","type","text","placeholder","main","name","mainBranch",3,"ngModelChange","ngModel"],["label","Service account","controlId","git-auth","hint","Shared by the namespace. Every Git operation uses this identity, never the identity of whoever opened the case."],["dsControl","","id","git-auth","name","serviceAuthSettingId",3,"ngModelChange","ngModel"],["value",""],[3,"value"],[1,"ds-hint","ds-hint--warning"],["legend","Automation",3,"disabled"],[1,"ds-stack","ds-stack--sm"],["dsCheck",""],["type","checkbox","name","autoWorktree",3,"ngModelChange","ngModel"],[1,"ds-hint","ds-indent"],["label","Setup command (optional)","controlId","git-setup"],["dsControl","","mono","","id","git-setup","type","text","placeholder","pnpm install --ignore-scripts","name","setupCommand",3,"ngModelChange","ngModel"],["id","git-save","dsButton","","variant","primary","type","button",3,"click","disabled"],["id","git-remove","dsButton","","variant","danger","type","button",3,"disabled"],["id","git-retry","dsButton","","type","button",3,"click"],["id","git-remove","dsButton","","variant","danger","type","button",3,"click","disabled"]],template:function(e,c){e&1&&(Es(0,"ds-page"),fg(1,"ds-section-header",0),jw(2,ae,2,0,"p",1)(3,ue,30,14),hl(),Es(4,"ds-confirm-dialog",2),vg("confirmed",function(){return c.confirmRemove()})("cancelled",function(){return c.confirmingRemove.set(false)}),hl()),e&2&&(BE(2),Bw(c.isLoading()?2:3),BE(2),dg("open",c.confirmingRemove()));},dependencies:[id,bo,xo,Lt,vn,Gt,mo,da,Ni,pn,hn,cn,ln,dn,mn,at,an,rn],encapsulation:2})};
2
+ export{ne as NamespaceGitComponent};