@whoz-oss/coday-client 0.0.0-workstream-forge.191 → 0.0.0-workstream-forge.192

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 (52) hide show
  1. package/browser/{chunk-HWYklY9Y.js → chunk--VyjHrUp.js} +1 -1
  2. package/browser/{chunk-B8gZd06m.js → chunk-0YfE5-kT.js} +1 -1
  3. package/browser/{chunk-Ci2-XlfX.js → chunk-B052E4S9.js} +1 -1
  4. package/browser/{chunk-CBHveUVj.js → chunk-B4pjzcnE.js} +1 -1
  5. package/browser/{chunk-BF3aTFQQ.js → chunk-B5r0Ox2C.js} +1 -1
  6. package/browser/{chunk-B7eWI7Zr.js → chunk-B7Z6Fs_y.js} +1 -1
  7. package/browser/chunk-B9yU35Nk.js +1 -0
  8. package/browser/{chunk-tLpw_W95.js → chunk-BHPHI0CD.js} +1 -1
  9. package/browser/{chunk-DrI2_shF.js → chunk-BPqGvT9i.js} +1 -1
  10. package/browser/{chunk-Vta7ij-9.js → chunk-B_ZxS-MH.js} +1 -1
  11. package/browser/{chunk-CQW6NOzi.js → chunk-BcvTRNsL.js} +1 -1
  12. package/browser/{chunk-Bzw_C04G.js → chunk-Be7bG7wk.js} +1 -1
  13. package/browser/{chunk-xja3qXp8.js → chunk-Be8uKTOv.js} +1 -1
  14. package/browser/{chunk-Cwi9llFN.js → chunk-BiBg7n7T.js} +1 -1
  15. package/browser/{chunk-DANdX1yy.js → chunk-BkV7capF.js} +1 -1
  16. package/browser/{chunk-CfD3HGXo.js → chunk-Br8JIJN0.js} +1 -1
  17. package/browser/{chunk-CnKnePkA.js → chunk-Bz5WsPSf.js} +1 -1
  18. package/browser/{chunk-CZYx16vp.js → chunk-C6AKubE2.js} +1 -1
  19. package/browser/chunk-CLMvgpVE.js +2 -0
  20. package/browser/{chunk-Lci8wPPS.js → chunk-CP0b8UfM.js} +1 -1
  21. package/browser/{chunk-DWOY0gxS.js → chunk-Cdekc_Ja.js} +1 -1
  22. package/browser/{chunk-CV4FMBa3.js → chunk-Cey2E8TJ.js} +1 -1
  23. package/browser/{chunk-CrsIVVty.js → chunk-CguUhMWM.js} +1 -1
  24. package/browser/{chunk-D4o3ka54.js → chunk-CjFeVJkb.js} +4 -4
  25. package/browser/{chunk-B_DnrO-0.js → chunk-Cl3998Mk.js} +1 -1
  26. package/browser/{chunk-Cr-m-DUQ.js → chunk-ClVt9_if.js} +1 -1
  27. package/browser/{chunk-BwweTrAH.js → chunk-CqRBMgH9.js} +1 -1
  28. package/browser/{chunk-CNe6qAwH.js → chunk-Cr96_gIP.js} +1 -1
  29. package/browser/{chunk-BZB-03U8.js → chunk-D07YF5zj.js} +1 -1
  30. package/browser/{chunk-CX6B6mwz.js → chunk-DARZ_scT.js} +1 -1
  31. package/browser/{chunk-WUo009Q1.js → chunk-DJCz1B1Q.js} +1 -1
  32. package/browser/{chunk-BtpzNdsI.js → chunk-DRgK95mJ.js} +1 -1
  33. package/browser/{chunk-B-0eqDVC.js → chunk-DU0kWx3S.js} +1 -1
  34. package/browser/{chunk-Di55x0db.js → chunk-DWnVusRc.js} +1 -1
  35. package/browser/{chunk-DG0wdTeu.js → chunk-Dc7NzS2s.js} +1 -1
  36. package/browser/{chunk-Dc9kDlHF.js → chunk-DeGiN5aU.js} +1 -1
  37. package/browser/{chunk-Gq6laqL9.js → chunk-DerKZkDh.js} +1 -1
  38. package/browser/{chunk-Fr6dNv8n.js → chunk-Dhsi7_nc.js} +1 -1
  39. package/browser/{chunk-Dr7W2c2P.js → chunk-IbTNsAkg.js} +1 -1
  40. package/browser/{chunk-BMt2ALZR.js → chunk-MSmole4c.js} +1 -1
  41. package/browser/{chunk-D2dCpjo-.js → chunk-P7UNXBbe.js} +1 -1
  42. package/browser/{chunk-czXM-rgq.js → chunk-TtcxIE4U.js} +1 -1
  43. package/browser/{chunk-C897P5sK.js → chunk-WNMc2f98.js} +1 -1
  44. package/browser/{chunk-c5Q5WhPc.js → chunk-dSs6kurh.js} +1 -1
  45. package/browser/{chunk-BkZnLOTd.js → chunk-noWW3hAs.js} +1 -1
  46. package/browser/{chunk-CHMphNyx.js → chunk-xZ2iK4io.js} +1 -1
  47. package/browser/index.html +1 -1
  48. package/browser/main-SQW6H4KH.js +1253 -0
  49. package/package.json +1 -1
  50. package/browser/chunk-CO007ibK.js +0 -1
  51. package/browser/chunk-Wu5s8Pe-.js +0 -2
  52. package/browser/main-AK4FQCWG.js +0 -1253
@@ -1 +1 @@
1
- import {c as pn,h as hn,o as on,C as mn,g as at,q as sn,K as Oi,M as On}from'./chunk-D4o3ka54.js';import {g,W as W$1,F,I as Ie,ag as U,U as Ui,K as KC,C as U$1,m as mw,au as $t,D as Ds,Q as mg,M as MC,a as pl,P as Pw,j as jE,N as ug,L as Lw,k as Xw,O as Og,S as Sg,v as vl,V as Vw,H as Hw,q as qw,l as lg,av as $C,aw as GC,n as df,o as ff,ax as ZD}from'./main-AK4FQCWG.js';var j=(t,n)=>n.id,z=(t,n)=>n.name;function q(t,n){t&1&&(Ds(0,"p",3),MC(1,"Loading\u2026"),pl());}function Q(t,n){t&1&&(Ds(0,"ds-notice"),MC(1,"Failed to load agent definition."),pl());}function W(t,n){if(t&1&&(Ds(0,"dt"),MC(1,"User context"),pl(),Ds(2,"dd",6),MC(3),pl()),t&2){let e=Xw();jE(3),Og(e.userId);}}function X(t,n){if(t&1){let e=qw();Ds(0,"ds-card")(1,"ds-disclosure",12),mg("toggled",function(){df(e);let m=Xw(2);return ff(m.toggleSystemPrompt())}),Ds(2,"pre",13),MC(3),pl()()();}if(t&2){let e=Xw(),r=Xw();jE(),ug("open",!r.systemPromptCollapsed()),jE(2),Og(e.systemPrompt);}}function Y(t,n){if(t&1){let e=qw();Ds(0,"ds-card")(1,"ds-disclosure",14),mg("toggled",function(){df(e);let m=Xw(2);return ff(m.toggleInstructions())}),Ds(2,"pre",13),MC(3),pl()()();}if(t&2){let e=Xw(),r=Xw();jE(),ug("open",!r.instructionsCollapsed()),jE(2),Og(e.instructions);}}function Z(t,n){t&1&&(Ds(0,"p",3),MC(1," This agent declares no skill, so it gets no skill tools. Attach skills from the edit form. "),pl());}function ee(t,n){t&1&&(Ds(0,"span",17),MC(1,"platform"),pl());}function te(t,n){t&1&&(Ds(0,"span",17),MC(1,"SKILL.md"),pl());}function ne(t,n){if(t&1&&(Ds(0,"li",15)(1,"span")(2,"span",16),MC(3),pl(),Pw(4,ee,2,0,"span",17),Pw(5,te,2,0,"span",17),pl(),Ds(6,"p",3),MC(7),pl()()),t&2){let e=n.$implicit;jE(3),Og(e.name),jE(),Lw(e.namespaceId?-1:4),jE(),Lw(e.readOnly?5:-1),jE(2),Og(e.description);}}function ie(t,n){if(t&1&&(Ds(0,"ul",11),Vw(1,ne,8,4,"li",15,j),pl()),t&2){let e=Xw(2);jE(),Hw(e.resolvedSkills());}}function oe(t,n){t&1&&(Ds(0,"p",3),MC(1,"No tools available for this agent."),pl());}function ae(t,n){if(t&1&&(lg(0,"div",19),$C(1,"agentosMarkdown")),t&2){let e=Xw().$implicit;ug("innerHTML",GC(1,1,e.description),ZD);}}function de(t,n){if(t&1){let e=qw();Ds(0,"li")(1,"ds-disclosure",18),mg("toggled",function(){let m=df(e).$implicit,U=Xw(3);return ff(U.toggleTool(m))}),Pw(2,ae,2,3,"div",19),Ds(3,"pre",20),MC(4),pl()()();}if(t&2){let e=n.$implicit,r=Xw(3);jE(),ug("heading",e.name)("open",r.isToolExpanded(e)),jE(),Lw(e.description?2:-1),jE(2),Og(r.formatSchema(e.inputSchema));}}function re(t,n){if(t&1&&(Ds(0,"ul",11),Vw(1,de,5,4,"li",null,z),pl()),t&2){let e=Xw();jE(),Hw(e.tools);}}function se(t,n){if(t&1&&(Ds(0,"ds-card",4)(1,"dl",5)(2,"dt"),MC(3,"Name"),pl(),Ds(4,"dd"),MC(5),pl(),Ds(6,"dt"),MC(7,"Resolved model"),pl(),Ds(8,"dd",6),MC(9),pl(),Ds(10,"dt"),MC(11,"Provider"),pl(),Ds(12,"dd"),MC(13),pl(),Ds(14,"dt",7),MC(15,"Execution mode"),pl(),Ds(16,"dd",8)(17,"span",9),MC(18),pl()(),Pw(19,W,4,1),pl()(),Pw(20,X,4,2,"ds-card"),Pw(21,Y,4,2,"ds-card"),Ds(22,"ds-card",10),Pw(23,Z,2,0,"p",3)(24,ie,3,0,"ul",11),pl(),Ds(25,"ds-card",10),Pw(26,oe,2,0,"p",3)(27,re,3,0,"ul",11),pl()),t&2){let e=n,r=Xw();jE(5),Og(e.name),jE(4),Og(e.resolvedModelApiName),jE(4),Og(e.resolvedProviderName),jE(4),Sg("agent-config-inspect__badge--active",e.executionMode!=="SIMPLE"),jE(),vl(" ",e.executionMode," "),jE(),Lw(e.userId?19:-1),jE(),Lw(e.systemPrompt?20:-1),jE(),Lw(e.instructions?21:-1),jE(),ug("heading","Skills ("+r.resolvedSkills().length+")"),jE(),Lw(r.resolvedSkills().length===0?23:24),jE(2),ug("heading","Tools ("+e.tools.length+")"),jE(),Lw(e.tools.length===0?26:27);}}var K=class t{route=g(W$1);router=g(F);destroyRef=g(Ie);agentConfigController=g(U);namespaceId=this.route.snapshot.params.namespaceId;agentConfigId=this.route.snapshot.params.agentConfigId;isPlatformMode=!this.namespaceId;isLoading=Ui(true);hasError=Ui(false);definition=Ui(null);expandedTools=Ui(new Set);resolvedSkills=KC(()=>this.definition()?.skills??[]);systemPromptCollapsed=Ui(true);instructionsCollapsed=Ui(true);ngOnInit(){this.agentConfigController.getDefinitionAgentConfig(this.agentConfigId).pipe(U$1(this.destroyRef)).subscribe({next:n=>{this.definition.set(n),this.isLoading.set(false);},error:()=>{this.hasError.set(true),this.isLoading.set(false);}});}toggleTool(n){this.expandedTools.update(e=>{let r=new Set(e);return r.has(n.name)?r.delete(n.name):r.add(n.name),r});}isToolExpanded(n){return this.expandedTools().has(n.name)}toggleSystemPrompt(){this.systemPromptCollapsed.update(n=>!n);}toggleInstructions(){this.instructionsCollapsed.update(n=>!n);}formatSchema(n){try{return JSON.stringify(JSON.parse(n),null,2)}catch(e){return n}}editRoute(){return this.isPlatformMode?["/agentos","admin","agent-configs",this.agentConfigId,"edit"]:["/agentos",this.namespaceId,"agent-configs",this.agentConfigId,"edit"]}back(){this.isPlatformMode?this.router.navigate(["/agentos","admin","agent-configs"]):this.router.navigate(["/agentos",this.namespaceId,"agent-configs"]);}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=mw({type:t,selectors:[["agentos-agent-config-inspect"]],decls:9,vars:2,consts:[["title","Agent definition"],["dsButton","","variant","ghost","type","button","title","Back to agent configs",3,"click"],["headerMeta","",1,"ds-link",3,"routerLink"],[1,"ds-hint"],["heading","General"],["dsDefinitionList",""],[1,"ds-mono"],[1,"agent-config-inspect__dt"],[1,"agent-config-inspect__dd"],[1,"agent-config-inspect__badge"],[3,"heading"],[1,"ds-list"],["heading","System Prompt",3,"toggled","open"],[1,"ds-pre","ds-pre--prose"],["heading","Instructions",3,"toggled","open"],[1,"ds-stack","ds-stack--sm"],[1,"ds-strong"],[1,"ds-meta"],["bordered","","mono","",3,"toggled","heading","open"],[1,"ds-prose","ds-hint",3,"innerHTML"],[1,"ds-pre"]],template:function(e,r){if(e&1&&(Ds(0,"ds-page")(1,"ds-section-header",0)(2,"button",1),mg("click",function(){return r.back()}),MC(3," \u2190 Agent configs "),pl(),Ds(4,"a",2),MC(5,"Edit config \u2192"),pl()(),Pw(6,q,2,0,"p",3)(7,Q,2,0,"ds-notice")(8,se,28,13),pl()),e&2){let m;jE(4),ug("routerLink",r.editRoute()),jE(2),Lw(r.isLoading()?6:r.hasError()?7:(m=r.definition())?8:-1,m);}},dependencies:[$t,pn,hn,on,mn,at,sn,Oi,On],encapsulation:2})};export{K as AgentConfigInspectComponent};
1
+ import {c as pn,h as hn,o as on,C as mn,g as at,q as sn,K as Oi,M as On}from'./chunk-CjFeVJkb.js';import {g,W as W$1,F,I as Ie,ag as U,U as Ui,K as KC,E as U$1,m as mw,au as $t,D as Ds,R as mg,M as MC,a as pl,P as Pw,j as jE,Q as ug,L as Lw,X as Xw,O as Og,S as Sg,v as vl,i as Vw,H as Hw,q as qw,l as lg,av as $C,aw as GC,r as df,s as ff,ax as ZD}from'./main-SQW6H4KH.js';var j=(t,n)=>n.id,z=(t,n)=>n.name;function q(t,n){t&1&&(Ds(0,"p",3),MC(1,"Loading\u2026"),pl());}function Q(t,n){t&1&&(Ds(0,"ds-notice"),MC(1,"Failed to load agent definition."),pl());}function W(t,n){if(t&1&&(Ds(0,"dt"),MC(1,"User context"),pl(),Ds(2,"dd",6),MC(3),pl()),t&2){let e=Xw();jE(3),Og(e.userId);}}function X(t,n){if(t&1){let e=qw();Ds(0,"ds-card")(1,"ds-disclosure",12),mg("toggled",function(){df(e);let m=Xw(2);return ff(m.toggleSystemPrompt())}),Ds(2,"pre",13),MC(3),pl()()();}if(t&2){let e=Xw(),r=Xw();jE(),ug("open",!r.systemPromptCollapsed()),jE(2),Og(e.systemPrompt);}}function Y(t,n){if(t&1){let e=qw();Ds(0,"ds-card")(1,"ds-disclosure",14),mg("toggled",function(){df(e);let m=Xw(2);return ff(m.toggleInstructions())}),Ds(2,"pre",13),MC(3),pl()()();}if(t&2){let e=Xw(),r=Xw();jE(),ug("open",!r.instructionsCollapsed()),jE(2),Og(e.instructions);}}function Z(t,n){t&1&&(Ds(0,"p",3),MC(1," This agent declares no skill, so it gets no skill tools. Attach skills from the edit form. "),pl());}function ee(t,n){t&1&&(Ds(0,"span",17),MC(1,"platform"),pl());}function te(t,n){t&1&&(Ds(0,"span",17),MC(1,"SKILL.md"),pl());}function ne(t,n){if(t&1&&(Ds(0,"li",15)(1,"span")(2,"span",16),MC(3),pl(),Pw(4,ee,2,0,"span",17),Pw(5,te,2,0,"span",17),pl(),Ds(6,"p",3),MC(7),pl()()),t&2){let e=n.$implicit;jE(3),Og(e.name),jE(),Lw(e.namespaceId?-1:4),jE(),Lw(e.readOnly?5:-1),jE(2),Og(e.description);}}function ie(t,n){if(t&1&&(Ds(0,"ul",11),Vw(1,ne,8,4,"li",15,j),pl()),t&2){let e=Xw(2);jE(),Hw(e.resolvedSkills());}}function oe(t,n){t&1&&(Ds(0,"p",3),MC(1,"No tools available for this agent."),pl());}function ae(t,n){if(t&1&&(lg(0,"div",19),$C(1,"agentosMarkdown")),t&2){let e=Xw().$implicit;ug("innerHTML",GC(1,1,e.description),ZD);}}function de(t,n){if(t&1){let e=qw();Ds(0,"li")(1,"ds-disclosure",18),mg("toggled",function(){let m=df(e).$implicit,U=Xw(3);return ff(U.toggleTool(m))}),Pw(2,ae,2,3,"div",19),Ds(3,"pre",20),MC(4),pl()()();}if(t&2){let e=n.$implicit,r=Xw(3);jE(),ug("heading",e.name)("open",r.isToolExpanded(e)),jE(),Lw(e.description?2:-1),jE(2),Og(r.formatSchema(e.inputSchema));}}function re(t,n){if(t&1&&(Ds(0,"ul",11),Vw(1,de,5,4,"li",null,z),pl()),t&2){let e=Xw();jE(),Hw(e.tools);}}function se(t,n){if(t&1&&(Ds(0,"ds-card",4)(1,"dl",5)(2,"dt"),MC(3,"Name"),pl(),Ds(4,"dd"),MC(5),pl(),Ds(6,"dt"),MC(7,"Resolved model"),pl(),Ds(8,"dd",6),MC(9),pl(),Ds(10,"dt"),MC(11,"Provider"),pl(),Ds(12,"dd"),MC(13),pl(),Ds(14,"dt",7),MC(15,"Execution mode"),pl(),Ds(16,"dd",8)(17,"span",9),MC(18),pl()(),Pw(19,W,4,1),pl()(),Pw(20,X,4,2,"ds-card"),Pw(21,Y,4,2,"ds-card"),Ds(22,"ds-card",10),Pw(23,Z,2,0,"p",3)(24,ie,3,0,"ul",11),pl(),Ds(25,"ds-card",10),Pw(26,oe,2,0,"p",3)(27,re,3,0,"ul",11),pl()),t&2){let e=n,r=Xw();jE(5),Og(e.name),jE(4),Og(e.resolvedModelApiName),jE(4),Og(e.resolvedProviderName),jE(4),Sg("agent-config-inspect__badge--active",e.executionMode!=="SIMPLE"),jE(),vl(" ",e.executionMode," "),jE(),Lw(e.userId?19:-1),jE(),Lw(e.systemPrompt?20:-1),jE(),Lw(e.instructions?21:-1),jE(),ug("heading","Skills ("+r.resolvedSkills().length+")"),jE(),Lw(r.resolvedSkills().length===0?23:24),jE(2),ug("heading","Tools ("+e.tools.length+")"),jE(),Lw(e.tools.length===0?26:27);}}var K=class t{route=g(W$1);router=g(F);destroyRef=g(Ie);agentConfigController=g(U);namespaceId=this.route.snapshot.params.namespaceId;agentConfigId=this.route.snapshot.params.agentConfigId;isPlatformMode=!this.namespaceId;isLoading=Ui(true);hasError=Ui(false);definition=Ui(null);expandedTools=Ui(new Set);resolvedSkills=KC(()=>this.definition()?.skills??[]);systemPromptCollapsed=Ui(true);instructionsCollapsed=Ui(true);ngOnInit(){this.agentConfigController.getDefinitionAgentConfig(this.agentConfigId).pipe(U$1(this.destroyRef)).subscribe({next:n=>{this.definition.set(n),this.isLoading.set(false);},error:()=>{this.hasError.set(true),this.isLoading.set(false);}});}toggleTool(n){this.expandedTools.update(e=>{let r=new Set(e);return r.has(n.name)?r.delete(n.name):r.add(n.name),r});}isToolExpanded(n){return this.expandedTools().has(n.name)}toggleSystemPrompt(){this.systemPromptCollapsed.update(n=>!n);}toggleInstructions(){this.instructionsCollapsed.update(n=>!n);}formatSchema(n){try{return JSON.stringify(JSON.parse(n),null,2)}catch(e){return n}}editRoute(){return this.isPlatformMode?["/agentos","admin","agent-configs",this.agentConfigId,"edit"]:["/agentos",this.namespaceId,"agent-configs",this.agentConfigId,"edit"]}back(){this.isPlatformMode?this.router.navigate(["/agentos","admin","agent-configs"]):this.router.navigate(["/agentos",this.namespaceId,"agent-configs"]);}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=mw({type:t,selectors:[["agentos-agent-config-inspect"]],decls:9,vars:2,consts:[["title","Agent definition"],["dsButton","","variant","ghost","type","button","title","Back to agent configs",3,"click"],["headerMeta","",1,"ds-link",3,"routerLink"],[1,"ds-hint"],["heading","General"],["dsDefinitionList",""],[1,"ds-mono"],[1,"agent-config-inspect__dt"],[1,"agent-config-inspect__dd"],[1,"agent-config-inspect__badge"],[3,"heading"],[1,"ds-list"],["heading","System Prompt",3,"toggled","open"],[1,"ds-pre","ds-pre--prose"],["heading","Instructions",3,"toggled","open"],[1,"ds-stack","ds-stack--sm"],[1,"ds-strong"],[1,"ds-meta"],["bordered","","mono","",3,"toggled","heading","open"],[1,"ds-prose","ds-hint",3,"innerHTML"],[1,"ds-pre"]],template:function(e,r){if(e&1&&(Ds(0,"ds-page")(1,"ds-section-header",0)(2,"button",1),mg("click",function(){return r.back()}),MC(3," \u2190 Agent configs "),pl(),Ds(4,"a",2),MC(5,"Edit config \u2192"),pl()(),Pw(6,q,2,0,"p",3)(7,Q,2,0,"ds-notice")(8,se,28,13),pl()),e&2){let m;jE(4),ug("routerLink",r.editRoute()),jE(2),Lw(r.isLoading()?6:r.hasError()?7:(m=r.definition())?8:-1,m);}},dependencies:[$t,pn,hn,on,mn,at,sn,Oi,On],encapsulation:2})};export{K as AgentConfigInspectComponent};
@@ -1 +1 @@
1
- import {e}from'./chunk-C6dIhkYp.js';import {n}from'./chunk-CfgXrte_.js';import {v}from'./chunk-CrsIVVty.js';import {O}from'./chunk-c5Q5WhPc.js';import {g,W as W$1,F,I as Ie,J,U as Ui,C as U$1,ad as ne$1,a1 as fa,aa as Cr,m as mw,D as Ds,Q as mg,a as pl,M as MC,P as Pw,N as ug,j as jE,L as Lw,k as Xw,O as Og,V as Vw,H as Hw,v as vl,q as qw,e as cg,n as df,o as ff}from'./main-AK4FQCWG.js';import {z as k,O as O$1,g as at,h as hn,I as Io,j as ko,P,B as P$1}from'./chunk-D4o3ka54.js';import'./chunk-CO007ibK.js';var Q=(n,e)=>e.key;function W(n,e){if(n&1&&(Ds(0,"p",3),MC(1),pl()),n&2){let t=Xw();jE(),Og(t.deletion.error());}}function X(n,e){n&1&&(Ds(0,"p",4),MC(1,"Loading integrations\u2026"),pl());}function Z(n,e){n&1&&(Ds(0,"p",5),MC(1,"No integrations available."),pl());}function ee(n,e){n&1&&(Ds(0,"p",4),MC(1,"No integrations match the current filter."),pl());}function te(n,e){n&1&&(Ds(0,"ds-tag",20),MC(1,"YAML"),pl(),Ds(2,"ds-tag",21),MC(3,"Read-only"),pl());}function ne(n,e){if(n&1){let t=qw();Ds(0,"button",22),mg("click",function(){df(t);let s=Xw().$implicit,c=Xw(2);return ff(c.view(s))}),MC(1,"View"),pl();}if(n&2){let t=Xw().$implicit;cg("aria-label","View "+t.config.name);}}function ie(n,e){if(n&1){let t=qw();Ds(0,"button",22),mg("click",function(){df(t);let s=Xw(3).$implicit,c=Xw(2);return ff(c.edit(s))}),MC(1," Edit "),pl();}if(n&2){let t=Xw(3).$implicit;cg("aria-label","Edit "+t.config.name);}}function oe(n,e){if(n&1){let t=qw();Ds(0,"button",22),mg("click",function(){df(t);let s=Xw(2).$implicit,c=Xw(2);return ff(c.duplicate(s))}),MC(1," Duplicate "),pl(),Pw(2,ie,2,1,"button",19);}if(n&2){let t=Xw(2).$implicit;cg("aria-label","Duplicate "+t.config.name),jE(2),Lw(t.canEdit?2:-1);}}function ae(n,e){if(n&1){let t=qw();Ds(0,"agentos-row-delete-action",25),mg("deleteRequested",function(){df(t);let s=Xw(2).$implicit,c=Xw(2);return ff(c.deletion.request(s.key))})("deleteConfirmed",function(){df(t);let s=Xw(2).$implicit,c=Xw(2);return ff(c.confirmDelete(s))})("deleteCancelled",function(){df(t);let s=Xw(4);return ff(s.deletion.cancel())}),pl();}if(n&2){let t=Xw(2).$implicit,a=Xw(2);ug("rowKey",t.key)("rowLabel",t.config.name)("state",a.deletion);}}function re(n,e){n&1&&(Ds(0,"button",24),MC(1,"Inherited"),pl());}function le(n,e){if(n&1&&(Pw(0,oe,3,2),Pw(1,ae,1,3,"agentos-row-delete-action",23),Pw(2,re,2,0,"button",24)),n&2){let t=Xw().$implicit,a=Xw(2);Lw(a.deletion.confirmingId()!==t.key?0:-1),jE(),Lw(t.canDelete?1:-1),jE(),Lw(!t.canEdit&&!t.canDelete?2:-1);}}function se(n,e){if(n&1&&(Ds(0,"tr",9)(1,"td",12),MC(2),pl(),Ds(3,"td",13),MC(4),pl(),Ds(5,"td",14)(6,"div",15)(7,"ds-tag",16),MC(8),pl(),Pw(9,te,4,0),pl()(),Ds(10,"td",17)(11,"div",18),Pw(12,ne,2,1,"button",19)(13,le,3,3),pl()()()),n&2){let t=e.$implicit;jE(2),Og(t.config.name),jE(2),vl(" ",t.config.integrationType," "),jE(3),ug("variant",t.scopeLabel==="Platform"?"neutral":t.scopeLabel==="Personal"?"outline":"accent"),jE(),vl(" ",t.scopeLabel," "),jE(),Lw(t.source==="FILESYSTEM"?9:-1),jE(3),Lw(t.source==="FILESYSTEM"?12:13);}}function ce(n,e){if(n&1&&(Ds(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),MC(5,"Name"),pl(),Ds(6,"th",10),MC(7,"Type"),pl(),Ds(8,"th",10),MC(9,"Scope"),pl(),Ds(10,"th",10)(11,"span",11),MC(12,"Actions"),pl()()()(),Ds(13,"tbody",8),Vw(14,se,14,6,"tr",9,Q),pl()()()),n&2){let t=Xw();jE(14),Hw(t.rowFilter.filteredRows());}}var U=class n$1{route=g(W$1);router=g(F);destroyRef=g(Ie);state=g(O);namespaceRole=g(v);namespaceApi=g(J);namespaceId=this.route.snapshot.params.namespaceId;namespaceName=Ui("this namespace");isAdmin=Ui(false);isLoading=Ui(true);rows=Ui([]);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")??""),fa(e=>e?this.namespaceRole.isAdminOfNamespace$(e):Cr(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=mw({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&&(Ds(0,"ds-section-header",0)(1,"agentos-table-filter",1),mg("queryChange",function(c){return a.rowFilter.query.set(c)}),pl(),Ds(2,"button",2),mg("click",function(){return a.openCreateForm()}),MC(3,"New integration"),pl()(),Pw(4,W,2,1,"p",3),Pw(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&&(ug("description","Integrations for "+a.namespaceName()+", including entries inherited from the platform."),jE(),ug("query",a.rowFilter.query()),jE(3),Lw(a.deletion.error()?4:-1),jE(),Lw(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};
1
+ import {e}from'./chunk-C6dIhkYp.js';import {n}from'./chunk-CfgXrte_.js';import {v}from'./chunk-CguUhMWM.js';import {O}from'./chunk-dSs6kurh.js';import {g,W as W$1,F,I as Ie,J,U as Ui,E as U$1,ad as ne$1,a1 as fa,aa as Cr,m as mw,D as Ds,R as mg,a as pl,M as MC,P as Pw,Q as ug,j as jE,L as Lw,X as Xw,O as Og,i as Vw,H as Hw,v as vl,q as qw,f as cg,r as df,s as ff}from'./main-SQW6H4KH.js';import {z as k,O as O$1,g as at,h as hn,I as Io,j as ko,P,B as P$1}from'./chunk-CjFeVJkb.js';import'./chunk-B9yU35Nk.js';var Q=(n,e)=>e.key;function W(n,e){if(n&1&&(Ds(0,"p",3),MC(1),pl()),n&2){let t=Xw();jE(),Og(t.deletion.error());}}function X(n,e){n&1&&(Ds(0,"p",4),MC(1,"Loading integrations\u2026"),pl());}function Z(n,e){n&1&&(Ds(0,"p",5),MC(1,"No integrations available."),pl());}function ee(n,e){n&1&&(Ds(0,"p",4),MC(1,"No integrations match the current filter."),pl());}function te(n,e){n&1&&(Ds(0,"ds-tag",20),MC(1,"YAML"),pl(),Ds(2,"ds-tag",21),MC(3,"Read-only"),pl());}function ne(n,e){if(n&1){let t=qw();Ds(0,"button",22),mg("click",function(){df(t);let s=Xw().$implicit,c=Xw(2);return ff(c.view(s))}),MC(1,"View"),pl();}if(n&2){let t=Xw().$implicit;cg("aria-label","View "+t.config.name);}}function ie(n,e){if(n&1){let t=qw();Ds(0,"button",22),mg("click",function(){df(t);let s=Xw(3).$implicit,c=Xw(2);return ff(c.edit(s))}),MC(1," Edit "),pl();}if(n&2){let t=Xw(3).$implicit;cg("aria-label","Edit "+t.config.name);}}function oe(n,e){if(n&1){let t=qw();Ds(0,"button",22),mg("click",function(){df(t);let s=Xw(2).$implicit,c=Xw(2);return ff(c.duplicate(s))}),MC(1," Duplicate "),pl(),Pw(2,ie,2,1,"button",19);}if(n&2){let t=Xw(2).$implicit;cg("aria-label","Duplicate "+t.config.name),jE(2),Lw(t.canEdit?2:-1);}}function ae(n,e){if(n&1){let t=qw();Ds(0,"agentos-row-delete-action",25),mg("deleteRequested",function(){df(t);let s=Xw(2).$implicit,c=Xw(2);return ff(c.deletion.request(s.key))})("deleteConfirmed",function(){df(t);let s=Xw(2).$implicit,c=Xw(2);return ff(c.confirmDelete(s))})("deleteCancelled",function(){df(t);let s=Xw(4);return ff(s.deletion.cancel())}),pl();}if(n&2){let t=Xw(2).$implicit,a=Xw(2);ug("rowKey",t.key)("rowLabel",t.config.name)("state",a.deletion);}}function re(n,e){n&1&&(Ds(0,"button",24),MC(1,"Inherited"),pl());}function le(n,e){if(n&1&&(Pw(0,oe,3,2),Pw(1,ae,1,3,"agentos-row-delete-action",23),Pw(2,re,2,0,"button",24)),n&2){let t=Xw().$implicit,a=Xw(2);Lw(a.deletion.confirmingId()!==t.key?0:-1),jE(),Lw(t.canDelete?1:-1),jE(),Lw(!t.canEdit&&!t.canDelete?2:-1);}}function se(n,e){if(n&1&&(Ds(0,"tr",9)(1,"td",12),MC(2),pl(),Ds(3,"td",13),MC(4),pl(),Ds(5,"td",14)(6,"div",15)(7,"ds-tag",16),MC(8),pl(),Pw(9,te,4,0),pl()(),Ds(10,"td",17)(11,"div",18),Pw(12,ne,2,1,"button",19)(13,le,3,3),pl()()()),n&2){let t=e.$implicit;jE(2),Og(t.config.name),jE(2),vl(" ",t.config.integrationType," "),jE(3),ug("variant",t.scopeLabel==="Platform"?"neutral":t.scopeLabel==="Personal"?"outline":"accent"),jE(),vl(" ",t.scopeLabel," "),jE(),Lw(t.source==="FILESYSTEM"?9:-1),jE(3),Lw(t.source==="FILESYSTEM"?12:13);}}function ce(n,e){if(n&1&&(Ds(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),MC(5,"Name"),pl(),Ds(6,"th",10),MC(7,"Type"),pl(),Ds(8,"th",10),MC(9,"Scope"),pl(),Ds(10,"th",10)(11,"span",11),MC(12,"Actions"),pl()()()(),Ds(13,"tbody",8),Vw(14,se,14,6,"tr",9,Q),pl()()()),n&2){let t=Xw();jE(14),Hw(t.rowFilter.filteredRows());}}var U=class n$1{route=g(W$1);router=g(F);destroyRef=g(Ie);state=g(O);namespaceRole=g(v);namespaceApi=g(J);namespaceId=this.route.snapshot.params.namespaceId;namespaceName=Ui("this namespace");isAdmin=Ui(false);isLoading=Ui(true);rows=Ui([]);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")??""),fa(e=>e?this.namespaceRole.isAdminOfNamespace$(e):Cr(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=mw({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&&(Ds(0,"ds-section-header",0)(1,"agentos-table-filter",1),mg("queryChange",function(c){return a.rowFilter.query.set(c)}),pl(),Ds(2,"button",2),mg("click",function(){return a.openCreateForm()}),MC(3,"New integration"),pl()(),Pw(4,W,2,1,"p",3),Pw(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&&(ug("description","Integrations for "+a.namespaceName()+", including entries inherited from the platform."),jE(),ug("query",a.rowFilter.query()),jE(3),Lw(a.deletion.error()?4:-1),jE(),Lw(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};
@@ -1,2 +1,2 @@
1
- import {I}from'./chunk-CfD3HGXo.js';import {g,W,aW as L,I as Ie,U as Ui,K as KC,aX as $e,ac as Ty,C as U,a2 as da,aa as Cr,m as mw,D as Ds,l as lg,P as Pw,a as pl,Q as mg,j as jE,L as Lw,N as ug,M as MC,q as qw,T as SI,V as Vw,k as Xw,Y as MI,H as Hw,v as vl,as as kg,n as df,o as ff,O as Og}from'./main-AK4FQCWG.js';import {a4 as id,l as bo,x as xo,L as Lt,u as vn,G as Gt,m as mo,a6 as da$1,aa as Ni,c as pn,h as hn,d as cn,r as ln,e as dn,C as mn,g as at,i as an,t as rn}from'./chunk-D4o3ka54.js';import'./chunk-CO007ibK.js';var oe=(i,t)=>t.id;function ae(i,t){i&1&&(Ds(0,"p",1),MC(1,"Loading\u2026"),pl());}function se(i,t){if(i&1&&(Ds(0,"ds-notice"),MC(1),pl()),i&2){let e=Xw(2);jE(),Og(e.errorMessage());}}function re(i,t){if(i&1){let e=qw();Ds(0,"div")(1,"button",23),mg("click",function(){df(e);let s=Xw(2);return ff(s.retryLoad())}),MC(2,"Retry loading"),pl()();}}function ce(i,t){if(i&1&&(lg(0,"br"),MC(1)),i&2){let e=Xw(3);jE(),vl("",e.association()?.checkoutFailureReason," ");}}function de(i,t){if(i&1&&(Ds(0,"ds-notice",3),MC(1),Pw(2,ce,2,1),pl()),i&2){let e=Xw(2);ug("tone",e.checkoutStatus()===e.CheckoutStatus.FAILED?"error":e.checkoutStatus()===e.CheckoutStatus.READY?"success":"neutral"),jE(),vl(" Repository: ",e.checkoutStatus()," "),jE(),Lw(e.association()?.checkoutFailureReason?2:-1);}}function le(i,t){if(i&1&&(Ds(0,"option",12),MC(1),pl()),i&2){let e=t.$implicit,c=Xw(2);ug("value",e.id),jE(),kg("",e.name," (",c.authTypeLabel(e.authType),")");}}function me(i,t){i&1&&(Ds(0,"p",13),MC(1," No usable auth setting in this namespace. Create a BEARER_TOKEN one first. "),pl());}function pe(i,t){if(i&1){let e=qw();Ds(0,"button",24),mg("click",function(){df(e);let s=Xw(2);return ff(s.remove())}),MC(1," Remove association "),pl();}if(i&2){let e=Xw(2);ug("disabled",!e.associationLoaded()||e.isSaving());}}function ue(i,t){if(i&1){let e=qw();Pw(0,se,2,1,"ds-notice"),Pw(1,re,3,0,"div"),Pw(2,de,3,3,"ds-notice",3),Ds(3,"ds-fieldset",4)(4,"ds-form-field",5)(5,"input",6),mg("ngModelChange",function(s){df(e);let u=Xw();return ff(u.repositoryUrl.set(s))}),pl(),SI(),pl(),Ds(6,"ds-form-field",7)(7,"input",8),mg("ngModelChange",function(s){df(e);let u=Xw();return ff(u.mainBranch.set(s))}),pl(),SI(),pl(),Ds(8,"ds-form-field",9)(9,"select",10),mg("ngModelChange",function(s){df(e);let u=Xw();return ff(u.serviceAuthSettingId.set(s))}),Ds(10,"option",11),MC(11,"Select an auth setting\u2026"),pl(),Vw(12,le,2,3,"option",12,oe),pl(),SI(),Pw(14,me,2,0,"p",13),pl()(),Ds(15,"ds-fieldset",14)(16,"div",15)(17,"label",16)(18,"input",17),mg("ngModelChange",function(s){df(e);let u=Xw();return ff(u.autoWorktree.set(s))}),pl(),SI(),MC(19," Offer a worktree to every new top-level case "),pl(),Ds(20,"p",18),MC(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. "),pl()(),Ds(22,"ds-form-field",19)(23,"input",20),mg("ngModelChange",function(s){df(e);let u=Xw();return ff(u.setupCommand.set(s))}),pl(),SI(),Ds(24,"p",13),MC(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. "),pl()()(),Ds(26,"ds-form-actions")(27,"button",21),mg("click",function(){df(e);let s=Xw();return ff(s.save())}),MC(28),pl(),Pw(29,pe,2,1,"button",22),pl();}if(i&2){let e=Xw();Lw(e.errorMessage()?0:-1),jE(),Lw(e.associationLoaded()?-1:1),jE(),Lw(e.isAssociated()&&e.checkoutStatus()?2:-1),jE(),ug("disabled",!e.associationLoaded()||e.isSaving()),jE(2),ug("ngModel",e.repositoryUrl()),MI(),jE(2),ug("ngModel",e.mainBranch()),MI(),jE(2),ug("ngModel",e.serviceAuthSettingId()),MI(),jE(3),Hw(e.eligibleAuthSettings()),jE(2),Lw(e.eligibleAuthSettings().length===0?14:-1),jE(),ug("disabled",!e.associationLoaded()||e.isSaving()),jE(3),ug("ngModel",e.autoWorktree()),MI(),jE(5),ug("ngModel",e.setupCommand()),MI(),jE(4),ug("disabled",!e.canSave()),jE(),vl(" ",e.isSaving()?"Saving\u2026":e.isAssociated()?"Update":"Associate"," "),jE(),Lw(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(Ie);isLoading=Ui(true);isSaving=Ui(false);confirmingRemove=Ui(false);associationLoaded=Ui(false);errorMessage=Ui(null);association=Ui(null);authSettings=Ui([]);repositoryUrl=Ui("");mainBranch=Ui("main");serviceAuthSettingId=Ui("");autoWorktree=Ui(false);setupCommand=Ui("");namespaceId="";isAssociated=KC(()=>this.association()?.associated===true);eligibleAuthSettings=KC(()=>this.authSettings().filter(t=>ge.includes(t.authType)));authTypeLabel(t){return he[t??""]??t??"unknown"}canSave=KC(()=>this.associationLoaded()&&!this.isLoading()&&!this.isSaving()&&this.repositoryUrl().trim().length>0&&this.serviceAuthSettingId().length>0);checkoutStatus=KC(()=>this.association()?.checkoutStatus??null);CheckoutStatus=$e;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),Ty({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),da(t=>(console.error("Failed to save the Git association",t),this.errorMessage.set(this.messageOf(t)),this.isSaving.set(false),Cr(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),da(t=>(console.error("Failed to remove the Git association",t),this.errorMessage.set(this.messageOf(t)),this.isSaving.set(false),Cr(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=mw({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&&(Ds(0,"ds-page"),lg(1,"ds-section-header",0),Pw(2,ae,2,0,"p",1)(3,ue,30,14),pl(),Ds(4,"ds-confirm-dialog",2),mg("confirmed",function(){return c.confirmRemove()})("cancelled",function(){return c.confirmingRemove.set(false)}),pl()),e&2&&(jE(2),Lw(c.isLoading()?2:3),jE(2),ug("open",c.confirmingRemove()));},dependencies:[id,bo,xo,Lt,vn,Gt,mo,da$1,Ni,pn,hn,cn,ln,dn,mn,at,an,rn],encapsulation:2})};
1
+ import {I}from'./chunk-Br8JIJN0.js';import {g,W,aW as L,I as Ie,U as Ui,K as KC,aX as $e,ac as Ty,E as U,a2 as da,aa as Cr,m as mw,D as Ds,l as lg,P as Pw,a as pl,R as mg,j as jE,L as Lw,Q as ug,M as MC,q as qw,T as SI,i as Vw,X as Xw,Y as MI,H as Hw,v as vl,as as kg,r as df,s as ff,O as Og}from'./main-SQW6H4KH.js';import {a4 as id,l as bo,x as xo,L as Lt,u as vn,G as Gt,m as mo,a6 as da$1,aa as Ni,c as pn,h as hn,d as cn,r as ln,e as dn,C as mn,g as at,i as an,t as rn}from'./chunk-CjFeVJkb.js';import'./chunk-B9yU35Nk.js';var oe=(i,t)=>t.id;function ae(i,t){i&1&&(Ds(0,"p",1),MC(1,"Loading\u2026"),pl());}function se(i,t){if(i&1&&(Ds(0,"ds-notice"),MC(1),pl()),i&2){let e=Xw(2);jE(),Og(e.errorMessage());}}function re(i,t){if(i&1){let e=qw();Ds(0,"div")(1,"button",23),mg("click",function(){df(e);let s=Xw(2);return ff(s.retryLoad())}),MC(2,"Retry loading"),pl()();}}function ce(i,t){if(i&1&&(lg(0,"br"),MC(1)),i&2){let e=Xw(3);jE(),vl("",e.association()?.checkoutFailureReason," ");}}function de(i,t){if(i&1&&(Ds(0,"ds-notice",3),MC(1),Pw(2,ce,2,1),pl()),i&2){let e=Xw(2);ug("tone",e.checkoutStatus()===e.CheckoutStatus.FAILED?"error":e.checkoutStatus()===e.CheckoutStatus.READY?"success":"neutral"),jE(),vl(" Repository: ",e.checkoutStatus()," "),jE(),Lw(e.association()?.checkoutFailureReason?2:-1);}}function le(i,t){if(i&1&&(Ds(0,"option",12),MC(1),pl()),i&2){let e=t.$implicit,c=Xw(2);ug("value",e.id),jE(),kg("",e.name," (",c.authTypeLabel(e.authType),")");}}function me(i,t){i&1&&(Ds(0,"p",13),MC(1," No usable auth setting in this namespace. Create a BEARER_TOKEN one first. "),pl());}function pe(i,t){if(i&1){let e=qw();Ds(0,"button",24),mg("click",function(){df(e);let s=Xw(2);return ff(s.remove())}),MC(1," Remove association "),pl();}if(i&2){let e=Xw(2);ug("disabled",!e.associationLoaded()||e.isSaving());}}function ue(i,t){if(i&1){let e=qw();Pw(0,se,2,1,"ds-notice"),Pw(1,re,3,0,"div"),Pw(2,de,3,3,"ds-notice",3),Ds(3,"ds-fieldset",4)(4,"ds-form-field",5)(5,"input",6),mg("ngModelChange",function(s){df(e);let u=Xw();return ff(u.repositoryUrl.set(s))}),pl(),SI(),pl(),Ds(6,"ds-form-field",7)(7,"input",8),mg("ngModelChange",function(s){df(e);let u=Xw();return ff(u.mainBranch.set(s))}),pl(),SI(),pl(),Ds(8,"ds-form-field",9)(9,"select",10),mg("ngModelChange",function(s){df(e);let u=Xw();return ff(u.serviceAuthSettingId.set(s))}),Ds(10,"option",11),MC(11,"Select an auth setting\u2026"),pl(),Vw(12,le,2,3,"option",12,oe),pl(),SI(),Pw(14,me,2,0,"p",13),pl()(),Ds(15,"ds-fieldset",14)(16,"div",15)(17,"label",16)(18,"input",17),mg("ngModelChange",function(s){df(e);let u=Xw();return ff(u.autoWorktree.set(s))}),pl(),SI(),MC(19," Offer a worktree to every new top-level case "),pl(),Ds(20,"p",18),MC(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. "),pl()(),Ds(22,"ds-form-field",19)(23,"input",20),mg("ngModelChange",function(s){df(e);let u=Xw();return ff(u.setupCommand.set(s))}),pl(),SI(),Ds(24,"p",13),MC(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. "),pl()()(),Ds(26,"ds-form-actions")(27,"button",21),mg("click",function(){df(e);let s=Xw();return ff(s.save())}),MC(28),pl(),Pw(29,pe,2,1,"button",22),pl();}if(i&2){let e=Xw();Lw(e.errorMessage()?0:-1),jE(),Lw(e.associationLoaded()?-1:1),jE(),Lw(e.isAssociated()&&e.checkoutStatus()?2:-1),jE(),ug("disabled",!e.associationLoaded()||e.isSaving()),jE(2),ug("ngModel",e.repositoryUrl()),MI(),jE(2),ug("ngModel",e.mainBranch()),MI(),jE(2),ug("ngModel",e.serviceAuthSettingId()),MI(),jE(3),Hw(e.eligibleAuthSettings()),jE(2),Lw(e.eligibleAuthSettings().length===0?14:-1),jE(),ug("disabled",!e.associationLoaded()||e.isSaving()),jE(3),ug("ngModel",e.autoWorktree()),MI(),jE(5),ug("ngModel",e.setupCommand()),MI(),jE(4),ug("disabled",!e.canSave()),jE(),vl(" ",e.isSaving()?"Saving\u2026":e.isAssociated()?"Update":"Associate"," "),jE(),Lw(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(Ie);isLoading=Ui(true);isSaving=Ui(false);confirmingRemove=Ui(false);associationLoaded=Ui(false);errorMessage=Ui(null);association=Ui(null);authSettings=Ui([]);repositoryUrl=Ui("");mainBranch=Ui("main");serviceAuthSettingId=Ui("");autoWorktree=Ui(false);setupCommand=Ui("");namespaceId="";isAssociated=KC(()=>this.association()?.associated===true);eligibleAuthSettings=KC(()=>this.authSettings().filter(t=>ge.includes(t.authType)));authTypeLabel(t){return he[t??""]??t??"unknown"}canSave=KC(()=>this.associationLoaded()&&!this.isLoading()&&!this.isSaving()&&this.repositoryUrl().trim().length>0&&this.serviceAuthSettingId().length>0);checkoutStatus=KC(()=>this.association()?.checkoutStatus??null);CheckoutStatus=$e;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),Ty({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),da(t=>(console.error("Failed to save the Git association",t),this.errorMessage.set(this.messageOf(t)),this.isSaving.set(false),Cr(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),da(t=>(console.error("Failed to remove the Git association",t),this.errorMessage.set(this.messageOf(t)),this.isSaving.set(false),Cr(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=mw({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&&(Ds(0,"ds-page"),lg(1,"ds-section-header",0),Pw(2,ae,2,0,"p",1)(3,ue,30,14),pl(),Ds(4,"ds-confirm-dialog",2),mg("confirmed",function(){return c.confirmRemove()})("cancelled",function(){return c.confirmingRemove.set(false)}),pl()),e&2&&(jE(2),Lw(c.isLoading()?2:3),jE(2),ug("open",c.confirmingRemove()));},dependencies:[id,bo,xo,Lt,vn,Gt,mo,da$1,Ni,pn,hn,cn,ln,dn,mn,at,an,rn],encapsulation:2})};
2
2
  export{ne as NamespaceGitComponent};
@@ -1,4 +1,4 @@
1
- import {aY as A,aZ as z$1}from'./main-AK4FQCWG.js';var ut=z$1(Xe=>{"use strict";(function(i){var n=/\S/,t=/\"/g,e=/\n/g,r=/\r/g,a=/\\/g,s=/\u2028/,u=/\u2029/;i.tags={"#":1,"^":2,"<":3,$:4,"/":5,"!":6,">":7,"=":8,_v:9,"{":10,"&":11,_t:12},i.scan=function(h,g){var S=h.length,U=0,R=1,q=2,E=U,$=null,ee=null,B="",I=[],J=!1,O=0,C=0,L="{{",b="}}";function te(){B.length>0&&(I.push({tag:"_t",text:new String(B)}),B="");}function ge(){for(var A=!0,k=C;k<I.length;k++)if(A=i.tags[I[k].tag]<i.tags._v||I[k].tag=="_t"&&I[k].text.match(n)===null,!A)return !1;return A}function be(A,k){if(te(),A&&ge())for(var _=C,ie;_<I.length;_++)I[_].text&&((ie=I[_+1])&&ie.tag==">"&&(ie.indent=I[_].text.toString()),I.splice(_,1));else k||I.push({tag:`
1
+ import {aY as A,aZ as z$1}from'./main-SQW6H4KH.js';var ut=z$1(Xe=>{"use strict";(function(i){var n=/\S/,t=/\"/g,e=/\n/g,r=/\r/g,a=/\\/g,s=/\u2028/,u=/\u2029/;i.tags={"#":1,"^":2,"<":3,$:4,"/":5,"!":6,">":7,"=":8,_v:9,"{":10,"&":11,_t:12},i.scan=function(h,g){var S=h.length,U=0,R=1,q=2,E=U,$=null,ee=null,B="",I=[],J=!1,O=0,C=0,L="{{",b="}}";function te(){B.length>0&&(I.push({tag:"_t",text:new String(B)}),B="");}function ge(){for(var A=!0,k=C;k<I.length;k++)if(A=i.tags[I[k].tag]<i.tags._v||I[k].tag=="_t"&&I[k].text.match(n)===null,!A)return !1;return A}function be(A,k){if(te(),A&&ge())for(var _=C,ie;_<I.length;_++)I[_].text&&((ie=I[_+1])&&ie.tag==">"&&(ie.indent=I[_].text.toString()),I.splice(_,1));else k||I.push({tag:`
2
2
  `});J=!1,C=I.length;}function ne(A,k){var _="="+b,ie=A.indexOf(_,k),De=f(A.substring(A.indexOf("=",k)+1,ie)).split(" ");return L=De[0],b=De[De.length-1],ie+_.length-1}for(g&&(g=g.split(" "),L=g[0],b=g[1]),O=0;O<S;O++)E==U?v(L,h,O)?(--O,te(),E=R):h.charAt(O)==`
3
3
  `?be(J):B+=h.charAt(O):E==R?(O+=L.length-1,ee=i.tags[h.charAt(O+1)],$=ee?h.charAt(O+1):"_v",$=="="?(O=ne(h,O),E=U):(ee&&O++,E=q),J=O):v(b,h,O)?(I.push({tag:$,n:f(B),otag:L,ctag:b,i:$=="/"?J-L.length:O+b.length}),B="",O+=b.length-1,E=U,$=="{"&&(b=="}}"?O++:d(I[I.length-1]))):B+=h.charAt(O);return be(J,!0),I};function d(l){l.n.substr(l.n.length-1)==="}"&&(l.n=l.n.substring(0,l.n.length-1));}function f(l){return l.trim?l.trim():l.replace(/^\s*|\s*$/g,"")}function v(l,h,g){if(h.charAt(g)!=l.charAt(0))return !1;for(var S=1,U=l.length;S<U;S++)if(h.charAt(g+S)!=l.charAt(S))return !1;return !0}var y={_t:!0,"\n":!0,$:!0,"/":!0};function o(l,h,g,S){var U=[],R=null,q=null,E=null;for(q=g[g.length-1];l.length>0;){if(E=l.shift(),q&&q.tag=="<"&&!(E.tag in y))throw new Error("Illegal content in < super tag.");if(i.tags[E.tag]<=i.tags.$||c(E,S))g.push(E),E.nodes=o(l,E.tag,g,S);else if(E.tag=="/"){if(g.length===0)throw new Error("Closing tag without opener: /"+E.n);if(R=g.pop(),E.n!=R.n&&!m(E.n,R.n,S))throw new Error("Nesting error: "+R.n+" vs. "+E.n);return R.end=E.i,U}else E.tag==`
4
4
  `&&(E.last=l.length==0||l[0].tag==`
@@ -1 +1 @@
1
- import {v}from'./chunk-CrsIVVty.js';import {I}from'./chunk-CfD3HGXo.js';import {O}from'./chunk-c5Q5WhPc.js';import {g,W,F,I as Ie$1,a8 as _,a9 as F$1,aa as Cr,U as Ui,ab as ue,K as KC,a1 as fa,C as U,A as Af,ac as Ty,m as mw,D as Ds,Q as mg,M as MC,a as pl,P as Pw,j as jE,N as ug,L as Lw,a2 as da,ad as ne,q as qw,V as Vw,ae as kw,T as SI,l as lg,k as Xw,H as Hw,Y as MI,v as vl,O as Og,n as df,o as ff}from'./main-AK4FQCWG.js';import {p as pt,T as Te$1,a as fn,c as pn,h as hn,d as cn,r as ln,e as dn,o as on,g as at,i as an,t as rn,U as Ut,n as nd,l as bo,x as xo,L as Lt,u as vn,G as Gt,w as pa,m as mo,b as po,V as Vn,A as An,W as Wt}from'./chunk-D4o3ka54.js';import'./chunk-CO007ibK.js';var be=(i,e)=>e.value;function _e(i,e){i&1&&(Ds(0,"p",2),MC(1,"Loading\u2026"),pl());}function xe(i,e){if(i&1&&(Ds(0,"label",6),lg(1,"input",22),SI(),MC(2),pl()),i&2){let t=e.$implicit,n=Xw(2);jE(),ug("value",t.value)("formControl",n.scopeControl)("disabled",t.value==="namespace"&&!n.isAdmin()),MI(),jE(),vl(" ",t.label," ");}}function Ie(i,e){if(i&1&&(Ds(0,"option",10),MC(1),pl()),i&2){let t=e.$implicit;ug("value",t.type),jE(),Og(t.displayName);}}function Ne(i,e){if(i&1&&(Ds(0,"option",10),MC(1),pl()),i&2){let t=e.$implicit;ug("value",t.value),jE(),Og(t.label);}}function Ae(i,e){if(i&1&&(Ds(0,"div",18)(1,"label",6),lg(2,"input",23),SI(),MC(3," Grant automatically "),pl(),Ds(4,"p",2),MC(5),pl()()),i&2){let t=Xw(2);jE(2),ug("formControl",t.autoGrantControl),MI(),jE(3),vl(" Give this integration to ",t.autoGrantReach(),", without each agent having to declare it. An agent can still opt out by mapping this configuration to an empty tool list. ");}}function Ee(i,e){if(i&1){let t=qw();Ds(0,"ds-card")(1,"ds-json-schema-form",24),mg("valueChange",function(a){df(t);let p=Xw(2);return ff(p.onParamsChange(a))}),pl()();}if(i&2){let t=Xw(2);jE(),ug("schema",e)("value",t.initialParams());}}function Fe(i,e){if(i&1){let t=qw();Ds(0,"button",25),mg("click",function(){df(t);let a=Xw(2);return ff(a.exportYaml())}),MC(1),pl();}if(i&2){let t=Xw(2);ug("disabled",t.isExporting()),jE(),vl(" ",t.isExporting()?"Exporting\u2026":"Export as YAML"," ");}}function Te(i,e){if(i&1){let t=qw();Ds(0,"form",4),mg("ngSubmit",function(){df(t);let a=Xw();return ff(a.submit())}),Ds(1,"ds-fieldset",5),Vw(2,xe,3,4,"label",6,kw().trackByScope,true),pl(),Ds(4,"ds-form-field",7)(5,"select",8)(6,"option",9),MC(7,"Select type"),pl(),Vw(8,Ie,2,2,"option",10,kw().trackByType,true),pl(),SI(),pl(),Ds(10,"ds-form-field",11),lg(11,"input",12),SI(),pl(),Ds(12,"ds-form-field",13),lg(13,"textarea",14),SI(),pl(),Ds(14,"ds-form-field",15)(15,"select",16)(16,"option",17),MC(17,"None"),pl(),Vw(18,Ne,2,2,"option",10,be),pl(),SI(),pl(),Pw(20,Ae,6,2,"div",18),Pw(21,Ee,2,2,"ds-card"),Ds(22,"ds-form-actions")(23,"button",19),MC(24),pl(),Pw(25,Fe,2,2,"button",20),Ds(26,"button",21),mg("click",function(){df(t);let a=Xw();return ff(a.cancel())}),MC(27,"Cancel"),pl()()();}if(i&2){let t,n=Xw();ug("formGroup",n.form),jE(),ug("disabled",n.isEditMode()),jE(),Hw(n.scopeOptions),jE(3),ug("formControl",n.typeControl),MI(),jE(3),Hw(n.integrationTypes()),jE(3),ug("formControl",n.nameControl),MI(),jE(2),ug("formControl",n.descriptionControl),MI(),jE(2),ug("formControl",n.authSettingNameControl),MI(),jE(),ug("ngValue",null),jE(2),Hw(n.authSettingOptions()),jE(2),Lw(n.isAutoGrantable()?20:-1),jE(),Lw((t=n.schema())?21:-1,t),jE(2),ug("disabled",n.nameControl.invalid||n.typeControl.invalid||n.isSubmitting()),jE(),vl(" ",n.isEditMode()?"Save changes":"Create"," "),jE(),Lw(n.isEditMode()?25:-1);}}var Ve=new Set(["platform","namespace","userOnNs","userGlobal"]),w=Object.freeze({platform:"Configuration plateforme",namespace:"Configuration du namespace",userOnNs:"Pour moi sur ce namespace",userGlobal:"Pour moi globalement"}),ve=class i{route=g(W);router=g(F);destroyRef=g(Ie$1);state=g(O);integrationTypeController=g(_);authSettingState=g(I);namespaceRole=g(v);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=!this.namespaceId;isAdmin=F$1(this.isPlatformMode?Cr(true):this.namespaceRole.isAdminOfNamespace$(this.namespaceId),{initialValue:this.isPlatformMode});form=new pt({name:new Te$1("",{nonNullable:true,validators:[fn.required,fn.minLength(1)]}),description:new Te$1(null),type:new Te$1("",{nonNullable:true,validators:[fn.required]}),scope:new Te$1("namespace",{nonNullable:true}),autoGrant:new Te$1(false,{nonNullable:true})});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get typeControl(){return this.form.controls.type}get scopeControl(){return this.form.controls.scope}get autoGrantControl(){return this.form.controls.autoGrant}isEditMode=Ui(false);isSubmitting=Ui(false);isLoading=Ui(false);isExporting=Ui(false);scopeOptions=[{value:"platform",label:w.platform},{value:"namespace",label:w.namespace},{value:"userOnNs",label:w.userOnNs},{value:"userGlobal",label:w.userGlobal}];authSettingNameControl=new Te$1(null);loadedAuthSettings=Ui([]);authSettingsLoaded=Ui(false);savedAuthSettingName=Ui(null);authSettingsScope$=new ue;authSettingOptions=KC(()=>{let e=this.loadedAuthSettings(),t=this.savedAuthSettingName();return !t||!this.authSettingsLoaded()||e.some(n=>n.value===t)?e:[...e,{value:t,label:`${t} (not found)`}]});paramsValue=Ui(null);initialParams=Ui(null);integrationTypes=F$1(this.integrationTypeController.listTypesIntegrationType(),{initialValue:[]});selectedType=F$1(this.form.controls.type.valueChanges,{initialValue:this.form.controls.type.value});scopeValue=F$1(this.form.controls.scope.valueChanges,{initialValue:this.form.controls.scope.value});schema=KC(()=>{let e=this.selectedType();return e?this.integrationTypes().find(n=>n.type===e)?.configSchema??null:null});isAutoGrantable=KC(()=>{let e=this.selectedType();return e?this.integrationTypes().find(t=>t.type===e)?.autoGrantable??false:false});autoGrantReach=KC(()=>{switch(this.scopeValue()){case "platform":return "every agent of this environment";case "namespace":return "every agent of this namespace";default:return "your own runs"}});existingConfig=null;constructor(){this.authSettingsScope$.pipe(fa(e=>this.loadAuthSettingLayers(e)),U(this.destroyRef)).subscribe(e=>{this.loadedAuthSettings.set(this.toAuthSettingOptions(e)),this.authSettingsLoaded.set(true);}),Af(()=>{if(this.isAdmin()||this.isEditMode())return;["platform","namespace"].includes(this.scopeControl.value)&&this.scopeControl.setValue("userOnNs");});}ngOnInit(){this.namespaceId&&this.state.setNamespace(this.namespaceId);let e=this.route.snapshot.paramMap,t=this.route.snapshot.queryParamMap,n=e.get("integrationId");if(n){this.isEditMode.set(true),this.scopeControl.disable(),this.loadConfig(n);return}if(this.isPlatformMode){this.scopeControl.setValue("platform"),this.scopeControl.disable(),this.loadAuthSettingsForScope("platform");return}let a=this.parseScope(t.get("scope"));this.scopeControl.setValue(a),this.loadAuthSettingsForScope(a),this.scopeControl.valueChanges.pipe(U(this.destroyRef)).subscribe(D=>{this.loadAuthSettingsForScope(D);});let p=t.get("template");p&&this.hydrateFromTemplate(p);}parseScope(e){return e&&Ve.has(e)?e:"namespace"}deriveScopeFromConfig(e){return !e.userId&&!e.namespaceId?"platform":e.userId?e.namespaceId?"userOnNs":"userGlobal":"namespace"}loadConfig(e){this.isLoading.set(true),this.state.getById(e).pipe(U(this.destroyRef)).subscribe({next:t=>{this.existingConfig=t;let n=this.deriveScopeFromConfig(t);this.scopeControl.setValue(n),this.applyConfigToForm(t),this.loadAuthSettingsForScope(n),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),console.warn(`[IntegrationForm] Could not load config '${e}' \u2014 navigating back`),this.navigateBack();}});}hydrateFromTemplate(e){this.isLoading.set(true),this.state.getById(e).pipe(U(this.destroyRef)).subscribe({next:t=>{this.applyConfigToForm(t),this.isLoading.set(false),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:true});},error:t=>{console.warn(`[IntegrationForm] Could not hydrate from template ${e}:`,t),this.isLoading.set(false),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:true});}});}applyConfigToForm(e){this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??null),this.typeControl.setValue(e.integrationType),this.initialParams.set(e.parameters),this.paramsValue.set(e.parameters),this.authSettingNameControl.setValue(e.authSettingName??null),this.savedAuthSettingName.set(e.authSettingName??null),this.autoGrantControl.setValue(e.autoGrant??false);}loadAuthSettingsForScope(e){this.authSettingsLoaded.set(false),this.authSettingsScope$.next(e);}loadAuthSettingLayers(e){let t=(p,D)=>D.pipe(da(()=>Cr([])),ne(Se=>({label:p,settings:Se}))),n=t("platform",this.authSettingState.loadPlatformSettings()),a=t("mine",this.authSettingState.loadUserSettings("global"));return e==="platform"||e==="userGlobal"?Ty([a,n]):Ty([t("mine",this.authSettingState.loadUserSettings(this.namespaceId)),t("namespace",this.authSettingState.loadNamespaceSettings(this.namespaceId)),a,n])}toAuthSettingOptions(e){let t=new Map;for(let{label:n,settings:a}of e)for(let{name:p}of a)p&&t.set(p,(t.get(p)??new Set).add(n));return [...t.entries()].sort(([n],[a])=>n.localeCompare(a)).map(([n,a])=>({value:n,label:`${n} (${[...a].join(", ")})`}))}onParamsChange(e){this.paramsValue.set(e);}submit(){if(this.nameControl.invalid||this.typeControl.invalid||this.isSubmitting())return;if(this.isEditMode()&&!this.existingConfig?.id){this.navigateBack();return}this.isSubmitting.set(true);let e=this.descriptionControl.value?.trim(),t={name:this.nameControl.value.trim(),description:e||null,integrationType:this.typeControl.value,parameters:this.paramsValue(),authSettingName:this.authSettingNameControl.value||null,autoGrant:this.isAutoGrantable()&&this.autoGrantControl.value},n=this.form.getRawValue().scope;(this.isEditMode()&&this.existingConfig?.id?this.state.update(this.existingConfig.id,t,n,this.existingConfig):this.state.create(t,n,this.namespaceId??null)).pipe(U(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(false)});}exportYaml(){let e=this.existingConfig?.id;!e||this.isExporting()||(this.isExporting.set(true),this.state.exportAsYaml(e).pipe(U(this.destroyRef)).subscribe({next:t=>{let n=new Blob([t],{type:"application/yaml"}),a=URL.createObjectURL(n),p=document.createElement("a");p.href=a,p.download=`${this.existingConfig?.name??"integration"}.yaml`,p.click(),URL.revokeObjectURL(a),this.isExporting.set(false);},error:()=>this.isExporting.set(false)}));}cancel(){this.navigateBack();}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","integration-configs"]):this.router.navigate(["/agentos",this.namespaceId,"integrations"]);}trackByType(e,t){return t.type}trackByScope(e,t){return t.value}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=mw({type:i,selectors:[["agentos-integration-form"]],decls:6,vars:2,consts:[[3,"title"],["dsButton","","variant","ghost","type","button","title","Back to integrations",3,"click"],[1,"ds-hint"],[1,"ds-form",3,"formGroup"],[1,"ds-form",3,"ngSubmit","formGroup"],["legend","Scope",3,"disabled"],["dsCheck",""],["label","Type","controlId","integration-type","required",""],["dsControl","","id","integration-type",3,"formControl"],["value","","disabled",""],[3,"value"],["label","Name","controlId","integration-name","required",""],["dsControl","","id","integration-name","type","text","placeholder","Integration name","autocomplete","off",3,"formControl"],["label","Description","controlId","integration-description"],["dsControl","","id","integration-description","placeholder","Optional description","rows","3",3,"formControl"],["label","Auth Setting","controlId","integration-auth-setting","hint","Only the name is saved. It is resolved at run time for the user running the case, the most specific layer winning (user on this namespace > namespace > user > platform), so a shared integration can rely on each user's own auth setting of that name."],["dsControl","","id","integration-auth-setting",3,"formControl"],[3,"ngValue"],[1,"ds-stack","ds-stack--sm"],["dsButton","","variant","primary","type","submit",3,"disabled"],["dsButton","","type","button",3,"disabled"],["dsButton","","type","button",3,"click"],["type","radio",3,"value","formControl","disabled"],["type","checkbox",3,"formControl"],[3,"valueChange","schema","value"],["dsButton","","type","button",3,"click","disabled"]],template:function(t,n){t&1&&(Ds(0,"ds-page")(1,"ds-section-header",0)(2,"button",1),mg("click",function(){return n.cancel()}),MC(3," \u2190 Integrations "),pl()(),Pw(4,_e,2,0,"p",2)(5,Te,28,12,"form",3),pl()),t&2&&(jE(),ug("title",n.isEditMode()?"Edit integration":"New integration"),jE(3),Lw(n.isLoading()?4:5));},dependencies:[pn,hn,cn,ln,dn,on,at,an,rn,Ut,nd,bo,xo,Lt,vn,Gt,pa,mo,po,Vn,An,Wt],encapsulation:2})};export{ve as IntegrationFormComponent};
1
+ import {v}from'./chunk-CguUhMWM.js';import {I}from'./chunk-Br8JIJN0.js';import {O}from'./chunk-dSs6kurh.js';import {g,W,F,I as Ie$1,a8 as _,a9 as F$1,aa as Cr,U as Ui,ab as ue,K as KC,a1 as fa,E as U,o as Af,ac as Ty,m as mw,D as Ds,R as mg,M as MC,a as pl,P as Pw,j as jE,Q as ug,L as Lw,a2 as da,ad as ne,q as qw,i as Vw,ae as kw,T as SI,l as lg,X as Xw,H as Hw,Y as MI,v as vl,O as Og,r as df,s as ff}from'./main-SQW6H4KH.js';import {p as pt,T as Te$1,a as fn,c as pn,h as hn,d as cn,r as ln,e as dn,o as on,g as at,i as an,t as rn,U as Ut,n as nd,l as bo,x as xo,L as Lt,u as vn,G as Gt,w as pa,m as mo,b as po,V as Vn,A as An,W as Wt}from'./chunk-CjFeVJkb.js';import'./chunk-B9yU35Nk.js';var be=(i,e)=>e.value;function _e(i,e){i&1&&(Ds(0,"p",2),MC(1,"Loading\u2026"),pl());}function xe(i,e){if(i&1&&(Ds(0,"label",6),lg(1,"input",22),SI(),MC(2),pl()),i&2){let t=e.$implicit,n=Xw(2);jE(),ug("value",t.value)("formControl",n.scopeControl)("disabled",t.value==="namespace"&&!n.isAdmin()),MI(),jE(),vl(" ",t.label," ");}}function Ie(i,e){if(i&1&&(Ds(0,"option",10),MC(1),pl()),i&2){let t=e.$implicit;ug("value",t.type),jE(),Og(t.displayName);}}function Ne(i,e){if(i&1&&(Ds(0,"option",10),MC(1),pl()),i&2){let t=e.$implicit;ug("value",t.value),jE(),Og(t.label);}}function Ae(i,e){if(i&1&&(Ds(0,"div",18)(1,"label",6),lg(2,"input",23),SI(),MC(3," Grant automatically "),pl(),Ds(4,"p",2),MC(5),pl()()),i&2){let t=Xw(2);jE(2),ug("formControl",t.autoGrantControl),MI(),jE(3),vl(" Give this integration to ",t.autoGrantReach(),", without each agent having to declare it. An agent can still opt out by mapping this configuration to an empty tool list. ");}}function Ee(i,e){if(i&1){let t=qw();Ds(0,"ds-card")(1,"ds-json-schema-form",24),mg("valueChange",function(a){df(t);let p=Xw(2);return ff(p.onParamsChange(a))}),pl()();}if(i&2){let t=Xw(2);jE(),ug("schema",e)("value",t.initialParams());}}function Fe(i,e){if(i&1){let t=qw();Ds(0,"button",25),mg("click",function(){df(t);let a=Xw(2);return ff(a.exportYaml())}),MC(1),pl();}if(i&2){let t=Xw(2);ug("disabled",t.isExporting()),jE(),vl(" ",t.isExporting()?"Exporting\u2026":"Export as YAML"," ");}}function Te(i,e){if(i&1){let t=qw();Ds(0,"form",4),mg("ngSubmit",function(){df(t);let a=Xw();return ff(a.submit())}),Ds(1,"ds-fieldset",5),Vw(2,xe,3,4,"label",6,kw().trackByScope,true),pl(),Ds(4,"ds-form-field",7)(5,"select",8)(6,"option",9),MC(7,"Select type"),pl(),Vw(8,Ie,2,2,"option",10,kw().trackByType,true),pl(),SI(),pl(),Ds(10,"ds-form-field",11),lg(11,"input",12),SI(),pl(),Ds(12,"ds-form-field",13),lg(13,"textarea",14),SI(),pl(),Ds(14,"ds-form-field",15)(15,"select",16)(16,"option",17),MC(17,"None"),pl(),Vw(18,Ne,2,2,"option",10,be),pl(),SI(),pl(),Pw(20,Ae,6,2,"div",18),Pw(21,Ee,2,2,"ds-card"),Ds(22,"ds-form-actions")(23,"button",19),MC(24),pl(),Pw(25,Fe,2,2,"button",20),Ds(26,"button",21),mg("click",function(){df(t);let a=Xw();return ff(a.cancel())}),MC(27,"Cancel"),pl()()();}if(i&2){let t,n=Xw();ug("formGroup",n.form),jE(),ug("disabled",n.isEditMode()),jE(),Hw(n.scopeOptions),jE(3),ug("formControl",n.typeControl),MI(),jE(3),Hw(n.integrationTypes()),jE(3),ug("formControl",n.nameControl),MI(),jE(2),ug("formControl",n.descriptionControl),MI(),jE(2),ug("formControl",n.authSettingNameControl),MI(),jE(),ug("ngValue",null),jE(2),Hw(n.authSettingOptions()),jE(2),Lw(n.isAutoGrantable()?20:-1),jE(),Lw((t=n.schema())?21:-1,t),jE(2),ug("disabled",n.nameControl.invalid||n.typeControl.invalid||n.isSubmitting()),jE(),vl(" ",n.isEditMode()?"Save changes":"Create"," "),jE(),Lw(n.isEditMode()?25:-1);}}var Ve=new Set(["platform","namespace","userOnNs","userGlobal"]),w=Object.freeze({platform:"Configuration plateforme",namespace:"Configuration du namespace",userOnNs:"Pour moi sur ce namespace",userGlobal:"Pour moi globalement"}),ve=class i{route=g(W);router=g(F);destroyRef=g(Ie$1);state=g(O);integrationTypeController=g(_);authSettingState=g(I);namespaceRole=g(v);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=!this.namespaceId;isAdmin=F$1(this.isPlatformMode?Cr(true):this.namespaceRole.isAdminOfNamespace$(this.namespaceId),{initialValue:this.isPlatformMode});form=new pt({name:new Te$1("",{nonNullable:true,validators:[fn.required,fn.minLength(1)]}),description:new Te$1(null),type:new Te$1("",{nonNullable:true,validators:[fn.required]}),scope:new Te$1("namespace",{nonNullable:true}),autoGrant:new Te$1(false,{nonNullable:true})});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get typeControl(){return this.form.controls.type}get scopeControl(){return this.form.controls.scope}get autoGrantControl(){return this.form.controls.autoGrant}isEditMode=Ui(false);isSubmitting=Ui(false);isLoading=Ui(false);isExporting=Ui(false);scopeOptions=[{value:"platform",label:w.platform},{value:"namespace",label:w.namespace},{value:"userOnNs",label:w.userOnNs},{value:"userGlobal",label:w.userGlobal}];authSettingNameControl=new Te$1(null);loadedAuthSettings=Ui([]);authSettingsLoaded=Ui(false);savedAuthSettingName=Ui(null);authSettingsScope$=new ue;authSettingOptions=KC(()=>{let e=this.loadedAuthSettings(),t=this.savedAuthSettingName();return !t||!this.authSettingsLoaded()||e.some(n=>n.value===t)?e:[...e,{value:t,label:`${t} (not found)`}]});paramsValue=Ui(null);initialParams=Ui(null);integrationTypes=F$1(this.integrationTypeController.listTypesIntegrationType(),{initialValue:[]});selectedType=F$1(this.form.controls.type.valueChanges,{initialValue:this.form.controls.type.value});scopeValue=F$1(this.form.controls.scope.valueChanges,{initialValue:this.form.controls.scope.value});schema=KC(()=>{let e=this.selectedType();return e?this.integrationTypes().find(n=>n.type===e)?.configSchema??null:null});isAutoGrantable=KC(()=>{let e=this.selectedType();return e?this.integrationTypes().find(t=>t.type===e)?.autoGrantable??false:false});autoGrantReach=KC(()=>{switch(this.scopeValue()){case "platform":return "every agent of this environment";case "namespace":return "every agent of this namespace";default:return "your own runs"}});existingConfig=null;constructor(){this.authSettingsScope$.pipe(fa(e=>this.loadAuthSettingLayers(e)),U(this.destroyRef)).subscribe(e=>{this.loadedAuthSettings.set(this.toAuthSettingOptions(e)),this.authSettingsLoaded.set(true);}),Af(()=>{if(this.isAdmin()||this.isEditMode())return;["platform","namespace"].includes(this.scopeControl.value)&&this.scopeControl.setValue("userOnNs");});}ngOnInit(){this.namespaceId&&this.state.setNamespace(this.namespaceId);let e=this.route.snapshot.paramMap,t=this.route.snapshot.queryParamMap,n=e.get("integrationId");if(n){this.isEditMode.set(true),this.scopeControl.disable(),this.loadConfig(n);return}if(this.isPlatformMode){this.scopeControl.setValue("platform"),this.scopeControl.disable(),this.loadAuthSettingsForScope("platform");return}let a=this.parseScope(t.get("scope"));this.scopeControl.setValue(a),this.loadAuthSettingsForScope(a),this.scopeControl.valueChanges.pipe(U(this.destroyRef)).subscribe(D=>{this.loadAuthSettingsForScope(D);});let p=t.get("template");p&&this.hydrateFromTemplate(p);}parseScope(e){return e&&Ve.has(e)?e:"namespace"}deriveScopeFromConfig(e){return !e.userId&&!e.namespaceId?"platform":e.userId?e.namespaceId?"userOnNs":"userGlobal":"namespace"}loadConfig(e){this.isLoading.set(true),this.state.getById(e).pipe(U(this.destroyRef)).subscribe({next:t=>{this.existingConfig=t;let n=this.deriveScopeFromConfig(t);this.scopeControl.setValue(n),this.applyConfigToForm(t),this.loadAuthSettingsForScope(n),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),console.warn(`[IntegrationForm] Could not load config '${e}' \u2014 navigating back`),this.navigateBack();}});}hydrateFromTemplate(e){this.isLoading.set(true),this.state.getById(e).pipe(U(this.destroyRef)).subscribe({next:t=>{this.applyConfigToForm(t),this.isLoading.set(false),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:true});},error:t=>{console.warn(`[IntegrationForm] Could not hydrate from template ${e}:`,t),this.isLoading.set(false),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:true});}});}applyConfigToForm(e){this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??null),this.typeControl.setValue(e.integrationType),this.initialParams.set(e.parameters),this.paramsValue.set(e.parameters),this.authSettingNameControl.setValue(e.authSettingName??null),this.savedAuthSettingName.set(e.authSettingName??null),this.autoGrantControl.setValue(e.autoGrant??false);}loadAuthSettingsForScope(e){this.authSettingsLoaded.set(false),this.authSettingsScope$.next(e);}loadAuthSettingLayers(e){let t=(p,D)=>D.pipe(da(()=>Cr([])),ne(Se=>({label:p,settings:Se}))),n=t("platform",this.authSettingState.loadPlatformSettings()),a=t("mine",this.authSettingState.loadUserSettings("global"));return e==="platform"||e==="userGlobal"?Ty([a,n]):Ty([t("mine",this.authSettingState.loadUserSettings(this.namespaceId)),t("namespace",this.authSettingState.loadNamespaceSettings(this.namespaceId)),a,n])}toAuthSettingOptions(e){let t=new Map;for(let{label:n,settings:a}of e)for(let{name:p}of a)p&&t.set(p,(t.get(p)??new Set).add(n));return [...t.entries()].sort(([n],[a])=>n.localeCompare(a)).map(([n,a])=>({value:n,label:`${n} (${[...a].join(", ")})`}))}onParamsChange(e){this.paramsValue.set(e);}submit(){if(this.nameControl.invalid||this.typeControl.invalid||this.isSubmitting())return;if(this.isEditMode()&&!this.existingConfig?.id){this.navigateBack();return}this.isSubmitting.set(true);let e=this.descriptionControl.value?.trim(),t={name:this.nameControl.value.trim(),description:e||null,integrationType:this.typeControl.value,parameters:this.paramsValue(),authSettingName:this.authSettingNameControl.value||null,autoGrant:this.isAutoGrantable()&&this.autoGrantControl.value},n=this.form.getRawValue().scope;(this.isEditMode()&&this.existingConfig?.id?this.state.update(this.existingConfig.id,t,n,this.existingConfig):this.state.create(t,n,this.namespaceId??null)).pipe(U(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(false)});}exportYaml(){let e=this.existingConfig?.id;!e||this.isExporting()||(this.isExporting.set(true),this.state.exportAsYaml(e).pipe(U(this.destroyRef)).subscribe({next:t=>{let n=new Blob([t],{type:"application/yaml"}),a=URL.createObjectURL(n),p=document.createElement("a");p.href=a,p.download=`${this.existingConfig?.name??"integration"}.yaml`,p.click(),URL.revokeObjectURL(a),this.isExporting.set(false);},error:()=>this.isExporting.set(false)}));}cancel(){this.navigateBack();}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","integration-configs"]):this.router.navigate(["/agentos",this.namespaceId,"integrations"]);}trackByType(e,t){return t.type}trackByScope(e,t){return t.value}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=mw({type:i,selectors:[["agentos-integration-form"]],decls:6,vars:2,consts:[[3,"title"],["dsButton","","variant","ghost","type","button","title","Back to integrations",3,"click"],[1,"ds-hint"],[1,"ds-form",3,"formGroup"],[1,"ds-form",3,"ngSubmit","formGroup"],["legend","Scope",3,"disabled"],["dsCheck",""],["label","Type","controlId","integration-type","required",""],["dsControl","","id","integration-type",3,"formControl"],["value","","disabled",""],[3,"value"],["label","Name","controlId","integration-name","required",""],["dsControl","","id","integration-name","type","text","placeholder","Integration name","autocomplete","off",3,"formControl"],["label","Description","controlId","integration-description"],["dsControl","","id","integration-description","placeholder","Optional description","rows","3",3,"formControl"],["label","Auth Setting","controlId","integration-auth-setting","hint","Only the name is saved. It is resolved at run time for the user running the case, the most specific layer winning (user on this namespace > namespace > user > platform), so a shared integration can rely on each user's own auth setting of that name."],["dsControl","","id","integration-auth-setting",3,"formControl"],[3,"ngValue"],[1,"ds-stack","ds-stack--sm"],["dsButton","","variant","primary","type","submit",3,"disabled"],["dsButton","","type","button",3,"disabled"],["dsButton","","type","button",3,"click"],["type","radio",3,"value","formControl","disabled"],["type","checkbox",3,"formControl"],[3,"valueChange","schema","value"],["dsButton","","type","button",3,"click","disabled"]],template:function(t,n){t&1&&(Ds(0,"ds-page")(1,"ds-section-header",0)(2,"button",1),mg("click",function(){return n.cancel()}),MC(3," \u2190 Integrations "),pl()(),Pw(4,_e,2,0,"p",2)(5,Te,28,12,"form",3),pl()),t&2&&(jE(),ug("title",n.isEditMode()?"Edit integration":"New integration"),jE(3),Lw(n.isLoading()?4:5));},dependencies:[pn,hn,cn,ln,dn,on,at,an,rn,Ut,nd,bo,xo,Lt,vn,Gt,pa,mo,po,Vn,An,Wt],encapsulation:2})};export{ve as IntegrationFormComponent};
@@ -1,2 +1,2 @@
1
- import {v}from'./chunk-CrsIVVty.js';import {I,n as nt,i as it}from'./chunk-CfD3HGXo.js';import {g,W,F,I as Ie,U as Ui,a9 as F$1,K as KC,A as Af,C as U,G as x,E as w,m as mw,D as Ds,Q as mg,M as MC,a as pl,P as Pw,j as jE,N as ug,L as Lw,q as qw,V as Vw,ao as Bw,T as SI,l as lg,k as Xw,Y as MI,H as Hw,v as vl,ae as kw,O as Og,e as cg,n as df,o as ff}from'./main-AK4FQCWG.js';import {T as Te,a as fn,p as pt,c as pn,h as hn,d as cn,r as ln,e as dn,g as at,i as an,t as rn,U as Ut,n as nd,l as bo,x as xo,L as Lt,G as Gt,w as pa,m as mo,b as po,V as Vn,A as An}from'./chunk-D4o3ka54.js';import'./chunk-CO007ibK.js';function Ce(i,t){i&1&&(Ds(0,"p",2),MC(1,"Loading\u2026"),pl());}function ye(i,t){if(i&1&&(Ds(0,"label",16),lg(1,"input",17),SI(),MC(2),pl()),i&2){let e=t.$implicit,n=Xw(3);jE(),ug("formControl",n.scopeControl)("value",e.value)("disabled",e.value==="namespace"&&!n.isAdmin()),MI(),jE(),vl(" ",e.label," ");}}function ge(i,t){if(i&1&&(Ds(0,"ds-fieldset",5),Vw(1,ye,3,4,"label",16,kw().trackByScope,true),pl()),i&2){let e=Xw(2);ug("disabled",e.isEditMode()),jE(),Hw(e.scopeOptions);}}function fe(i,t){if(i&1&&(Ds(0,"option",8),MC(1),pl()),i&2){let e=t.$implicit,n=Xw(2);ug("value",e),jE(),Og(n.authTypeLabel[e]);}}function Se(i,t){if(i&1&&(Ds(0,"ds-form-field",18),lg(1,"input",19),SI(),pl()),i&2){let e=Xw().$implicit;ug("label",e.label)("controlId","as-cred-"+e.key)("required",e.required)("hint",e.hint??null)("hintId","as-hint-"+e.key),jE(),ug("id","as-cred-"+e.key)("type",e.secret?"password":"text")("placeholder",e.placeholder)("formControl",t)("autocomplete",e.secret?"new-password":"off"),cg("aria-describedby",e.hint?"as-hint-"+e.key:null),MI();}}function Ae(i,t){if(i&1&&Pw(0,Se,2,11,"ds-form-field",18),i&2){let e,n=t.$implicit,o=Xw(3);Lw((e=o.controlForField(n.key))?0:-1,e);}}function ve(i,t){if(i&1&&(Ds(0,"ds-fieldset",13),Vw(1,Ae,1,1,null,null,kw().trackByField,true),pl()),i&2){let e=Xw(2);ug("hint","Values are stored encrypted and masked on read."+(e.isEditMode()?" Leave a field unchanged to keep the stored credential.":"")),jE(),Hw(e.credentialFields());}}function be(i,t){if(i&1){let e=qw();Ds(0,"form",4),mg("ngSubmit",function(){df(e);let o=Xw();return ff(o.submit())}),Pw(1,ge,3,1,"ds-fieldset",5),Ds(2,"ds-form-field",6)(3,"select",7),Vw(4,fe,2,2,"option",8,Bw),pl(),SI(),pl(),Ds(6,"ds-form-field",9),lg(7,"input",10),SI(),pl(),Ds(8,"ds-form-field",11),lg(9,"input",12),SI(),pl(),Pw(10,ve,3,1,"ds-fieldset",13),Ds(11,"ds-form-actions")(12,"button",14),MC(13),pl(),Ds(14,"button",15),mg("click",function(){df(e);let o=Xw();return ff(o.cancel())}),MC(15,"Cancel"),pl()()();}if(i&2){let e=Xw();ug("formGroup",e.form),jE(),Lw(e.isPlatformMode?-1:1),jE(2),ug("formControl",e.authTypeControl),MI(),jE(),Hw(e.authTypeOptions),jE(3),ug("formControl",e.nameControl),MI(),jE(2),ug("formControl",e.descriptionControl),MI(),jE(),Lw(e.credentialFields().length>0?10:-1),jE(2),ug("disabled",e.form.invalid||e.isSubmitting()),jE(),vl(" ",e.isEditMode()?"Save changes":"Create"," ");}}var ke=new Set(["namespace","userOnNs","userGlobal"]),D=Object.freeze({platform:"Platform (read-only)",namespace:"Namespace configuration",userOnNs:"Personal \u2014 this namespace only",userGlobal:"Personal \u2014 all namespaces"}),_e={ApiKeyAuthSetting:[{key:"apiKey",label:"API Key",placeholder:"sk-\u2026",secret:true,required:false}],BasicAuthAuthSetting:[{key:"username",label:"Username",placeholder:"user@example.com",secret:false,required:false},{key:"password",label:"Password",placeholder:"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",secret:true,required:false}],BearerTokenAuthSetting:[{key:"token",label:"Bearer token",placeholder:"eyJ\u2026",secret:true,required:false}],OAuthDiscoverableAuthSetting:[{key:"discoveryUrl",label:"Discovery URL",placeholder:"https://\u2026/.well-known/openid-configuration",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Space-separated OAuth scopes to request (e.g. openid profile email). Check your provider's documentation for the exact values.",secret:false,required:false}],OAuthCustomAuthSetting:[{key:"authorizationUrl",label:"Authorization URL",placeholder:"https://\u2026/authorize",secret:false,required:false},{key:"tokenUrl",label:"Token URL",placeholder:"https://\u2026/token",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Space-separated OAuth scopes to request (e.g. openid profile email). Check your provider's documentation for the exact values.",secret:false,required:false}],OAuthRegisteredAuthSetting:[{key:"authorizationUrl",label:"Authorization URL",placeholder:"https://\u2026/authorize",secret:false,required:false},{key:"tokenUrl",label:"Token URL",placeholder:"https://\u2026/token",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Space-separated OAuth scopes to request (e.g. openid profile email). Check your provider's documentation for the exact values.",secret:false,required:false}],OAuthMcpDiscoverableAuthSetting:[{key:"resourceUrl",label:"Resource URL",placeholder:"https://mcp.example.com",hint:"Use the base URL exactly as documented by your provider \u2014 do not append a path suffix. Examples: https://mcp.hubspot.com (HubSpot), https://mcp.atlassian.com/v1/mcp (Atlassian).",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",hint:"Leave empty to let the server register an OAuth client automatically (RFC 7591 dynamic registration). Fill in only if you have a pre-registered client ID from your provider.",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Leave empty in most cases \u2014 the MCP server declares the required scopes itself. Fill in only if your provider explicitly requires client-declared scopes.",secret:false,required:false}]},me=class i{route=g(W);router=g(F);destroyRef=g(Ie);state=g(I);namespaceRole=g(v);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=this.namespaceId===void 0;isAdmin=this.isPlatformMode?Ui(true):F$1(this.namespaceRole.isAdminOfNamespace$(this.namespaceId),{initialValue:false});authTypeOptions=nt;authTypeLabel=it;scopeOptions=[{value:"namespace",label:D.namespace},{value:"userOnNs",label:D.userOnNs},{value:"userGlobal",label:D.userGlobal}];nameControl=new Te("",{nonNullable:true,validators:[fn.required,fn.minLength(1)]});descriptionControl=new Te(null);authTypeControl=new Te("ApiKeyAuthSetting",{nonNullable:true,validators:[fn.required]});scopeControl=new Te("namespace",{nonNullable:true});form=new pt({name:this.nameControl,description:this.descriptionControl,authType:this.authTypeControl,scope:this.scopeControl});apiKeyControl=new Te("",{nonNullable:true});usernameControl=new Te("",{nonNullable:true});passwordControl=new Te("",{nonNullable:true});tokenControl=new Te("",{nonNullable:true});discoveryUrlControl=new Te("",{nonNullable:true});authorizationUrlControl=new Te("",{nonNullable:true});tokenUrlControl=new Te("",{nonNullable:true});clientIdControl=new Te("",{nonNullable:true});clientSecretControl=new Te("",{nonNullable:true});scopesControl=new Te("",{nonNullable:true});resourceUrlControl=new Te("",{nonNullable:true});selectedAuthType=F$1(this.authTypeControl.valueChanges,{initialValue:this.authTypeControl.value});credentialFields=KC(()=>_e[this.selectedAuthType()]);isEditMode=Ui(false);isSubmitting=Ui(false);isLoading=Ui(false);existingConfig=null;initialCredentials={};constructor(){this.isPlatformMode||Af(()=>{this.isAdmin()||this.isEditMode()||this.scopeControl.value==="namespace"&&this.scopeControl.setValue("userOnNs");});}ngOnInit(){this.namespaceId&&this.state.setNamespace(this.namespaceId);let t=this.route.snapshot.paramMap,e=this.route.snapshot.queryParamMap,n=t.get("authSettingId");if(n){this.isEditMode.set(true),this.scopeControl.disable(),this.authTypeControl.disable(),this.loadConfig(n);return}if(this.isPlatformMode){this.scopeControl.setValue("platform"),this.scopeControl.disable();return}let o=this.parseScope(e.get("scope"));this.scopeControl.setValue(o);let v=e.get("template");v&&this.hydrateFromTemplate(v);}parseScope(t){return t&&ke.has(t)?t:"namespace"}deriveScopeFromConfig(t){return !t.userId&&!t.namespaceId?"platform":t.userId?t.namespaceId?"userOnNs":"userGlobal":"namespace"}loadConfig(t){this.isLoading.set(true),this.state.getById(t).pipe(U(this.destroyRef)).subscribe({next:e=>{this.existingConfig=e,this.scopeControl.setValue(this.deriveScopeFromConfig(e)),this.applyConfigToForm(e),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),console.warn(`[AuthSettingForm] Could not load auth setting '${t}' \u2014 navigating back`),this.navigateBack();}});}hydrateFromTemplate(t){this.isLoading.set(true),this.state.getById(t).pipe(U(this.destroyRef)).subscribe({next:e=>{this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??null),this.authTypeControl.setValue(e.authType),this.clearCredentialControls(),this.initialCredentials={},this.isLoading.set(false),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:true});},error:e=>{console.warn(`[AuthSettingForm] Could not hydrate from template ${t}:`,e),this.isLoading.set(false),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:true});}});}applyConfigToForm(t){switch(this.nameControl.setValue(t.name),this.descriptionControl.setValue(t.description??null),this.authTypeControl.setValue(t.authType),this.clearCredentialControls(),this.initialCredentials={},t.authType){case "ApiKeyAuthSetting":{let e=t.apiKey??"";this.apiKeyControl.setValue(e),this.initialCredentials.apiKey=e;break}case "BasicAuthAuthSetting":{let e=t,n=e.username??"",o=e.password??"";this.usernameControl.setValue(n),this.passwordControl.setValue(o),this.initialCredentials.username=n,this.initialCredentials.password=o;break}case "BearerTokenAuthSetting":{let e=t.token??"";this.tokenControl.setValue(e),this.initialCredentials.token=e;break}case "OAuthDiscoverableAuthSetting":{let e=t;this.discoveryUrlControl.setValue(e.discoveryUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.discoveryUrl=e.discoveryUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}case "OAuthCustomAuthSetting":{let e=t;this.authorizationUrlControl.setValue(e.authorizationUrl??""),this.tokenUrlControl.setValue(e.tokenUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.authorizationUrl=e.authorizationUrl??"",this.initialCredentials.tokenUrl=e.tokenUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}case "OAuthRegisteredAuthSetting":{let e=t;this.authorizationUrlControl.setValue(e.authorizationUrl??""),this.tokenUrlControl.setValue(e.tokenUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.authorizationUrl=e.authorizationUrl??"",this.initialCredentials.tokenUrl=e.tokenUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}case "OAuthMcpDiscoverableAuthSetting":{let e=t;this.resourceUrlControl.setValue(e.resourceUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.resourceUrl=e.resourceUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}}}clearCredentialControls(){this.apiKeyControl.setValue(""),this.usernameControl.setValue(""),this.passwordControl.setValue(""),this.tokenControl.setValue(""),this.discoveryUrlControl.setValue(""),this.authorizationUrlControl.setValue(""),this.tokenUrlControl.setValue(""),this.clientIdControl.setValue(""),this.clientSecretControl.setValue(""),this.scopesControl.setValue(""),this.resourceUrlControl.setValue("");}credentialValue(t,e){if(!(this.isEditMode()&&e===this.initialCredentials[t]))return e||void 0}submit(){if(this.form.invalid||this.isSubmitting())return;if(this.isEditMode()&&!this.existingConfig?.id){this.navigateBack();return}this.isSubmitting.set(true);let t=this.nameControl.value.trim(),e=this.descriptionControl.value?.trim()||void 0,n=this.authTypeControl.value,o=this.form.getRawValue().scope,v=this.isPlatformMode?null:this.namespaceId??null,w=this.buildTypedPayload(n,t,e);(this.isEditMode()&&this.existingConfig?.id?this.state.update(this.existingConfig.id,w,this.existingConfig):this.state.create(w,o,v)).pipe(U(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(false)});}buildTypedPayload(t,e,n){let o={name:e,description:n};switch(t){case "ApiKeyAuthSetting":return x(w({},o),{authType:"ApiKeyAuthSetting",apiKey:this.credentialValue("apiKey",this.apiKeyControl.value)});case "BasicAuthAuthSetting":return x(w({},o),{authType:"BasicAuthAuthSetting",username:this.credentialValue("username",this.usernameControl.value),password:this.credentialValue("password",this.passwordControl.value)});case "BearerTokenAuthSetting":return x(w({},o),{authType:"BearerTokenAuthSetting",token:this.credentialValue("token",this.tokenControl.value)});case "OAuthDiscoverableAuthSetting":return x(w({},o),{authType:"OAuthDiscoverableAuthSetting",discoveryUrl:this.credentialValue("discoveryUrl",this.discoveryUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)});case "OAuthCustomAuthSetting":return x(w({},o),{authType:"OAuthCustomAuthSetting",authorizationUrl:this.credentialValue("authorizationUrl",this.authorizationUrlControl.value),tokenUrl:this.credentialValue("tokenUrl",this.tokenUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)});case "OAuthRegisteredAuthSetting":return x(w({},o),{authType:"OAuthRegisteredAuthSetting",authorizationUrl:this.credentialValue("authorizationUrl",this.authorizationUrlControl.value),tokenUrl:this.credentialValue("tokenUrl",this.tokenUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)});case "OAuthMcpDiscoverableAuthSetting":return x(w({},o),{authType:"OAuthMcpDiscoverableAuthSetting",resourceUrl:this.credentialValue("resourceUrl",this.resourceUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)})}}controlForField(t){return {apiKey:this.apiKeyControl,username:this.usernameControl,password:this.passwordControl,token:this.tokenControl,discoveryUrl:this.discoveryUrlControl,authorizationUrl:this.authorizationUrlControl,tokenUrl:this.tokenUrlControl,clientId:this.clientIdControl,clientSecret:this.clientSecretControl,scopes:this.scopesControl,resourceUrl:this.resourceUrlControl}[t]}cancel(){this.navigateBack();}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","auth-settings"]):this.router.navigate(["/agentos",this.namespaceId,"auth-settings"]);}trackByScope(t,e){return e.value}trackByField(t,e){return e.key}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=mw({type:i,selectors:[["agentos-auth-setting-form"]],decls:6,vars:2,consts:[[3,"title"],["dsButton","","variant","ghost","type","button","title","Back to auth settings",3,"click"],[1,"ds-hint"],[1,"ds-form",3,"formGroup"],[1,"ds-form",3,"ngSubmit","formGroup"],["legend","Configuration scope",3,"disabled"],["label","Auth type","controlId","as-auth-type","required",""],["dsControl","","id","as-auth-type",3,"formControl"],[3,"value"],["label","Name","controlId","as-name","required",""],["dsControl","","id","as-name","type","text","placeholder","e.g. GitHub OAuth App","autocomplete","off",3,"formControl"],["label","Description","controlId","as-description"],["dsControl","","id","as-description","type","text","placeholder","Optional \u2014 short description of this auth setting","autocomplete","off",3,"formControl"],["legend","Credentials",3,"hint"],["dsButton","","variant","primary","type","submit",3,"disabled"],["dsButton","","type","button",3,"click"],["dsCheck",""],["type","radio",3,"formControl","value","disabled"],[3,"label","controlId","required","hint","hintId"],["dsControl","",3,"id","type","placeholder","formControl","autocomplete"]],template:function(e,n){e&1&&(Ds(0,"ds-page")(1,"ds-section-header",0)(2,"button",1),mg("click",function(){return n.cancel()}),MC(3," \u2190 Auth settings "),pl()(),Pw(4,Ce,2,0,"p",2)(5,be,16,8,"form",3),pl()),e&2&&(jE(),ug("title",n.isEditMode()?"Edit auth setting":"New auth setting"),jE(3),Lw(n.isLoading()?4:5));},dependencies:[pn,hn,cn,ln,dn,at,an,rn,Ut,nd,bo,xo,Lt,Gt,pa,mo,po,Vn,An],encapsulation:2})};
1
+ import {v}from'./chunk-CguUhMWM.js';import {I,n as nt,i as it}from'./chunk-Br8JIJN0.js';import {g,W,F,I as Ie,U as Ui,a9 as F$1,K as KC,o as Af,E as U,N as x,G as w,m as mw,D as Ds,R as mg,M as MC,a as pl,P as Pw,j as jE,Q as ug,L as Lw,q as qw,i as Vw,ao as Bw,T as SI,l as lg,X as Xw,Y as MI,H as Hw,v as vl,ae as kw,O as Og,f as cg,r as df,s as ff}from'./main-SQW6H4KH.js';import {T as Te,a as fn,p as pt,c as pn,h as hn,d as cn,r as ln,e as dn,g as at,i as an,t as rn,U as Ut,n as nd,l as bo,x as xo,L as Lt,G as Gt,w as pa,m as mo,b as po,V as Vn,A as An}from'./chunk-CjFeVJkb.js';import'./chunk-B9yU35Nk.js';function Ce(i,t){i&1&&(Ds(0,"p",2),MC(1,"Loading\u2026"),pl());}function ye(i,t){if(i&1&&(Ds(0,"label",16),lg(1,"input",17),SI(),MC(2),pl()),i&2){let e=t.$implicit,n=Xw(3);jE(),ug("formControl",n.scopeControl)("value",e.value)("disabled",e.value==="namespace"&&!n.isAdmin()),MI(),jE(),vl(" ",e.label," ");}}function ge(i,t){if(i&1&&(Ds(0,"ds-fieldset",5),Vw(1,ye,3,4,"label",16,kw().trackByScope,true),pl()),i&2){let e=Xw(2);ug("disabled",e.isEditMode()),jE(),Hw(e.scopeOptions);}}function fe(i,t){if(i&1&&(Ds(0,"option",8),MC(1),pl()),i&2){let e=t.$implicit,n=Xw(2);ug("value",e),jE(),Og(n.authTypeLabel[e]);}}function Se(i,t){if(i&1&&(Ds(0,"ds-form-field",18),lg(1,"input",19),SI(),pl()),i&2){let e=Xw().$implicit;ug("label",e.label)("controlId","as-cred-"+e.key)("required",e.required)("hint",e.hint??null)("hintId","as-hint-"+e.key),jE(),ug("id","as-cred-"+e.key)("type",e.secret?"password":"text")("placeholder",e.placeholder)("formControl",t)("autocomplete",e.secret?"new-password":"off"),cg("aria-describedby",e.hint?"as-hint-"+e.key:null),MI();}}function Ae(i,t){if(i&1&&Pw(0,Se,2,11,"ds-form-field",18),i&2){let e,n=t.$implicit,o=Xw(3);Lw((e=o.controlForField(n.key))?0:-1,e);}}function ve(i,t){if(i&1&&(Ds(0,"ds-fieldset",13),Vw(1,Ae,1,1,null,null,kw().trackByField,true),pl()),i&2){let e=Xw(2);ug("hint","Values are stored encrypted and masked on read."+(e.isEditMode()?" Leave a field unchanged to keep the stored credential.":"")),jE(),Hw(e.credentialFields());}}function be(i,t){if(i&1){let e=qw();Ds(0,"form",4),mg("ngSubmit",function(){df(e);let o=Xw();return ff(o.submit())}),Pw(1,ge,3,1,"ds-fieldset",5),Ds(2,"ds-form-field",6)(3,"select",7),Vw(4,fe,2,2,"option",8,Bw),pl(),SI(),pl(),Ds(6,"ds-form-field",9),lg(7,"input",10),SI(),pl(),Ds(8,"ds-form-field",11),lg(9,"input",12),SI(),pl(),Pw(10,ve,3,1,"ds-fieldset",13),Ds(11,"ds-form-actions")(12,"button",14),MC(13),pl(),Ds(14,"button",15),mg("click",function(){df(e);let o=Xw();return ff(o.cancel())}),MC(15,"Cancel"),pl()()();}if(i&2){let e=Xw();ug("formGroup",e.form),jE(),Lw(e.isPlatformMode?-1:1),jE(2),ug("formControl",e.authTypeControl),MI(),jE(),Hw(e.authTypeOptions),jE(3),ug("formControl",e.nameControl),MI(),jE(2),ug("formControl",e.descriptionControl),MI(),jE(),Lw(e.credentialFields().length>0?10:-1),jE(2),ug("disabled",e.form.invalid||e.isSubmitting()),jE(),vl(" ",e.isEditMode()?"Save changes":"Create"," ");}}var ke=new Set(["namespace","userOnNs","userGlobal"]),D=Object.freeze({platform:"Platform (read-only)",namespace:"Namespace configuration",userOnNs:"Personal \u2014 this namespace only",userGlobal:"Personal \u2014 all namespaces"}),_e={ApiKeyAuthSetting:[{key:"apiKey",label:"API Key",placeholder:"sk-\u2026",secret:true,required:false}],BasicAuthAuthSetting:[{key:"username",label:"Username",placeholder:"user@example.com",secret:false,required:false},{key:"password",label:"Password",placeholder:"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",secret:true,required:false}],BearerTokenAuthSetting:[{key:"token",label:"Bearer token",placeholder:"eyJ\u2026",secret:true,required:false}],OAuthDiscoverableAuthSetting:[{key:"discoveryUrl",label:"Discovery URL",placeholder:"https://\u2026/.well-known/openid-configuration",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Space-separated OAuth scopes to request (e.g. openid profile email). Check your provider's documentation for the exact values.",secret:false,required:false}],OAuthCustomAuthSetting:[{key:"authorizationUrl",label:"Authorization URL",placeholder:"https://\u2026/authorize",secret:false,required:false},{key:"tokenUrl",label:"Token URL",placeholder:"https://\u2026/token",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Space-separated OAuth scopes to request (e.g. openid profile email). Check your provider's documentation for the exact values.",secret:false,required:false}],OAuthRegisteredAuthSetting:[{key:"authorizationUrl",label:"Authorization URL",placeholder:"https://\u2026/authorize",secret:false,required:false},{key:"tokenUrl",label:"Token URL",placeholder:"https://\u2026/token",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Space-separated OAuth scopes to request (e.g. openid profile email). Check your provider's documentation for the exact values.",secret:false,required:false}],OAuthMcpDiscoverableAuthSetting:[{key:"resourceUrl",label:"Resource URL",placeholder:"https://mcp.example.com",hint:"Use the base URL exactly as documented by your provider \u2014 do not append a path suffix. Examples: https://mcp.hubspot.com (HubSpot), https://mcp.atlassian.com/v1/mcp (Atlassian).",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",hint:"Leave empty to let the server register an OAuth client automatically (RFC 7591 dynamic registration). Fill in only if you have a pre-registered client ID from your provider.",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Leave empty in most cases \u2014 the MCP server declares the required scopes itself. Fill in only if your provider explicitly requires client-declared scopes.",secret:false,required:false}]},me=class i{route=g(W);router=g(F);destroyRef=g(Ie);state=g(I);namespaceRole=g(v);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=this.namespaceId===void 0;isAdmin=this.isPlatformMode?Ui(true):F$1(this.namespaceRole.isAdminOfNamespace$(this.namespaceId),{initialValue:false});authTypeOptions=nt;authTypeLabel=it;scopeOptions=[{value:"namespace",label:D.namespace},{value:"userOnNs",label:D.userOnNs},{value:"userGlobal",label:D.userGlobal}];nameControl=new Te("",{nonNullable:true,validators:[fn.required,fn.minLength(1)]});descriptionControl=new Te(null);authTypeControl=new Te("ApiKeyAuthSetting",{nonNullable:true,validators:[fn.required]});scopeControl=new Te("namespace",{nonNullable:true});form=new pt({name:this.nameControl,description:this.descriptionControl,authType:this.authTypeControl,scope:this.scopeControl});apiKeyControl=new Te("",{nonNullable:true});usernameControl=new Te("",{nonNullable:true});passwordControl=new Te("",{nonNullable:true});tokenControl=new Te("",{nonNullable:true});discoveryUrlControl=new Te("",{nonNullable:true});authorizationUrlControl=new Te("",{nonNullable:true});tokenUrlControl=new Te("",{nonNullable:true});clientIdControl=new Te("",{nonNullable:true});clientSecretControl=new Te("",{nonNullable:true});scopesControl=new Te("",{nonNullable:true});resourceUrlControl=new Te("",{nonNullable:true});selectedAuthType=F$1(this.authTypeControl.valueChanges,{initialValue:this.authTypeControl.value});credentialFields=KC(()=>_e[this.selectedAuthType()]);isEditMode=Ui(false);isSubmitting=Ui(false);isLoading=Ui(false);existingConfig=null;initialCredentials={};constructor(){this.isPlatformMode||Af(()=>{this.isAdmin()||this.isEditMode()||this.scopeControl.value==="namespace"&&this.scopeControl.setValue("userOnNs");});}ngOnInit(){this.namespaceId&&this.state.setNamespace(this.namespaceId);let t=this.route.snapshot.paramMap,e=this.route.snapshot.queryParamMap,n=t.get("authSettingId");if(n){this.isEditMode.set(true),this.scopeControl.disable(),this.authTypeControl.disable(),this.loadConfig(n);return}if(this.isPlatformMode){this.scopeControl.setValue("platform"),this.scopeControl.disable();return}let o=this.parseScope(e.get("scope"));this.scopeControl.setValue(o);let v=e.get("template");v&&this.hydrateFromTemplate(v);}parseScope(t){return t&&ke.has(t)?t:"namespace"}deriveScopeFromConfig(t){return !t.userId&&!t.namespaceId?"platform":t.userId?t.namespaceId?"userOnNs":"userGlobal":"namespace"}loadConfig(t){this.isLoading.set(true),this.state.getById(t).pipe(U(this.destroyRef)).subscribe({next:e=>{this.existingConfig=e,this.scopeControl.setValue(this.deriveScopeFromConfig(e)),this.applyConfigToForm(e),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),console.warn(`[AuthSettingForm] Could not load auth setting '${t}' \u2014 navigating back`),this.navigateBack();}});}hydrateFromTemplate(t){this.isLoading.set(true),this.state.getById(t).pipe(U(this.destroyRef)).subscribe({next:e=>{this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??null),this.authTypeControl.setValue(e.authType),this.clearCredentialControls(),this.initialCredentials={},this.isLoading.set(false),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:true});},error:e=>{console.warn(`[AuthSettingForm] Could not hydrate from template ${t}:`,e),this.isLoading.set(false),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:true});}});}applyConfigToForm(t){switch(this.nameControl.setValue(t.name),this.descriptionControl.setValue(t.description??null),this.authTypeControl.setValue(t.authType),this.clearCredentialControls(),this.initialCredentials={},t.authType){case "ApiKeyAuthSetting":{let e=t.apiKey??"";this.apiKeyControl.setValue(e),this.initialCredentials.apiKey=e;break}case "BasicAuthAuthSetting":{let e=t,n=e.username??"",o=e.password??"";this.usernameControl.setValue(n),this.passwordControl.setValue(o),this.initialCredentials.username=n,this.initialCredentials.password=o;break}case "BearerTokenAuthSetting":{let e=t.token??"";this.tokenControl.setValue(e),this.initialCredentials.token=e;break}case "OAuthDiscoverableAuthSetting":{let e=t;this.discoveryUrlControl.setValue(e.discoveryUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.discoveryUrl=e.discoveryUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}case "OAuthCustomAuthSetting":{let e=t;this.authorizationUrlControl.setValue(e.authorizationUrl??""),this.tokenUrlControl.setValue(e.tokenUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.authorizationUrl=e.authorizationUrl??"",this.initialCredentials.tokenUrl=e.tokenUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}case "OAuthRegisteredAuthSetting":{let e=t;this.authorizationUrlControl.setValue(e.authorizationUrl??""),this.tokenUrlControl.setValue(e.tokenUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.authorizationUrl=e.authorizationUrl??"",this.initialCredentials.tokenUrl=e.tokenUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}case "OAuthMcpDiscoverableAuthSetting":{let e=t;this.resourceUrlControl.setValue(e.resourceUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.resourceUrl=e.resourceUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}}}clearCredentialControls(){this.apiKeyControl.setValue(""),this.usernameControl.setValue(""),this.passwordControl.setValue(""),this.tokenControl.setValue(""),this.discoveryUrlControl.setValue(""),this.authorizationUrlControl.setValue(""),this.tokenUrlControl.setValue(""),this.clientIdControl.setValue(""),this.clientSecretControl.setValue(""),this.scopesControl.setValue(""),this.resourceUrlControl.setValue("");}credentialValue(t,e){if(!(this.isEditMode()&&e===this.initialCredentials[t]))return e||void 0}submit(){if(this.form.invalid||this.isSubmitting())return;if(this.isEditMode()&&!this.existingConfig?.id){this.navigateBack();return}this.isSubmitting.set(true);let t=this.nameControl.value.trim(),e=this.descriptionControl.value?.trim()||void 0,n=this.authTypeControl.value,o=this.form.getRawValue().scope,v=this.isPlatformMode?null:this.namespaceId??null,w=this.buildTypedPayload(n,t,e);(this.isEditMode()&&this.existingConfig?.id?this.state.update(this.existingConfig.id,w,this.existingConfig):this.state.create(w,o,v)).pipe(U(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(false)});}buildTypedPayload(t,e,n){let o={name:e,description:n};switch(t){case "ApiKeyAuthSetting":return x(w({},o),{authType:"ApiKeyAuthSetting",apiKey:this.credentialValue("apiKey",this.apiKeyControl.value)});case "BasicAuthAuthSetting":return x(w({},o),{authType:"BasicAuthAuthSetting",username:this.credentialValue("username",this.usernameControl.value),password:this.credentialValue("password",this.passwordControl.value)});case "BearerTokenAuthSetting":return x(w({},o),{authType:"BearerTokenAuthSetting",token:this.credentialValue("token",this.tokenControl.value)});case "OAuthDiscoverableAuthSetting":return x(w({},o),{authType:"OAuthDiscoverableAuthSetting",discoveryUrl:this.credentialValue("discoveryUrl",this.discoveryUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)});case "OAuthCustomAuthSetting":return x(w({},o),{authType:"OAuthCustomAuthSetting",authorizationUrl:this.credentialValue("authorizationUrl",this.authorizationUrlControl.value),tokenUrl:this.credentialValue("tokenUrl",this.tokenUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)});case "OAuthRegisteredAuthSetting":return x(w({},o),{authType:"OAuthRegisteredAuthSetting",authorizationUrl:this.credentialValue("authorizationUrl",this.authorizationUrlControl.value),tokenUrl:this.credentialValue("tokenUrl",this.tokenUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)});case "OAuthMcpDiscoverableAuthSetting":return x(w({},o),{authType:"OAuthMcpDiscoverableAuthSetting",resourceUrl:this.credentialValue("resourceUrl",this.resourceUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)})}}controlForField(t){return {apiKey:this.apiKeyControl,username:this.usernameControl,password:this.passwordControl,token:this.tokenControl,discoveryUrl:this.discoveryUrlControl,authorizationUrl:this.authorizationUrlControl,tokenUrl:this.tokenUrlControl,clientId:this.clientIdControl,clientSecret:this.clientSecretControl,scopes:this.scopesControl,resourceUrl:this.resourceUrlControl}[t]}cancel(){this.navigateBack();}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","auth-settings"]):this.router.navigate(["/agentos",this.namespaceId,"auth-settings"]);}trackByScope(t,e){return e.value}trackByField(t,e){return e.key}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=mw({type:i,selectors:[["agentos-auth-setting-form"]],decls:6,vars:2,consts:[[3,"title"],["dsButton","","variant","ghost","type","button","title","Back to auth settings",3,"click"],[1,"ds-hint"],[1,"ds-form",3,"formGroup"],[1,"ds-form",3,"ngSubmit","formGroup"],["legend","Configuration scope",3,"disabled"],["label","Auth type","controlId","as-auth-type","required",""],["dsControl","","id","as-auth-type",3,"formControl"],[3,"value"],["label","Name","controlId","as-name","required",""],["dsControl","","id","as-name","type","text","placeholder","e.g. GitHub OAuth App","autocomplete","off",3,"formControl"],["label","Description","controlId","as-description"],["dsControl","","id","as-description","type","text","placeholder","Optional \u2014 short description of this auth setting","autocomplete","off",3,"formControl"],["legend","Credentials",3,"hint"],["dsButton","","variant","primary","type","submit",3,"disabled"],["dsButton","","type","button",3,"click"],["dsCheck",""],["type","radio",3,"formControl","value","disabled"],[3,"label","controlId","required","hint","hintId"],["dsControl","",3,"id","type","placeholder","formControl","autocomplete"]],template:function(e,n){e&1&&(Ds(0,"ds-page")(1,"ds-section-header",0)(2,"button",1),mg("click",function(){return n.cancel()}),MC(3," \u2190 Auth settings "),pl()(),Pw(4,Ce,2,0,"p",2)(5,be,16,8,"form",3),pl()),e&2&&(jE(),ug("title",n.isEditMode()?"Edit auth setting":"New auth setting"),jE(3),Lw(n.isLoading()?4:5));},dependencies:[pn,hn,cn,ln,dn,at,an,rn,Ut,nd,bo,xo,Lt,Gt,pa,mo,po,Vn,An],encapsulation:2})};
2
2
  export{me as AuthSettingFormComponent};
@@ -1 +1 @@
1
- import {i}from'./chunk-CO007ibK.js';import {y}from'./chunk-D4o3ka54.js';import {g,af as G,aI as ve,$ as wr,at as wy,a1 as fa,a2 as da,aa as Cr,ad as ne,aD as Uy,a5 as yd,a6 as x}from'./main-AK4FQCWG.js';var u=s=>s,N="none",w="me",O=class s{nsController=g(G);exportService=g(ve);userState=g(y);refresh$=new wr(void 0);namespaceId$=new wr(null);vm$=wy([this.namespaceId$,this.refresh$]).pipe(fa(([e])=>{let n=this.loadPlatformConfigs().pipe(da(()=>Cr([]))),t=this.loadUserConfigs("global").pipe(da(()=>Cr([])));return e?wy([n,this.loadNamespaceConfigs(e).pipe(da(()=>Cr([]))),this.loadUserConfigs(e).pipe(da(()=>Cr([]))),t]).pipe(ne(([i,r,c,g])=>({platform:i,namespace:r,userOnNs:c,userGlobal:g}))):wy([n,t]).pipe(ne(([i,r])=>({platform:i,namespace:[],userOnNs:[],userGlobal:r})))}),Uy({bufferSize:1,refCount:true}));setNamespace(e){this.namespaceId$.value!==e&&this.namespaceId$.next(e);}refresh(){this.refresh$.next();}loadPlatformConfigs(){return this.nsController.listIntegrationConfig(N)}loadUserConfigs(e){let n=e==="global"?N:e;return this.nsController.listIntegrationConfig(n,w)}userGlobal$=i(this.refresh$,()=>this.loadUserConfigs("global"),[]);loadNamespaceConfigs(e){return e?this.nsController.listIntegrationConfig(e):Cr([])}getById(e,n){return this.nsController.getByIdIntegrationConfig(e)}create(e,n,t){let r=this.userState.currentUser()?.id;if((n==="userOnNs"||n==="userGlobal")&&!r)throw new Error(`Cannot create ${n} config before UserStateService.loadMe() resolves \u2014 call loadMe() at app init`);if(n==="platform"){let g={name:e.name,integrationType:e.integrationType,description:e.description,parameters:e.parameters,authSettingName:e.authSettingName??void 0,autoGrant:e.autoGrant??false};return this.nsController.createIntegrationConfig(u(g)).pipe(yd(()=>this.refresh()))}if(n==="namespace"){if(!t)throw new Error("Cannot create namespace-scoped config without a namespaceId");let g={name:e.name,integrationType:e.integrationType,description:e.description,namespaceId:t,parameters:e.parameters,authSettingName:e.authSettingName??void 0,autoGrant:e.autoGrant??false};return this.nsController.createIntegrationConfig(u(g)).pipe(yd(()=>this.refresh()))}if(n==="userOnNs"&&!t)throw new Error("Cannot create userOnNs config without a namespaceId");let c={name:e.name,integrationType:e.integrationType,description:e.description,userId:r,namespaceId:n==="userOnNs"?t:void 0,parameters:e.parameters,authSettingName:e.authSettingName??void 0,autoGrant:e.autoGrant??false};return this.nsController.createIntegrationConfig(u(c)).pipe(yd(()=>this.refresh()))}update(e,n,t,i){let r={name:n.name,integrationType:n.integrationType,description:n.description,userId:i.userId,namespaceId:i.namespaceId,parameters:n.parameters,authSettingName:n.authSettingName??void 0,autoGrant:n.autoGrant??false};return this.nsController.updateIntegrationConfig(e,u(r)).pipe(yd(()=>this.refresh()))}delete(e,n){return this.nsController.deleteIntegrationConfig(e).pipe(yd(()=>this.refresh()))}exportAsYaml(e){return this.exportService.exportAsYaml(e)}static \u0275fac=function(n){return new(n||s)};static \u0275prov=x({token:s,factory:s.\u0275fac,providedIn:"root"})};export{O};
1
+ import {i}from'./chunk-B9yU35Nk.js';import {y}from'./chunk-CjFeVJkb.js';import {g,af as G,aI as ve,$ as wr,at as wy,a1 as fa,a2 as da,aa as Cr,ad as ne,aD as Uy,a5 as yd,a6 as x}from'./main-SQW6H4KH.js';var u=s=>s,N="none",w="me",O=class s{nsController=g(G);exportService=g(ve);userState=g(y);refresh$=new wr(void 0);namespaceId$=new wr(null);vm$=wy([this.namespaceId$,this.refresh$]).pipe(fa(([e])=>{let n=this.loadPlatformConfigs().pipe(da(()=>Cr([]))),t=this.loadUserConfigs("global").pipe(da(()=>Cr([])));return e?wy([n,this.loadNamespaceConfigs(e).pipe(da(()=>Cr([]))),this.loadUserConfigs(e).pipe(da(()=>Cr([]))),t]).pipe(ne(([i,r,c,g])=>({platform:i,namespace:r,userOnNs:c,userGlobal:g}))):wy([n,t]).pipe(ne(([i,r])=>({platform:i,namespace:[],userOnNs:[],userGlobal:r})))}),Uy({bufferSize:1,refCount:true}));setNamespace(e){this.namespaceId$.value!==e&&this.namespaceId$.next(e);}refresh(){this.refresh$.next();}loadPlatformConfigs(){return this.nsController.listIntegrationConfig(N)}loadUserConfigs(e){let n=e==="global"?N:e;return this.nsController.listIntegrationConfig(n,w)}userGlobal$=i(this.refresh$,()=>this.loadUserConfigs("global"),[]);loadNamespaceConfigs(e){return e?this.nsController.listIntegrationConfig(e):Cr([])}getById(e,n){return this.nsController.getByIdIntegrationConfig(e)}create(e,n,t){let r=this.userState.currentUser()?.id;if((n==="userOnNs"||n==="userGlobal")&&!r)throw new Error(`Cannot create ${n} config before UserStateService.loadMe() resolves \u2014 call loadMe() at app init`);if(n==="platform"){let g={name:e.name,integrationType:e.integrationType,description:e.description,parameters:e.parameters,authSettingName:e.authSettingName??void 0,autoGrant:e.autoGrant??false};return this.nsController.createIntegrationConfig(u(g)).pipe(yd(()=>this.refresh()))}if(n==="namespace"){if(!t)throw new Error("Cannot create namespace-scoped config without a namespaceId");let g={name:e.name,integrationType:e.integrationType,description:e.description,namespaceId:t,parameters:e.parameters,authSettingName:e.authSettingName??void 0,autoGrant:e.autoGrant??false};return this.nsController.createIntegrationConfig(u(g)).pipe(yd(()=>this.refresh()))}if(n==="userOnNs"&&!t)throw new Error("Cannot create userOnNs config without a namespaceId");let c={name:e.name,integrationType:e.integrationType,description:e.description,userId:r,namespaceId:n==="userOnNs"?t:void 0,parameters:e.parameters,authSettingName:e.authSettingName??void 0,autoGrant:e.autoGrant??false};return this.nsController.createIntegrationConfig(u(c)).pipe(yd(()=>this.refresh()))}update(e,n,t,i){let r={name:n.name,integrationType:n.integrationType,description:n.description,userId:i.userId,namespaceId:i.namespaceId,parameters:n.parameters,authSettingName:n.authSettingName??void 0,autoGrant:n.autoGrant??false};return this.nsController.updateIntegrationConfig(e,u(r)).pipe(yd(()=>this.refresh()))}delete(e,n){return this.nsController.deleteIntegrationConfig(e).pipe(yd(()=>this.refresh()))}exportAsYaml(e){return this.exportService.exportAsYaml(e)}static \u0275fac=function(n){return new(n||s)};static \u0275prov=x({token:s,factory:s.\u0275fac,providedIn:"root"})};export{O};
@@ -1 +1 @@
1
- import {a9 as R,c as pn,h as hn,d as cn,e as dn,C as mn,g as at,i as an}from'./chunk-D4o3ka54.js';import {g,W,F,aU as D,ag as U,I as Ie,U as Ui,C as U$1,B,aV as hy,m as mw,D as Ds,Q as mg,M as MC,a as pl,l as lg,P as Pw,j as jE,N as ug,L as Lw,v as vl,k as Xw,O as Og}from'./main-AK4FQCWG.js';function P(l,t){if(l&1&&(Ds(0,"ds-notice"),MC(1),pl()),l&2){let n=Xw();jE(),Og(n.launchError());}}var T=class l{route=g(W);router=g(F);caseController=g(D);caseState=g(R);agentConfigController=g(U);destroyRef=g(Ie);namespaceId=this.route.snapshot.params.namespaceId;agentConfigId=this.route.snapshot.params.agentConfigId;resolvedAgentConfig=null;payloadJson=Ui("");launchError=Ui(null);isLaunching=Ui(false);isLoading=Ui(false);ngOnInit(){this.isLoading.set(true),this.agentConfigController.getByIdAgentConfig(this.agentConfigId).pipe(U$1(this.destroyRef)).subscribe({next:t=>{this.resolvedAgentConfig=t,t.loopConfig!=null&&this.payloadJson.set(JSON.stringify(t.loopConfig,null,2)),this.isLoading.set(false);},error:()=>{this.isLoading.set(false);}});}launch(){return B(this,null,function*(){this.launchError.set(null),this.isLaunching.set(true);try{let t=this.resolvedAgentConfig??(yield hy(this.agentConfigController.getByIdAgentConfig(this.agentConfigId))),n=yield hy(this.caseController.createCase({namespaceId:this.namespaceId}));this.caseState.addCase(n);let e=n.id??"",d={content:`@${t.name} start`};yield hy(this.caseController.addMessageCase(e,d)),this.router.navigate(["/agentos/home"],{queryParams:{ns:this.namespaceId,case:e}});}catch(t){console.error("[AgentConfigLaunch] Failed to launch loop agent",t),this.launchError.set("Failed to launch the agent loop. Please check the console for details."),this.isLaunching.set(false);}})}back(){this.router.navigate(["/agentos",this.namespaceId,"agent-configs",this.agentConfigId,"edit"]);}static \u0275fac=function(n){return new(n||l)};static \u0275cmp=mw({type:l,selectors:[["agentos-agent-config-launch"]],decls:17,vars:6,consts:[["title","Launch loop agent"],["dsButton","","variant","ghost","type","button","title","Back to agent config",3,"click"],[1,"ds-hint"],["label","Loop configuration (read-only)","controlId","agent-loop-payload"],["dsControl","","mono","","id","agent-loop-payload","rows","15","readonly","","spellcheck","false","autocomplete","off",3,"value","disabled"],["dsButton","","variant","primary","type","button",3,"click","disabled"],["dsButton","","type","button",3,"click","disabled"]],template:function(n,e){n&1&&(Ds(0,"ds-page")(1,"ds-section-header",0)(2,"button",1),mg("click",function(){return e.back()}),MC(3," \u2190 Edit agent config "),pl()(),Ds(4,"p",2),MC(5," The loop configuration below is read from "),Ds(6,"code"),MC(7,"AgentConfig.loopConfig"),pl(),MC(8," and will be used by the backend when the agent loop starts. A new Case will be created and one child case will be launched per entity found. "),pl(),Ds(9,"ds-form-field",3),lg(10,"textarea",4),pl(),Pw(11,P,2,1,"ds-notice"),Ds(12,"ds-form-actions")(13,"button",5),mg("click",function(){return e.launch()}),MC(14),pl(),Ds(15,"button",6),mg("click",function(){return e.back()}),MC(16,"Cancel"),pl()()()),n&2&&(jE(10),ug("value",e.payloadJson())("disabled",e.isLaunching()||e.isLoading()),jE(),Lw(e.launchError()?11:-1),jE(2),ug("disabled",e.isLaunching()),jE(),vl(" ",e.isLaunching()?"Launching\u2026":"Launch"," "),jE(),ug("disabled",e.isLaunching()));},dependencies:[pn,hn,cn,dn,mn,at,an],encapsulation:2})};export{T as AgentConfigLaunchComponent};
1
+ import {a9 as R,c as pn,h as hn,d as cn,e as dn,C as mn,g as at,i as an}from'./chunk-CjFeVJkb.js';import {g,W,F,aU as D,ag as U,I as Ie,U as Ui,E as U$1,B,aV as hy,m as mw,D as Ds,R as mg,M as MC,a as pl,l as lg,P as Pw,j as jE,Q as ug,L as Lw,v as vl,X as Xw,O as Og}from'./main-SQW6H4KH.js';function P(l,t){if(l&1&&(Ds(0,"ds-notice"),MC(1),pl()),l&2){let n=Xw();jE(),Og(n.launchError());}}var T=class l{route=g(W);router=g(F);caseController=g(D);caseState=g(R);agentConfigController=g(U);destroyRef=g(Ie);namespaceId=this.route.snapshot.params.namespaceId;agentConfigId=this.route.snapshot.params.agentConfigId;resolvedAgentConfig=null;payloadJson=Ui("");launchError=Ui(null);isLaunching=Ui(false);isLoading=Ui(false);ngOnInit(){this.isLoading.set(true),this.agentConfigController.getByIdAgentConfig(this.agentConfigId).pipe(U$1(this.destroyRef)).subscribe({next:t=>{this.resolvedAgentConfig=t,t.loopConfig!=null&&this.payloadJson.set(JSON.stringify(t.loopConfig,null,2)),this.isLoading.set(false);},error:()=>{this.isLoading.set(false);}});}launch(){return B(this,null,function*(){this.launchError.set(null),this.isLaunching.set(true);try{let t=this.resolvedAgentConfig??(yield hy(this.agentConfigController.getByIdAgentConfig(this.agentConfigId))),n=yield hy(this.caseController.createCase({namespaceId:this.namespaceId}));this.caseState.addCase(n);let e=n.id??"",d={content:`@${t.name} start`};yield hy(this.caseController.addMessageCase(e,d)),this.router.navigate(["/agentos/home"],{queryParams:{ns:this.namespaceId,case:e}});}catch(t){console.error("[AgentConfigLaunch] Failed to launch loop agent",t),this.launchError.set("Failed to launch the agent loop. Please check the console for details."),this.isLaunching.set(false);}})}back(){this.router.navigate(["/agentos",this.namespaceId,"agent-configs",this.agentConfigId,"edit"]);}static \u0275fac=function(n){return new(n||l)};static \u0275cmp=mw({type:l,selectors:[["agentos-agent-config-launch"]],decls:17,vars:6,consts:[["title","Launch loop agent"],["dsButton","","variant","ghost","type","button","title","Back to agent config",3,"click"],[1,"ds-hint"],["label","Loop configuration (read-only)","controlId","agent-loop-payload"],["dsControl","","mono","","id","agent-loop-payload","rows","15","readonly","","spellcheck","false","autocomplete","off",3,"value","disabled"],["dsButton","","variant","primary","type","button",3,"click","disabled"],["dsButton","","type","button",3,"click","disabled"]],template:function(n,e){n&1&&(Ds(0,"ds-page")(1,"ds-section-header",0)(2,"button",1),mg("click",function(){return e.back()}),MC(3," \u2190 Edit agent config "),pl()(),Ds(4,"p",2),MC(5," The loop configuration below is read from "),Ds(6,"code"),MC(7,"AgentConfig.loopConfig"),pl(),MC(8," and will be used by the backend when the agent loop starts. A new Case will be created and one child case will be launched per entity found. "),pl(),Ds(9,"ds-form-field",3),lg(10,"textarea",4),pl(),Pw(11,P,2,1,"ds-notice"),Ds(12,"ds-form-actions")(13,"button",5),mg("click",function(){return e.launch()}),MC(14),pl(),Ds(15,"button",6),mg("click",function(){return e.back()}),MC(16,"Cancel"),pl()()()),n&2&&(jE(10),ug("value",e.payloadJson())("disabled",e.isLaunching()||e.isLoading()),jE(),Lw(e.launchError()?11:-1),jE(2),ug("disabled",e.isLaunching()),jE(),vl(" ",e.isLaunching()?"Launching\u2026":"Launch"," "),jE(),ug("disabled",e.isLaunching()));},dependencies:[pn,hn,cn,dn,mn,at,an],encapsulation:2})};export{T as AgentConfigLaunchComponent};
@@ -1 +1 @@
1
- import {z as k,O,g as at,h as hn,I as Io,j as ko,P,B as P$1}from'./chunk-D4o3ka54.js';import {g,W as W$1,F,I as Ie,ag as U$1,$ as wr,U as Ui,a1 as fa,ac as Ty,a2 as da,aa as Cr,C as U$2,m as mw,D as Ds,Q as mg,a as pl,M as MC,P as Pw,j as jE,N as ug,L as Lw,k as Xw,O as Og,V as Vw,H as Hw,v as vl,q as qw,n as df,o as ff,e as cg}from'./main-AK4FQCWG.js';var J=(n,e)=>e.key;function U(n,e){if(n&1&&(Ds(0,"p",3),MC(1),pl()),n&2){let t=Xw();jE(),Og(t.deletion.error());}}function z(n,e){n&1&&(Ds(0,"p",4),MC(1,"Loading agent configs\u2026"),pl());}function G(n,e){n&1&&(Ds(0,"p",5),MC(1,"No agent configs available."),pl());}function Q(n,e){n&1&&(Ds(0,"p",4),MC(1,"No agent configs match the current filter."),pl());}function W(n,e){n&1&&(Ds(0,"ds-tag",18),MC(1,"Read-only"),pl());}function X(n,e){if(n&1){let t=qw();Ds(0,"button",22),mg("click",function(){df(t);let s=Xw(2).$implicit,d=Xw(2);return ff(d.launch(s))}),MC(1," Launch "),pl();}if(n&2){let t=Xw(2).$implicit;cg("aria-label","Launch "+t.config.name);}}function Y(n,e){if(n&1){let t=qw();Ds(0,"button",22),mg("click",function(){df(t);let s=Xw(2).$implicit,d=Xw(2);return ff(d.edit(s))}),MC(1," Edit "),pl();}if(n&2){let t=Xw(2).$implicit;cg("aria-label","Edit "+t.config.name);}}function Z(n,e){if(n&1){let t=qw();Ds(0,"button",22),mg("click",function(){df(t);let s=Xw().$implicit,d=Xw(2);return ff(d.inspect(s))}),MC(1," Inspect "),pl(),Pw(2,X,2,1,"button",23),Pw(3,Y,2,1,"button",23);}if(n&2){let t=Xw().$implicit,i=Xw(2);cg("aria-label","Inspect "+t.config.name),jE(2),Lw(i.canLaunch(t)?2:-1),jE(),Lw(t.scope==="namespace"?3:-1);}}function ee(n,e){if(n&1){let t=qw();Ds(0,"agentos-row-delete-action",24),mg("deleteRequested",function(){df(t);let s=Xw().$implicit,d=Xw(2);return ff(d.deletion.request(s.key))})("deleteConfirmed",function(){df(t);let s=Xw().$implicit,d=Xw(2);return ff(d.confirmDelete(s))})("deleteCancelled",function(){df(t);let s=Xw(3);return ff(s.deletion.cancel())}),pl();}if(n&2){let t=Xw().$implicit,i=Xw(2);ug("rowKey",t.key)("rowLabel",t.config.name)("state",i.deletion);}}function te(n,e){if(n&1&&(Ds(0,"tr",9)(1,"td",12),MC(2),pl(),Ds(3,"td",13),MC(4),pl(),Ds(5,"td",14),MC(6),pl(),Ds(7,"td",15)(8,"div",16)(9,"ds-tag",17),MC(10),pl(),Pw(11,W,2,0,"ds-tag",18),pl()(),Ds(12,"td",19)(13,"div",20),Pw(14,Z,4,3),Pw(15,ee,1,3,"agentos-row-delete-action",21),pl()()()),n&2){let t=e.$implicit,i=Xw(2);jE(2),Og(t.config.name),jE(2),vl(" ",t.config.description||"\u2014"," "),jE(2),Og(i.mode(t)),jE(3),ug("variant",t.scope==="platform"?"neutral":"accent"),jE(),Og(t.scope==="platform"?"Platform":"Namespace"),jE(),Lw(t.scope==="platform"?11:-1),jE(3),Lw(i.deletion.confirmingId()!==t.key?14:-1),jE(),Lw(t.scope==="namespace"?15:-1);}}function ne(n,e){if(n&1&&(Ds(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),MC(5,"Name"),pl(),Ds(6,"th",10),MC(7,"Description"),pl(),Ds(8,"th",10),MC(9,"Execution mode"),pl(),Ds(10,"th",10),MC(11,"Scope"),pl(),Ds(12,"th",10)(13,"span",11),MC(14,"Actions"),pl()()()(),Ds(15,"tbody",8),Vw(16,te,16,8,"tr",9,J),pl()()()),n&2){let t=Xw();jE(16),Hw(t.rowFilter.filteredRows());}}var H=class n{route=g(W$1);router=g(F);destroyRef=g(Ie);controller=g(U$1);namespaceId=this.route.snapshot.params.namespaceId;refresh$=new wr(void 0);isLoading=Ui(true);deletion=k();rows=Ui([]);rowFilter=O(this.rows,e=>[e.config.name,e.config.description,this.mode(e),e.scope].filter(Boolean).join(" "));allConfigs$=this.refresh$.pipe(fa(()=>(this.isLoading.set(true),Ty({namespace:this.controller.listByParentAgentConfig(this.namespaceId),platform:this.controller.listPlatformAgentsAgentConfig().pipe(da(()=>Cr([])))}))));constructor(){this.allConfigs$.pipe(U$2(this.destroyRef)).subscribe({next:({namespace:e,platform:t})=>{this.rows.set([...t.map((i,s)=>({key:`platform:${i.id??s}`,config:i,scope:"platform"})),...e.map((i,s)=>({key:`namespace:${i.id??s}`,config:i,scope:"namespace"}))]),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"agent-configs","new"]);}inspect(e){e.config.id&&this.router.navigate(e.scope==="platform"?["/agentos","admin","agent-configs",e.config.id,"inspect"]:["/agentos",this.namespaceId,"agent-configs",e.config.id,"inspect"]);}launch(e){e.scope==="platform"||!e.config.id||this.router.navigate(["/agentos",this.namespaceId,"agent-configs",e.config.id,"launch"]);}edit(e){e.scope==="platform"||!e.config.id||this.router.navigate(["/agentos",this.namespaceId,"agent-configs",e.config.id,"edit"]);}confirmDelete(e){e.scope==="platform"||!e.config.id||this.deletion.execute(e.key,{request$:this.controller.deleteAgentConfig(e.config.id).pipe(U$2(this.destroyRef)),onSuccess:()=>this.refresh$.next(),errorMessage:`Deleting "${e.config.name}" failed. Try again.`});}canLaunch(e){return e.scope==="namespace"&&e.config.executionMode==="LOOP"}mode(e){return e.config.executionMode??(e.config.advancedExecution?"ADVANCED":"SIMPLE")}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=mw({type:n,selectors:[["agentos-namespace-agent-configs"]],decls:9,vars:3,consts:[["title","Agent configs","description","Agent configurations available in this namespace, including configurations inherited from the platform."],["label","Filter agent configs","placeholder","Filter agent configs\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","Agent configs"],["role","rowgroup"],["role","row"],["role","columnheader"],[1,"sr-only"],["role","cell","data-label","Name","data-title","",1,"settings-table__name"],["role","cell","data-label","Description",1,"settings-table__secondary"],["role","cell","data-label","Execution mode"],["role","cell","data-label","Scope"],[1,"settings-table__tags"],[3,"variant"],["variant","outline"],["role","cell","data-label","Actions","data-actions",""],[1,"settings-table__actions"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"rowKey","rowLabel","state"],["type","button",3,"click"],["type","button"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"deleteRequested","deleteConfirmed","deleteCancelled","rowKey","rowLabel","state"]],template:function(t,i){t&1&&(Ds(0,"ds-section-header",0)(1,"agentos-table-filter",1),mg("queryChange",function(d){return i.rowFilter.query.set(d)}),pl(),Ds(2,"button",2),mg("click",function(){return i.openCreateForm()}),MC(3,"New agent config"),pl()(),Pw(4,U,2,1,"p",3),Pw(5,z,2,0,"p",4)(6,G,2,0,"p",5)(7,Q,2,0,"p",4)(8,ne,18,0,"div",6)),t&2&&(jE(),ug("query",i.rowFilter.query()),jE(3),Lw(i.deletion.error()?4:-1),jE(),Lw(i.isLoading()?5:i.rows().length===0?6:i.rowFilter.filteredRows().length===0?7:8));},dependencies:[at,hn,Io,ko,P,P$1],encapsulation:2})};export{H as NamespaceAgentConfigsComponent};
1
+ import {z as k,O,g as at,h as hn,I as Io,j as ko,P,B as P$1}from'./chunk-CjFeVJkb.js';import {g,W as W$1,F,I as Ie,ag as U$1,$ as wr,U as Ui,a1 as fa,ac as Ty,a2 as da,aa as Cr,E as U$2,m as mw,D as Ds,R as mg,a as pl,M as MC,P as Pw,j as jE,Q as ug,L as Lw,X as Xw,O as Og,i as Vw,H as Hw,v as vl,q as qw,r as df,s as ff,f as cg}from'./main-SQW6H4KH.js';var J=(n,e)=>e.key;function U(n,e){if(n&1&&(Ds(0,"p",3),MC(1),pl()),n&2){let t=Xw();jE(),Og(t.deletion.error());}}function z(n,e){n&1&&(Ds(0,"p",4),MC(1,"Loading agent configs\u2026"),pl());}function G(n,e){n&1&&(Ds(0,"p",5),MC(1,"No agent configs available."),pl());}function Q(n,e){n&1&&(Ds(0,"p",4),MC(1,"No agent configs match the current filter."),pl());}function W(n,e){n&1&&(Ds(0,"ds-tag",18),MC(1,"Read-only"),pl());}function X(n,e){if(n&1){let t=qw();Ds(0,"button",22),mg("click",function(){df(t);let s=Xw(2).$implicit,d=Xw(2);return ff(d.launch(s))}),MC(1," Launch "),pl();}if(n&2){let t=Xw(2).$implicit;cg("aria-label","Launch "+t.config.name);}}function Y(n,e){if(n&1){let t=qw();Ds(0,"button",22),mg("click",function(){df(t);let s=Xw(2).$implicit,d=Xw(2);return ff(d.edit(s))}),MC(1," Edit "),pl();}if(n&2){let t=Xw(2).$implicit;cg("aria-label","Edit "+t.config.name);}}function Z(n,e){if(n&1){let t=qw();Ds(0,"button",22),mg("click",function(){df(t);let s=Xw().$implicit,d=Xw(2);return ff(d.inspect(s))}),MC(1," Inspect "),pl(),Pw(2,X,2,1,"button",23),Pw(3,Y,2,1,"button",23);}if(n&2){let t=Xw().$implicit,i=Xw(2);cg("aria-label","Inspect "+t.config.name),jE(2),Lw(i.canLaunch(t)?2:-1),jE(),Lw(t.scope==="namespace"?3:-1);}}function ee(n,e){if(n&1){let t=qw();Ds(0,"agentos-row-delete-action",24),mg("deleteRequested",function(){df(t);let s=Xw().$implicit,d=Xw(2);return ff(d.deletion.request(s.key))})("deleteConfirmed",function(){df(t);let s=Xw().$implicit,d=Xw(2);return ff(d.confirmDelete(s))})("deleteCancelled",function(){df(t);let s=Xw(3);return ff(s.deletion.cancel())}),pl();}if(n&2){let t=Xw().$implicit,i=Xw(2);ug("rowKey",t.key)("rowLabel",t.config.name)("state",i.deletion);}}function te(n,e){if(n&1&&(Ds(0,"tr",9)(1,"td",12),MC(2),pl(),Ds(3,"td",13),MC(4),pl(),Ds(5,"td",14),MC(6),pl(),Ds(7,"td",15)(8,"div",16)(9,"ds-tag",17),MC(10),pl(),Pw(11,W,2,0,"ds-tag",18),pl()(),Ds(12,"td",19)(13,"div",20),Pw(14,Z,4,3),Pw(15,ee,1,3,"agentos-row-delete-action",21),pl()()()),n&2){let t=e.$implicit,i=Xw(2);jE(2),Og(t.config.name),jE(2),vl(" ",t.config.description||"\u2014"," "),jE(2),Og(i.mode(t)),jE(3),ug("variant",t.scope==="platform"?"neutral":"accent"),jE(),Og(t.scope==="platform"?"Platform":"Namespace"),jE(),Lw(t.scope==="platform"?11:-1),jE(3),Lw(i.deletion.confirmingId()!==t.key?14:-1),jE(),Lw(t.scope==="namespace"?15:-1);}}function ne(n,e){if(n&1&&(Ds(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),MC(5,"Name"),pl(),Ds(6,"th",10),MC(7,"Description"),pl(),Ds(8,"th",10),MC(9,"Execution mode"),pl(),Ds(10,"th",10),MC(11,"Scope"),pl(),Ds(12,"th",10)(13,"span",11),MC(14,"Actions"),pl()()()(),Ds(15,"tbody",8),Vw(16,te,16,8,"tr",9,J),pl()()()),n&2){let t=Xw();jE(16),Hw(t.rowFilter.filteredRows());}}var H=class n{route=g(W$1);router=g(F);destroyRef=g(Ie);controller=g(U$1);namespaceId=this.route.snapshot.params.namespaceId;refresh$=new wr(void 0);isLoading=Ui(true);deletion=k();rows=Ui([]);rowFilter=O(this.rows,e=>[e.config.name,e.config.description,this.mode(e),e.scope].filter(Boolean).join(" "));allConfigs$=this.refresh$.pipe(fa(()=>(this.isLoading.set(true),Ty({namespace:this.controller.listByParentAgentConfig(this.namespaceId),platform:this.controller.listPlatformAgentsAgentConfig().pipe(da(()=>Cr([])))}))));constructor(){this.allConfigs$.pipe(U$2(this.destroyRef)).subscribe({next:({namespace:e,platform:t})=>{this.rows.set([...t.map((i,s)=>({key:`platform:${i.id??s}`,config:i,scope:"platform"})),...e.map((i,s)=>({key:`namespace:${i.id??s}`,config:i,scope:"namespace"}))]),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"agent-configs","new"]);}inspect(e){e.config.id&&this.router.navigate(e.scope==="platform"?["/agentos","admin","agent-configs",e.config.id,"inspect"]:["/agentos",this.namespaceId,"agent-configs",e.config.id,"inspect"]);}launch(e){e.scope==="platform"||!e.config.id||this.router.navigate(["/agentos",this.namespaceId,"agent-configs",e.config.id,"launch"]);}edit(e){e.scope==="platform"||!e.config.id||this.router.navigate(["/agentos",this.namespaceId,"agent-configs",e.config.id,"edit"]);}confirmDelete(e){e.scope==="platform"||!e.config.id||this.deletion.execute(e.key,{request$:this.controller.deleteAgentConfig(e.config.id).pipe(U$2(this.destroyRef)),onSuccess:()=>this.refresh$.next(),errorMessage:`Deleting "${e.config.name}" failed. Try again.`});}canLaunch(e){return e.scope==="namespace"&&e.config.executionMode==="LOOP"}mode(e){return e.config.executionMode??(e.config.advancedExecution?"ADVANCED":"SIMPLE")}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=mw({type:n,selectors:[["agentos-namespace-agent-configs"]],decls:9,vars:3,consts:[["title","Agent configs","description","Agent configurations available in this namespace, including configurations inherited from the platform."],["label","Filter agent configs","placeholder","Filter agent configs\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","Agent configs"],["role","rowgroup"],["role","row"],["role","columnheader"],[1,"sr-only"],["role","cell","data-label","Name","data-title","",1,"settings-table__name"],["role","cell","data-label","Description",1,"settings-table__secondary"],["role","cell","data-label","Execution mode"],["role","cell","data-label","Scope"],[1,"settings-table__tags"],[3,"variant"],["variant","outline"],["role","cell","data-label","Actions","data-actions",""],[1,"settings-table__actions"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"rowKey","rowLabel","state"],["type","button",3,"click"],["type","button"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"deleteRequested","deleteConfirmed","deleteCancelled","rowKey","rowLabel","state"]],template:function(t,i){t&1&&(Ds(0,"ds-section-header",0)(1,"agentos-table-filter",1),mg("queryChange",function(d){return i.rowFilter.query.set(d)}),pl(),Ds(2,"button",2),mg("click",function(){return i.openCreateForm()}),MC(3,"New agent config"),pl()(),Pw(4,U,2,1,"p",3),Pw(5,z,2,0,"p",4)(6,G,2,0,"p",5)(7,Q,2,0,"p",4)(8,ne,18,0,"div",6)),t&2&&(jE(),ug("query",i.rowFilter.query()),jE(3),Lw(i.deletion.error()?4:-1),jE(),Lw(i.isLoading()?5:i.rows().length===0?6:i.rowFilter.filteredRows().length===0?7:8));},dependencies:[at,hn,Io,ko,P,P$1],encapsulation:2})};export{H as NamespaceAgentConfigsComponent};
@@ -33,5 +33,5 @@
33
33
  <style>:root{--color-bg:#f5f6f8;--color-bg-solid:#f5f6f8;--color-bg-secondary:rgba(255, 255, 255, .7);--color-bg-secondary-rgb:255 255 255;--color-text:#1d1d1f;--color-text-secondary:#6e6e73;--color-text-inverse:#ffffff;--color-text-tertiary:#a1a1a6;--color-primary:#007aff;--color-primary-hover:#0051d5;--color-accent:#8b5cf6;--color-link:#007aff;--color-border:rgba(0, 0, 0, .1);--color-border-light:rgba(40, 40, 40, .08);--color-input-bg:rgba(255, 255, 255, .8);--color-bg-hover:rgba(0, 0, 0, .04);--color-success:#34c759;--color-success-bg:#e3f5e1;--color-error:#ff3b30;--color-warning:#ff9500;--color-info:#5ac8fa;--color-message-user:rgba(0, 122, 255, .1);--color-message-ai:rgba(255, 255, 255, .8);--color-code-bg:rgba(142, 142, 147, .12);--color-code-text:#ff375f;--glass-bg:rgba(255, 255, 255, .72);--glass-border:rgba(255, 255, 255, .18);--glass-shadow:0 8px 32px 0 rgba(31, 38, 135, .15);--glass-backdrop-blur:blur(20px);--color-modal-bg:#ffffff;--color-surface:#ffffff;--color-modal-border:rgba(0, 0, 0, .12);--color-modal-shadow:0 8px 40px rgba(0, 0, 0, .18), 0 2px 8px rgba(0, 0, 0, .1);--color-shadow:rgba(0, 0, 0, .08);--color-overlay:rgba(0, 0, 0, .4);--color-surface-hover:var(--color-bg-hover);--color-surface-secondary:rgba(0, 0, 0, .03);--color-surface-muted:rgba(0, 0, 0, .05);--color-divider:rgba(0, 0, 0, .1)}*{box-sizing:border-box}html{color-scheme:light}html{--mat-sys-background:light-dark(#faf9fd, #121316);--mat-sys-error:light-dark(#ba1a1a, #ffb4ab);--mat-sys-error-container:light-dark(#ffdad6, #93000a);--mat-sys-inverse-on-surface:light-dark(#f2f0f4, #2f3033);--mat-sys-inverse-primary:light-dark(#abc7ff, #005cbb);--mat-sys-inverse-surface:light-dark(#2f3033, #e3e2e6);--mat-sys-on-background:light-dark(#1a1b1f, #e3e2e6);--mat-sys-on-error:light-dark(#ffffff, #690005);--mat-sys-on-error-container:light-dark(#93000a, #ffdad6);--mat-sys-on-primary:light-dark(#ffffff, #002f65);--mat-sys-on-primary-container:light-dark(#00458f, #d7e3ff);--mat-sys-on-primary-fixed:light-dark(#001b3f, #001b3f);--mat-sys-on-primary-fixed-variant:light-dark(#00458f, #00458f);--mat-sys-on-secondary:light-dark(#ffffff, #283041);--mat-sys-on-secondary-container:light-dark(#3e4759, #dae2f9);--mat-sys-on-secondary-fixed:light-dark(#131c2b, #131c2b);--mat-sys-on-secondary-fixed-variant:light-dark(#3e4759, #3e4759);--mat-sys-on-surface:light-dark(#1a1b1f, #e3e2e6);--mat-sys-on-surface-variant:light-dark(#44474e, #e0e2ec);--mat-sys-on-tertiary:light-dark(#ffffff, #002f65);--mat-sys-on-tertiary-container:light-dark(#00458f, #d7e3ff);--mat-sys-on-tertiary-fixed:light-dark(#001b3f, #001b3f);--mat-sys-on-tertiary-fixed-variant:light-dark(#00458f, #00458f);--mat-sys-outline:light-dark(#74777f, #8e9099);--mat-sys-outline-variant:light-dark(#c4c6d0, #44474e);--mat-sys-primary:light-dark(#005cbb, #abc7ff);--mat-sys-primary-container:light-dark(#d7e3ff, #00458f);--mat-sys-primary-fixed:light-dark(#d7e3ff, #d7e3ff);--mat-sys-primary-fixed-dim:light-dark(#abc7ff, #abc7ff);--mat-sys-scrim:light-dark(#000000, #000000);--mat-sys-secondary:light-dark(#565e71, #bec6dc);--mat-sys-secondary-container:light-dark(#dae2f9, #3e4759);--mat-sys-secondary-fixed:light-dark(#dae2f9, #dae2f9);--mat-sys-secondary-fixed-dim:light-dark(#bec6dc, #bec6dc);--mat-sys-shadow:light-dark(#000000, #000000);--mat-sys-surface:light-dark(#faf9fd, #121316);--mat-sys-surface-bright:light-dark(#faf9fd, #38393c);--mat-sys-surface-container:light-dark(#efedf0, #1f2022);--mat-sys-surface-container-high:light-dark(#e9e7eb, #292a2c);--mat-sys-surface-container-highest:light-dark(#e3e2e6, #343537);--mat-sys-surface-container-low:light-dark(#f4f3f6, #1a1b1f);--mat-sys-surface-container-lowest:light-dark(#ffffff, #0d0e11);--mat-sys-surface-dim:light-dark(#dbd9dd, #121316);--mat-sys-surface-tint:light-dark(#005cbb, #abc7ff);--mat-sys-surface-variant:light-dark(#e0e2ec, #44474e);--mat-sys-tertiary:light-dark(#005cbb, #abc7ff);--mat-sys-tertiary-container:light-dark(#d7e3ff, #00458f);--mat-sys-tertiary-fixed:light-dark(#d7e3ff, #d7e3ff);--mat-sys-tertiary-fixed-dim:light-dark(#abc7ff, #abc7ff);--mat-sys-neutral-variant20:#2d3038;--mat-sys-neutral10:#1a1b1f;--mat-sys-level0:0px 0px 0px 0px rgba(0, 0, 0, .2), 0px 0px 0px 0px rgba(0, 0, 0, .14), 0px 0px 0px 0px rgba(0, 0, 0, .12);--mat-sys-level1:0px 2px 1px -1px rgba(0, 0, 0, .2), 0px 1px 1px 0px rgba(0, 0, 0, .14), 0px 1px 3px 0px rgba(0, 0, 0, .12);--mat-sys-level2:0px 3px 3px -2px rgba(0, 0, 0, .2), 0px 3px 4px 0px rgba(0, 0, 0, .14), 0px 1px 8px 0px rgba(0, 0, 0, .12);--mat-sys-level3:0px 3px 5px -1px rgba(0, 0, 0, .2), 0px 6px 10px 0px rgba(0, 0, 0, .14), 0px 1px 18px 0px rgba(0, 0, 0, .12);--mat-sys-level4:0px 5px 5px -3px rgba(0, 0, 0, .2), 0px 8px 10px 1px rgba(0, 0, 0, .14), 0px 3px 14px 2px rgba(0, 0, 0, .12);--mat-sys-level5:0px 7px 8px -4px rgba(0, 0, 0, .2), 0px 12px 17px 2px rgba(0, 0, 0, .14), 0px 5px 22px 4px rgba(0, 0, 0, .12);--mat-sys-body-large:400 1rem / 1.5rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-body-large-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-body-large-line-height:1.5rem;--mat-sys-body-large-size:1rem;--mat-sys-body-large-tracking:.031rem;--mat-sys-body-large-weight:400;--mat-sys-body-medium:400 .875rem / 1.25rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-body-medium-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-body-medium-line-height:1.25rem;--mat-sys-body-medium-size:.875rem;--mat-sys-body-medium-tracking:.016rem;--mat-sys-body-medium-weight:400;--mat-sys-body-small:400 .75rem / 1rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-body-small-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-body-small-line-height:1rem;--mat-sys-body-small-size:.75rem;--mat-sys-body-small-tracking:.025rem;--mat-sys-body-small-weight:400;--mat-sys-display-large:400 3.562rem / 4rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-display-large-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-display-large-line-height:4rem;--mat-sys-display-large-size:3.562rem;--mat-sys-display-large-tracking:-.016rem;--mat-sys-display-large-weight:400;--mat-sys-display-medium:400 2.812rem / 3.25rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-display-medium-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-display-medium-line-height:3.25rem;--mat-sys-display-medium-size:2.812rem;--mat-sys-display-medium-tracking:0;--mat-sys-display-medium-weight:400;--mat-sys-display-small:400 2.25rem / 2.75rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-display-small-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-display-small-line-height:2.75rem;--mat-sys-display-small-size:2.25rem;--mat-sys-display-small-tracking:0;--mat-sys-display-small-weight:400;--mat-sys-headline-large:400 2rem / 2.5rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-headline-large-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-headline-large-line-height:2.5rem;--mat-sys-headline-large-size:2rem;--mat-sys-headline-large-tracking:0;--mat-sys-headline-large-weight:400;--mat-sys-headline-medium:400 1.75rem / 2.25rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-headline-medium-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-headline-medium-line-height:2.25rem;--mat-sys-headline-medium-size:1.75rem;--mat-sys-headline-medium-tracking:0;--mat-sys-headline-medium-weight:400;--mat-sys-headline-small:400 1.5rem / 2rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-headline-small-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-headline-small-line-height:2rem;--mat-sys-headline-small-size:1.5rem;--mat-sys-headline-small-tracking:0;--mat-sys-headline-small-weight:400;--mat-sys-label-large:500 .875rem / 1.25rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-label-large-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-label-large-line-height:1.25rem;--mat-sys-label-large-size:.875rem;--mat-sys-label-large-tracking:.006rem;--mat-sys-label-large-weight:500;--mat-sys-label-large-weight-prominent:700;--mat-sys-label-medium:500 .75rem / 1rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-label-medium-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-label-medium-line-height:1rem;--mat-sys-label-medium-size:.75rem;--mat-sys-label-medium-tracking:.031rem;--mat-sys-label-medium-weight:500;--mat-sys-label-medium-weight-prominent:700;--mat-sys-label-small:500 .688rem / 1rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-label-small-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-label-small-line-height:1rem;--mat-sys-label-small-size:.688rem;--mat-sys-label-small-tracking:.031rem;--mat-sys-label-small-weight:500;--mat-sys-title-large:400 1.375rem / 1.75rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-title-large-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-title-large-line-height:1.75rem;--mat-sys-title-large-size:1.375rem;--mat-sys-title-large-tracking:0;--mat-sys-title-large-weight:400;--mat-sys-title-medium:500 1rem / 1.5rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-title-medium-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-title-medium-line-height:1.5rem;--mat-sys-title-medium-size:1rem;--mat-sys-title-medium-tracking:.009rem;--mat-sys-title-medium-weight:500;--mat-sys-title-small:500 .875rem / 1.25rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-title-small-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-title-small-line-height:1.25rem;--mat-sys-title-small-size:.875rem;--mat-sys-title-small-tracking:.006rem;--mat-sys-title-small-weight:500;--mat-sys-corner-extra-large:28px;--mat-sys-corner-extra-large-top:28px 28px 0 0;--mat-sys-corner-extra-small:4px;--mat-sys-corner-extra-small-top:4px 4px 0 0;--mat-sys-corner-full:9999px;--mat-sys-corner-large:16px;--mat-sys-corner-large-end:0 16px 16px 0;--mat-sys-corner-large-start:16px 0 0 16px;--mat-sys-corner-large-top:16px 16px 0 0;--mat-sys-corner-medium:12px;--mat-sys-corner-none:0;--mat-sys-corner-small:8px;--mat-sys-dragged-state-layer-opacity:.16;--mat-sys-focus-state-layer-opacity:.12;--mat-sys-hover-state-layer-opacity:.08;--mat-sys-pressed-state-layer-opacity:.12;--mat-snack-bar-container-shape:transparent;--mat-snack-bar-container-color:transparent;--mat-snack-bar-supporting-text-color:var(--color-text)}html,body{margin:0;padding:0;width:100%;height:100%}body{background:var(--color-bg);color:var(--color-text);font-family:-apple-system,BlinkMacSystemFont,SF Pro Display,Segoe UI,Helvetica Neue,Arial,sans-serif;transition:background .3s ease,color .3s ease;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;padding:0!important}</style><link rel="stylesheet" href="styles-VTJT2VI6.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles-VTJT2VI6.css"></noscript></head>
34
34
  <body>
35
35
  <app-root></app-root>
36
- <script src="polyfills-2FSRUXKO.js" type="module"></script><script src="main-AK4FQCWG.js" type="module"></script></body>
36
+ <script src="polyfills-2FSRUXKO.js" type="module"></script><script src="main-SQW6H4KH.js" type="module"></script></body>
37
37
  </html>