@whoz-oss/coday-client 0.0.0-workstream-forge.228 → 0.0.0-workstream-forge.229

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 (51) hide show
  1. package/browser/{chunk-Bjr7FKYe.js → chunk--YGzHIin.js} +1 -1
  2. package/browser/{chunk-ucWYVIhR.js → chunk-3Vx1rD5R.js} +1 -1
  3. package/browser/{chunk-CYPfAgi6.js → chunk-5gpSqnQn.js} +1 -1
  4. package/browser/{chunk-wnG909KK.js → chunk-AcyUOfIh.js} +1 -1
  5. package/browser/{chunk-qeffs5uB.js → chunk-B1o3dWmh.js} +1 -1
  6. package/browser/{chunk-BbULbTE-.js → chunk-B8uIzU0G.js} +1 -1
  7. package/browser/{chunk-CdwiSnSZ.js → chunk-BBzPjvsw.js} +1 -1
  8. package/browser/{chunk-Do3yjTGr.js → chunk-BId2U_hq.js} +1 -1
  9. package/browser/{chunk-DCCVtxUY.js → chunk-BUdycjpO.js} +1 -1
  10. package/browser/{chunk-B_CfL5ct.js → chunk-BV8j_rCq.js} +1 -1
  11. package/browser/{chunk-6p69HsOa.js → chunk-BtKM8wv2.js} +1 -1
  12. package/browser/{chunk-7YWH-FdV.js → chunk-BwOat0Fr.js} +1 -1
  13. package/browser/{chunk-BNVtpBuz.js → chunk-C01VfR54.js} +1 -1
  14. package/browser/{chunk-DDVFqcYY.js → chunk-C5-gpBRH.js} +1 -1
  15. package/browser/{chunk-CVaTzEB2.js → chunk-CEWw7cGY.js} +1 -1
  16. package/browser/{chunk-Q-_uA4d5.js → chunk-CLPPqS5g.js} +1 -1
  17. package/browser/{chunk-BJoOTamk.js → chunk-CLRKhkc7.js} +1 -1
  18. package/browser/{chunk-DZOFO-hq.js → chunk-CUgq98Mf.js} +1 -1
  19. package/browser/{chunk-C2MCLvYa.js → chunk-CX8BE84p.js} +1 -1
  20. package/browser/{chunk-CSFdqw8r.js → chunk-C_RmLClM.js} +1 -1
  21. package/browser/{chunk-CAOHsMU2.js → chunk-CfNQLZ6W.js} +1 -1
  22. package/browser/{chunk-CgJ89AEq.js → chunk-CfRra85R.js} +1 -1
  23. package/browser/{chunk-B-t8V9u4.js → chunk-CgVnGUs1.js} +1 -1
  24. package/browser/{chunk-BgJ8ySs3.js → chunk-CgzbCnUY.js} +1 -1
  25. package/browser/{chunk-KxPMQW9g.js → chunk-CkMJRn3f.js} +1 -1
  26. package/browser/{chunk-CQO1OiJR.js → chunk-CkZ9hE7I.js} +1 -1
  27. package/browser/{chunk-DKxnQYEw.js → chunk-CxdwffED.js} +1 -1
  28. package/browser/chunk-CzLmUpd_.js +1 -0
  29. package/browser/chunk-D2p21lhx.js +672 -0
  30. package/browser/{chunk-CTc3J6-o.js → chunk-D6nFpZPW.js} +1 -1
  31. package/browser/{chunk-DVh_U_Pz.js → chunk-D6srpqAy.js} +1 -1
  32. package/browser/{chunk-BEy6GrAQ.js → chunk-DDc6Gz4c.js} +1 -1
  33. package/browser/{chunk-RQLqPysh.js → chunk-DGHuRl1e.js} +1 -1
  34. package/browser/{chunk-BkqVneOQ.js → chunk-Db6vnGaO.js} +1 -1
  35. package/browser/{chunk-pWR46qVc.js → chunk-DuKMv3oJ.js} +1 -1
  36. package/browser/{chunk-CPRh25Ns.js → chunk-LvYb61ds.js} +1 -1
  37. package/browser/{chunk-BpaAtA6H.js → chunk-SFtJMlnY.js} +1 -1
  38. package/browser/{chunk-DewdYvKa.js → chunk-UPlPDOdj.js} +1 -1
  39. package/browser/{chunk-YshJHpGX.js → chunk-VzQcXBq_.js} +1 -1
  40. package/browser/{chunk-CHgX-NHl.js → chunk-Xf5AyLpk.js} +1 -1
  41. package/browser/{chunk-BU8nA2oi.js → chunk-bBpGsibr.js} +1 -1
  42. package/browser/{chunk-D7BuhvqM.js → chunk-mKXz_7dg.js} +1 -1
  43. package/browser/{chunk-C1xoalWH.js → chunk-oQqULj8o.js} +1 -1
  44. package/browser/{chunk-DwTR8XO9.js → chunk-oRjOra1Z.js} +1 -1
  45. package/browser/{chunk-CGDxWxaW.js → chunk-sRyyh7vh.js} +1 -1
  46. package/browser/{chunk-TeOKZRPI.js → chunk-xA0P3DA0.js} +1 -1
  47. package/browser/index.html +1 -1
  48. package/browser/{main-ZPG3XUQU.js → main-47BLQXE5.js} +1 -1
  49. package/package.json +1 -1
  50. package/browser/chunk-Bs2lM6dc.js +0 -670
  51. package/browser/chunk-TuIJresS.js +0 -1
@@ -1 +1 @@
1
- import {d as pn,h as hn,o as on,C as mn,i as at,q as sn,K as Oi,M as On}from'./chunk-Bs2lM6dc.js';import {g,W as W$1,F,I as Ie,ag as U,U as Ui,X as XC,G as U$1,y as yw,au as $t,D as Ds,Q as mg,N as NC,p as pl,L as Lw,a as BE,P as ug,j as jw,J as Jw,O as Og,S as Sg,v as vl,H as Hw,m as Uw,Z as Zw,l as lg,av as zC,aw as WC,r as df,s as ff,ax as YD}from'./main-ZPG3XUQU.js';var j=(t,n)=>n.id,z=(t,n)=>n.name;function q(t,n){t&1&&(Ds(0,"p",3),NC(1,"Loading\u2026"),pl());}function Q(t,n){t&1&&(Ds(0,"ds-notice"),NC(1,"Failed to load agent definition."),pl());}function W(t,n){if(t&1&&(Ds(0,"dt"),NC(1,"User context"),pl(),Ds(2,"dd",6),NC(3),pl()),t&2){let e=Jw();BE(3),Og(e.userId);}}function X(t,n){if(t&1){let e=Zw();Ds(0,"ds-card")(1,"ds-disclosure",12),mg("toggled",function(){df(e);let m=Jw(2);return ff(m.toggleSystemPrompt())}),Ds(2,"pre",13),NC(3),pl()()();}if(t&2){let e=Jw(),r=Jw();BE(),ug("open",!r.systemPromptCollapsed()),BE(2),Og(e.systemPrompt);}}function Y(t,n){if(t&1){let e=Zw();Ds(0,"ds-card")(1,"ds-disclosure",14),mg("toggled",function(){df(e);let m=Jw(2);return ff(m.toggleInstructions())}),Ds(2,"pre",13),NC(3),pl()()();}if(t&2){let e=Jw(),r=Jw();BE(),ug("open",!r.instructionsCollapsed()),BE(2),Og(e.instructions);}}function Z(t,n){t&1&&(Ds(0,"p",3),NC(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),NC(1,"platform"),pl());}function te(t,n){t&1&&(Ds(0,"span",17),NC(1,"SKILL.md"),pl());}function ne(t,n){if(t&1&&(Ds(0,"li",15)(1,"span")(2,"span",16),NC(3),pl(),Lw(4,ee,2,0,"span",17),Lw(5,te,2,0,"span",17),pl(),Ds(6,"p",3),NC(7),pl()()),t&2){let e=n.$implicit;BE(3),Og(e.name),BE(),jw(e.namespaceId?-1:4),BE(),jw(e.readOnly?5:-1),BE(2),Og(e.description);}}function ie(t,n){if(t&1&&(Ds(0,"ul",11),Hw(1,ne,8,4,"li",15,j),pl()),t&2){let e=Jw(2);BE(),Uw(e.resolvedSkills());}}function oe(t,n){t&1&&(Ds(0,"p",3),NC(1,"No tools available for this agent."),pl());}function ae(t,n){if(t&1&&(lg(0,"div",19),zC(1,"agentosMarkdown")),t&2){let e=Jw().$implicit;ug("innerHTML",WC(1,1,e.description),YD);}}function de(t,n){if(t&1){let e=Zw();Ds(0,"li")(1,"ds-disclosure",18),mg("toggled",function(){let m=df(e).$implicit,U=Jw(3);return ff(U.toggleTool(m))}),Lw(2,ae,2,3,"div",19),Ds(3,"pre",20),NC(4),pl()()();}if(t&2){let e=n.$implicit,r=Jw(3);BE(),ug("heading",e.name)("open",r.isToolExpanded(e)),BE(),jw(e.description?2:-1),BE(2),Og(r.formatSchema(e.inputSchema));}}function re(t,n){if(t&1&&(Ds(0,"ul",11),Hw(1,de,5,4,"li",null,z),pl()),t&2){let e=Jw();BE(),Uw(e.tools);}}function se(t,n){if(t&1&&(Ds(0,"ds-card",4)(1,"dl",5)(2,"dt"),NC(3,"Name"),pl(),Ds(4,"dd"),NC(5),pl(),Ds(6,"dt"),NC(7,"Resolved model"),pl(),Ds(8,"dd",6),NC(9),pl(),Ds(10,"dt"),NC(11,"Provider"),pl(),Ds(12,"dd"),NC(13),pl(),Ds(14,"dt",7),NC(15,"Execution mode"),pl(),Ds(16,"dd",8)(17,"span",9),NC(18),pl()(),Lw(19,W,4,1),pl()(),Lw(20,X,4,2,"ds-card"),Lw(21,Y,4,2,"ds-card"),Ds(22,"ds-card",10),Lw(23,Z,2,0,"p",3)(24,ie,3,0,"ul",11),pl(),Ds(25,"ds-card",10),Lw(26,oe,2,0,"p",3)(27,re,3,0,"ul",11),pl()),t&2){let e=n,r=Jw();BE(5),Og(e.name),BE(4),Og(e.resolvedModelApiName),BE(4),Og(e.resolvedProviderName),BE(4),Sg("agent-config-inspect__badge--active",e.executionMode!=="SIMPLE"),BE(),vl(" ",e.executionMode," "),BE(),jw(e.userId?19:-1),BE(),jw(e.systemPrompt?20:-1),BE(),jw(e.instructions?21:-1),BE(),ug("heading","Skills ("+r.resolvedSkills().length+")"),BE(),jw(r.resolvedSkills().length===0?23:24),BE(2),ug("heading","Tools ("+e.tools.length+")"),BE(),jw(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=XC(()=>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=yw({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()}),NC(3," \u2190 Agent configs "),pl(),Ds(4,"a",2),NC(5,"Edit config \u2192"),pl()(),Lw(6,q,2,0,"p",3)(7,Q,2,0,"ds-notice")(8,se,28,13),pl()),e&2){let m;BE(4),ug("routerLink",r.editRoute()),BE(2),jw(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 {d as pn,h as hn,o as on,C as mn,i as at,q as sn,K as Oi,M as On}from'./chunk-D2p21lhx.js';import {g,W as W$1,F,I as Ie,ag as U,U as Ui,X as XC,G as U$1,y as yw,au as $t,D as Ds,Q as mg,N as NC,p as pl,L as Lw,a as BE,P as ug,j as jw,J as Jw,O as Og,S as Sg,v as vl,H as Hw,m as Uw,Z as Zw,l as lg,av as zC,aw as WC,r as df,s as ff,ax as YD}from'./main-47BLQXE5.js';var j=(t,n)=>n.id,z=(t,n)=>n.name;function q(t,n){t&1&&(Ds(0,"p",3),NC(1,"Loading\u2026"),pl());}function Q(t,n){t&1&&(Ds(0,"ds-notice"),NC(1,"Failed to load agent definition."),pl());}function W(t,n){if(t&1&&(Ds(0,"dt"),NC(1,"User context"),pl(),Ds(2,"dd",6),NC(3),pl()),t&2){let e=Jw();BE(3),Og(e.userId);}}function X(t,n){if(t&1){let e=Zw();Ds(0,"ds-card")(1,"ds-disclosure",12),mg("toggled",function(){df(e);let m=Jw(2);return ff(m.toggleSystemPrompt())}),Ds(2,"pre",13),NC(3),pl()()();}if(t&2){let e=Jw(),r=Jw();BE(),ug("open",!r.systemPromptCollapsed()),BE(2),Og(e.systemPrompt);}}function Y(t,n){if(t&1){let e=Zw();Ds(0,"ds-card")(1,"ds-disclosure",14),mg("toggled",function(){df(e);let m=Jw(2);return ff(m.toggleInstructions())}),Ds(2,"pre",13),NC(3),pl()()();}if(t&2){let e=Jw(),r=Jw();BE(),ug("open",!r.instructionsCollapsed()),BE(2),Og(e.instructions);}}function Z(t,n){t&1&&(Ds(0,"p",3),NC(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),NC(1,"platform"),pl());}function te(t,n){t&1&&(Ds(0,"span",17),NC(1,"SKILL.md"),pl());}function ne(t,n){if(t&1&&(Ds(0,"li",15)(1,"span")(2,"span",16),NC(3),pl(),Lw(4,ee,2,0,"span",17),Lw(5,te,2,0,"span",17),pl(),Ds(6,"p",3),NC(7),pl()()),t&2){let e=n.$implicit;BE(3),Og(e.name),BE(),jw(e.namespaceId?-1:4),BE(),jw(e.readOnly?5:-1),BE(2),Og(e.description);}}function ie(t,n){if(t&1&&(Ds(0,"ul",11),Hw(1,ne,8,4,"li",15,j),pl()),t&2){let e=Jw(2);BE(),Uw(e.resolvedSkills());}}function oe(t,n){t&1&&(Ds(0,"p",3),NC(1,"No tools available for this agent."),pl());}function ae(t,n){if(t&1&&(lg(0,"div",19),zC(1,"agentosMarkdown")),t&2){let e=Jw().$implicit;ug("innerHTML",WC(1,1,e.description),YD);}}function de(t,n){if(t&1){let e=Zw();Ds(0,"li")(1,"ds-disclosure",18),mg("toggled",function(){let m=df(e).$implicit,U=Jw(3);return ff(U.toggleTool(m))}),Lw(2,ae,2,3,"div",19),Ds(3,"pre",20),NC(4),pl()()();}if(t&2){let e=n.$implicit,r=Jw(3);BE(),ug("heading",e.name)("open",r.isToolExpanded(e)),BE(),jw(e.description?2:-1),BE(2),Og(r.formatSchema(e.inputSchema));}}function re(t,n){if(t&1&&(Ds(0,"ul",11),Hw(1,de,5,4,"li",null,z),pl()),t&2){let e=Jw();BE(),Uw(e.tools);}}function se(t,n){if(t&1&&(Ds(0,"ds-card",4)(1,"dl",5)(2,"dt"),NC(3,"Name"),pl(),Ds(4,"dd"),NC(5),pl(),Ds(6,"dt"),NC(7,"Resolved model"),pl(),Ds(8,"dd",6),NC(9),pl(),Ds(10,"dt"),NC(11,"Provider"),pl(),Ds(12,"dd"),NC(13),pl(),Ds(14,"dt",7),NC(15,"Execution mode"),pl(),Ds(16,"dd",8)(17,"span",9),NC(18),pl()(),Lw(19,W,4,1),pl()(),Lw(20,X,4,2,"ds-card"),Lw(21,Y,4,2,"ds-card"),Ds(22,"ds-card",10),Lw(23,Z,2,0,"p",3)(24,ie,3,0,"ul",11),pl(),Ds(25,"ds-card",10),Lw(26,oe,2,0,"p",3)(27,re,3,0,"ul",11),pl()),t&2){let e=n,r=Jw();BE(5),Og(e.name),BE(4),Og(e.resolvedModelApiName),BE(4),Og(e.resolvedProviderName),BE(4),Sg("agent-config-inspect__badge--active",e.executionMode!=="SIMPLE"),BE(),vl(" ",e.executionMode," "),BE(),jw(e.userId?19:-1),BE(),jw(e.systemPrompt?20:-1),BE(),jw(e.instructions?21:-1),BE(),ug("heading","Skills ("+r.resolvedSkills().length+")"),BE(),jw(r.resolvedSkills().length===0?23:24),BE(2),ug("heading","Tools ("+e.tools.length+")"),BE(),jw(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=XC(()=>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=yw({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()}),NC(3," \u2190 Agent configs "),pl(),Ds(4,"a",2),NC(5,"Edit config \u2192"),pl()(),Lw(6,q,2,0,"p",3)(7,Q,2,0,"ds-notice")(8,se,28,13),pl()),e&2){let m;BE(4),ug("routerLink",r.editRoute()),BE(2),jw(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 {g,aJ as be,a6 as x}from'./main-ZPG3XUQU.js';var c=class r{api=g(be);getById(e){return this.api.getByIdScheduledPrompt(e)}listPlatform(){return this.api.searchScheduledPrompt({namespaceId:null,userId:null})}listByNamespace(e){return this.api.searchScheduledPrompt({namespaceId:e,userId:null})}search(e){return this.api.searchScheduledPrompt(e)}listEffective(e){return this.api.resolveEffectiveScheduledPrompt(e)}create(e){return this.api.createScheduledPrompt(e)}update(e,t){return this.api.updateScheduledPrompt(e,t)}enable(e){return this.api.enableScheduledPrompt(e)}disable(e){return this.api.disableScheduledPrompt(e)}delete(e){return this.api.deleteScheduledPrompt(e)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=x({token:r,factory:r.\u0275fac,providedIn:"root"})};export{c};
1
+ import {g,aJ as be,a6 as x}from'./main-47BLQXE5.js';var c=class r{api=g(be);getById(e){return this.api.getByIdScheduledPrompt(e)}listPlatform(){return this.api.searchScheduledPrompt({namespaceId:null,userId:null})}listByNamespace(e){return this.api.searchScheduledPrompt({namespaceId:e,userId:null})}search(e){return this.api.searchScheduledPrompt(e)}listEffective(e){return this.api.resolveEffectiveScheduledPrompt(e)}create(e){return this.api.createScheduledPrompt(e)}update(e,t){return this.api.updateScheduledPrompt(e,t)}enable(e){return this.api.enableScheduledPrompt(e)}disable(e){return this.api.disableScheduledPrompt(e)}delete(e){return this.api.deleteScheduledPrompt(e)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=x({token:r,factory:r.\u0275fac,providedIn:"root"})};export{c};
@@ -1 +1 @@
1
- import {o as o$1,r,i,l}from'./chunk-1nyEsjkY.js';import {o}from'./chunk-DewdYvKa.js';import {O}from'./chunk-6p69HsOa.js';import {g,W as W$1,F,I as Ie,ag as U,ay as N,U as Ui,az as K,a8 as _,X as XC,a9 as F$1,aA as qe$1,G as U$1,a2 as da,aa as Tr,ac as Ty,ad as ne,M as x,K as w,y as yw,au as $t$1,D as Ds,Q as mg,N as NC,p as pl,L as Lw,a as BE,P as ug,j as jw,aq as k,a6 as x$1,J as Jw,Z as Zw,l as lg,_ as _I,R as NI,k as cg,v as vl,H as Hw,m as Uw,O as Og,r as df,s as ff,as as kg}from'./main-ZPG3XUQU.js';import {p as pt$1,T as Te,a as fn,U as Ut$1,n as nd,b as bo,x as xo,L as Lt$1,k as kn,u as vn,G as Gt$1,m as mo,c as po,$ as $r,H as qr,V as Vn,A as An,d as pn,h as hn,e as cn,r as ln,g as dn,C as mn,i as at$1,j as an,t as rn,l as ko}from'./chunk-Bs2lM6dc.js';import'./chunk-TuIJresS.js';var W=class n{aiModelController=g(k);listAvailable(t){let e=this.aiModelController.listPlatformLevelAiModel().pipe(this.orEmpty("platform")),o=t?this.aiModelController.listByNamespaceIdAiModel(t).pipe(this.orEmpty("namespace")):Tr([]);return Ty({platform:e,namespace:o}).pipe(ne(({platform:r,namespace:d})=>[...r,...d]))}orEmpty(t){return da(e=>(console.error(`[ai-model-state] failed to load the ${t} AI models`,e),Tr([])))}static \u0275fac=function(e){return new(e||n)};static \u0275prov=x$1({token:n,factory:n.\u0275fac,providedIn:"root"})};var D="*";function Ge(n){return (n??[]).some(t=>t.trim()===D)}function Ue(n){let t=(n??[]).map(e=>e.trim()).filter(e=>e.length>0&&e!==D).map(e=>e.toLowerCase());return new Set(t)}function H(n){return n.includes(D)}function Xe(n){let t=n.replace(/[\\.[\]{}()^$|]/g,"\\$&").replace(/\*/g,".*");try{return new RegExp(`^${t}$`,"i")}catch(e){return null}}function z(n,t){return (t??[]).map(e=>e.trim()).filter(e=>e.length>0&&e!==D&&H(e)).some(e=>Xe(e)?.test(n)??false)}var je="AGENTOS_CONFIG",Qe=new Set(["HTTP_API","MCP_HTTP","MCP_STDIO","BASH","TMUX","GIT"]);function Ke(n){return n.configEnabled&&(n.hasSubAgents||n.integrationTypes.some(t=>Qe.has(t)))}var $=n=>n.trim().toLowerCase();function Ze(n,t){let e=o=>o.namespaceId?1:0;return e(n)-e(t)||n.priority-t.priority}var We=(n,t)=>n.label.localeCompare(t.label);function He(n,t){let e=new Map;for(let _ of n){let m=_.alias?.trim();if(!m)continue;let I=e.get($(m));(!I||Ze(_,I)>0)&&e.set($(m),_);}let o=[...e.values()].map(_=>({value:_.alias.trim(),label:`${_.alias.trim()} (${_.apiModelName})`})).sort(We),r=new Set,d=[];for(let _ of n){let m=_.apiModelName?.trim();!m||r.has($(m))||(r.add($(m)),e.has($(m))||d.push({value:m,label:m}));}d.sort(We);let f=t??"";if(f.trim().length===0||[...o,...d].some(_=>_.value===f))return {aliases:o,apiNames:d,current:null};let S=e.has($(f))||r.has($(f));return {aliases:o,apiNames:d,current:{value:f,label:S?f:`${f} (not in the list)`}}}var Ye=(n,t)=>t.value,et=(n,t)=>t.config.id,tt=(n,t)=>t.type,qe=(n,t)=>t.selector;function nt(n,t){if(n&1&&(Ds(0,"a",2),NC(1,"View resolved definition \u2192"),pl()),n&2){let e=Jw();ug("routerLink",e.inspectRoute());}}function ot(n,t){n&1&&(Ds(0,"ds-tag",3),NC(1,"Platform level"),pl());}function it(n,t){n&1&&(Ds(0,"p",4),NC(1,"Loading\u2026"),pl());}function at(n,t){if(n&1&&(lg(0,"input",17),_I()),n&2){let e=Jw(2);ug("formControl",e.modelNameControl),NI();}}function lt(n,t){if(n&1&&(Ds(0,"option",41),NC(1),pl()),n&2){let e=t;ug("ngValue",e.value),BE(),Og(e.label);}}function rt(n,t){if(n&1&&(Ds(0,"option",41),NC(1),pl()),n&2){let e=t.$implicit;ug("ngValue",e.value),BE(),Og(e.label);}}function st(n,t){if(n&1&&(Ds(0,"optgroup",42),Hw(1,rt,2,2,"option",41,Ye),pl()),n&2){let e=Jw(3);BE(),Uw(e.modelOptions().aliases);}}function dt(n,t){if(n&1&&(Ds(0,"option",41),NC(1),pl()),n&2){let e=t.$implicit;ug("ngValue",e.value),BE(),Og(e.label);}}function ct(n,t){if(n&1&&(Ds(0,"optgroup",43),Hw(1,dt,2,2,"option",41,Ye),pl()),n&2){let e=Jw(3);BE(),Uw(e.modelOptions().apiNames);}}function mt(n,t){if(n&1&&(Ds(0,"select",18)(1,"option",40),NC(2,"Select a model"),pl(),Lw(3,lt,2,2,"option",41),Lw(4,st,3,0,"optgroup",42),Lw(5,ct,3,0,"optgroup",43),pl(),_I()),n&2){let e,o=Jw(2);ug("formControl",o.modelNameControl),NI(),BE(),ug("ngValue",null),BE(2),jw((e=o.modelOptions().current)?3:-1,e),BE(),jw(o.modelOptions().aliases.length>0?4:-1),BE(),jw(o.modelOptions().apiNames.length>0?5:-1);}}function ut(n,t){if(n&1&&(Ds(0,"span",44),NC(1),pl()),n&2){let e=Jw().$implicit;BE(),Og(e.config.integrationType);}}function gt(n,t){if(n&1&&(lg(0,"input",45),_I()),n&2){let e=Jw().$implicit;ug("formControl",e.toolsControl),cg("aria-label","Tools of "+e.config.name),NI();}}function pt(n,t){if(n&1){let e=Zw();Ds(0,"div",10)(1,"label",11)(2,"input",23),mg("change",function(){let r=df(e).$implicit,d=Jw(3);return ff(d.toggleIntegration(r))}),pl(),Ds(3,"span",24),NC(4),pl(),Lw(5,ut,2,1,"span",44),pl(),Lw(6,gt,1,2,"input",45),pl();}if(n&2){let e=t.$implicit;BE(2),ug("checked",e.enabled()),BE(2),Og(e.config.name),BE(),jw(e.config.integrationType?5:-1),BE(),jw(e.enabled()?6:-1);}}function ft(n,t){if(n&1&&(Ds(0,"p",13),NC(1),pl()),n&2){let e=Jw().$implicit;BE(),vl(" Restricted to: ",e.restrictedTools.join(", ")," (set outside this form, preserved on save) ");}}function Ct(n,t){if(n&1){let e=Zw();Ds(0,"div",10)(1,"label",24),NC(2),Ds(3,"span",44),NC(4,"built-in"),pl()(),Ds(5,"select",47),mg("change",function(r){let d=df(e).$implicit,f=Jw(4);return ff(f.setBuiltInState(d,r.target.value))}),Ds(6,"option",48),NC(7),pl(),Ds(8,"option",49),NC(9,"Enabled"),pl(),Ds(10,"option",50),NC(11,"Disabled"),pl()(),Lw(12,ft,2,1,"p",13),Ds(13,"p",13),NC(14),pl()();}if(n&2){let e=t.$implicit,o=Jw(4);BE(),cg("for","built-in-"+e.type),BE(),vl(" ",e.displayName," "),BE(3),ug("id","built-in-"+e.type)("value",e.state()),BE(2),Og(o.builtInDefaultLabel(e)),BE(5),jw(e.state()==="on"&&e.restrictedTools?12:-1),BE(2),Og(e.description);}}function _t(n,t){if(n&1&&(Ds(0,"span",46),NC(1,"Built-in integrations"),pl(),Hw(2,Ct,15,7,"div",10,tt)),n&2){let e=Jw(3);BE(2),Uw(e.builtInRows());}}function bt(n,t){n&1&&(Ds(0,"ds-notice",26),NC(1," This agent can read the AgentOS configuration and also has a network integration or sub-agents: what it reads could be sent outside without any confirmation. Prefer a dedicated configuration agent without them. "),pl());}function ht(n,t){if(n&1&&(Ds(0,"ds-fieldset",21),Hw(1,pt,7,4,"div",10,et),Lw(3,_t,4,0),Lw(4,bt,2,0,"ds-notice",26),pl()),n&2){let e=Jw(2);BE(),Uw(e.integrationRows()),BE(2),jw(e.builtInRows().length>0?3:-1),BE(),jw(e.configAgentExposureWarning()?4:-1);}}function yt(n,t){n&1&&NC(0," A platform config can only list platform skills here: namespace skills are resolved per namespace when the agent runs. ");}function vt(n,t){n&1&&(Ds(0,"ds-notice",26),NC(1," Saving with this on replaces the selection below with "),Ds(2,"code",25),NC(3,"*"),pl(),NC(4,". "),pl());}function xt(n,t){n&1&&(Ds(0,"ds-notice"),NC(1," The skill catalogue could not be loaded. What this agent already declares is listed below and preserved on save. "),pl());}function St(n,t){n&1&&(Ds(0,"p",4),NC(1,"No skill available in this scope yet."),pl());}function At(n,t){n&1&&(Ds(0,"span",44),NC(1,"platform"),pl());}function wt(n,t){if(n&1&&(Ds(0,"span",44),NC(1),pl()),n&2){let e=Jw(4);BE(),vl(" ",e.skillCatalogueUnavailable()?"not verified":"no matching skill"," ");}}function Et(n,t){if(n&1&&(Ds(0,"p",13),NC(1),pl()),n&2){let e=Jw().$implicit;BE(),Og(e.description);}}function Tt(n,t){if(n&1){let e=Zw();Ds(0,"div",10)(1,"label",11)(2,"input",51),mg("change",function(){let r=df(e).$implicit,d=Jw(3);return ff(d.toggleSkill(r))}),pl(),Ds(3,"span",24),NC(4),pl(),Lw(5,At,2,0,"span",44),Lw(6,wt,2,1,"span",44),pl(),Lw(7,Et,2,1,"p",13),pl();}if(n&2){let e=t.$implicit,o=Jw(3);BE(2),ug("checked",e.selected())("disabled",o.allSkillsSelected()),BE(2),Og(e.name),BE(),jw(e.platform?5:-1),BE(),jw(e.unresolved?6:-1),BE(),jw(e.description?7:-1);}}function kt(n,t){if(n&1&&Hw(0,Tt,8,6,"div",10,qe),n&2){let e=Jw(2);Uw(e.skillRows());}}function It(n,t){if(n&1&&(Ds(0,"ds-form-field",30),lg(1,"textarea",52),_I(),Ds(2,"p",4),NC(3," Default payload for this loop agent. Overridden at launch time if the first message contains a valid "),Ds(4,"code"),NC(5,"AgentLoopPayload"),pl(),NC(6,". Leave empty if you always provide the payload at launch. "),pl()()),n&2){let e=Jw(2);ug("error",e.loopConfigControl.invalid&&e.loopConfigControl.touched?"Invalid JSON \u2014 please fix the syntax.":null),BE(),ug("placeholder",e.loopConfigPlaceholder)("formControl",e.loopConfigControl),NI();}}function Mt(n,t){n&1&&NC(0," A platform config can only list platform agents here: a namespace's agents are resolved per namespace when the agent runs. ");}function Rt(n,t){if(n&1&&NC(0),n&2){let e=Jw(3);kg(" That deletes ",e.droppedUnresolvedSubAgents()," flagged ",e.droppedUnresolvedSubAgents()===1?"selector":"selectors"," nothing matched, which this form cannot restore. ");}}function Ft(n,t){if(n&1&&(Ds(0,"ds-notice",26),NC(1," Saving with this on replaces the selection below with "),Ds(2,"code",25),NC(3,"*"),pl(),NC(4,". "),Lw(5,Rt,1,2),pl()),n&2){let e=Jw(2);BE(5),jw(e.droppedUnresolvedSubAgents()>0?5:-1);}}function Nt(n,t){n&1&&(Ds(0,"ds-notice"),NC(1," The list of agents could not be loaded. What this agent already declares is listed below and preserved on save. "),pl());}function Dt(n,t){n&1&&(Ds(0,"p",4),NC(1,"No other agent is available in this scope yet."),pl());}function Lt(n,t){n&1&&(Ds(0,"span",44),NC(1,"pattern"),pl());}function Ot(n,t){n&1&&(Ds(0,"span",44),NC(1,"via pattern"),pl());}function Vt(n,t){if(n&1&&(Ds(0,"span",44),NC(1),pl()),n&2){let e=Jw(4);BE(),vl(" ",e.subAgentCandidatesUnavailable()?"not verified":"no matching agent"," ");}}function Pt(n,t){if(n&1){let e=Zw();Ds(0,"button",55),mg("click",function(){df(e);let r=Jw().$implicit,d=Jw(3);return ff(d.removeSubAgent(r))}),NC(1," \xD7 "),pl();}if(n&2){let e=Jw().$implicit;cg("aria-label","Remove "+e.selector);}}function Bt(n,t){if(n&1){let e=Zw();Ds(0,"div",32)(1,"label",53)(2,"input",51),mg("change",function(){let r=df(e).$implicit,d=Jw(3);return ff(d.toggleSubAgent(r))}),pl(),Ds(3,"span",24),NC(4),pl(),Lw(5,Lt,2,0,"span",44)(6,Ot,2,0,"span",44)(7,Vt,2,1,"span",44),pl(),Lw(8,Pt,2,1,"button",54),pl();}if(n&2){let e=t.$implicit,o=Jw(3);BE(2),ug("checked",e.selected())("disabled",o.allSubAgentsSelected()),BE(2),Og(e.name),BE(),jw(e.pattern?5:e.grantedByPattern?6:e.unresolved?7:-1),BE(3),jw(e.unresolved?8:-1);}}function $t(n,t){if(n&1&&Hw(0,Bt,9,5,"div",32,qe),n&2){let e=Jw(2);Uw(e.subAgentRows());}}function Gt(n,t){if(n&1){let e=Zw();Ds(0,"div")(1,"button",56),mg("click",function(){df(e);let r=Jw(2);return ff(r.useDefaultDelegationTimeout())}),NC(2," Use server default "),pl()();}}function Ut(n,t){n&1&&(Ds(0,"ds-notice"),NC(1),pl()),n&2&&(BE(),Og(t));}function jt(n,t){if(n&1){let e=Zw();Ds(0,"button",57),mg("click",function(){df(e);let r=Jw(2);return ff(r.exportYaml())}),NC(1),pl();}if(n&2){let e=Jw(2);ug("disabled",e.isExporting()),BE(),vl(" ",e.isExporting()?"Exporting\u2026":"Export as YAML"," ");}}function Kt(n,t){if(n&1){let e=Zw();Ds(0,"form",6),mg("ngSubmit",function(){df(e);let r=Jw();return ff(r.submit())}),Ds(1,"ds-fieldset",7)(2,"ds-form-field",8),lg(3,"input",9),_I(),pl(),Ds(4,"div",10)(5,"label",11),lg(6,"input",12),_I(),NC(7," Enabled "),pl(),Ds(8,"p",13),NC(9,"Disabled agents are excluded from namespace resolution."),pl()(),Ds(10,"ds-form-field",14),lg(11,"input",15),_I(),pl(),Ds(12,"ds-form-field",16),Lw(13,at,1,1,"input",17)(14,mt,6,5,"select",18),pl(),Ds(15,"ds-form-field",19),lg(16,"textarea",20),_I(),pl()(),Lw(17,ht,5,2,"ds-fieldset",21),Ds(18,"ds-fieldset",22)(19,"p",4),NC(20," Instruction bundles this agent can read on demand. Selecting at least one grants it the "),Ds(21,"code"),NC(22,"readSkill"),pl(),NC(23," and "),Ds(24,"code"),NC(25,"readSkillResource"),pl(),NC(26," tools; selecting none grants neither. "),Lw(27,yt,1,0),pl(),Ds(28,"label",11)(29,"input",23),mg("change",function(){df(e);let r=Jw();return ff(r.toggleAllSkills())}),pl(),Ds(30,"span",24),NC(31,"Every skill in the catalogue ("),Ds(32,"code",25),NC(33,"*"),pl(),NC(34,")"),pl()(),Ds(35,"p",13),NC(36," Resolved at run time, so skills added later are granted too, without editing this agent. "),pl(),Lw(37,vt,5,0,"ds-notice",26),Lw(38,xt,2,0,"ds-notice"),Lw(39,St,2,0,"p",4)(40,kt,2,0),pl(),Ds(41,"ds-form-field",27)(42,"select",28)(43,"option",29),NC(44,"SIMPLE \u2014 Standard agent (single LLM call)"),pl(),Ds(45,"option",29),NC(46,"ADVANCED \u2014 Multi-step reasoning loop"),pl(),Ds(47,"option",29),NC(48,"LOOP \u2014 Bulk loop agent (no LLM, experimental)"),pl()(),_I(),pl(),Lw(49,It,7,3,"ds-form-field",30),Ds(50,"ds-fieldset",31)(51,"p",4),NC(52," The agents this one may delegate to. Selecting at least one grants it the "),Ds(53,"code"),NC(54,"DELEGATE__delegate"),pl(),NC(55," tool; selecting none grants it no way to delegate. Entries are matched against agent names, never ids. "),Lw(56,Mt,1,0),pl(),Ds(57,"label",11)(58,"input",23),mg("change",function(){df(e);let r=Jw();return ff(r.toggleAllSubAgents())}),pl(),Ds(59,"span",24),NC(60,"Every agent it can reach ("),Ds(61,"code",25),NC(62,"*"),pl(),NC(63,")"),pl()(),Ds(64,"p",13),NC(65," Resolved at run time, so agents added later can be delegated to as well, without editing this agent. "),pl(),Lw(66,Ft,6,1,"ds-notice",26),Lw(67,Nt,2,0,"ds-notice"),Lw(68,Dt,2,0,"p",4)(69,$t,2,0),Ds(70,"p",4),NC(71," Advanced \u2014 add a glob instead of picking a name, for example "),Ds(72,"code"),NC(73,"*Fixer"),pl(),NC(74," to cover BugFixer and StoryFixer. "),pl(),Ds(75,"div",32)(76,"input",33),mg("keydown.enter",function(){df(e);let r=Jw();return ff(r.addSubAgent())}),pl(),_I(),Ds(77,"button",34),mg("click",function(){df(e);let r=Jw();return ff(r.addSubAgent())}),NC(78," + "),pl()(),Ds(79,"ds-form-field",35),lg(80,"input",36),_I(),Lw(81,Gt,3,0,"div"),pl()(),Lw(82,Ut,2,1,"ds-notice"),Ds(83,"ds-form-actions")(84,"button",37),NC(85),pl(),Lw(86,jt,2,2,"button",38),Ds(87,"button",39),mg("click",function(){df(e);let r=Jw();return ff(r.cancel())}),NC(88,"Cancel"),pl()()();}if(n&2){let e,o=Jw();ug("formGroup",o.form),BE(3),ug("formControl",o.nameControl),NI(),BE(3),ug("formControl",o.enabledControl),NI(),BE(5),ug("formControl",o.descriptionControl),NI(),BE(2),jw(o.modelAsFreeText()?13:14),BE(3),ug("formControl",o.instructionsControl),NI(),BE(),jw(o.integrationRows().length>0||o.builtInRows().length>0?17:-1),BE(10),jw(o.isPlatformMode?27:-1),BE(2),ug("checked",o.allSkillsSelected()),BE(8),jw(o.namedSkillSelectionDropped()?37:-1),BE(),jw(o.skillCatalogueUnavailable()?38:-1),BE(),jw(o.skillRows().length===0?39:40),BE(3),ug("formControl",o.executionModeControl),NI(),BE(),ug("value",o.ExecutionMode.SIMPLE),BE(2),ug("value",o.ExecutionMode.ADVANCED),BE(2),ug("value",o.ExecutionMode.LOOP),BE(2),jw(o.isLoopMode()?49:-1),BE(7),jw(o.isPlatformMode?56:-1),BE(2),ug("checked",o.allSubAgentsSelected()),BE(8),jw(o.namedSubAgentSelectionDropped()?66:-1),BE(),jw(o.subAgentCandidatesUnavailable()?67:-1),BE(),jw(o.subAgentRows().length===0?68:69),BE(8),ug("formControl",o.newSubAgentControl),NI(),BE(),ug("disabled",!o.newSubAgentControl.value.trim()),BE(2),ug("hint",o.delegationTimeoutHint())("error",o.delegationTimeoutControl.invalid?"Enter a valid positive whole number of seconds, or leave empty to inherit the server default.":null),BE(),ug("formControl",o.delegationTimeoutControl),cg("aria-invalid",o.delegationTimeoutControl.invalid),NI(),BE(),jw(o.delegationTimeoutControl.value!==null?81:-1),BE(),jw((e=o.submitError())?82:-1,e),BE(2),ug("disabled",o.form.invalid||o.isSubmitting()),BE(),vl(" ",o.isEditMode()?"Save changes":"Create"," "),BE(),jw(o.isEditMode()?86:-1);}}var Je=class n{route=g(W$1);router=g(F);destroyRef=g(Ie);agentConfigController=g(U);defaultsController=g(N);defaultDelegationTimeoutSeconds=Ui(null);exportService=g(K);integrationConfigState=g(O);integrationTypeController=g(_);skillState=g(o);aiModelState=g(W);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=!this.namespaceId;form=new pt$1({name:new Te("",{nonNullable:true,validators:[fn.required,fn.minLength(1)]}),description:new Te(null),modelName:new Te(null,{validators:[fn.required,n.notBlankValidator]}),instructions:new Te(null),executionMode:new Te("SIMPLE",{nonNullable:true}),delegationTimeoutSeconds:new Te(null,{validators:[fn.min(1),fn.max(2147483647),fn.pattern(/^\d+$/)]}),enabled:new Te(false,{nonNullable:true}),loopConfig:new Te(null,{validators:[n.jsonValidator]})});static notBlankValidator(t){let e=t.value;return typeof e=="string"&&e.length>0&&e.trim().length===0?{required:true}:null}static jsonValidator(t){let e=t.value?.trim();if(!e)return null;try{return JSON.parse(e),null}catch(o){return {invalidJson:true}}}get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get modelNameControl(){return this.form.controls.modelName}get instructionsControl(){return this.form.controls.instructions}get executionModeControl(){return this.form.controls.executionMode}get delegationTimeoutControl(){return this.form.controls.delegationTimeoutSeconds}useDefaultDelegationTimeout(){this.delegationTimeoutControl.setValue(null),this.delegationTimeoutControl.markAsDirty();}delegationTimeoutHint=XC(()=>{let t=this.defaultDelegationTimeoutSeconds();return `How long each delegation launched by this agent waits without activity from the sub-agent, including its own delegations. When it runs out, the sub-agent and its active descendants are stopped and can be resumed. Leave empty to use the server default${t!==null?`: ${t} s (${t/60} min)`:""}.`});get enabledControl(){return this.form.controls.enabled}get loopConfigControl(){return this.form.controls.loopConfig}executionModeValue=F$1(this.form.controls.executionMode.valueChanges,{initialValue:this.form.controls.executionMode.value});isLoopMode=XC(()=>this.executionModeValue()==="LOOP");subAgentRows=Ui([]);allSubAgentsSelected=Ui(false);subAgentCandidatesUnavailable=Ui(false);namedSubAgentSelectionDropped=XC(()=>this.allSubAgentsSelected()&&this.subAgentRows().some(t=>t.selected()));droppedUnresolvedSubAgents=XC(()=>this.allSubAgentsSelected()?this.subAgentRows().filter(t=>t.unresolved&&t.selected()).length:0);hasAnySubAgent=XC(()=>this.allSubAgentsSelected()||this.subAgentRows().some(t=>t.selected()));newSubAgentControl=new Te("",{nonNullable:true});isEditMode=Ui(false);isSubmitting=Ui(false);isLoading=Ui(false);isExporting=Ui(false);submitError=Ui(null);ExecutionMode=qe$1;loopConfigPlaceholder=JSON.stringify({search:{tool:"SearchTalents",params:{talentId:["6ac76692a909eaaae0b078d6"],resolveTargets:["MANAGER"],next:null}},act:{agentName:"ProfileCaretaker",promptTemplate:"This talent has not completed their profile. As their manager, I need you to help me review and improve it."}},null,2);builtInRows=Ui([]);inspectRoute(){let t=this.route.snapshot.paramMap.get("agentConfigId")??"";return this.isPlatformMode?["/agentos","admin","agent-configs",t,"inspect"]:["/agentos",this.namespaceId,"agent-configs",t,"inspect"]}configAgentExposureWarning=XC(()=>Ke({configEnabled:this.builtInRows().some(t=>t.type===je&&t.state()==="on"),integrationTypes:this.integrationRows().filter(t=>t.enabled()).map(t=>t.config.integrationType),hasSubAgents:this.hasAnySubAgent()}));modelOptions=Ui({aliases:[],apiNames:[],current:null});modelCatalogueLoaded=Ui(false);modelAsFreeText=XC(()=>{let{aliases:t,apiNames:e}=this.modelOptions();return this.modelCatalogueLoaded()&&t.length+e.length===0});applyModelCatalogue(t,e){this.modelOptions.set(He(t,e)),this.modelCatalogueLoaded.set(true);}integrationRows=Ui([]);skillRows=Ui([]);allSkillsSelected=Ui(false);skillCatalogueUnavailable=Ui(false);namedSkillSelectionDropped=XC(()=>this.allSkillsSelected()&&this.skillRows().some(t=>t.selected()));existingConfig=null;ngOnInit(){this.defaultsController.getAgentConfigDefaults().pipe(U$1(this.destroyRef),da(()=>Tr(null))).subscribe(e=>this.defaultDelegationTimeoutSeconds.set(e?.delegationTimeoutSeconds??null));let t=this.route.snapshot.paramMap.get("agentConfigId");t?(this.isEditMode.set(true),this.loadConfigAndIntegrations(t)):this.loadIntegrations(void 0);}loadConfigAndIntegrations(t){this.isLoading.set(true),Ty({config:this.agentConfigController.getByIdAgentConfig(t),namespaceIntegrations:this.namespaceId?this.integrationConfigState.loadNamespaceConfigs(this.namespaceId):Tr([]),platformIntegrations:this.integrationConfigState.loadPlatformConfigs(),builtInTypes:this.loadBuiltInTypes(),skillCatalogue:this.loadSkillCatalogue(),delegationCandidates:this.loadDelegationCandidates(),models:this.aiModelState.listAvailable(this.namespaceId)}).pipe(U$1(this.destroyRef)).subscribe({next:({config:e,namespaceIntegrations:o,platformIntegrations:r,builtInTypes:d,skillCatalogue:f,delegationCandidates:S,models:_})=>{this.existingConfig=e,this.applyModelCatalogue(_,e.modelName??null),this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??null),this.modelNameControl.setValue(e.modelName??null),this.instructionsControl.setValue(e.instructions??null);let m=e.executionMode??(e.advancedExecution?"ADVANCED":"SIMPLE");this.executionModeControl.setValue(m),this.delegationTimeoutControl.setValue(e.delegationTimeoutSeconds??null),this.enabledControl.setValue(e.enabled??true),this.loopConfigControl.setValue(e.loopConfig!=null?JSON.stringify(e.loopConfig,null,2):null);let I=[...r,...o];this.integrationRows.set(this.buildIntegrationRows(I,e.integrations??void 0)),this.builtInRows.set(this.buildBuiltInRows(d,e.integrations??void 0)),this.allSubAgentsSelected.set(Ge(e.subAgents)),this.subAgentRows.set(this.buildSubAgentRows(S,e.subAgents,e.name)),this.allSkillsSelected.set(o$1(e.skillSelectors)),this.skillRows.set(this.buildSkillRows(f,e.skillSelectors)),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),this.navigateBack();}});}loadIntegrations(t){Ty({namespaceIntegrations:this.namespaceId?this.integrationConfigState.loadNamespaceConfigs(this.namespaceId):Tr([]),platformIntegrations:this.integrationConfigState.loadPlatformConfigs(),builtInTypes:this.loadBuiltInTypes(),skillCatalogue:this.loadSkillCatalogue(),delegationCandidates:this.loadDelegationCandidates(),models:this.aiModelState.listAvailable(this.namespaceId)}).pipe(U$1(this.destroyRef)).subscribe({next:({namespaceIntegrations:e,platformIntegrations:o,builtInTypes:r,skillCatalogue:d,delegationCandidates:f,models:S})=>{this.applyModelCatalogue(S,null);let _=[...o,...e];this.integrationRows.set(this.buildIntegrationRows(_,t??void 0)),this.builtInRows.set(this.buildBuiltInRows(r,t??void 0)),this.allSubAgentsSelected.set(false),this.subAgentRows.set(this.buildSubAgentRows(f,void 0,null)),this.allSkillsSelected.set(false),this.skillRows.set(this.buildSkillRows(d,void 0));}});}loadSkillCatalogue(){return (this.namespaceId?this.skillState.listEffective(this.namespaceId):this.skillState.listPlatform().pipe(ne(e=>e.map(o=>({id:o.id??"",name:o.name,description:o.description,namespaceId:o.namespaceId??null,readOnly:o.readOnly===true}))))).pipe(da(e=>(console.error("[agent-config-form] failed to load the skill catalogue",e),this.skillCatalogueUnavailable.set(true),Tr([]))))}buildSkillRows(t,e){let r$1=(e??[]).map(m=>m.trim()).filter(m=>m.length>0).filter(m=>m!==r),d=i(r$1),f=new Set(t.map(m=>m.name.toLowerCase())),S=t.map(m=>({selector:m.name,name:m.name,description:m.description,platform:m.namespaceId==null,unresolved:false,selected:Ui(d.has(m.name.toLowerCase()))})),_=new Set;for(let m of r$1){let I=l(m).toLowerCase();f.has(I)||_.has(I)||(_.add(I),S.push({selector:m,name:m,description:"",platform:false,unresolved:true,selected:Ui(true)}));}return S}toggleSkill(t){t.selected.update(e=>!e);}toggleAllSkills(){this.allSkillsSelected.update(t=>!t);}buildSkillSelectorsPayload(){if(this.allSkillsSelected())return [r];let t=this.skillRows().filter(e=>e.selected()).map(e=>e.selector);return t.length>0?t:void 0}loadDelegationCandidates(){let t=this.agentConfigController.listPlatformAgentsAgentConfig(false).pipe(this.orNoCandidates()),e=this.namespaceId?this.agentConfigController.listByParentAgentConfig(this.namespaceId,false).pipe(this.orNoCandidates()):Tr([]);return Ty({platform:t,namespace:e}).pipe(ne(({platform:o,namespace:r})=>[...o,...r]),ne(o=>o.map(r=>r.name).filter(r=>r.length>0)),ne(o=>n.dedupeByKey(o)))}orNoCandidates(){return da(t=>(console.error("[agent-config-form] failed to load the delegation candidates",t),this.subAgentCandidatesUnavailable.set(true),Tr([])))}static dedupeByKey(t){let e=new Set;return t.filter(o=>{let r=o.toLowerCase();return e.has(r)?false:(e.add(r),true)})}buildSubAgentRows(t,e,o){let r=Ue(e),d=o?.toLowerCase()??null,f=t.filter(b=>{let G=b.toLowerCase();return G!==d||r.has(G)}),S=new Set(f.map(b=>b.toLowerCase())),_=f.map(b=>({selector:b,name:b,unresolved:false,pattern:false,grantedByPattern:z(b,e),selected:Ui(r.has(b.toLowerCase()))})),m=new Set,I=(e??[]).map(b=>b.trim()).filter(b=>b.length>0&&b!==D);for(let b of I){let G=b.toLowerCase();S.has(G)||m.has(G)||(m.add(G),_.push({selector:b,name:b,unresolved:true,pattern:H(b),grantedByPattern:false,selected:Ui(true)}));}return _}loadBuiltInTypes(){return this.integrationTypeController.listTypesIntegrationType().pipe(ne(t=>t.filter(e=>!e.configSchema)),da(t=>(console.error("[agent-config-form] failed to load integration types",t),Tr([]))))}buildIntegrationRows(t,e){return t.map(o=>{let r=o.name??"",d=e?.[r],f=e!=null&&r in e,S=Array.isArray(d)?d.join(", "):"";return {config:o,enabled:Ui(f),toolsControl:new Te(S,{nonNullable:true})}})}buildBuiltInRows(t,e){return t.map(o=>{let r=e!=null&&o.type in e,d=e?.[o.type],f=r?Array.isArray(d)&&d.length===0?"off":"on":"default";return {type:o.type,displayName:o.displayName,description:o.description,enabledByDefault:o.enabledByDefault===true,state:Ui(f),restrictedTools:Array.isArray(d)&&d.length>0?d:null}})}toggleIntegration(t){t.enabled.update(e=>!e);}setBuiltInState(t,e){t.state.set(e);}builtInDefaultLabel(t){return t.enabledByDefault?"Platform default (enabled)":"Platform default (disabled)"}addSubAgent(){let t=this.newSubAgentControl.value.trim();if(!t)return;let e=this.subAgentRows().find(o=>o.selector.toLowerCase()===t.toLowerCase());e?e.selected.set(true):t===D?this.allSubAgentsSelected.set(true):this.subAgentRows.update(o=>this.withPatternGrants([...o,{selector:t,name:t,unresolved:true,pattern:H(t),grantedByPattern:false,selected:Ui(true)}])),this.newSubAgentControl.reset("");}removeSubAgent(t){let e=t.selector.toLowerCase();this.subAgentRows.update(o=>this.withPatternGrants(o.filter(r=>r.selector.toLowerCase()!==e)));}toggleSubAgent(t){t.selected.update(e=>!e),t.pattern&&this.subAgentRows.update(e=>this.withPatternGrants(e));}withPatternGrants(t){let e=this.allSubAgentsSelected()?[]:t.filter(o=>o.selected()).map(o=>o.selector);return t.map(o=>o.unresolved?o:x(w({},o),{grantedByPattern:z(o.name,e)}))}toggleAllSubAgents(){this.allSubAgentsSelected.update(t=>!t),this.subAgentRows.update(t=>this.withPatternGrants(t));}buildSubAgentsPayload(){if(this.allSubAgentsSelected())return [D];let t=this.subAgentRows().filter(e=>e.selected()).map(e=>e.selector);return t.length>0?t:void 0}buildIntegrationsPayload(){let t={};for(let o of this.integrationRows().filter(r=>r.enabled())){let r=o.config.name??"",d=o.toolsControl.value.trim();t[r]=d===""?null:d.split(",").map(f=>f.trim()).filter(f=>f.length>0);}for(let o of this.builtInRows()){let r=o.state();r==="on"?t[o.type]=o.restrictedTools??null:r==="off"&&(t[o.type]=[]);}let e=new Set([...this.integrationRows().map(o=>o.config.name??""),...this.builtInRows().map(o=>o.type)]);for(let[o,r]of Object.entries(this.existingConfig?.integrations??{}))e.has(o)||(t[o]=r);return Object.keys(t).length>0?t:void 0}submit(){if(this.form.invalid||this.isSubmitting())return;this.addSubAgent(),this.submitError.set(null),this.isSubmitting.set(true);let t=x(w({},this.existingConfig??{}),{createdOn:this.existingConfig?.createdOn,updatedOn:this.existingConfig?.updatedOn,namespaceId:this.namespaceId,name:this.nameControl.value.trim(),description:this.descriptionControl.value?.trim()||void 0,modelName:this.modelNameControl.value?.trim()||void 0,instructions:this.instructionsControl.value?.trim()||void 0,integrations:this.buildIntegrationsPayload(),executionMode:this.executionModeControl.value,advancedExecution:this.executionModeControl.value==="ADVANCED",enabled:this.enabledControl.value,subAgents:this.buildSubAgentsPayload(),skillSelectors:this.buildSkillSelectorsPayload(),delegationTimeoutSeconds:this.delegationTimeoutControl.value,loopConfig:this.buildLoopConfigPayload()});(this.isEditMode()?this.agentConfigController.updateAgentConfig(this.existingConfig.id??"",t):this.agentConfigController.createAgentConfig(t)).pipe(U$1(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:o=>{this.isSubmitting.set(false),this.submitError.set(n.serverMessage(o));}});}static serverMessage(t){let o=t?.error?.message;if(typeof o=="string"&&o.trim().length>0)return o;let r=t?.status;return r===0?"The server could not be reached. The agent was not saved.":typeof r=="number"&&r>=500?`The server failed to save the agent (HTTP ${r}). Nothing was changed.`:"The server refused the save and gave no reason. Check the values and try again."}exportYaml(){let t=this.existingConfig?.id;!t||this.isExporting()||(this.isExporting.set(true),this.exportService.exportAsYaml(t).pipe(U$1(this.destroyRef)).subscribe({next:e=>{let o=new Blob([e],{type:"application/yaml"}),r=URL.createObjectURL(o),d=document.createElement("a");d.href=r,d.download=`${this.existingConfig?.name??"agent"}.yaml`,d.click(),URL.revokeObjectURL(r),this.isExporting.set(false);},error:()=>this.isExporting.set(false)}));}buildLoopConfigPayload(){let t=this.loopConfigControl.value?.trim();if(!t)return this.existingConfig?.loopConfig!=null?null:void 0;try{return JSON.parse(t)}catch(e){return}}cancel(){this.navigateBack();}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","agent-configs"]):this.router.navigate(["/agentos",this.namespaceId,"agent-configs"]);}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=yw({type:n,selectors:[["agentos-agent-config-form"]],decls:8,vars:4,consts:[[3,"title"],["dsButton","","variant","ghost","type","button","title","Back to agent configs",3,"click"],["headerMeta","",1,"ds-link",3,"routerLink"],["headerMeta","","variant","outline"],[1,"ds-hint"],[1,"ds-form",3,"formGroup"],[1,"ds-form",3,"ngSubmit","formGroup"],["legend","Agent"],["label","Name","controlId","agent-config-name","required",""],["dsControl","","id","agent-config-name","type","text","placeholder","e.g. Support agent","autocomplete","off",3,"formControl"],[1,"ds-stack","ds-stack--sm"],["dsCheck",""],["type","checkbox",3,"formControl"],[1,"ds-hint","ds-indent"],["label","Description","controlId","agent-config-description"],["dsControl","","id","agent-config-description","type","text","placeholder","Optional \u2014 short description of this agent","autocomplete","off",3,"formControl"],["label","Model","controlId","agent-config-model-name","required","","hint","Aliases are matched first, then API model names. Resolved when the agent runs."],["dsControl","","id","agent-config-model-name","type","text","placeholder","Model alias or name to use, e.g. BIG","autocomplete","off",3,"formControl"],["dsControl","","id","agent-config-model-name",3,"formControl"],["label","Instructions","controlId","agent-config-instructions"],["dsControl","","id","agent-config-instructions","rows","6","placeholder","Optional \u2014 system instructions for this agent",3,"formControl"],["legend","Integrations","hint","Select which integrations this agent can use. Leave tool names empty to allow all tools from an integration."],["legend","Skills"],["type","checkbox",3,"change","checked"],[1,"ds-strong"],[1,"ds-code"],["tone","warning"],["label","Execution mode","controlId","agent-config-execution-mode","hint",'SIMPLE runs a single LLM pass. ADVANCED uses an intention loop for complex tasks and requires a model that supports advanced execution, otherwise the agent fails to run. LOOP (experimental) starts one case per result of a tool, without an LLM \u2014 run it with "Launch loop" in the agent list menu.'],["dsControl","","id","agent-config-execution-mode",3,"formControl"],[3,"value"],["label","Loop configuration (JSON)","controlId","agent-config-loop-config",3,"error"],["legend","Sub-agents"],[1,"ds-inline"],["dsControl","","type","text","aria-label","New sub-agent pattern","placeholder","e.g. *Fixer","autocomplete","off",3,"keydown.enter","formControl"],["dsButton","","variant","icon","type","button","title","Add pattern","aria-label","Add pattern",3,"click","disabled"],["label","Delegation timeout (seconds)","controlId","delegation-timeout","hintId","delegation-timeout-hint","errorId","delegation-timeout-error",3,"hint","error"],["dsControl","","id","delegation-timeout","type","number","min","1","max","2147483647","step","1","placeholder","Server default","aria-describedby","delegation-timeout-hint delegation-timeout-error",3,"formControl"],["dsButton","","variant","primary","type","submit",3,"disabled"],["dsButton","","type","button",3,"disabled"],["dsButton","","type","button",3,"click"],["disabled","",3,"ngValue"],[3,"ngValue"],["label","Aliases"],["label","API model names"],[1,"ds-meta"],["dsControl","","type","text","placeholder","Tool names, comma-separated (empty = all tools)","autocomplete","off",1,"ds-indent",3,"formControl"],[1,"ds-micro"],["dsControl","",1,"ds-indent","ds-control--auto",3,"change","id","value"],["value","default"],["value","on"],["value","off"],["type","checkbox",3,"change","checked","disabled"],["dsControl","","mono","","id","agent-config-loop-config","rows","10","spellcheck","false","autocomplete","off",3,"placeholder","formControl"],["dsCheck","",1,"ds-grow"],["dsButton","","variant","icon-danger","type","button","title","Remove"],["dsButton","","variant","icon-danger","type","button","title","Remove",3,"click"],["dsButton","","variant","ghost","type","button",3,"click"],["dsButton","","type","button",3,"click","disabled"]],template:function(e,o){e&1&&(Ds(0,"ds-page")(1,"ds-section-header",0)(2,"button",1),mg("click",function(){return o.cancel()}),NC(3," \u2190 Agent configs "),pl(),Lw(4,nt,2,1,"a",2),Lw(5,ot,2,0,"ds-tag",3),pl(),Lw(6,it,2,0,"p",4)(7,Kt,89,33,"form",5),pl()),e&2&&(BE(),ug("title",o.isEditMode()?"Edit agent config":"New agent config"),BE(3),jw(o.isEditMode()?4:-1),BE(),jw(o.isPlatformMode?5:-1),BE(),jw(o.isLoading()?6:7));},dependencies:[Ut$1,nd,bo,xo,Lt$1,kn,vn,Gt$1,mo,po,$r,qr,Vn,An,$t$1,pn,hn,cn,ln,dn,mn,at$1,an,rn,ko],encapsulation:2})};export{Je as AgentConfigFormComponent};
1
+ import {o as o$1,r,i,l}from'./chunk-1nyEsjkY.js';import {o}from'./chunk-UPlPDOdj.js';import {O}from'./chunk-BtKM8wv2.js';import {g,W as W$1,F,I as Ie,ag as U,ay as N,U as Ui,az as K,a8 as _,X as XC,a9 as F$1,aA as qe$1,G as U$1,a2 as da,aa as Tr,ac as Ty,ad as ne,M as x,K as w,y as yw,au as $t$1,D as Ds,Q as mg,N as NC,p as pl,L as Lw,a as BE,P as ug,j as jw,aq as k,a6 as x$1,J as Jw,Z as Zw,l as lg,_ as _I,R as NI,k as cg,v as vl,H as Hw,m as Uw,O as Og,r as df,s as ff,as as kg}from'./main-47BLQXE5.js';import {p as pt$1,T as Te,a as fn,U as Ut$1,n as nd,b as bo,x as xo,L as Lt$1,k as kn,u as vn,G as Gt$1,m as mo,c as po,$ as $r,H as qr,V as Vn,A as An,d as pn,h as hn,e as cn,r as ln,g as dn,C as mn,i as at$1,j as an,t as rn,l as ko}from'./chunk-D2p21lhx.js';import'./chunk-CzLmUpd_.js';var W=class n{aiModelController=g(k);listAvailable(t){let e=this.aiModelController.listPlatformLevelAiModel().pipe(this.orEmpty("platform")),o=t?this.aiModelController.listByNamespaceIdAiModel(t).pipe(this.orEmpty("namespace")):Tr([]);return Ty({platform:e,namespace:o}).pipe(ne(({platform:r,namespace:d})=>[...r,...d]))}orEmpty(t){return da(e=>(console.error(`[ai-model-state] failed to load the ${t} AI models`,e),Tr([])))}static \u0275fac=function(e){return new(e||n)};static \u0275prov=x$1({token:n,factory:n.\u0275fac,providedIn:"root"})};var D="*";function Ge(n){return (n??[]).some(t=>t.trim()===D)}function Ue(n){let t=(n??[]).map(e=>e.trim()).filter(e=>e.length>0&&e!==D).map(e=>e.toLowerCase());return new Set(t)}function H(n){return n.includes(D)}function Xe(n){let t=n.replace(/[\\.[\]{}()^$|]/g,"\\$&").replace(/\*/g,".*");try{return new RegExp(`^${t}$`,"i")}catch(e){return null}}function z(n,t){return (t??[]).map(e=>e.trim()).filter(e=>e.length>0&&e!==D&&H(e)).some(e=>Xe(e)?.test(n)??false)}var je="AGENTOS_CONFIG",Qe=new Set(["HTTP_API","MCP_HTTP","MCP_STDIO","BASH","TMUX","GIT"]);function Ke(n){return n.configEnabled&&(n.hasSubAgents||n.integrationTypes.some(t=>Qe.has(t)))}var $=n=>n.trim().toLowerCase();function Ze(n,t){let e=o=>o.namespaceId?1:0;return e(n)-e(t)||n.priority-t.priority}var We=(n,t)=>n.label.localeCompare(t.label);function He(n,t){let e=new Map;for(let _ of n){let m=_.alias?.trim();if(!m)continue;let I=e.get($(m));(!I||Ze(_,I)>0)&&e.set($(m),_);}let o=[...e.values()].map(_=>({value:_.alias.trim(),label:`${_.alias.trim()} (${_.apiModelName})`})).sort(We),r=new Set,d=[];for(let _ of n){let m=_.apiModelName?.trim();!m||r.has($(m))||(r.add($(m)),e.has($(m))||d.push({value:m,label:m}));}d.sort(We);let f=t??"";if(f.trim().length===0||[...o,...d].some(_=>_.value===f))return {aliases:o,apiNames:d,current:null};let S=e.has($(f))||r.has($(f));return {aliases:o,apiNames:d,current:{value:f,label:S?f:`${f} (not in the list)`}}}var Ye=(n,t)=>t.value,et=(n,t)=>t.config.id,tt=(n,t)=>t.type,qe=(n,t)=>t.selector;function nt(n,t){if(n&1&&(Ds(0,"a",2),NC(1,"View resolved definition \u2192"),pl()),n&2){let e=Jw();ug("routerLink",e.inspectRoute());}}function ot(n,t){n&1&&(Ds(0,"ds-tag",3),NC(1,"Platform level"),pl());}function it(n,t){n&1&&(Ds(0,"p",4),NC(1,"Loading\u2026"),pl());}function at(n,t){if(n&1&&(lg(0,"input",17),_I()),n&2){let e=Jw(2);ug("formControl",e.modelNameControl),NI();}}function lt(n,t){if(n&1&&(Ds(0,"option",41),NC(1),pl()),n&2){let e=t;ug("ngValue",e.value),BE(),Og(e.label);}}function rt(n,t){if(n&1&&(Ds(0,"option",41),NC(1),pl()),n&2){let e=t.$implicit;ug("ngValue",e.value),BE(),Og(e.label);}}function st(n,t){if(n&1&&(Ds(0,"optgroup",42),Hw(1,rt,2,2,"option",41,Ye),pl()),n&2){let e=Jw(3);BE(),Uw(e.modelOptions().aliases);}}function dt(n,t){if(n&1&&(Ds(0,"option",41),NC(1),pl()),n&2){let e=t.$implicit;ug("ngValue",e.value),BE(),Og(e.label);}}function ct(n,t){if(n&1&&(Ds(0,"optgroup",43),Hw(1,dt,2,2,"option",41,Ye),pl()),n&2){let e=Jw(3);BE(),Uw(e.modelOptions().apiNames);}}function mt(n,t){if(n&1&&(Ds(0,"select",18)(1,"option",40),NC(2,"Select a model"),pl(),Lw(3,lt,2,2,"option",41),Lw(4,st,3,0,"optgroup",42),Lw(5,ct,3,0,"optgroup",43),pl(),_I()),n&2){let e,o=Jw(2);ug("formControl",o.modelNameControl),NI(),BE(),ug("ngValue",null),BE(2),jw((e=o.modelOptions().current)?3:-1,e),BE(),jw(o.modelOptions().aliases.length>0?4:-1),BE(),jw(o.modelOptions().apiNames.length>0?5:-1);}}function ut(n,t){if(n&1&&(Ds(0,"span",44),NC(1),pl()),n&2){let e=Jw().$implicit;BE(),Og(e.config.integrationType);}}function gt(n,t){if(n&1&&(lg(0,"input",45),_I()),n&2){let e=Jw().$implicit;ug("formControl",e.toolsControl),cg("aria-label","Tools of "+e.config.name),NI();}}function pt(n,t){if(n&1){let e=Zw();Ds(0,"div",10)(1,"label",11)(2,"input",23),mg("change",function(){let r=df(e).$implicit,d=Jw(3);return ff(d.toggleIntegration(r))}),pl(),Ds(3,"span",24),NC(4),pl(),Lw(5,ut,2,1,"span",44),pl(),Lw(6,gt,1,2,"input",45),pl();}if(n&2){let e=t.$implicit;BE(2),ug("checked",e.enabled()),BE(2),Og(e.config.name),BE(),jw(e.config.integrationType?5:-1),BE(),jw(e.enabled()?6:-1);}}function ft(n,t){if(n&1&&(Ds(0,"p",13),NC(1),pl()),n&2){let e=Jw().$implicit;BE(),vl(" Restricted to: ",e.restrictedTools.join(", ")," (set outside this form, preserved on save) ");}}function Ct(n,t){if(n&1){let e=Zw();Ds(0,"div",10)(1,"label",24),NC(2),Ds(3,"span",44),NC(4,"built-in"),pl()(),Ds(5,"select",47),mg("change",function(r){let d=df(e).$implicit,f=Jw(4);return ff(f.setBuiltInState(d,r.target.value))}),Ds(6,"option",48),NC(7),pl(),Ds(8,"option",49),NC(9,"Enabled"),pl(),Ds(10,"option",50),NC(11,"Disabled"),pl()(),Lw(12,ft,2,1,"p",13),Ds(13,"p",13),NC(14),pl()();}if(n&2){let e=t.$implicit,o=Jw(4);BE(),cg("for","built-in-"+e.type),BE(),vl(" ",e.displayName," "),BE(3),ug("id","built-in-"+e.type)("value",e.state()),BE(2),Og(o.builtInDefaultLabel(e)),BE(5),jw(e.state()==="on"&&e.restrictedTools?12:-1),BE(2),Og(e.description);}}function _t(n,t){if(n&1&&(Ds(0,"span",46),NC(1,"Built-in integrations"),pl(),Hw(2,Ct,15,7,"div",10,tt)),n&2){let e=Jw(3);BE(2),Uw(e.builtInRows());}}function bt(n,t){n&1&&(Ds(0,"ds-notice",26),NC(1," This agent can read the AgentOS configuration and also has a network integration or sub-agents: what it reads could be sent outside without any confirmation. Prefer a dedicated configuration agent without them. "),pl());}function ht(n,t){if(n&1&&(Ds(0,"ds-fieldset",21),Hw(1,pt,7,4,"div",10,et),Lw(3,_t,4,0),Lw(4,bt,2,0,"ds-notice",26),pl()),n&2){let e=Jw(2);BE(),Uw(e.integrationRows()),BE(2),jw(e.builtInRows().length>0?3:-1),BE(),jw(e.configAgentExposureWarning()?4:-1);}}function yt(n,t){n&1&&NC(0," A platform config can only list platform skills here: namespace skills are resolved per namespace when the agent runs. ");}function vt(n,t){n&1&&(Ds(0,"ds-notice",26),NC(1," Saving with this on replaces the selection below with "),Ds(2,"code",25),NC(3,"*"),pl(),NC(4,". "),pl());}function xt(n,t){n&1&&(Ds(0,"ds-notice"),NC(1," The skill catalogue could not be loaded. What this agent already declares is listed below and preserved on save. "),pl());}function St(n,t){n&1&&(Ds(0,"p",4),NC(1,"No skill available in this scope yet."),pl());}function At(n,t){n&1&&(Ds(0,"span",44),NC(1,"platform"),pl());}function wt(n,t){if(n&1&&(Ds(0,"span",44),NC(1),pl()),n&2){let e=Jw(4);BE(),vl(" ",e.skillCatalogueUnavailable()?"not verified":"no matching skill"," ");}}function Et(n,t){if(n&1&&(Ds(0,"p",13),NC(1),pl()),n&2){let e=Jw().$implicit;BE(),Og(e.description);}}function Tt(n,t){if(n&1){let e=Zw();Ds(0,"div",10)(1,"label",11)(2,"input",51),mg("change",function(){let r=df(e).$implicit,d=Jw(3);return ff(d.toggleSkill(r))}),pl(),Ds(3,"span",24),NC(4),pl(),Lw(5,At,2,0,"span",44),Lw(6,wt,2,1,"span",44),pl(),Lw(7,Et,2,1,"p",13),pl();}if(n&2){let e=t.$implicit,o=Jw(3);BE(2),ug("checked",e.selected())("disabled",o.allSkillsSelected()),BE(2),Og(e.name),BE(),jw(e.platform?5:-1),BE(),jw(e.unresolved?6:-1),BE(),jw(e.description?7:-1);}}function kt(n,t){if(n&1&&Hw(0,Tt,8,6,"div",10,qe),n&2){let e=Jw(2);Uw(e.skillRows());}}function It(n,t){if(n&1&&(Ds(0,"ds-form-field",30),lg(1,"textarea",52),_I(),Ds(2,"p",4),NC(3," Default payload for this loop agent. Overridden at launch time if the first message contains a valid "),Ds(4,"code"),NC(5,"AgentLoopPayload"),pl(),NC(6,". Leave empty if you always provide the payload at launch. "),pl()()),n&2){let e=Jw(2);ug("error",e.loopConfigControl.invalid&&e.loopConfigControl.touched?"Invalid JSON \u2014 please fix the syntax.":null),BE(),ug("placeholder",e.loopConfigPlaceholder)("formControl",e.loopConfigControl),NI();}}function Mt(n,t){n&1&&NC(0," A platform config can only list platform agents here: a namespace's agents are resolved per namespace when the agent runs. ");}function Rt(n,t){if(n&1&&NC(0),n&2){let e=Jw(3);kg(" That deletes ",e.droppedUnresolvedSubAgents()," flagged ",e.droppedUnresolvedSubAgents()===1?"selector":"selectors"," nothing matched, which this form cannot restore. ");}}function Ft(n,t){if(n&1&&(Ds(0,"ds-notice",26),NC(1," Saving with this on replaces the selection below with "),Ds(2,"code",25),NC(3,"*"),pl(),NC(4,". "),Lw(5,Rt,1,2),pl()),n&2){let e=Jw(2);BE(5),jw(e.droppedUnresolvedSubAgents()>0?5:-1);}}function Nt(n,t){n&1&&(Ds(0,"ds-notice"),NC(1," The list of agents could not be loaded. What this agent already declares is listed below and preserved on save. "),pl());}function Dt(n,t){n&1&&(Ds(0,"p",4),NC(1,"No other agent is available in this scope yet."),pl());}function Lt(n,t){n&1&&(Ds(0,"span",44),NC(1,"pattern"),pl());}function Ot(n,t){n&1&&(Ds(0,"span",44),NC(1,"via pattern"),pl());}function Vt(n,t){if(n&1&&(Ds(0,"span",44),NC(1),pl()),n&2){let e=Jw(4);BE(),vl(" ",e.subAgentCandidatesUnavailable()?"not verified":"no matching agent"," ");}}function Pt(n,t){if(n&1){let e=Zw();Ds(0,"button",55),mg("click",function(){df(e);let r=Jw().$implicit,d=Jw(3);return ff(d.removeSubAgent(r))}),NC(1," \xD7 "),pl();}if(n&2){let e=Jw().$implicit;cg("aria-label","Remove "+e.selector);}}function Bt(n,t){if(n&1){let e=Zw();Ds(0,"div",32)(1,"label",53)(2,"input",51),mg("change",function(){let r=df(e).$implicit,d=Jw(3);return ff(d.toggleSubAgent(r))}),pl(),Ds(3,"span",24),NC(4),pl(),Lw(5,Lt,2,0,"span",44)(6,Ot,2,0,"span",44)(7,Vt,2,1,"span",44),pl(),Lw(8,Pt,2,1,"button",54),pl();}if(n&2){let e=t.$implicit,o=Jw(3);BE(2),ug("checked",e.selected())("disabled",o.allSubAgentsSelected()),BE(2),Og(e.name),BE(),jw(e.pattern?5:e.grantedByPattern?6:e.unresolved?7:-1),BE(3),jw(e.unresolved?8:-1);}}function $t(n,t){if(n&1&&Hw(0,Bt,9,5,"div",32,qe),n&2){let e=Jw(2);Uw(e.subAgentRows());}}function Gt(n,t){if(n&1){let e=Zw();Ds(0,"div")(1,"button",56),mg("click",function(){df(e);let r=Jw(2);return ff(r.useDefaultDelegationTimeout())}),NC(2," Use server default "),pl()();}}function Ut(n,t){n&1&&(Ds(0,"ds-notice"),NC(1),pl()),n&2&&(BE(),Og(t));}function jt(n,t){if(n&1){let e=Zw();Ds(0,"button",57),mg("click",function(){df(e);let r=Jw(2);return ff(r.exportYaml())}),NC(1),pl();}if(n&2){let e=Jw(2);ug("disabled",e.isExporting()),BE(),vl(" ",e.isExporting()?"Exporting\u2026":"Export as YAML"," ");}}function Kt(n,t){if(n&1){let e=Zw();Ds(0,"form",6),mg("ngSubmit",function(){df(e);let r=Jw();return ff(r.submit())}),Ds(1,"ds-fieldset",7)(2,"ds-form-field",8),lg(3,"input",9),_I(),pl(),Ds(4,"div",10)(5,"label",11),lg(6,"input",12),_I(),NC(7," Enabled "),pl(),Ds(8,"p",13),NC(9,"Disabled agents are excluded from namespace resolution."),pl()(),Ds(10,"ds-form-field",14),lg(11,"input",15),_I(),pl(),Ds(12,"ds-form-field",16),Lw(13,at,1,1,"input",17)(14,mt,6,5,"select",18),pl(),Ds(15,"ds-form-field",19),lg(16,"textarea",20),_I(),pl()(),Lw(17,ht,5,2,"ds-fieldset",21),Ds(18,"ds-fieldset",22)(19,"p",4),NC(20," Instruction bundles this agent can read on demand. Selecting at least one grants it the "),Ds(21,"code"),NC(22,"readSkill"),pl(),NC(23," and "),Ds(24,"code"),NC(25,"readSkillResource"),pl(),NC(26," tools; selecting none grants neither. "),Lw(27,yt,1,0),pl(),Ds(28,"label",11)(29,"input",23),mg("change",function(){df(e);let r=Jw();return ff(r.toggleAllSkills())}),pl(),Ds(30,"span",24),NC(31,"Every skill in the catalogue ("),Ds(32,"code",25),NC(33,"*"),pl(),NC(34,")"),pl()(),Ds(35,"p",13),NC(36," Resolved at run time, so skills added later are granted too, without editing this agent. "),pl(),Lw(37,vt,5,0,"ds-notice",26),Lw(38,xt,2,0,"ds-notice"),Lw(39,St,2,0,"p",4)(40,kt,2,0),pl(),Ds(41,"ds-form-field",27)(42,"select",28)(43,"option",29),NC(44,"SIMPLE \u2014 Standard agent (single LLM call)"),pl(),Ds(45,"option",29),NC(46,"ADVANCED \u2014 Multi-step reasoning loop"),pl(),Ds(47,"option",29),NC(48,"LOOP \u2014 Bulk loop agent (no LLM, experimental)"),pl()(),_I(),pl(),Lw(49,It,7,3,"ds-form-field",30),Ds(50,"ds-fieldset",31)(51,"p",4),NC(52," The agents this one may delegate to. Selecting at least one grants it the "),Ds(53,"code"),NC(54,"DELEGATE__delegate"),pl(),NC(55," tool; selecting none grants it no way to delegate. Entries are matched against agent names, never ids. "),Lw(56,Mt,1,0),pl(),Ds(57,"label",11)(58,"input",23),mg("change",function(){df(e);let r=Jw();return ff(r.toggleAllSubAgents())}),pl(),Ds(59,"span",24),NC(60,"Every agent it can reach ("),Ds(61,"code",25),NC(62,"*"),pl(),NC(63,")"),pl()(),Ds(64,"p",13),NC(65," Resolved at run time, so agents added later can be delegated to as well, without editing this agent. "),pl(),Lw(66,Ft,6,1,"ds-notice",26),Lw(67,Nt,2,0,"ds-notice"),Lw(68,Dt,2,0,"p",4)(69,$t,2,0),Ds(70,"p",4),NC(71," Advanced \u2014 add a glob instead of picking a name, for example "),Ds(72,"code"),NC(73,"*Fixer"),pl(),NC(74," to cover BugFixer and StoryFixer. "),pl(),Ds(75,"div",32)(76,"input",33),mg("keydown.enter",function(){df(e);let r=Jw();return ff(r.addSubAgent())}),pl(),_I(),Ds(77,"button",34),mg("click",function(){df(e);let r=Jw();return ff(r.addSubAgent())}),NC(78," + "),pl()(),Ds(79,"ds-form-field",35),lg(80,"input",36),_I(),Lw(81,Gt,3,0,"div"),pl()(),Lw(82,Ut,2,1,"ds-notice"),Ds(83,"ds-form-actions")(84,"button",37),NC(85),pl(),Lw(86,jt,2,2,"button",38),Ds(87,"button",39),mg("click",function(){df(e);let r=Jw();return ff(r.cancel())}),NC(88,"Cancel"),pl()()();}if(n&2){let e,o=Jw();ug("formGroup",o.form),BE(3),ug("formControl",o.nameControl),NI(),BE(3),ug("formControl",o.enabledControl),NI(),BE(5),ug("formControl",o.descriptionControl),NI(),BE(2),jw(o.modelAsFreeText()?13:14),BE(3),ug("formControl",o.instructionsControl),NI(),BE(),jw(o.integrationRows().length>0||o.builtInRows().length>0?17:-1),BE(10),jw(o.isPlatformMode?27:-1),BE(2),ug("checked",o.allSkillsSelected()),BE(8),jw(o.namedSkillSelectionDropped()?37:-1),BE(),jw(o.skillCatalogueUnavailable()?38:-1),BE(),jw(o.skillRows().length===0?39:40),BE(3),ug("formControl",o.executionModeControl),NI(),BE(),ug("value",o.ExecutionMode.SIMPLE),BE(2),ug("value",o.ExecutionMode.ADVANCED),BE(2),ug("value",o.ExecutionMode.LOOP),BE(2),jw(o.isLoopMode()?49:-1),BE(7),jw(o.isPlatformMode?56:-1),BE(2),ug("checked",o.allSubAgentsSelected()),BE(8),jw(o.namedSubAgentSelectionDropped()?66:-1),BE(),jw(o.subAgentCandidatesUnavailable()?67:-1),BE(),jw(o.subAgentRows().length===0?68:69),BE(8),ug("formControl",o.newSubAgentControl),NI(),BE(),ug("disabled",!o.newSubAgentControl.value.trim()),BE(2),ug("hint",o.delegationTimeoutHint())("error",o.delegationTimeoutControl.invalid?"Enter a valid positive whole number of seconds, or leave empty to inherit the server default.":null),BE(),ug("formControl",o.delegationTimeoutControl),cg("aria-invalid",o.delegationTimeoutControl.invalid),NI(),BE(),jw(o.delegationTimeoutControl.value!==null?81:-1),BE(),jw((e=o.submitError())?82:-1,e),BE(2),ug("disabled",o.form.invalid||o.isSubmitting()),BE(),vl(" ",o.isEditMode()?"Save changes":"Create"," "),BE(),jw(o.isEditMode()?86:-1);}}var Je=class n{route=g(W$1);router=g(F);destroyRef=g(Ie);agentConfigController=g(U);defaultsController=g(N);defaultDelegationTimeoutSeconds=Ui(null);exportService=g(K);integrationConfigState=g(O);integrationTypeController=g(_);skillState=g(o);aiModelState=g(W);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=!this.namespaceId;form=new pt$1({name:new Te("",{nonNullable:true,validators:[fn.required,fn.minLength(1)]}),description:new Te(null),modelName:new Te(null,{validators:[fn.required,n.notBlankValidator]}),instructions:new Te(null),executionMode:new Te("SIMPLE",{nonNullable:true}),delegationTimeoutSeconds:new Te(null,{validators:[fn.min(1),fn.max(2147483647),fn.pattern(/^\d+$/)]}),enabled:new Te(false,{nonNullable:true}),loopConfig:new Te(null,{validators:[n.jsonValidator]})});static notBlankValidator(t){let e=t.value;return typeof e=="string"&&e.length>0&&e.trim().length===0?{required:true}:null}static jsonValidator(t){let e=t.value?.trim();if(!e)return null;try{return JSON.parse(e),null}catch(o){return {invalidJson:true}}}get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get modelNameControl(){return this.form.controls.modelName}get instructionsControl(){return this.form.controls.instructions}get executionModeControl(){return this.form.controls.executionMode}get delegationTimeoutControl(){return this.form.controls.delegationTimeoutSeconds}useDefaultDelegationTimeout(){this.delegationTimeoutControl.setValue(null),this.delegationTimeoutControl.markAsDirty();}delegationTimeoutHint=XC(()=>{let t=this.defaultDelegationTimeoutSeconds();return `How long each delegation launched by this agent waits without activity from the sub-agent, including its own delegations. When it runs out, the sub-agent and its active descendants are stopped and can be resumed. Leave empty to use the server default${t!==null?`: ${t} s (${t/60} min)`:""}.`});get enabledControl(){return this.form.controls.enabled}get loopConfigControl(){return this.form.controls.loopConfig}executionModeValue=F$1(this.form.controls.executionMode.valueChanges,{initialValue:this.form.controls.executionMode.value});isLoopMode=XC(()=>this.executionModeValue()==="LOOP");subAgentRows=Ui([]);allSubAgentsSelected=Ui(false);subAgentCandidatesUnavailable=Ui(false);namedSubAgentSelectionDropped=XC(()=>this.allSubAgentsSelected()&&this.subAgentRows().some(t=>t.selected()));droppedUnresolvedSubAgents=XC(()=>this.allSubAgentsSelected()?this.subAgentRows().filter(t=>t.unresolved&&t.selected()).length:0);hasAnySubAgent=XC(()=>this.allSubAgentsSelected()||this.subAgentRows().some(t=>t.selected()));newSubAgentControl=new Te("",{nonNullable:true});isEditMode=Ui(false);isSubmitting=Ui(false);isLoading=Ui(false);isExporting=Ui(false);submitError=Ui(null);ExecutionMode=qe$1;loopConfigPlaceholder=JSON.stringify({search:{tool:"SearchTalents",params:{talentId:["6ac76692a909eaaae0b078d6"],resolveTargets:["MANAGER"],next:null}},act:{agentName:"ProfileCaretaker",promptTemplate:"This talent has not completed their profile. As their manager, I need you to help me review and improve it."}},null,2);builtInRows=Ui([]);inspectRoute(){let t=this.route.snapshot.paramMap.get("agentConfigId")??"";return this.isPlatformMode?["/agentos","admin","agent-configs",t,"inspect"]:["/agentos",this.namespaceId,"agent-configs",t,"inspect"]}configAgentExposureWarning=XC(()=>Ke({configEnabled:this.builtInRows().some(t=>t.type===je&&t.state()==="on"),integrationTypes:this.integrationRows().filter(t=>t.enabled()).map(t=>t.config.integrationType),hasSubAgents:this.hasAnySubAgent()}));modelOptions=Ui({aliases:[],apiNames:[],current:null});modelCatalogueLoaded=Ui(false);modelAsFreeText=XC(()=>{let{aliases:t,apiNames:e}=this.modelOptions();return this.modelCatalogueLoaded()&&t.length+e.length===0});applyModelCatalogue(t,e){this.modelOptions.set(He(t,e)),this.modelCatalogueLoaded.set(true);}integrationRows=Ui([]);skillRows=Ui([]);allSkillsSelected=Ui(false);skillCatalogueUnavailable=Ui(false);namedSkillSelectionDropped=XC(()=>this.allSkillsSelected()&&this.skillRows().some(t=>t.selected()));existingConfig=null;ngOnInit(){this.defaultsController.getAgentConfigDefaults().pipe(U$1(this.destroyRef),da(()=>Tr(null))).subscribe(e=>this.defaultDelegationTimeoutSeconds.set(e?.delegationTimeoutSeconds??null));let t=this.route.snapshot.paramMap.get("agentConfigId");t?(this.isEditMode.set(true),this.loadConfigAndIntegrations(t)):this.loadIntegrations(void 0);}loadConfigAndIntegrations(t){this.isLoading.set(true),Ty({config:this.agentConfigController.getByIdAgentConfig(t),namespaceIntegrations:this.namespaceId?this.integrationConfigState.loadNamespaceConfigs(this.namespaceId):Tr([]),platformIntegrations:this.integrationConfigState.loadPlatformConfigs(),builtInTypes:this.loadBuiltInTypes(),skillCatalogue:this.loadSkillCatalogue(),delegationCandidates:this.loadDelegationCandidates(),models:this.aiModelState.listAvailable(this.namespaceId)}).pipe(U$1(this.destroyRef)).subscribe({next:({config:e,namespaceIntegrations:o,platformIntegrations:r,builtInTypes:d,skillCatalogue:f,delegationCandidates:S,models:_})=>{this.existingConfig=e,this.applyModelCatalogue(_,e.modelName??null),this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??null),this.modelNameControl.setValue(e.modelName??null),this.instructionsControl.setValue(e.instructions??null);let m=e.executionMode??(e.advancedExecution?"ADVANCED":"SIMPLE");this.executionModeControl.setValue(m),this.delegationTimeoutControl.setValue(e.delegationTimeoutSeconds??null),this.enabledControl.setValue(e.enabled??true),this.loopConfigControl.setValue(e.loopConfig!=null?JSON.stringify(e.loopConfig,null,2):null);let I=[...r,...o];this.integrationRows.set(this.buildIntegrationRows(I,e.integrations??void 0)),this.builtInRows.set(this.buildBuiltInRows(d,e.integrations??void 0)),this.allSubAgentsSelected.set(Ge(e.subAgents)),this.subAgentRows.set(this.buildSubAgentRows(S,e.subAgents,e.name)),this.allSkillsSelected.set(o$1(e.skillSelectors)),this.skillRows.set(this.buildSkillRows(f,e.skillSelectors)),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),this.navigateBack();}});}loadIntegrations(t){Ty({namespaceIntegrations:this.namespaceId?this.integrationConfigState.loadNamespaceConfigs(this.namespaceId):Tr([]),platformIntegrations:this.integrationConfigState.loadPlatformConfigs(),builtInTypes:this.loadBuiltInTypes(),skillCatalogue:this.loadSkillCatalogue(),delegationCandidates:this.loadDelegationCandidates(),models:this.aiModelState.listAvailable(this.namespaceId)}).pipe(U$1(this.destroyRef)).subscribe({next:({namespaceIntegrations:e,platformIntegrations:o,builtInTypes:r,skillCatalogue:d,delegationCandidates:f,models:S})=>{this.applyModelCatalogue(S,null);let _=[...o,...e];this.integrationRows.set(this.buildIntegrationRows(_,t??void 0)),this.builtInRows.set(this.buildBuiltInRows(r,t??void 0)),this.allSubAgentsSelected.set(false),this.subAgentRows.set(this.buildSubAgentRows(f,void 0,null)),this.allSkillsSelected.set(false),this.skillRows.set(this.buildSkillRows(d,void 0));}});}loadSkillCatalogue(){return (this.namespaceId?this.skillState.listEffective(this.namespaceId):this.skillState.listPlatform().pipe(ne(e=>e.map(o=>({id:o.id??"",name:o.name,description:o.description,namespaceId:o.namespaceId??null,readOnly:o.readOnly===true}))))).pipe(da(e=>(console.error("[agent-config-form] failed to load the skill catalogue",e),this.skillCatalogueUnavailable.set(true),Tr([]))))}buildSkillRows(t,e){let r$1=(e??[]).map(m=>m.trim()).filter(m=>m.length>0).filter(m=>m!==r),d=i(r$1),f=new Set(t.map(m=>m.name.toLowerCase())),S=t.map(m=>({selector:m.name,name:m.name,description:m.description,platform:m.namespaceId==null,unresolved:false,selected:Ui(d.has(m.name.toLowerCase()))})),_=new Set;for(let m of r$1){let I=l(m).toLowerCase();f.has(I)||_.has(I)||(_.add(I),S.push({selector:m,name:m,description:"",platform:false,unresolved:true,selected:Ui(true)}));}return S}toggleSkill(t){t.selected.update(e=>!e);}toggleAllSkills(){this.allSkillsSelected.update(t=>!t);}buildSkillSelectorsPayload(){if(this.allSkillsSelected())return [r];let t=this.skillRows().filter(e=>e.selected()).map(e=>e.selector);return t.length>0?t:void 0}loadDelegationCandidates(){let t=this.agentConfigController.listPlatformAgentsAgentConfig(false).pipe(this.orNoCandidates()),e=this.namespaceId?this.agentConfigController.listByParentAgentConfig(this.namespaceId,false).pipe(this.orNoCandidates()):Tr([]);return Ty({platform:t,namespace:e}).pipe(ne(({platform:o,namespace:r})=>[...o,...r]),ne(o=>o.map(r=>r.name).filter(r=>r.length>0)),ne(o=>n.dedupeByKey(o)))}orNoCandidates(){return da(t=>(console.error("[agent-config-form] failed to load the delegation candidates",t),this.subAgentCandidatesUnavailable.set(true),Tr([])))}static dedupeByKey(t){let e=new Set;return t.filter(o=>{let r=o.toLowerCase();return e.has(r)?false:(e.add(r),true)})}buildSubAgentRows(t,e,o){let r=Ue(e),d=o?.toLowerCase()??null,f=t.filter(b=>{let G=b.toLowerCase();return G!==d||r.has(G)}),S=new Set(f.map(b=>b.toLowerCase())),_=f.map(b=>({selector:b,name:b,unresolved:false,pattern:false,grantedByPattern:z(b,e),selected:Ui(r.has(b.toLowerCase()))})),m=new Set,I=(e??[]).map(b=>b.trim()).filter(b=>b.length>0&&b!==D);for(let b of I){let G=b.toLowerCase();S.has(G)||m.has(G)||(m.add(G),_.push({selector:b,name:b,unresolved:true,pattern:H(b),grantedByPattern:false,selected:Ui(true)}));}return _}loadBuiltInTypes(){return this.integrationTypeController.listTypesIntegrationType().pipe(ne(t=>t.filter(e=>!e.configSchema)),da(t=>(console.error("[agent-config-form] failed to load integration types",t),Tr([]))))}buildIntegrationRows(t,e){return t.map(o=>{let r=o.name??"",d=e?.[r],f=e!=null&&r in e,S=Array.isArray(d)?d.join(", "):"";return {config:o,enabled:Ui(f),toolsControl:new Te(S,{nonNullable:true})}})}buildBuiltInRows(t,e){return t.map(o=>{let r=e!=null&&o.type in e,d=e?.[o.type],f=r?Array.isArray(d)&&d.length===0?"off":"on":"default";return {type:o.type,displayName:o.displayName,description:o.description,enabledByDefault:o.enabledByDefault===true,state:Ui(f),restrictedTools:Array.isArray(d)&&d.length>0?d:null}})}toggleIntegration(t){t.enabled.update(e=>!e);}setBuiltInState(t,e){t.state.set(e);}builtInDefaultLabel(t){return t.enabledByDefault?"Platform default (enabled)":"Platform default (disabled)"}addSubAgent(){let t=this.newSubAgentControl.value.trim();if(!t)return;let e=this.subAgentRows().find(o=>o.selector.toLowerCase()===t.toLowerCase());e?e.selected.set(true):t===D?this.allSubAgentsSelected.set(true):this.subAgentRows.update(o=>this.withPatternGrants([...o,{selector:t,name:t,unresolved:true,pattern:H(t),grantedByPattern:false,selected:Ui(true)}])),this.newSubAgentControl.reset("");}removeSubAgent(t){let e=t.selector.toLowerCase();this.subAgentRows.update(o=>this.withPatternGrants(o.filter(r=>r.selector.toLowerCase()!==e)));}toggleSubAgent(t){t.selected.update(e=>!e),t.pattern&&this.subAgentRows.update(e=>this.withPatternGrants(e));}withPatternGrants(t){let e=this.allSubAgentsSelected()?[]:t.filter(o=>o.selected()).map(o=>o.selector);return t.map(o=>o.unresolved?o:x(w({},o),{grantedByPattern:z(o.name,e)}))}toggleAllSubAgents(){this.allSubAgentsSelected.update(t=>!t),this.subAgentRows.update(t=>this.withPatternGrants(t));}buildSubAgentsPayload(){if(this.allSubAgentsSelected())return [D];let t=this.subAgentRows().filter(e=>e.selected()).map(e=>e.selector);return t.length>0?t:void 0}buildIntegrationsPayload(){let t={};for(let o of this.integrationRows().filter(r=>r.enabled())){let r=o.config.name??"",d=o.toolsControl.value.trim();t[r]=d===""?null:d.split(",").map(f=>f.trim()).filter(f=>f.length>0);}for(let o of this.builtInRows()){let r=o.state();r==="on"?t[o.type]=o.restrictedTools??null:r==="off"&&(t[o.type]=[]);}let e=new Set([...this.integrationRows().map(o=>o.config.name??""),...this.builtInRows().map(o=>o.type)]);for(let[o,r]of Object.entries(this.existingConfig?.integrations??{}))e.has(o)||(t[o]=r);return Object.keys(t).length>0?t:void 0}submit(){if(this.form.invalid||this.isSubmitting())return;this.addSubAgent(),this.submitError.set(null),this.isSubmitting.set(true);let t=x(w({},this.existingConfig??{}),{createdOn:this.existingConfig?.createdOn,updatedOn:this.existingConfig?.updatedOn,namespaceId:this.namespaceId,name:this.nameControl.value.trim(),description:this.descriptionControl.value?.trim()||void 0,modelName:this.modelNameControl.value?.trim()||void 0,instructions:this.instructionsControl.value?.trim()||void 0,integrations:this.buildIntegrationsPayload(),executionMode:this.executionModeControl.value,advancedExecution:this.executionModeControl.value==="ADVANCED",enabled:this.enabledControl.value,subAgents:this.buildSubAgentsPayload(),skillSelectors:this.buildSkillSelectorsPayload(),delegationTimeoutSeconds:this.delegationTimeoutControl.value,loopConfig:this.buildLoopConfigPayload()});(this.isEditMode()?this.agentConfigController.updateAgentConfig(this.existingConfig.id??"",t):this.agentConfigController.createAgentConfig(t)).pipe(U$1(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:o=>{this.isSubmitting.set(false),this.submitError.set(n.serverMessage(o));}});}static serverMessage(t){let o=t?.error?.message;if(typeof o=="string"&&o.trim().length>0)return o;let r=t?.status;return r===0?"The server could not be reached. The agent was not saved.":typeof r=="number"&&r>=500?`The server failed to save the agent (HTTP ${r}). Nothing was changed.`:"The server refused the save and gave no reason. Check the values and try again."}exportYaml(){let t=this.existingConfig?.id;!t||this.isExporting()||(this.isExporting.set(true),this.exportService.exportAsYaml(t).pipe(U$1(this.destroyRef)).subscribe({next:e=>{let o=new Blob([e],{type:"application/yaml"}),r=URL.createObjectURL(o),d=document.createElement("a");d.href=r,d.download=`${this.existingConfig?.name??"agent"}.yaml`,d.click(),URL.revokeObjectURL(r),this.isExporting.set(false);},error:()=>this.isExporting.set(false)}));}buildLoopConfigPayload(){let t=this.loopConfigControl.value?.trim();if(!t)return this.existingConfig?.loopConfig!=null?null:void 0;try{return JSON.parse(t)}catch(e){return}}cancel(){this.navigateBack();}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","agent-configs"]):this.router.navigate(["/agentos",this.namespaceId,"agent-configs"]);}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=yw({type:n,selectors:[["agentos-agent-config-form"]],decls:8,vars:4,consts:[[3,"title"],["dsButton","","variant","ghost","type","button","title","Back to agent configs",3,"click"],["headerMeta","",1,"ds-link",3,"routerLink"],["headerMeta","","variant","outline"],[1,"ds-hint"],[1,"ds-form",3,"formGroup"],[1,"ds-form",3,"ngSubmit","formGroup"],["legend","Agent"],["label","Name","controlId","agent-config-name","required",""],["dsControl","","id","agent-config-name","type","text","placeholder","e.g. Support agent","autocomplete","off",3,"formControl"],[1,"ds-stack","ds-stack--sm"],["dsCheck",""],["type","checkbox",3,"formControl"],[1,"ds-hint","ds-indent"],["label","Description","controlId","agent-config-description"],["dsControl","","id","agent-config-description","type","text","placeholder","Optional \u2014 short description of this agent","autocomplete","off",3,"formControl"],["label","Model","controlId","agent-config-model-name","required","","hint","Aliases are matched first, then API model names. Resolved when the agent runs."],["dsControl","","id","agent-config-model-name","type","text","placeholder","Model alias or name to use, e.g. BIG","autocomplete","off",3,"formControl"],["dsControl","","id","agent-config-model-name",3,"formControl"],["label","Instructions","controlId","agent-config-instructions"],["dsControl","","id","agent-config-instructions","rows","6","placeholder","Optional \u2014 system instructions for this agent",3,"formControl"],["legend","Integrations","hint","Select which integrations this agent can use. Leave tool names empty to allow all tools from an integration."],["legend","Skills"],["type","checkbox",3,"change","checked"],[1,"ds-strong"],[1,"ds-code"],["tone","warning"],["label","Execution mode","controlId","agent-config-execution-mode","hint",'SIMPLE runs a single LLM pass. ADVANCED uses an intention loop for complex tasks and requires a model that supports advanced execution, otherwise the agent fails to run. LOOP (experimental) starts one case per result of a tool, without an LLM \u2014 run it with "Launch loop" in the agent list menu.'],["dsControl","","id","agent-config-execution-mode",3,"formControl"],[3,"value"],["label","Loop configuration (JSON)","controlId","agent-config-loop-config",3,"error"],["legend","Sub-agents"],[1,"ds-inline"],["dsControl","","type","text","aria-label","New sub-agent pattern","placeholder","e.g. *Fixer","autocomplete","off",3,"keydown.enter","formControl"],["dsButton","","variant","icon","type","button","title","Add pattern","aria-label","Add pattern",3,"click","disabled"],["label","Delegation timeout (seconds)","controlId","delegation-timeout","hintId","delegation-timeout-hint","errorId","delegation-timeout-error",3,"hint","error"],["dsControl","","id","delegation-timeout","type","number","min","1","max","2147483647","step","1","placeholder","Server default","aria-describedby","delegation-timeout-hint delegation-timeout-error",3,"formControl"],["dsButton","","variant","primary","type","submit",3,"disabled"],["dsButton","","type","button",3,"disabled"],["dsButton","","type","button",3,"click"],["disabled","",3,"ngValue"],[3,"ngValue"],["label","Aliases"],["label","API model names"],[1,"ds-meta"],["dsControl","","type","text","placeholder","Tool names, comma-separated (empty = all tools)","autocomplete","off",1,"ds-indent",3,"formControl"],[1,"ds-micro"],["dsControl","",1,"ds-indent","ds-control--auto",3,"change","id","value"],["value","default"],["value","on"],["value","off"],["type","checkbox",3,"change","checked","disabled"],["dsControl","","mono","","id","agent-config-loop-config","rows","10","spellcheck","false","autocomplete","off",3,"placeholder","formControl"],["dsCheck","",1,"ds-grow"],["dsButton","","variant","icon-danger","type","button","title","Remove"],["dsButton","","variant","icon-danger","type","button","title","Remove",3,"click"],["dsButton","","variant","ghost","type","button",3,"click"],["dsButton","","type","button",3,"click","disabled"]],template:function(e,o){e&1&&(Ds(0,"ds-page")(1,"ds-section-header",0)(2,"button",1),mg("click",function(){return o.cancel()}),NC(3," \u2190 Agent configs "),pl(),Lw(4,nt,2,1,"a",2),Lw(5,ot,2,0,"ds-tag",3),pl(),Lw(6,it,2,0,"p",4)(7,Kt,89,33,"form",5),pl()),e&2&&(BE(),ug("title",o.isEditMode()?"Edit agent config":"New agent config"),BE(3),jw(o.isEditMode()?4:-1),BE(),jw(o.isPlatformMode?5:-1),BE(),jw(o.isLoading()?6:7));},dependencies:[Ut$1,nd,bo,xo,Lt$1,kn,vn,Gt$1,mo,po,$r,qr,Vn,An,$t$1,pn,hn,cn,ln,dn,mn,at$1,an,rn,ko],encapsulation:2})};export{Je as AgentConfigFormComponent};
@@ -1 +1 @@
1
- import {O}from'./chunk-DDVFqcYY.js';import {v}from'./chunk-CAOHsMU2.js';import {g,W,F,I as Ie,U as Ui,a9 as F$1,an as Me,q as Af,G as U,y as yw,D as Ds,Q as mg,N as NC,p as pl,L as Lw,a as BE,P as ug,j as jw,Z as Zw,H as Hw,ao as Vw,_ as _I,l as lg,am as Bw,J as Jw,R as NI,m as Uw,v as vl,ae as Fw,O as Og,r as df,s as ff}from'./main-ZPG3XUQU.js';import {p as pt,E as Bt,T as Te,a as fn,d as pn,h as hn,e as cn,r as ln,g as dn,i as at,j as an,t as rn,U as Ut,n as nd,b as bo,x as xo,L as Lt,G as Gt,w as pa,m as mo,c as po,V as Vn,A as An,v as va,F as go,_ as _o}from'./chunk-Bs2lM6dc.js';import'./chunk-TuIJresS.js';function ge(o,t){o&1&&(Ds(0,"p",2),NC(1,"Loading\u2026"),pl());}function be(o,t){if(o&1&&(Ds(0,"label",23),lg(1,"input",24),_I(),NC(2),pl()),o&2){let e=t.$implicit,r=Jw(3);BE(),ug("formControl",r.scopeControl)("value",e.value)("disabled",e.value==="namespace"&&!r.isAdmin()),NI(),BE(),vl(" ",e.label," ");}}function _e(o,t){if(o&1&&(Ds(0,"ds-fieldset",5),Hw(1,be,3,4,"label",23,Fw().trackByScope,true),pl()),o&2){let e=Jw(2);ug("disabled",e.isEditMode()),BE(),Uw(e.scopeOptions);}}function Ae(o,t){if(o&1&&(Ds(0,"option",8),NC(1),pl()),o&2){let e=t.$implicit;ug("value",e),BE(),Og(e);}}function Se(o,t){if(o&1){let e=Zw();Ds(0,"div",19),lg(1,"input",25),_I(),lg(2,"input",26),_I(),Ds(3,"button",27),mg("click",function(){let l=df(e).$index,f=Jw(2);return ff(f.removeHeader(l))}),NC(4," \xD7 "),pl()();}if(o&2){let e=t.$index;ug("formGroupName",e),BE(),NI(),BE(),NI();}}function Pe(o,t){if(o&1){let e=Zw();Ds(0,"form",4),mg("ngSubmit",function(){df(e);let l=Jw();return ff(l.submit())}),Lw(1,_e,3,1,"ds-fieldset",5),Ds(2,"ds-form-field",6)(3,"select",7),Hw(4,Ae,2,2,"option",8,Vw),pl(),_I(),pl(),Ds(6,"ds-form-field",9),lg(7,"input",10),_I(),pl(),Ds(8,"ds-form-field",11),lg(9,"input",12),_I(),pl(),Ds(10,"ds-form-field",13),lg(11,"input",14),_I(),pl(),Ds(12,"ds-form-field",15),lg(13,"input",16),_I(),pl(),Ds(14,"ds-form-field",17)(15,"div",18),Hw(16,Se,5,1,"div",19,Bw),Ds(18,"div")(19,"button",20),mg("click",function(){df(e);let l=Jw();return ff(l.addHeader())}),NC(20,"+ Add header"),pl()()()(),Ds(21,"ds-form-actions")(22,"button",21),NC(23),pl(),Ds(24,"button",22),mg("click",function(){df(e);let l=Jw();return ff(l.cancel())}),NC(25,"Cancel"),pl()()();}if(o&2){let e=Jw();ug("formGroup",e.form),BE(),jw(e.isPlatformMode?-1:1),BE(2),ug("formControl",e.apiTypeControl),NI(),BE(),Uw(e.apiTypeOptions),BE(3),ug("formControl",e.nameControl),NI(),BE(2),ug("formControl",e.descriptionControl),NI(),BE(2),ug("formControl",e.baseUrlControl),NI(),BE(2),ug("formControl",e.apiKeyControl),NI(),BE(2),ug("formArrayName","headers"),BE(),Uw(e.headersArray.controls),BE(6),ug("disabled",e.form.invalid||e.isSubmitting()),BE(),vl(" ",e.isEditMode()?"Save changes":"Create"," ");}}var xe=new Set(["namespace","userOnNs","userGlobal"]),E=Object.freeze({platform:"Configuration de niveau plateforme",namespace:"Configuration du namespace",userOnNs:"Pour moi sur ce namespace",userGlobal:"Pour moi globalement"}),ye=class o{route=g(W);router=g(F);destroyRef=g(Ie);state=g(O);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});apiTypeOptions=Object.values(Me);scopeOptions=[{value:"namespace",label:E.namespace},{value:"userOnNs",label:E.userOnNs},{value:"userGlobal",label:E.userGlobal}];form=new pt({name:new Te("",{nonNullable:true,validators:[fn.required,fn.minLength(1)]}),description:new Te(null),apiType:new Te("OpenAI",{nonNullable:true,validators:[fn.required]}),baseUrl:new Te("",{nonNullable:true}),apiKey:new Te("",{nonNullable:true}),scope:new Te("namespace",{nonNullable:true}),headers:new Bt([],{validators:[]})});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get apiTypeControl(){return this.form.controls.apiType}get baseUrlControl(){return this.form.controls.baseUrl}get apiKeyControl(){return this.form.controls.apiKey}get scopeControl(){return this.form.controls.scope}get headersArray(){return this.form.controls.headers}addHeader(){this.headersArray.push(new pt({key:new Te("",{nonNullable:true,validators:[fn.required]}),value:new Te("",{nonNullable:true})}));}removeHeader(t){this.headersArray.removeAt(t);}isEditMode=Ui(false);isSubmitting=Ui(false);isLoading=Ui(false);existingConfig=null;initialApiKey="";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,r=t.get("aiProviderId"),l=this.isPlatformMode?"namespace":this.parseScope(e.get("scope"));if(r){this.isEditMode.set(true),this.scopeControl.disable(),this.apiTypeControl.disable(),this.loadConfig(r);return}this.scopeControl.setValue(l);let f=e.get("template");f&&this.hydrateFromTemplate(f);}parseScope(t){return t&&xe.has(t)?t:"namespace"}deriveScopeFromConfig(t){return !t.userId?"namespace":t.namespaceId?"userOnNs":"userGlobal"}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(`[AiProviderForm] Could not load provider '${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.apiTypeControl.setValue(e.apiType),this.baseUrlControl.setValue(e.baseUrl??""),this.apiKeyControl.setValue(""),this.initialApiKey="",this.apiKeyControl.markAsTouched(),this.isLoading.set(false),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:true});},error:e=>{console.warn(`[AiProviderForm] 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){this.nameControl.setValue(t.name),this.descriptionControl.setValue(t.description??null),this.apiTypeControl.setValue(t.apiType),this.baseUrlControl.setValue(t.baseUrl??"");let e=t.apiKey??"";this.apiKeyControl.setValue(e),this.initialApiKey=e,this.headersArray.clear();for(let[r,l]of Object.entries(t.headers??{}))this.headersArray.push(new pt({key:new Te(r,{nonNullable:true,validators:[fn.required]}),value:new Te(l,{nonNullable:true})}));}submit(){if(this.form.invalid||this.isSubmitting())return;if(this.isEditMode()&&!this.existingConfig?.id){this.navigateBack();return}this.isSubmitting.set(true);let t=this.descriptionControl.value?.trim(),e=this.baseUrlControl.value.trim(),r=this.apiKeyControl.value,l=this.isEditMode()&&r===this.initialApiKey?null:r,f=this.headersArray.controls.filter(A=>A.controls.key.value.trim()).map(A=>[A.controls.key.value.trim(),A.controls.value.value]),Ce=f.length>0?Object.fromEntries(f):null,V={name:this.nameControl.value.trim(),apiType:this.apiTypeControl.value,description:t||null,baseUrl:e||null,apiKey:l,headers:Ce},w=this.form.getRawValue().scope,he=this.isPlatformMode?null:this.namespaceId??null;(this.isEditMode()&&this.existingConfig?.id?this.state.update(this.existingConfig.id,V,w,this.existingConfig):this.state.create(V,w,he)).pipe(U(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(false)});}cancel(){this.navigateBack();}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","ai-providers"]):this.router.navigate(["/agentos",this.namespaceId,"ai-providers"]);}trackByScope(t,e){return e.value}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=yw({type:o,selectors:[["agentos-ai-provider-form"]],decls:6,vars:2,consts:[[3,"title"],["dsButton","","variant","ghost","type","button","title","Back to AI providers",3,"click"],[1,"ds-hint"],[1,"ds-form",3,"formGroup"],[1,"ds-form",3,"ngSubmit","formGroup"],["legend","Configuration scope",3,"disabled"],["label","API type","controlId","llm-api-type","required",""],["dsControl","","id","llm-api-type",3,"formControl"],[3,"value"],["label","Name","controlId","llm-name","required",""],["dsControl","","id","llm-name","type","text","placeholder","e.g. OpenAI prod","autocomplete","off",3,"formControl"],["label","Description","controlId","llm-description"],["dsControl","","id","llm-description","type","text","placeholder","Optional \u2014 short description of this provider","autocomplete","off",3,"formControl"],["label","Base URL","controlId","llm-base-url"],["dsControl","","id","llm-base-url","type","url","placeholder","Optional \u2014 leave empty for default endpoint","autocomplete","off",3,"formControl"],["label","API key","controlId","llm-api-key"],["dsControl","","id","llm-api-key","type","password","placeholder","sk-\u2026","autocomplete","new-password",3,"formControl"],["label","Custom headers"],[1,"ds-stack","ds-stack--sm",3,"formArrayName"],[1,"ds-inline",3,"formGroupName"],["dsButton","","variant","ghost","type","button",3,"click"],["dsButton","","variant","primary","type","submit",3,"disabled"],["dsButton","","type","button",3,"click"],["dsCheck",""],["type","radio",3,"formControl","value","disabled"],["dsControl","","type","text","placeholder","Header name","formControlName","key","autocomplete","off"],["dsControl","","type","text","placeholder","Value","formControlName","value","autocomplete","off"],["dsButton","","variant","icon-danger","type","button","title","Remove header","aria-label","Remove header",3,"click"]],template:function(e,r){e&1&&(Ds(0,"ds-page")(1,"ds-section-header",0)(2,"button",1),mg("click",function(){return r.cancel()}),NC(3," \u2190 AI providers "),pl()(),Lw(4,ge,2,0,"p",2)(5,Pe,26,10,"form",3),pl()),e&2&&(BE(),ug("title",r.isEditMode()?"Edit AI provider":"New AI provider"),BE(3),jw(r.isLoading()?4:5));},dependencies:[pn,hn,cn,ln,dn,at,an,rn,Ut,nd,bo,xo,Lt,Gt,pa,mo,po,Vn,An,va,go,_o],encapsulation:2})};export{ye as AiProviderFormComponent};
1
+ import {O}from'./chunk-C5-gpBRH.js';import {v}from'./chunk-CfNQLZ6W.js';import {g,W,F,I as Ie,U as Ui,a9 as F$1,an as Me,q as Af,G as U,y as yw,D as Ds,Q as mg,N as NC,p as pl,L as Lw,a as BE,P as ug,j as jw,Z as Zw,H as Hw,ao as Vw,_ as _I,l as lg,am as Bw,J as Jw,R as NI,m as Uw,v as vl,ae as Fw,O as Og,r as df,s as ff}from'./main-47BLQXE5.js';import {p as pt,E as Bt,T as Te,a as fn,d as pn,h as hn,e as cn,r as ln,g as dn,i as at,j as an,t as rn,U as Ut,n as nd,b as bo,x as xo,L as Lt,G as Gt,w as pa,m as mo,c as po,V as Vn,A as An,v as va,F as go,_ as _o}from'./chunk-D2p21lhx.js';import'./chunk-CzLmUpd_.js';function ge(o,t){o&1&&(Ds(0,"p",2),NC(1,"Loading\u2026"),pl());}function be(o,t){if(o&1&&(Ds(0,"label",23),lg(1,"input",24),_I(),NC(2),pl()),o&2){let e=t.$implicit,r=Jw(3);BE(),ug("formControl",r.scopeControl)("value",e.value)("disabled",e.value==="namespace"&&!r.isAdmin()),NI(),BE(),vl(" ",e.label," ");}}function _e(o,t){if(o&1&&(Ds(0,"ds-fieldset",5),Hw(1,be,3,4,"label",23,Fw().trackByScope,true),pl()),o&2){let e=Jw(2);ug("disabled",e.isEditMode()),BE(),Uw(e.scopeOptions);}}function Ae(o,t){if(o&1&&(Ds(0,"option",8),NC(1),pl()),o&2){let e=t.$implicit;ug("value",e),BE(),Og(e);}}function Se(o,t){if(o&1){let e=Zw();Ds(0,"div",19),lg(1,"input",25),_I(),lg(2,"input",26),_I(),Ds(3,"button",27),mg("click",function(){let l=df(e).$index,f=Jw(2);return ff(f.removeHeader(l))}),NC(4," \xD7 "),pl()();}if(o&2){let e=t.$index;ug("formGroupName",e),BE(),NI(),BE(),NI();}}function Pe(o,t){if(o&1){let e=Zw();Ds(0,"form",4),mg("ngSubmit",function(){df(e);let l=Jw();return ff(l.submit())}),Lw(1,_e,3,1,"ds-fieldset",5),Ds(2,"ds-form-field",6)(3,"select",7),Hw(4,Ae,2,2,"option",8,Vw),pl(),_I(),pl(),Ds(6,"ds-form-field",9),lg(7,"input",10),_I(),pl(),Ds(8,"ds-form-field",11),lg(9,"input",12),_I(),pl(),Ds(10,"ds-form-field",13),lg(11,"input",14),_I(),pl(),Ds(12,"ds-form-field",15),lg(13,"input",16),_I(),pl(),Ds(14,"ds-form-field",17)(15,"div",18),Hw(16,Se,5,1,"div",19,Bw),Ds(18,"div")(19,"button",20),mg("click",function(){df(e);let l=Jw();return ff(l.addHeader())}),NC(20,"+ Add header"),pl()()()(),Ds(21,"ds-form-actions")(22,"button",21),NC(23),pl(),Ds(24,"button",22),mg("click",function(){df(e);let l=Jw();return ff(l.cancel())}),NC(25,"Cancel"),pl()()();}if(o&2){let e=Jw();ug("formGroup",e.form),BE(),jw(e.isPlatformMode?-1:1),BE(2),ug("formControl",e.apiTypeControl),NI(),BE(),Uw(e.apiTypeOptions),BE(3),ug("formControl",e.nameControl),NI(),BE(2),ug("formControl",e.descriptionControl),NI(),BE(2),ug("formControl",e.baseUrlControl),NI(),BE(2),ug("formControl",e.apiKeyControl),NI(),BE(2),ug("formArrayName","headers"),BE(),Uw(e.headersArray.controls),BE(6),ug("disabled",e.form.invalid||e.isSubmitting()),BE(),vl(" ",e.isEditMode()?"Save changes":"Create"," ");}}var xe=new Set(["namespace","userOnNs","userGlobal"]),E=Object.freeze({platform:"Configuration de niveau plateforme",namespace:"Configuration du namespace",userOnNs:"Pour moi sur ce namespace",userGlobal:"Pour moi globalement"}),ye=class o{route=g(W);router=g(F);destroyRef=g(Ie);state=g(O);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});apiTypeOptions=Object.values(Me);scopeOptions=[{value:"namespace",label:E.namespace},{value:"userOnNs",label:E.userOnNs},{value:"userGlobal",label:E.userGlobal}];form=new pt({name:new Te("",{nonNullable:true,validators:[fn.required,fn.minLength(1)]}),description:new Te(null),apiType:new Te("OpenAI",{nonNullable:true,validators:[fn.required]}),baseUrl:new Te("",{nonNullable:true}),apiKey:new Te("",{nonNullable:true}),scope:new Te("namespace",{nonNullable:true}),headers:new Bt([],{validators:[]})});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get apiTypeControl(){return this.form.controls.apiType}get baseUrlControl(){return this.form.controls.baseUrl}get apiKeyControl(){return this.form.controls.apiKey}get scopeControl(){return this.form.controls.scope}get headersArray(){return this.form.controls.headers}addHeader(){this.headersArray.push(new pt({key:new Te("",{nonNullable:true,validators:[fn.required]}),value:new Te("",{nonNullable:true})}));}removeHeader(t){this.headersArray.removeAt(t);}isEditMode=Ui(false);isSubmitting=Ui(false);isLoading=Ui(false);existingConfig=null;initialApiKey="";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,r=t.get("aiProviderId"),l=this.isPlatformMode?"namespace":this.parseScope(e.get("scope"));if(r){this.isEditMode.set(true),this.scopeControl.disable(),this.apiTypeControl.disable(),this.loadConfig(r);return}this.scopeControl.setValue(l);let f=e.get("template");f&&this.hydrateFromTemplate(f);}parseScope(t){return t&&xe.has(t)?t:"namespace"}deriveScopeFromConfig(t){return !t.userId?"namespace":t.namespaceId?"userOnNs":"userGlobal"}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(`[AiProviderForm] Could not load provider '${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.apiTypeControl.setValue(e.apiType),this.baseUrlControl.setValue(e.baseUrl??""),this.apiKeyControl.setValue(""),this.initialApiKey="",this.apiKeyControl.markAsTouched(),this.isLoading.set(false),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:true});},error:e=>{console.warn(`[AiProviderForm] 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){this.nameControl.setValue(t.name),this.descriptionControl.setValue(t.description??null),this.apiTypeControl.setValue(t.apiType),this.baseUrlControl.setValue(t.baseUrl??"");let e=t.apiKey??"";this.apiKeyControl.setValue(e),this.initialApiKey=e,this.headersArray.clear();for(let[r,l]of Object.entries(t.headers??{}))this.headersArray.push(new pt({key:new Te(r,{nonNullable:true,validators:[fn.required]}),value:new Te(l,{nonNullable:true})}));}submit(){if(this.form.invalid||this.isSubmitting())return;if(this.isEditMode()&&!this.existingConfig?.id){this.navigateBack();return}this.isSubmitting.set(true);let t=this.descriptionControl.value?.trim(),e=this.baseUrlControl.value.trim(),r=this.apiKeyControl.value,l=this.isEditMode()&&r===this.initialApiKey?null:r,f=this.headersArray.controls.filter(A=>A.controls.key.value.trim()).map(A=>[A.controls.key.value.trim(),A.controls.value.value]),Ce=f.length>0?Object.fromEntries(f):null,V={name:this.nameControl.value.trim(),apiType:this.apiTypeControl.value,description:t||null,baseUrl:e||null,apiKey:l,headers:Ce},w=this.form.getRawValue().scope,he=this.isPlatformMode?null:this.namespaceId??null;(this.isEditMode()&&this.existingConfig?.id?this.state.update(this.existingConfig.id,V,w,this.existingConfig):this.state.create(V,w,he)).pipe(U(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(false)});}cancel(){this.navigateBack();}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","ai-providers"]):this.router.navigate(["/agentos",this.namespaceId,"ai-providers"]);}trackByScope(t,e){return e.value}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=yw({type:o,selectors:[["agentos-ai-provider-form"]],decls:6,vars:2,consts:[[3,"title"],["dsButton","","variant","ghost","type","button","title","Back to AI providers",3,"click"],[1,"ds-hint"],[1,"ds-form",3,"formGroup"],[1,"ds-form",3,"ngSubmit","formGroup"],["legend","Configuration scope",3,"disabled"],["label","API type","controlId","llm-api-type","required",""],["dsControl","","id","llm-api-type",3,"formControl"],[3,"value"],["label","Name","controlId","llm-name","required",""],["dsControl","","id","llm-name","type","text","placeholder","e.g. OpenAI prod","autocomplete","off",3,"formControl"],["label","Description","controlId","llm-description"],["dsControl","","id","llm-description","type","text","placeholder","Optional \u2014 short description of this provider","autocomplete","off",3,"formControl"],["label","Base URL","controlId","llm-base-url"],["dsControl","","id","llm-base-url","type","url","placeholder","Optional \u2014 leave empty for default endpoint","autocomplete","off",3,"formControl"],["label","API key","controlId","llm-api-key"],["dsControl","","id","llm-api-key","type","password","placeholder","sk-\u2026","autocomplete","new-password",3,"formControl"],["label","Custom headers"],[1,"ds-stack","ds-stack--sm",3,"formArrayName"],[1,"ds-inline",3,"formGroupName"],["dsButton","","variant","ghost","type","button",3,"click"],["dsButton","","variant","primary","type","submit",3,"disabled"],["dsButton","","type","button",3,"click"],["dsCheck",""],["type","radio",3,"formControl","value","disabled"],["dsControl","","type","text","placeholder","Header name","formControlName","key","autocomplete","off"],["dsControl","","type","text","placeholder","Value","formControlName","value","autocomplete","off"],["dsButton","","variant","icon-danger","type","button","title","Remove header","aria-label","Remove header",3,"click"]],template:function(e,r){e&1&&(Ds(0,"ds-page")(1,"ds-section-header",0)(2,"button",1),mg("click",function(){return r.cancel()}),NC(3," \u2190 AI providers "),pl()(),Lw(4,ge,2,0,"p",2)(5,Pe,26,10,"form",3),pl()),e&2&&(BE(),ug("title",r.isEditMode()?"Edit AI provider":"New AI provider"),BE(3),jw(r.isLoading()?4:5));},dependencies:[pn,hn,cn,ln,dn,at,an,rn,Ut,nd,bo,xo,Lt,Gt,pa,mo,po,Vn,An,va,go,_o],encapsulation:2})};export{ye as AiProviderFormComponent};
@@ -1 +1 @@
1
- import {e}from'./chunk-C6dIhkYp.js';import {n}from'./chunk-CfgXrte_.js';import {v}from'./chunk-CAOHsMU2.js';import {O}from'./chunk-6p69HsOa.js';import {g,W as W$1,F,I as Ie,E as J,U as Ui,G as U$1,ad as ne$1,a1 as fa,aa as Tr,y as yw,D as Ds,Q as mg,p as pl,N as NC,L as Lw,P as ug,a as BE,j as jw,J as Jw,O as Og,H as Hw,m as Uw,v as vl,Z as Zw,k as cg,r as df,s as ff}from'./main-ZPG3XUQU.js';import {z as k,O as O$1,i as at,h as hn,I as Io,l as ko,P,B as P$1}from'./chunk-Bs2lM6dc.js';import'./chunk-TuIJresS.js';var Q=(n,e)=>e.key;function W(n,e){if(n&1&&(Ds(0,"p",3),NC(1),pl()),n&2){let t=Jw();BE(),Og(t.deletion.error());}}function X(n,e){n&1&&(Ds(0,"p",4),NC(1,"Loading integrations\u2026"),pl());}function Z(n,e){n&1&&(Ds(0,"p",5),NC(1,"No integrations available."),pl());}function ee(n,e){n&1&&(Ds(0,"p",4),NC(1,"No integrations match the current filter."),pl());}function te(n,e){n&1&&(Ds(0,"ds-tag",20),NC(1,"YAML"),pl(),Ds(2,"ds-tag",21),NC(3,"Read-only"),pl());}function ne(n,e){if(n&1){let t=Zw();Ds(0,"button",22),mg("click",function(){df(t);let s=Jw().$implicit,c=Jw(2);return ff(c.view(s))}),NC(1,"View"),pl();}if(n&2){let t=Jw().$implicit;cg("aria-label","View "+t.config.name);}}function ie(n,e){if(n&1){let t=Zw();Ds(0,"button",22),mg("click",function(){df(t);let s=Jw(3).$implicit,c=Jw(2);return ff(c.edit(s))}),NC(1," Edit "),pl();}if(n&2){let t=Jw(3).$implicit;cg("aria-label","Edit "+t.config.name);}}function oe(n,e){if(n&1){let t=Zw();Ds(0,"button",22),mg("click",function(){df(t);let s=Jw(2).$implicit,c=Jw(2);return ff(c.duplicate(s))}),NC(1," Duplicate "),pl(),Lw(2,ie,2,1,"button",19);}if(n&2){let t=Jw(2).$implicit;cg("aria-label","Duplicate "+t.config.name),BE(2),jw(t.canEdit?2:-1);}}function ae(n,e){if(n&1){let t=Zw();Ds(0,"agentos-row-delete-action",25),mg("deleteRequested",function(){df(t);let s=Jw(2).$implicit,c=Jw(2);return ff(c.deletion.request(s.key))})("deleteConfirmed",function(){df(t);let s=Jw(2).$implicit,c=Jw(2);return ff(c.confirmDelete(s))})("deleteCancelled",function(){df(t);let s=Jw(4);return ff(s.deletion.cancel())}),pl();}if(n&2){let t=Jw(2).$implicit,a=Jw(2);ug("rowKey",t.key)("rowLabel",t.config.name)("state",a.deletion);}}function re(n,e){n&1&&(Ds(0,"button",24),NC(1,"Inherited"),pl());}function le(n,e){if(n&1&&(Lw(0,oe,3,2),Lw(1,ae,1,3,"agentos-row-delete-action",23),Lw(2,re,2,0,"button",24)),n&2){let t=Jw().$implicit,a=Jw(2);jw(a.deletion.confirmingId()!==t.key?0:-1),BE(),jw(t.canDelete?1:-1),BE(),jw(!t.canEdit&&!t.canDelete?2:-1);}}function se(n,e){if(n&1&&(Ds(0,"tr",9)(1,"td",12),NC(2),pl(),Ds(3,"td",13),NC(4),pl(),Ds(5,"td",14)(6,"div",15)(7,"ds-tag",16),NC(8),pl(),Lw(9,te,4,0),pl()(),Ds(10,"td",17)(11,"div",18),Lw(12,ne,2,1,"button",19)(13,le,3,3),pl()()()),n&2){let t=e.$implicit;BE(2),Og(t.config.name),BE(2),vl(" ",t.config.integrationType," "),BE(3),ug("variant",t.scopeLabel==="Platform"?"neutral":t.scopeLabel==="Personal"?"outline":"accent"),BE(),vl(" ",t.scopeLabel," "),BE(),jw(t.source==="FILESYSTEM"?9:-1),BE(3),jw(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),NC(5,"Name"),pl(),Ds(6,"th",10),NC(7,"Type"),pl(),Ds(8,"th",10),NC(9,"Scope"),pl(),Ds(10,"th",10)(11,"span",11),NC(12,"Actions"),pl()()()(),Ds(13,"tbody",8),Hw(14,se,14,6,"tr",9,Q),pl()()()),n&2){let t=Jw();BE(14),Uw(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):Tr(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=yw({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()}),NC(3,"New integration"),pl()(),Lw(4,W,2,1,"p",3),Lw(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."),BE(),ug("query",a.rowFilter.query()),BE(3),jw(a.deletion.error()?4:-1),BE(),jw(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-CfNQLZ6W.js';import {O}from'./chunk-BtKM8wv2.js';import {g,W as W$1,F,I as Ie,E as J,U as Ui,G as U$1,ad as ne$1,a1 as fa,aa as Tr,y as yw,D as Ds,Q as mg,p as pl,N as NC,L as Lw,P as ug,a as BE,j as jw,J as Jw,O as Og,H as Hw,m as Uw,v as vl,Z as Zw,k as cg,r as df,s as ff}from'./main-47BLQXE5.js';import {z as k,O as O$1,i as at,h as hn,I as Io,l as ko,P,B as P$1}from'./chunk-D2p21lhx.js';import'./chunk-CzLmUpd_.js';var Q=(n,e)=>e.key;function W(n,e){if(n&1&&(Ds(0,"p",3),NC(1),pl()),n&2){let t=Jw();BE(),Og(t.deletion.error());}}function X(n,e){n&1&&(Ds(0,"p",4),NC(1,"Loading integrations\u2026"),pl());}function Z(n,e){n&1&&(Ds(0,"p",5),NC(1,"No integrations available."),pl());}function ee(n,e){n&1&&(Ds(0,"p",4),NC(1,"No integrations match the current filter."),pl());}function te(n,e){n&1&&(Ds(0,"ds-tag",20),NC(1,"YAML"),pl(),Ds(2,"ds-tag",21),NC(3,"Read-only"),pl());}function ne(n,e){if(n&1){let t=Zw();Ds(0,"button",22),mg("click",function(){df(t);let s=Jw().$implicit,c=Jw(2);return ff(c.view(s))}),NC(1,"View"),pl();}if(n&2){let t=Jw().$implicit;cg("aria-label","View "+t.config.name);}}function ie(n,e){if(n&1){let t=Zw();Ds(0,"button",22),mg("click",function(){df(t);let s=Jw(3).$implicit,c=Jw(2);return ff(c.edit(s))}),NC(1," Edit "),pl();}if(n&2){let t=Jw(3).$implicit;cg("aria-label","Edit "+t.config.name);}}function oe(n,e){if(n&1){let t=Zw();Ds(0,"button",22),mg("click",function(){df(t);let s=Jw(2).$implicit,c=Jw(2);return ff(c.duplicate(s))}),NC(1," Duplicate "),pl(),Lw(2,ie,2,1,"button",19);}if(n&2){let t=Jw(2).$implicit;cg("aria-label","Duplicate "+t.config.name),BE(2),jw(t.canEdit?2:-1);}}function ae(n,e){if(n&1){let t=Zw();Ds(0,"agentos-row-delete-action",25),mg("deleteRequested",function(){df(t);let s=Jw(2).$implicit,c=Jw(2);return ff(c.deletion.request(s.key))})("deleteConfirmed",function(){df(t);let s=Jw(2).$implicit,c=Jw(2);return ff(c.confirmDelete(s))})("deleteCancelled",function(){df(t);let s=Jw(4);return ff(s.deletion.cancel())}),pl();}if(n&2){let t=Jw(2).$implicit,a=Jw(2);ug("rowKey",t.key)("rowLabel",t.config.name)("state",a.deletion);}}function re(n,e){n&1&&(Ds(0,"button",24),NC(1,"Inherited"),pl());}function le(n,e){if(n&1&&(Lw(0,oe,3,2),Lw(1,ae,1,3,"agentos-row-delete-action",23),Lw(2,re,2,0,"button",24)),n&2){let t=Jw().$implicit,a=Jw(2);jw(a.deletion.confirmingId()!==t.key?0:-1),BE(),jw(t.canDelete?1:-1),BE(),jw(!t.canEdit&&!t.canDelete?2:-1);}}function se(n,e){if(n&1&&(Ds(0,"tr",9)(1,"td",12),NC(2),pl(),Ds(3,"td",13),NC(4),pl(),Ds(5,"td",14)(6,"div",15)(7,"ds-tag",16),NC(8),pl(),Lw(9,te,4,0),pl()(),Ds(10,"td",17)(11,"div",18),Lw(12,ne,2,1,"button",19)(13,le,3,3),pl()()()),n&2){let t=e.$implicit;BE(2),Og(t.config.name),BE(2),vl(" ",t.config.integrationType," "),BE(3),ug("variant",t.scopeLabel==="Platform"?"neutral":t.scopeLabel==="Personal"?"outline":"accent"),BE(),vl(" ",t.scopeLabel," "),BE(),jw(t.source==="FILESYSTEM"?9:-1),BE(3),jw(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),NC(5,"Name"),pl(),Ds(6,"th",10),NC(7,"Type"),pl(),Ds(8,"th",10),NC(9,"Scope"),pl(),Ds(10,"th",10)(11,"span",11),NC(12,"Actions"),pl()()()(),Ds(13,"tbody",8),Hw(14,se,14,6,"tr",9,Q),pl()()()),n&2){let t=Jw();BE(14),Uw(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):Tr(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=yw({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()}),NC(3,"New integration"),pl()(),Lw(4,W,2,1,"p",3),Lw(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."),BE(),ug("query",a.rowFilter.query()),BE(3),jw(a.deletion.error()?4:-1),BE(),jw(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 +1 @@
1
- import {z as k,O as O$1,i as at,h as hn,I as Io,P,B as P$1}from'./chunk-Bs2lM6dc.js';import {g,F,I as Ie,ag as U$1,$ as Cr,U as Ui,a1 as fa,G as U$2,y as yw,D as Ds,Q as mg,p as pl,N as NC,L as Lw,a as BE,P as ug,j as jw,J as Jw,O as Og,H as Hw,m as Uw,v as vl,Z as Zw,r as df,s as ff,k as cg}from'./main-ZPG3XUQU.js';var B=(n,e)=>e.id??e.name;function j(n,e){if(n&1&&(Ds(0,"p",3),NC(1),pl()),n&2){let t=Jw();BE(),Og(t.deletion.error());}}function K(n,e){n&1&&(Ds(0,"p",4),NC(1,"Loading agent configs\u2026"),pl());}function H(n,e){n&1&&(Ds(0,"p",5),NC(1,"No platform agent configs defined yet."),pl());}function U(n,e){n&1&&(Ds(0,"p",4),NC(1,"No agent configs match the current filter."),pl());}function z(n,e){if(n&1){let t=Zw();Ds(0,"button",19),mg("click",function(){df(t);let d=Jw().$implicit,c=Jw(2);return ff(c.inspect(d))}),NC(1," Inspect "),pl(),Ds(2,"button",19),mg("click",function(){df(t);let d=Jw().$implicit,c=Jw(2);return ff(c.edit(d))}),NC(3,"Edit"),pl();}if(n&2){let t=Jw().$implicit;cg("aria-label","Inspect "+t.name),BE(2),cg("aria-label","Edit "+t.name);}}function G(n,e){if(n&1){let t=Zw();Ds(0,"agentos-row-delete-action",20),mg("deleteRequested",function(){df(t);let d=Jw().$implicit,c=Jw(2);return ff(c.deletion.request(d.id))})("deleteConfirmed",function(){df(t);let d=Jw().$implicit,c=Jw(2);return ff(c.confirmDelete(d))})("deleteCancelled",function(){df(t);let d=Jw(3);return ff(d.deletion.cancel())}),pl();}if(n&2){let t=Jw().$implicit,a=Jw(2);ug("rowKey",t.id)("rowLabel",t.name)("state",a.deletion);}}function J(n,e){if(n&1&&(Ds(0,"tr",9)(1,"td",12),NC(2),pl(),Ds(3,"td",13),NC(4),pl(),Ds(5,"td",14),NC(6),pl(),Ds(7,"td",15),NC(8),pl(),Ds(9,"td",16)(10,"div",17),Lw(11,z,4,2),Lw(12,G,1,3,"agentos-row-delete-action",18),pl()()()),n&2){let t=e.$implicit,a=Jw(2);BE(2),Og(t.name),BE(2),vl(" ",t.description||"\u2014"," "),BE(2),Og(t.modelName||"\u2014"),BE(2),Og(a.mode(t)),BE(3),jw(a.deletion.confirmingId()!==t.id?11:-1),BE(),jw(t.id?12:-1);}}function O(n,e){if(n&1&&(Ds(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),NC(5,"Name"),pl(),Ds(6,"th",10),NC(7,"Description"),pl(),Ds(8,"th",10),NC(9,"Model"),pl(),Ds(10,"th",10),NC(11,"Execution mode"),pl(),Ds(12,"th",10)(13,"span",11),NC(14,"Actions"),pl()()()(),Ds(15,"tbody",8),Hw(16,J,13,6,"tr",9,B),pl()()()),n&2){let t=Jw();BE(16),Uw(t.rowFilter.filteredRows());}}var I=class n{router=g(F);destroyRef=g(Ie);agentConfigController=g(U$1);refresh$=new Cr(void 0);isLoading=Ui(true);deletion=k();configs=Ui([]);rowFilter=O$1(this.configs,e=>[e.name,e.description,e.modelName,this.mode(e)].filter(Boolean).join(" "));constructor(){this.refresh$.pipe(fa(()=>(this.isLoading.set(true),this.agentConfigController.listPlatformAgentsAgentConfig(true))),U$2(this.destroyRef)).subscribe({next:e=>{this.configs.set(e),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}mode(e){return e.executionMode??(e.advancedExecution?"ADVANCED":"SIMPLE")}openCreateForm(){this.router.navigate(["/agentos","admin","agent-configs","new"]);}inspect(e){e.id&&this.router.navigate(["/agentos","admin","agent-configs",e.id,"inspect"]);}edit(e){e.id&&this.router.navigate(["/agentos","admin","agent-configs",e.id,"edit"]);}confirmDelete(e){e.id&&this.deletion.execute(e.id,{request$:this.agentConfigController.deleteAgentConfig(e.id).pipe(U$2(this.destroyRef)),onSuccess:()=>this.refresh$.next(),errorMessage:`Deleting "${e.name}" failed. Try again.`});}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=yw({type:n,selectors:[["agentos-platform-agent-configs"]],decls:9,vars:3,consts:[["title","Platform agents","description","Agent configurations shared across every namespace."],["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","Platform agents"],["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","Model"],["role","cell","data-label","Execution mode"],["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"],["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()}),NC(3,"New agent config"),pl()(),Lw(4,j,2,1,"p",3),Lw(5,K,2,0,"p",4)(6,H,2,0,"p",5)(7,U,2,0,"p",4)(8,O,18,0,"div",6)),t&2&&(BE(),ug("query",a.rowFilter.query()),BE(3),jw(a.deletion.error()?4:-1),BE(),jw(a.isLoading()?5:a.configs().length===0?6:a.rowFilter.filteredRows().length===0?7:8));},dependencies:[at,hn,Io,P,P$1],encapsulation:2})};export{I as PlatformAgentConfigsComponent};
1
+ import {z as k,O as O$1,i as at,h as hn,I as Io,P,B as P$1}from'./chunk-D2p21lhx.js';import {g,F,I as Ie,ag as U$1,$ as Cr,U as Ui,a1 as fa,G as U$2,y as yw,D as Ds,Q as mg,p as pl,N as NC,L as Lw,a as BE,P as ug,j as jw,J as Jw,O as Og,H as Hw,m as Uw,v as vl,Z as Zw,r as df,s as ff,k as cg}from'./main-47BLQXE5.js';var B=(n,e)=>e.id??e.name;function j(n,e){if(n&1&&(Ds(0,"p",3),NC(1),pl()),n&2){let t=Jw();BE(),Og(t.deletion.error());}}function K(n,e){n&1&&(Ds(0,"p",4),NC(1,"Loading agent configs\u2026"),pl());}function H(n,e){n&1&&(Ds(0,"p",5),NC(1,"No platform agent configs defined yet."),pl());}function U(n,e){n&1&&(Ds(0,"p",4),NC(1,"No agent configs match the current filter."),pl());}function z(n,e){if(n&1){let t=Zw();Ds(0,"button",19),mg("click",function(){df(t);let d=Jw().$implicit,c=Jw(2);return ff(c.inspect(d))}),NC(1," Inspect "),pl(),Ds(2,"button",19),mg("click",function(){df(t);let d=Jw().$implicit,c=Jw(2);return ff(c.edit(d))}),NC(3,"Edit"),pl();}if(n&2){let t=Jw().$implicit;cg("aria-label","Inspect "+t.name),BE(2),cg("aria-label","Edit "+t.name);}}function G(n,e){if(n&1){let t=Zw();Ds(0,"agentos-row-delete-action",20),mg("deleteRequested",function(){df(t);let d=Jw().$implicit,c=Jw(2);return ff(c.deletion.request(d.id))})("deleteConfirmed",function(){df(t);let d=Jw().$implicit,c=Jw(2);return ff(c.confirmDelete(d))})("deleteCancelled",function(){df(t);let d=Jw(3);return ff(d.deletion.cancel())}),pl();}if(n&2){let t=Jw().$implicit,a=Jw(2);ug("rowKey",t.id)("rowLabel",t.name)("state",a.deletion);}}function J(n,e){if(n&1&&(Ds(0,"tr",9)(1,"td",12),NC(2),pl(),Ds(3,"td",13),NC(4),pl(),Ds(5,"td",14),NC(6),pl(),Ds(7,"td",15),NC(8),pl(),Ds(9,"td",16)(10,"div",17),Lw(11,z,4,2),Lw(12,G,1,3,"agentos-row-delete-action",18),pl()()()),n&2){let t=e.$implicit,a=Jw(2);BE(2),Og(t.name),BE(2),vl(" ",t.description||"\u2014"," "),BE(2),Og(t.modelName||"\u2014"),BE(2),Og(a.mode(t)),BE(3),jw(a.deletion.confirmingId()!==t.id?11:-1),BE(),jw(t.id?12:-1);}}function O(n,e){if(n&1&&(Ds(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),NC(5,"Name"),pl(),Ds(6,"th",10),NC(7,"Description"),pl(),Ds(8,"th",10),NC(9,"Model"),pl(),Ds(10,"th",10),NC(11,"Execution mode"),pl(),Ds(12,"th",10)(13,"span",11),NC(14,"Actions"),pl()()()(),Ds(15,"tbody",8),Hw(16,J,13,6,"tr",9,B),pl()()()),n&2){let t=Jw();BE(16),Uw(t.rowFilter.filteredRows());}}var I=class n{router=g(F);destroyRef=g(Ie);agentConfigController=g(U$1);refresh$=new Cr(void 0);isLoading=Ui(true);deletion=k();configs=Ui([]);rowFilter=O$1(this.configs,e=>[e.name,e.description,e.modelName,this.mode(e)].filter(Boolean).join(" "));constructor(){this.refresh$.pipe(fa(()=>(this.isLoading.set(true),this.agentConfigController.listPlatformAgentsAgentConfig(true))),U$2(this.destroyRef)).subscribe({next:e=>{this.configs.set(e),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}mode(e){return e.executionMode??(e.advancedExecution?"ADVANCED":"SIMPLE")}openCreateForm(){this.router.navigate(["/agentos","admin","agent-configs","new"]);}inspect(e){e.id&&this.router.navigate(["/agentos","admin","agent-configs",e.id,"inspect"]);}edit(e){e.id&&this.router.navigate(["/agentos","admin","agent-configs",e.id,"edit"]);}confirmDelete(e){e.id&&this.deletion.execute(e.id,{request$:this.agentConfigController.deleteAgentConfig(e.id).pipe(U$2(this.destroyRef)),onSuccess:()=>this.refresh$.next(),errorMessage:`Deleting "${e.name}" failed. Try again.`});}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=yw({type:n,selectors:[["agentos-platform-agent-configs"]],decls:9,vars:3,consts:[["title","Platform agents","description","Agent configurations shared across every namespace."],["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","Platform agents"],["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","Model"],["role","cell","data-label","Execution mode"],["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"],["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()}),NC(3,"New agent config"),pl()(),Lw(4,j,2,1,"p",3),Lw(5,K,2,0,"p",4)(6,H,2,0,"p",5)(7,U,2,0,"p",4)(8,O,18,0,"div",6)),t&2&&(BE(),ug("query",a.rowFilter.query()),BE(3),jw(a.deletion.error()?4:-1),BE(),jw(a.isLoading()?5:a.configs().length===0?6:a.rowFilter.filteredRows().length===0?7:8));},dependencies:[at,hn,Io,P,P$1],encapsulation:2})};export{I as PlatformAgentConfigsComponent};
@@ -1 +1 @@
1
- import {a}from'./chunk-1nyEsjkY.js';import {o}from'./chunk-DewdYvKa.js';import {J as s,d as pn,h as hn,o as on,C as mn,i as at,q as sn,l as ko,K as Oi,M as On}from'./chunk-Bs2lM6dc.js';import {g,W,F,I as Ie,U as Ui,X as XC,G as U,ac as Ty,a2 as da,aa as Tr,y as yw,au as $t,D as Ds,Q as mg,N as NC,p as pl,L as Lw,a as BE,j as jw,J as Jw,P as ug,Z as Zw,l as lg,av as zC,O as Og,v as vl,aw as WC,H as Hw,m as Uw,ao as Vw,r as df,s as ff,ax as YD}from'./main-ZPG3XUQU.js';var Y=(e,t)=>t.name+t.grant;function Z(e,t){if(e&1&&(Ds(0,"a",2),NC(1,"Edit skill \u2192"),pl()),e&2){let n=Jw();ug("routerLink",n.editRoute());}}function ee(e,t){e&1&&(Ds(0,"ds-tag",3),NC(1,"Platform level"),pl());}function te(e,t){e&1&&(Ds(0,"p",4),NC(1,"Loading\u2026"),pl());}function ne(e,t){e&1&&(Ds(0,"ds-notice"),NC(1,"Failed to load skill."),pl());}function ie(e,t){if(e&1&&(Ds(0,"dt"),NC(1,"Created by"),pl(),Ds(2,"dd"),NC(3),pl()),e&2){let n=Jw(2);BE(3),Og(n.createdBy);}}function oe(e,t){if(e&1&&(Ds(0,"dt"),NC(1,"Last updated"),pl(),Ds(2,"dd"),NC(3),pl()),e&2){let n=Jw(2);BE(3),Og(n.updatedOn);}}function ae(e,t){if(e&1&&(Lw(0,ie,4,1),Lw(1,oe,4,1)),e&2){let n=Jw();jw(n.createdBy?0:-1),BE(),jw(n.updatedOn?1:-1);}}function le(e,t){e&1&&(Ds(0,"p",4),NC(1," A platform skill is offered to every namespace. Open it from a namespace to see which of its agents use it. "),pl());}function se(e,t){e&1&&(Ds(0,"p",4),NC(1,"Loading\u2026"),pl());}function re(e,t){e&1&&(Ds(0,"ds-notice"),NC(1," The agent configs could not be read, so it is unknown whether any agent uses this skill. "),pl());}function de(e,t){e&1&&(Ds(0,"p",4),NC(1,"No agent references this skill."),pl());}function ce(e,t){e&1&&(Ds(0,"ds-tag",15),NC(1,"platform agent"),pl());}function me(e,t){e&1&&(Ds(0,"ds-tag",15),NC(1,"via *"),pl());}function pe(e,t){if(e&1&&(Ds(0,"li",13)(1,"span",14),NC(2),pl(),Lw(3,ce,2,0,"ds-tag",15),Lw(4,me,2,0,"ds-tag",15),pl()),e&2){let n=t.$implicit;BE(2),Og(n.name),BE(),jw(n.platform?3:-1),BE(),jw(n.grant==="all"?4:-1);}}function ue(e,t){if(e&1&&(Ds(0,"ul",12),Hw(1,pe,5,3,"li",13,Y),pl(),Ds(3,"p",4),NC(4," An agent listed "),Ds(5,"code"),NC(6,"via *"),pl(),NC(7," takes the whole catalogue and keeps working without this skill. The others name it, so deleting the skill leaves their selector resolving to nothing. "),pl()),e&2){let n=Jw(2);BE(),Uw(n.consumers());}}function _e(e,t){e&1&&(Ds(0,"p",4),NC(1,"No resources bundled with this skill."),pl());}function ge(e,t){if(e&1){let n=Zw();Ds(0,"li")(1,"ds-disclosure",16),mg("toggled",function(){let r=df(n).$implicit,g=Jw(3);return ff(g.toggleResource(r))}),Ds(2,"pre",17),NC(3),pl()()();}if(e&2){let n=t.$implicit,o=Jw(3);BE(),ug("heading",n)("open",o.isResourceExpanded(n)),BE(2),Og(o.resourceContent(n));}}function Ce(e,t){if(e&1&&(Ds(0,"ul",12),Hw(1,ge,4,3,"li",null,Vw),pl()),e&2){let n=Jw(2);BE(),Uw(n.resourcePaths());}}function fe(e,t){if(e&1){let n=Zw();Ds(0,"ds-card",5)(1,"dl",6)(2,"dt"),NC(3,"Name"),pl(),Ds(4,"dd",7),NC(5),pl(),Ds(6,"dt"),NC(7,"Description"),pl(),Ds(8,"dd"),NC(9),pl(),Ds(10,"dt"),NC(11,"Scope"),pl(),Ds(12,"dd"),NC(13),pl(),Ds(14,"dt"),NC(15,"Storage"),pl(),Ds(16,"dd")(17,"ds-tag",8),NC(18),pl()(),Lw(19,ae,2,2),pl()(),Ds(20,"ds-card",9),Lw(21,le,2,0,"p",4)(22,se,2,0,"p",4)(23,re,2,0,"ds-notice")(24,de,2,0,"p",4)(25,ue,8,0),pl(),Ds(26,"ds-card")(27,"ds-disclosure",10),mg("toggled",function(){df(n);let r=Jw();return ff(r.toggleBody())}),lg(28,"div",11),zC(29,"agentosMarkdown"),pl()(),Ds(30,"ds-card",9),Lw(31,_e,2,0,"p",4)(32,Ce,3,0,"ul",12),pl();}if(e&2){let n=t,o=Jw();BE(5),Og(n.name),BE(4),Og(n.description),BE(4),Og(n.namespaceId?"Namespace":"Platform"),BE(4),ug("variant",o.isFilesystemBacked()?"outline":"neutral"),BE(),vl(" ",o.isFilesystemBacked()?"SKILL.md file (read-only)":"Database"," "),BE(),jw(o.isFilesystemBacked()?-1:19),BE(),ug("heading","Used by"+(!o.isPlatformMode&&!o.consumersLoading()&&!o.consumersUnavailable()?" ("+o.consumers().length+")":"")),BE(),jw(o.isPlatformMode?21:o.consumersLoading()?22:o.consumersUnavailable()?23:o.consumers().length===0?24:25),BE(6),ug("open",!o.bodyCollapsed()),BE(),ug("innerHTML",WC(29,12,n.body),YD),BE(2),ug("heading","Resources ("+o.resourcePaths().length+")"),BE(),jw(o.resourcePaths().length===0?31:32);}}var X=class e{route=g(W);router=g(F);destroyRef=g(Ie);skillState=g(o);agentState=g(s);namespaceId=this.route.snapshot.params.namespaceId;skillId=this.route.snapshot.params.skillId;isPlatformMode=!this.namespaceId;isLoading=Ui(true);hasError=Ui(false);skill=Ui(null);bodyCollapsed=Ui(false);expandedResources=Ui(new Set);resourcePaths=XC(()=>Object.keys(this.skill()?.resources??{}).sort());isFilesystemBacked=XC(()=>this.skill()?.readOnly===true);consumers=Ui([]);consumersUnavailable=Ui(false);consumersLoading=Ui(false);ngOnInit(){this.skillState.getById(this.skillId).pipe(U(this.destroyRef)).subscribe({next:t=>{this.skill.set(t),this.isLoading.set(false),this.loadConsumers(t.name);},error:()=>{this.hasError.set(true),this.isLoading.set(false);}});}loadConsumers(t){this.namespaceId&&(this.consumersLoading.set(true),Ty({namespace:this.agentState.listByNamespace(this.namespaceId),platform:this.agentState.listPlatform().pipe(da(()=>Tr([])))}).pipe(U(this.destroyRef)).subscribe({next:({namespace:n,platform:o})=>{let r=[...this.toConsumers(n,t,false),...this.toConsumers(o,t,true)];this.consumers.set([...r.filter(g=>g.grant==="named"),...r.filter(g=>g.grant==="all")]),this.consumersLoading.set(false);},error:()=>{this.consumersUnavailable.set(true),this.consumersLoading.set(false);}}));}toConsumers(t,n,o){return t.map(r=>({config:r,grant:a(r.skillSelectors,n)})).filter(r=>r.grant!=="none").map(({config:r,grant:g})=>({name:r.name,grant:g,platform:o}))}toggleBody(){this.bodyCollapsed.update(t=>!t);}toggleResource(t){this.expandedResources.update(n=>{let o=new Set(n);return o.has(t)?o.delete(t):o.add(t),o});}isResourceExpanded(t){return this.expandedResources().has(t)}resourceContent(t){return this.skill()?.resources?.[t]??""}editRoute(){return this.isPlatformMode?["/agentos","admin","skills",this.skillId,"edit"]:["/agentos",this.namespaceId,"skills",this.skillId,"edit"]}back(){this.isPlatformMode?this.router.navigate(["/agentos","admin","skills"]):this.router.navigate(["/agentos",this.namespaceId,"skills"]);}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=yw({type:e,selectors:[["agentos-skill-inspect"]],decls:9,vars:3,consts:[["title","Skill"],["dsButton","","variant","ghost","type","button","title","Back to skills",3,"click"],["headerMeta","",1,"ds-link",3,"routerLink"],["headerMeta","","variant","outline"],[1,"ds-hint"],["heading","General"],["dsDefinitionList",""],[1,"ds-mono"],[3,"variant"],[3,"heading"],["heading","Body",3,"toggled","open"],[1,"ds-pre","ds-pre--prose","ds-prose",3,"innerHTML"],[1,"ds-list"],[1,"ds-inline","ds-inline--wrap"],[1,"ds-strong"],["variant","neutral"],["bordered","","mono","",3,"toggled","heading","open"],[1,"ds-pre"]],template:function(n,o){if(n&1&&(Ds(0,"ds-page")(1,"ds-section-header",0)(2,"button",1),mg("click",function(){return o.back()}),NC(3,"\u2190 Skills"),pl(),Lw(4,Z,2,1,"a",2),Lw(5,ee,2,0,"ds-tag",3),pl(),Lw(6,te,2,0,"p",4)(7,ne,2,0,"ds-notice")(8,fe,33,14),pl()),n&2){let r;BE(4),jw(o.skill()&&!o.isFilesystemBacked()?4:-1),BE(),jw(o.isPlatformMode?5:-1),BE(),jw(o.isLoading()?6:o.hasError()?7:(r=o.skill())?8:-1,r);}},dependencies:[$t,pn,hn,on,mn,at,sn,ko,Oi,On],encapsulation:2})};export{X as SkillInspectComponent};
1
+ import {a}from'./chunk-1nyEsjkY.js';import {o}from'./chunk-UPlPDOdj.js';import {J as s,d as pn,h as hn,o as on,C as mn,i as at,q as sn,l as ko,K as Oi,M as On}from'./chunk-D2p21lhx.js';import {g,W,F,I as Ie,U as Ui,X as XC,G as U,ac as Ty,a2 as da,aa as Tr,y as yw,au as $t,D as Ds,Q as mg,N as NC,p as pl,L as Lw,a as BE,j as jw,J as Jw,P as ug,Z as Zw,l as lg,av as zC,O as Og,v as vl,aw as WC,H as Hw,m as Uw,ao as Vw,r as df,s as ff,ax as YD}from'./main-47BLQXE5.js';var Y=(e,t)=>t.name+t.grant;function Z(e,t){if(e&1&&(Ds(0,"a",2),NC(1,"Edit skill \u2192"),pl()),e&2){let n=Jw();ug("routerLink",n.editRoute());}}function ee(e,t){e&1&&(Ds(0,"ds-tag",3),NC(1,"Platform level"),pl());}function te(e,t){e&1&&(Ds(0,"p",4),NC(1,"Loading\u2026"),pl());}function ne(e,t){e&1&&(Ds(0,"ds-notice"),NC(1,"Failed to load skill."),pl());}function ie(e,t){if(e&1&&(Ds(0,"dt"),NC(1,"Created by"),pl(),Ds(2,"dd"),NC(3),pl()),e&2){let n=Jw(2);BE(3),Og(n.createdBy);}}function oe(e,t){if(e&1&&(Ds(0,"dt"),NC(1,"Last updated"),pl(),Ds(2,"dd"),NC(3),pl()),e&2){let n=Jw(2);BE(3),Og(n.updatedOn);}}function ae(e,t){if(e&1&&(Lw(0,ie,4,1),Lw(1,oe,4,1)),e&2){let n=Jw();jw(n.createdBy?0:-1),BE(),jw(n.updatedOn?1:-1);}}function le(e,t){e&1&&(Ds(0,"p",4),NC(1," A platform skill is offered to every namespace. Open it from a namespace to see which of its agents use it. "),pl());}function se(e,t){e&1&&(Ds(0,"p",4),NC(1,"Loading\u2026"),pl());}function re(e,t){e&1&&(Ds(0,"ds-notice"),NC(1," The agent configs could not be read, so it is unknown whether any agent uses this skill. "),pl());}function de(e,t){e&1&&(Ds(0,"p",4),NC(1,"No agent references this skill."),pl());}function ce(e,t){e&1&&(Ds(0,"ds-tag",15),NC(1,"platform agent"),pl());}function me(e,t){e&1&&(Ds(0,"ds-tag",15),NC(1,"via *"),pl());}function pe(e,t){if(e&1&&(Ds(0,"li",13)(1,"span",14),NC(2),pl(),Lw(3,ce,2,0,"ds-tag",15),Lw(4,me,2,0,"ds-tag",15),pl()),e&2){let n=t.$implicit;BE(2),Og(n.name),BE(),jw(n.platform?3:-1),BE(),jw(n.grant==="all"?4:-1);}}function ue(e,t){if(e&1&&(Ds(0,"ul",12),Hw(1,pe,5,3,"li",13,Y),pl(),Ds(3,"p",4),NC(4," An agent listed "),Ds(5,"code"),NC(6,"via *"),pl(),NC(7," takes the whole catalogue and keeps working without this skill. The others name it, so deleting the skill leaves their selector resolving to nothing. "),pl()),e&2){let n=Jw(2);BE(),Uw(n.consumers());}}function _e(e,t){e&1&&(Ds(0,"p",4),NC(1,"No resources bundled with this skill."),pl());}function ge(e,t){if(e&1){let n=Zw();Ds(0,"li")(1,"ds-disclosure",16),mg("toggled",function(){let r=df(n).$implicit,g=Jw(3);return ff(g.toggleResource(r))}),Ds(2,"pre",17),NC(3),pl()()();}if(e&2){let n=t.$implicit,o=Jw(3);BE(),ug("heading",n)("open",o.isResourceExpanded(n)),BE(2),Og(o.resourceContent(n));}}function Ce(e,t){if(e&1&&(Ds(0,"ul",12),Hw(1,ge,4,3,"li",null,Vw),pl()),e&2){let n=Jw(2);BE(),Uw(n.resourcePaths());}}function fe(e,t){if(e&1){let n=Zw();Ds(0,"ds-card",5)(1,"dl",6)(2,"dt"),NC(3,"Name"),pl(),Ds(4,"dd",7),NC(5),pl(),Ds(6,"dt"),NC(7,"Description"),pl(),Ds(8,"dd"),NC(9),pl(),Ds(10,"dt"),NC(11,"Scope"),pl(),Ds(12,"dd"),NC(13),pl(),Ds(14,"dt"),NC(15,"Storage"),pl(),Ds(16,"dd")(17,"ds-tag",8),NC(18),pl()(),Lw(19,ae,2,2),pl()(),Ds(20,"ds-card",9),Lw(21,le,2,0,"p",4)(22,se,2,0,"p",4)(23,re,2,0,"ds-notice")(24,de,2,0,"p",4)(25,ue,8,0),pl(),Ds(26,"ds-card")(27,"ds-disclosure",10),mg("toggled",function(){df(n);let r=Jw();return ff(r.toggleBody())}),lg(28,"div",11),zC(29,"agentosMarkdown"),pl()(),Ds(30,"ds-card",9),Lw(31,_e,2,0,"p",4)(32,Ce,3,0,"ul",12),pl();}if(e&2){let n=t,o=Jw();BE(5),Og(n.name),BE(4),Og(n.description),BE(4),Og(n.namespaceId?"Namespace":"Platform"),BE(4),ug("variant",o.isFilesystemBacked()?"outline":"neutral"),BE(),vl(" ",o.isFilesystemBacked()?"SKILL.md file (read-only)":"Database"," "),BE(),jw(o.isFilesystemBacked()?-1:19),BE(),ug("heading","Used by"+(!o.isPlatformMode&&!o.consumersLoading()&&!o.consumersUnavailable()?" ("+o.consumers().length+")":"")),BE(),jw(o.isPlatformMode?21:o.consumersLoading()?22:o.consumersUnavailable()?23:o.consumers().length===0?24:25),BE(6),ug("open",!o.bodyCollapsed()),BE(),ug("innerHTML",WC(29,12,n.body),YD),BE(2),ug("heading","Resources ("+o.resourcePaths().length+")"),BE(),jw(o.resourcePaths().length===0?31:32);}}var X=class e{route=g(W);router=g(F);destroyRef=g(Ie);skillState=g(o);agentState=g(s);namespaceId=this.route.snapshot.params.namespaceId;skillId=this.route.snapshot.params.skillId;isPlatformMode=!this.namespaceId;isLoading=Ui(true);hasError=Ui(false);skill=Ui(null);bodyCollapsed=Ui(false);expandedResources=Ui(new Set);resourcePaths=XC(()=>Object.keys(this.skill()?.resources??{}).sort());isFilesystemBacked=XC(()=>this.skill()?.readOnly===true);consumers=Ui([]);consumersUnavailable=Ui(false);consumersLoading=Ui(false);ngOnInit(){this.skillState.getById(this.skillId).pipe(U(this.destroyRef)).subscribe({next:t=>{this.skill.set(t),this.isLoading.set(false),this.loadConsumers(t.name);},error:()=>{this.hasError.set(true),this.isLoading.set(false);}});}loadConsumers(t){this.namespaceId&&(this.consumersLoading.set(true),Ty({namespace:this.agentState.listByNamespace(this.namespaceId),platform:this.agentState.listPlatform().pipe(da(()=>Tr([])))}).pipe(U(this.destroyRef)).subscribe({next:({namespace:n,platform:o})=>{let r=[...this.toConsumers(n,t,false),...this.toConsumers(o,t,true)];this.consumers.set([...r.filter(g=>g.grant==="named"),...r.filter(g=>g.grant==="all")]),this.consumersLoading.set(false);},error:()=>{this.consumersUnavailable.set(true),this.consumersLoading.set(false);}}));}toConsumers(t,n,o){return t.map(r=>({config:r,grant:a(r.skillSelectors,n)})).filter(r=>r.grant!=="none").map(({config:r,grant:g})=>({name:r.name,grant:g,platform:o}))}toggleBody(){this.bodyCollapsed.update(t=>!t);}toggleResource(t){this.expandedResources.update(n=>{let o=new Set(n);return o.has(t)?o.delete(t):o.add(t),o});}isResourceExpanded(t){return this.expandedResources().has(t)}resourceContent(t){return this.skill()?.resources?.[t]??""}editRoute(){return this.isPlatformMode?["/agentos","admin","skills",this.skillId,"edit"]:["/agentos",this.namespaceId,"skills",this.skillId,"edit"]}back(){this.isPlatformMode?this.router.navigate(["/agentos","admin","skills"]):this.router.navigate(["/agentos",this.namespaceId,"skills"]);}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=yw({type:e,selectors:[["agentos-skill-inspect"]],decls:9,vars:3,consts:[["title","Skill"],["dsButton","","variant","ghost","type","button","title","Back to skills",3,"click"],["headerMeta","",1,"ds-link",3,"routerLink"],["headerMeta","","variant","outline"],[1,"ds-hint"],["heading","General"],["dsDefinitionList",""],[1,"ds-mono"],[3,"variant"],[3,"heading"],["heading","Body",3,"toggled","open"],[1,"ds-pre","ds-pre--prose","ds-prose",3,"innerHTML"],[1,"ds-list"],[1,"ds-inline","ds-inline--wrap"],[1,"ds-strong"],["variant","neutral"],["bordered","","mono","",3,"toggled","heading","open"],[1,"ds-pre"]],template:function(n,o){if(n&1&&(Ds(0,"ds-page")(1,"ds-section-header",0)(2,"button",1),mg("click",function(){return o.back()}),NC(3,"\u2190 Skills"),pl(),Lw(4,Z,2,1,"a",2),Lw(5,ee,2,0,"ds-tag",3),pl(),Lw(6,te,2,0,"p",4)(7,ne,2,0,"ds-notice")(8,fe,33,14),pl()),n&2){let r;BE(4),jw(o.skill()&&!o.isFilesystemBacked()?4:-1),BE(),jw(o.isPlatformMode?5:-1),BE(),jw(o.isLoading()?6:o.hasError()?7:(r=o.skill())?8:-1,r);}},dependencies:[$t,pn,hn,on,mn,at,sn,ko,Oi,On],encapsulation:2})};export{X as SkillInspectComponent};
@@ -1 +1 @@
1
- import {z as k$1,O,i as at,h as hn,I as Io,P,B as P$1}from'./chunk-Bs2lM6dc.js';import {g,F,I as Ie,ap as F$1,$ as Cr,U as Ui,a1 as fa,G as U$1,y as yw,D as Ds,Q as mg,p as pl,N as NC,L as Lw,a as BE,P as ug,j as jw,J as Jw,O as Og,H as Hw,m as Uw,Z as Zw,k as cg,r as df,s as ff}from'./main-ZPG3XUQU.js';var B=(i,e)=>e.id??e.name;function M(i,e){if(i&1&&(Ds(0,"p",3),NC(1),pl()),i&2){let t=Jw();BE(),Og(t.deletion.error());}}function U(i,e){i&1&&(Ds(0,"p",4),NC(1,"Loading AI providers\u2026"),pl());}function j(i,e){i&1&&(Ds(0,"p",5),NC(1,"No platform AI providers defined yet."),pl());}function K(i,e){i&1&&(Ds(0,"p",4),NC(1,"No AI providers match the current filter."),pl());}function H(i,e){if(i&1){let t=Zw();Ds(0,"button",19),mg("click",function(){df(t);let s=Jw().$implicit,m=Jw(2);return ff(m.edit(s))}),NC(1," Edit "),pl();}if(i&2){let t=Jw().$implicit;cg("aria-label","Edit "+t.name);}}function z(i,e){if(i&1){let t=Zw();Ds(0,"agentos-row-delete-action",20),mg("deleteRequested",function(){df(t);let s=Jw().$implicit,m=Jw(2);return ff(m.deletion.request(s.id))})("deleteConfirmed",function(){df(t);let s=Jw().$implicit,m=Jw(2);return ff(m.confirmDelete(s))})("deleteCancelled",function(){df(t);let s=Jw(3);return ff(s.deletion.cancel())}),pl();}if(i&2){let t=Jw().$implicit,r=Jw(2);ug("rowKey",t.id)("rowLabel",t.name)("state",r.deletion);}}function G(i,e){if(i&1&&(Ds(0,"tr",9)(1,"td",12),NC(2),pl(),Ds(3,"td",13),NC(4),pl(),Ds(5,"td",14),NC(6),pl(),Ds(7,"td",15)(8,"div",16),Lw(9,H,2,1,"button",17),Lw(10,z,1,3,"agentos-row-delete-action",18),pl()()()),i&2){let t=e.$implicit,r=Jw(2);BE(2),Og(t.name),BE(2),Og(t.apiType),BE(2),Og(t.baseUrl||"\u2014"),BE(3),jw(r.deletion.confirmingId()!==t.id?9:-1),BE(),jw(t.id?10:-1);}}function J(i,e){if(i&1&&(Ds(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),NC(5,"Name"),pl(),Ds(6,"th",10),NC(7,"API type"),pl(),Ds(8,"th",10),NC(9,"Base URL"),pl(),Ds(10,"th",10)(11,"span",11),NC(12,"Actions"),pl()()()(),Ds(13,"tbody",8),Hw(14,G,11,5,"tr",9,B),pl()()()),i&2){let t=Jw();BE(14),Uw(t.rowFilter.filteredRows());}}var k=class i{router=g(F);destroyRef=g(Ie);aiProviderController=g(F$1);refresh$=new Cr(void 0);isLoading=Ui(true);deletion=k$1();providers=Ui([]);rowFilter=O(this.providers,e=>[e.name,e.apiType,e.baseUrl].filter(Boolean).join(" "));constructor(){this.refresh$.pipe(fa(()=>(this.isLoading.set(true),this.aiProviderController.listAiProvider("none"))),U$1(this.destroyRef)).subscribe({next:e=>{this.providers.set(e),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}openCreateForm(){this.router.navigate(["/agentos","admin","ai-providers","new"]);}edit(e){e.id&&this.router.navigate(["/agentos","admin","ai-providers",e.id,"edit"]);}confirmDelete(e){e.id&&this.deletion.execute(e.id,{request$:this.aiProviderController.deleteAiProvider(e.id).pipe(U$1(this.destroyRef)),onSuccess:()=>this.refresh$.next(),errorMessage:`Deleting "${e.name}" failed. Try again.`});}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=yw({type:i,selectors:[["agentos-platform-ai-providers"]],decls:9,vars:3,consts:[["title","Platform AI providers","description","AI providers shared across every namespace."],["label","Filter AI providers","placeholder","Filter AI providers\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","Platform AI providers"],["role","rowgroup"],["role","row"],["role","columnheader"],[1,"sr-only"],["role","cell","data-label","Name","data-title","",1,"settings-table__name"],["role","cell","data-label","API type"],["role","cell","data-label","Base URL",1,"settings-table__secondary"],["role","cell","data-label","Actions","data-actions",""],[1,"settings-table__actions"],["type","button"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"rowKey","rowLabel","state"],["type","button",3,"click"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"deleteRequested","deleteConfirmed","deleteCancelled","rowKey","rowLabel","state"]],template:function(t,r){t&1&&(Ds(0,"ds-section-header",0)(1,"agentos-table-filter",1),mg("queryChange",function(m){return r.rowFilter.query.set(m)}),pl(),Ds(2,"button",2),mg("click",function(){return r.openCreateForm()}),NC(3,"New AI provider"),pl()(),Lw(4,M,2,1,"p",3),Lw(5,U,2,0,"p",4)(6,j,2,0,"p",5)(7,K,2,0,"p",4)(8,J,16,0,"div",6)),t&2&&(BE(),ug("query",r.rowFilter.query()),BE(3),jw(r.deletion.error()?4:-1),BE(),jw(r.isLoading()?5:r.providers().length===0?6:r.rowFilter.filteredRows().length===0?7:8));},dependencies:[at,hn,Io,P,P$1],encapsulation:2})};export{k as PlatformAiProvidersComponent};
1
+ import {z as k$1,O,i as at,h as hn,I as Io,P,B as P$1}from'./chunk-D2p21lhx.js';import {g,F,I as Ie,ap as F$1,$ as Cr,U as Ui,a1 as fa,G as U$1,y as yw,D as Ds,Q as mg,p as pl,N as NC,L as Lw,a as BE,P as ug,j as jw,J as Jw,O as Og,H as Hw,m as Uw,Z as Zw,k as cg,r as df,s as ff}from'./main-47BLQXE5.js';var B=(i,e)=>e.id??e.name;function M(i,e){if(i&1&&(Ds(0,"p",3),NC(1),pl()),i&2){let t=Jw();BE(),Og(t.deletion.error());}}function U(i,e){i&1&&(Ds(0,"p",4),NC(1,"Loading AI providers\u2026"),pl());}function j(i,e){i&1&&(Ds(0,"p",5),NC(1,"No platform AI providers defined yet."),pl());}function K(i,e){i&1&&(Ds(0,"p",4),NC(1,"No AI providers match the current filter."),pl());}function H(i,e){if(i&1){let t=Zw();Ds(0,"button",19),mg("click",function(){df(t);let s=Jw().$implicit,m=Jw(2);return ff(m.edit(s))}),NC(1," Edit "),pl();}if(i&2){let t=Jw().$implicit;cg("aria-label","Edit "+t.name);}}function z(i,e){if(i&1){let t=Zw();Ds(0,"agentos-row-delete-action",20),mg("deleteRequested",function(){df(t);let s=Jw().$implicit,m=Jw(2);return ff(m.deletion.request(s.id))})("deleteConfirmed",function(){df(t);let s=Jw().$implicit,m=Jw(2);return ff(m.confirmDelete(s))})("deleteCancelled",function(){df(t);let s=Jw(3);return ff(s.deletion.cancel())}),pl();}if(i&2){let t=Jw().$implicit,r=Jw(2);ug("rowKey",t.id)("rowLabel",t.name)("state",r.deletion);}}function G(i,e){if(i&1&&(Ds(0,"tr",9)(1,"td",12),NC(2),pl(),Ds(3,"td",13),NC(4),pl(),Ds(5,"td",14),NC(6),pl(),Ds(7,"td",15)(8,"div",16),Lw(9,H,2,1,"button",17),Lw(10,z,1,3,"agentos-row-delete-action",18),pl()()()),i&2){let t=e.$implicit,r=Jw(2);BE(2),Og(t.name),BE(2),Og(t.apiType),BE(2),Og(t.baseUrl||"\u2014"),BE(3),jw(r.deletion.confirmingId()!==t.id?9:-1),BE(),jw(t.id?10:-1);}}function J(i,e){if(i&1&&(Ds(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),NC(5,"Name"),pl(),Ds(6,"th",10),NC(7,"API type"),pl(),Ds(8,"th",10),NC(9,"Base URL"),pl(),Ds(10,"th",10)(11,"span",11),NC(12,"Actions"),pl()()()(),Ds(13,"tbody",8),Hw(14,G,11,5,"tr",9,B),pl()()()),i&2){let t=Jw();BE(14),Uw(t.rowFilter.filteredRows());}}var k=class i{router=g(F);destroyRef=g(Ie);aiProviderController=g(F$1);refresh$=new Cr(void 0);isLoading=Ui(true);deletion=k$1();providers=Ui([]);rowFilter=O(this.providers,e=>[e.name,e.apiType,e.baseUrl].filter(Boolean).join(" "));constructor(){this.refresh$.pipe(fa(()=>(this.isLoading.set(true),this.aiProviderController.listAiProvider("none"))),U$1(this.destroyRef)).subscribe({next:e=>{this.providers.set(e),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}openCreateForm(){this.router.navigate(["/agentos","admin","ai-providers","new"]);}edit(e){e.id&&this.router.navigate(["/agentos","admin","ai-providers",e.id,"edit"]);}confirmDelete(e){e.id&&this.deletion.execute(e.id,{request$:this.aiProviderController.deleteAiProvider(e.id).pipe(U$1(this.destroyRef)),onSuccess:()=>this.refresh$.next(),errorMessage:`Deleting "${e.name}" failed. Try again.`});}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=yw({type:i,selectors:[["agentos-platform-ai-providers"]],decls:9,vars:3,consts:[["title","Platform AI providers","description","AI providers shared across every namespace."],["label","Filter AI providers","placeholder","Filter AI providers\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","Platform AI providers"],["role","rowgroup"],["role","row"],["role","columnheader"],[1,"sr-only"],["role","cell","data-label","Name","data-title","",1,"settings-table__name"],["role","cell","data-label","API type"],["role","cell","data-label","Base URL",1,"settings-table__secondary"],["role","cell","data-label","Actions","data-actions",""],[1,"settings-table__actions"],["type","button"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"rowKey","rowLabel","state"],["type","button",3,"click"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"deleteRequested","deleteConfirmed","deleteCancelled","rowKey","rowLabel","state"]],template:function(t,r){t&1&&(Ds(0,"ds-section-header",0)(1,"agentos-table-filter",1),mg("queryChange",function(m){return r.rowFilter.query.set(m)}),pl(),Ds(2,"button",2),mg("click",function(){return r.openCreateForm()}),NC(3,"New AI provider"),pl()(),Lw(4,M,2,1,"p",3),Lw(5,U,2,0,"p",4)(6,j,2,0,"p",5)(7,K,2,0,"p",4)(8,J,16,0,"div",6)),t&2&&(BE(),ug("query",r.rowFilter.query()),BE(3),jw(r.deletion.error()?4:-1),BE(),jw(r.isLoading()?5:r.providers().length===0?6:r.rowFilter.filteredRows().length===0?7:8));},dependencies:[at,hn,Io,P,P$1],encapsulation:2})};export{k as PlatformAiProvidersComponent};
@@ -1 +1 @@
1
- import {g,aK as fe,a6 as x}from'./main-ZPG3XUQU.js';var o=class r{skillController=g(fe);getById(l){return this.skillController.getByIdSkill(l)}listPlatform(){return this.skillController.listPlatformSkill()}listByNamespace(l){return this.skillController.listByParentSkill(l)}listEffective(l){return this.skillController.listEffectiveSkill(l)}create(l){return this.skillController.createSkill(l)}update(l,e){return this.skillController.updateSkill(l,e)}delete(l){return this.skillController.deleteSkill(l)}static \u0275fac=function(e){return new(e||r)};static \u0275prov=x({token:r,factory:r.\u0275fac,providedIn:"root"})};export{o};
1
+ import {g,aK as fe,a6 as x}from'./main-47BLQXE5.js';var o=class r{skillController=g(fe);getById(l){return this.skillController.getByIdSkill(l)}listPlatform(){return this.skillController.listPlatformSkill()}listByNamespace(l){return this.skillController.listByParentSkill(l)}listEffective(l){return this.skillController.listEffectiveSkill(l)}create(l){return this.skillController.createSkill(l)}update(l,e){return this.skillController.updateSkill(l,e)}delete(l){return this.skillController.deleteSkill(l)}static \u0275fac=function(e){return new(e||r)};static \u0275prov=x({token:r,factory:r.\u0275fac,providedIn:"root"})};export{o};
@@ -1 +1 @@
1
- import {O as O$1,i as at,h as hn,I as Io,l as ko,P}from'./chunk-Bs2lM6dc.js';import {g,I as Ie,Y as W,$ as Cr,U as Ui,X as XC,a0 as $e,a1 as fa,a2 as da,a3 as nn,G as U$1,y as yw,D as Ds,Q as mg,p as pl,N as NC,L as Lw,a as BE,P as ug,j as jw,H as Hw,J as Jw,m as Uw,v as vl,O as Og}from'./main-ZPG3XUQU.js';function q(e){if(e.sensitive)return e.configured?{status:"hidden",text:"set (hidden)"}:{status:"unset",text:"not set"};if(!e.configured)return {status:"unset",text:"unset"};let t=e.value??"",i=t.trim().toLowerCase();return i==="true"?{status:"on",text:"on"}:i==="false"?{status:"off",text:"off"}:{status:"value",text:t===""?"(empty)":t}}var U=(e,t)=>t.key;function B(e,t){e&1&&(Ds(0,"p",10),NC(1,"Loading the configuration failed. Try refreshing."),pl());}function V(e,t){e&1&&(Ds(0,"p",11),NC(1,"Loading configuration\u2026"),pl());}function j(e,t){e&1&&(Ds(0,"p",12),NC(1,"The service reported no settings."),pl());}function O(e,t){e&1&&(Ds(0,"p",11),NC(1,"No settings match the current filters."),pl());}function Y(e,t){e&1&&(Ds(0,"ds-tag",22),NC(1,"on"),pl());}function z(e,t){e&1&&(Ds(0,"ds-tag",20),NC(1,"off"),pl());}function H(e,t){if(e&1&&(Ds(0,"ds-tag",20),NC(1),pl()),e&2){let i=Jw().$implicit;BE(),Og(i.display.text);}}function G(e,t){if(e&1&&(Ds(0,"ds-tag",23),NC(1),pl()),e&2){let i=Jw().$implicit;BE(),Og(i.display.text);}}function J(e,t){if(e&1&&(Ds(0,"span",24),NC(1),pl()),e&2){let i=Jw().$implicit;BE(),Og(i.display.text);}}function K(e,t){if(e&1&&(Ds(0,"tr",16)(1,"td",18),NC(2),pl(),Ds(3,"td",19)(4,"ds-tag",20),NC(5),pl()(),Ds(6,"td",21),Lw(7,Y,2,0,"ds-tag",22)(8,z,2,0,"ds-tag",20)(9,H,2,1,"ds-tag",20)(10,G,2,1,"ds-tag",23)(11,J,2,1,"span",24),pl(),Ds(12,"td",25),NC(13),pl()()),e&2){let i,a=t.$implicit,m=Jw(2);BE(2),vl(" ",a.entry.key," "),BE(3),vl(" ",a.entry.source===m.Source.ENVIRONMENT?"Environment":"Property"," "),BE(2),jw((i=a.display.status)==="on"?7:i==="off"?8:i==="hidden"?9:i==="unset"?10:11),BE(6),vl(" ",a.entry.description||"\u2014"," ");}}function Q(e,t){if(e&1&&(Ds(0,"div",13)(1,"table",14)(2,"thead",15)(3,"tr",16)(4,"th",17),NC(5,"Setting"),pl(),Ds(6,"th",17),NC(7,"Source"),pl(),Ds(8,"th",17),NC(9,"Value"),pl(),Ds(10,"th",17),NC(11,"Description"),pl()()(),Ds(12,"tbody",15),Hw(13,K,14,4,"tr",16,U),pl()()()),e&2){let i=Jw();BE(13),Uw(i.visibleRows());}}var A=class e{destroyRef=g(Ie);configurationController=g(W);refresh$=new Cr(void 0);isLoading=Ui(true);loadError=Ui(false);rows=Ui([]);source=Ui("ALL");status=Ui("ALL");rowFilter=O$1(this.rows,t=>[t.entry.key,t.entry.description,t.entry.value].filter(Boolean).join(" "));visibleRows=XC(()=>this.rowFilter.filteredRows().filter(t=>{let i=this.source(),a=this.status();return i!=="ALL"&&t.entry.source!==i?false:a==="SET"?t.entry.configured:a==="UNSET"?!t.entry.configured:true}));Source=$e;constructor(){this.refresh$.pipe(fa(()=>(this.isLoading.set(true),this.loadError.set(false),this.configurationController.listEffectiveConfiguration().pipe(da(()=>(this.loadError.set(true),this.isLoading.set(false),nn))))),U$1(this.destroyRef)).subscribe(t=>{this.rows.set(t.map(i=>({key:`${i.source}:${i.key}`,entry:i,display:q(i)}))),this.isLoading.set(false);});}reload(){this.refresh$.next();}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=yw({type:e,selectors:[["agentos-platform-configuration"]],decls:24,vars:6,consts:[["title","Configuration","description","Effective environment variables and Spring properties of the running service. Secrets are never shown, only whether they are set."],["label","Filter settings","placeholder","Filter settings\u2026",3,"queryChange","query"],["dsButton","","type","button",3,"click"],[1,"settings-table__toolbar"],["aria-label","Filter by source",1,"ds-control",2,"width","auto",3,"change","value"],["value","ALL"],[3,"value"],["aria-label","Filter by state",1,"ds-control",2,"width","auto",3,"change","value"],["value","SET"],["value","UNSET"],["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","Effective configuration"],["role","rowgroup"],["role","row"],["role","columnheader"],["role","cell","data-label","Setting","data-title","",1,"settings-table__name","ds-mono"],["role","cell","data-label","Source"],["variant","neutral"],["role","cell","data-label","Value"],["variant","accent"],["variant","outline"],[1,"ds-mono"],["role","cell","data-label","Description",1,"settings-table__secondary"]],template:function(i,a){i&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.reload()}),NC(3,"Refresh"),pl()(),Ds(4,"div",3)(5,"select",4),mg("change",function(c){return a.source.set(c.target.value)}),Ds(6,"option",5),NC(7,"All sources"),pl(),Ds(8,"option",6),NC(9,"Environment variables"),pl(),Ds(10,"option",6),NC(11,"Spring properties"),pl()(),Ds(12,"select",7),mg("change",function(c){return a.status.set(c.target.value)}),Ds(13,"option",5),NC(14,"Set and unset"),pl(),Ds(15,"option",8),NC(16,"Set only"),pl(),Ds(17,"option",9),NC(18,"Unset only"),pl()()(),Lw(19,B,2,0,"p",10)(20,V,2,0,"p",11)(21,j,2,0,"p",12)(22,O,2,0,"p",11)(23,Q,15,0,"div",13)),i&2&&(BE(),ug("query",a.rowFilter.query()),BE(4),ug("value",a.source()),BE(3),ug("value",a.Source.ENVIRONMENT),BE(2),ug("value",a.Source.PROPERTY),BE(2),ug("value",a.status()),BE(7),jw(a.loadError()?19:a.isLoading()?20:a.rows().length===0?21:a.visibleRows().length===0?22:23));},dependencies:[at,hn,Io,ko,P],encapsulation:2})};export{A as PlatformConfigurationComponent};
1
+ import {O as O$1,i as at,h as hn,I as Io,l as ko,P}from'./chunk-D2p21lhx.js';import {g,I as Ie,Y as W,$ as Cr,U as Ui,X as XC,a0 as $e,a1 as fa,a2 as da,a3 as nn,G as U$1,y as yw,D as Ds,Q as mg,p as pl,N as NC,L as Lw,a as BE,P as ug,j as jw,H as Hw,J as Jw,m as Uw,v as vl,O as Og}from'./main-47BLQXE5.js';function q(e){if(e.sensitive)return e.configured?{status:"hidden",text:"set (hidden)"}:{status:"unset",text:"not set"};if(!e.configured)return {status:"unset",text:"unset"};let t=e.value??"",i=t.trim().toLowerCase();return i==="true"?{status:"on",text:"on"}:i==="false"?{status:"off",text:"off"}:{status:"value",text:t===""?"(empty)":t}}var U=(e,t)=>t.key;function B(e,t){e&1&&(Ds(0,"p",10),NC(1,"Loading the configuration failed. Try refreshing."),pl());}function V(e,t){e&1&&(Ds(0,"p",11),NC(1,"Loading configuration\u2026"),pl());}function j(e,t){e&1&&(Ds(0,"p",12),NC(1,"The service reported no settings."),pl());}function O(e,t){e&1&&(Ds(0,"p",11),NC(1,"No settings match the current filters."),pl());}function Y(e,t){e&1&&(Ds(0,"ds-tag",22),NC(1,"on"),pl());}function z(e,t){e&1&&(Ds(0,"ds-tag",20),NC(1,"off"),pl());}function H(e,t){if(e&1&&(Ds(0,"ds-tag",20),NC(1),pl()),e&2){let i=Jw().$implicit;BE(),Og(i.display.text);}}function G(e,t){if(e&1&&(Ds(0,"ds-tag",23),NC(1),pl()),e&2){let i=Jw().$implicit;BE(),Og(i.display.text);}}function J(e,t){if(e&1&&(Ds(0,"span",24),NC(1),pl()),e&2){let i=Jw().$implicit;BE(),Og(i.display.text);}}function K(e,t){if(e&1&&(Ds(0,"tr",16)(1,"td",18),NC(2),pl(),Ds(3,"td",19)(4,"ds-tag",20),NC(5),pl()(),Ds(6,"td",21),Lw(7,Y,2,0,"ds-tag",22)(8,z,2,0,"ds-tag",20)(9,H,2,1,"ds-tag",20)(10,G,2,1,"ds-tag",23)(11,J,2,1,"span",24),pl(),Ds(12,"td",25),NC(13),pl()()),e&2){let i,a=t.$implicit,m=Jw(2);BE(2),vl(" ",a.entry.key," "),BE(3),vl(" ",a.entry.source===m.Source.ENVIRONMENT?"Environment":"Property"," "),BE(2),jw((i=a.display.status)==="on"?7:i==="off"?8:i==="hidden"?9:i==="unset"?10:11),BE(6),vl(" ",a.entry.description||"\u2014"," ");}}function Q(e,t){if(e&1&&(Ds(0,"div",13)(1,"table",14)(2,"thead",15)(3,"tr",16)(4,"th",17),NC(5,"Setting"),pl(),Ds(6,"th",17),NC(7,"Source"),pl(),Ds(8,"th",17),NC(9,"Value"),pl(),Ds(10,"th",17),NC(11,"Description"),pl()()(),Ds(12,"tbody",15),Hw(13,K,14,4,"tr",16,U),pl()()()),e&2){let i=Jw();BE(13),Uw(i.visibleRows());}}var A=class e{destroyRef=g(Ie);configurationController=g(W);refresh$=new Cr(void 0);isLoading=Ui(true);loadError=Ui(false);rows=Ui([]);source=Ui("ALL");status=Ui("ALL");rowFilter=O$1(this.rows,t=>[t.entry.key,t.entry.description,t.entry.value].filter(Boolean).join(" "));visibleRows=XC(()=>this.rowFilter.filteredRows().filter(t=>{let i=this.source(),a=this.status();return i!=="ALL"&&t.entry.source!==i?false:a==="SET"?t.entry.configured:a==="UNSET"?!t.entry.configured:true}));Source=$e;constructor(){this.refresh$.pipe(fa(()=>(this.isLoading.set(true),this.loadError.set(false),this.configurationController.listEffectiveConfiguration().pipe(da(()=>(this.loadError.set(true),this.isLoading.set(false),nn))))),U$1(this.destroyRef)).subscribe(t=>{this.rows.set(t.map(i=>({key:`${i.source}:${i.key}`,entry:i,display:q(i)}))),this.isLoading.set(false);});}reload(){this.refresh$.next();}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=yw({type:e,selectors:[["agentos-platform-configuration"]],decls:24,vars:6,consts:[["title","Configuration","description","Effective environment variables and Spring properties of the running service. Secrets are never shown, only whether they are set."],["label","Filter settings","placeholder","Filter settings\u2026",3,"queryChange","query"],["dsButton","","type","button",3,"click"],[1,"settings-table__toolbar"],["aria-label","Filter by source",1,"ds-control",2,"width","auto",3,"change","value"],["value","ALL"],[3,"value"],["aria-label","Filter by state",1,"ds-control",2,"width","auto",3,"change","value"],["value","SET"],["value","UNSET"],["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","Effective configuration"],["role","rowgroup"],["role","row"],["role","columnheader"],["role","cell","data-label","Setting","data-title","",1,"settings-table__name","ds-mono"],["role","cell","data-label","Source"],["variant","neutral"],["role","cell","data-label","Value"],["variant","accent"],["variant","outline"],[1,"ds-mono"],["role","cell","data-label","Description",1,"settings-table__secondary"]],template:function(i,a){i&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.reload()}),NC(3,"Refresh"),pl()(),Ds(4,"div",3)(5,"select",4),mg("change",function(c){return a.source.set(c.target.value)}),Ds(6,"option",5),NC(7,"All sources"),pl(),Ds(8,"option",6),NC(9,"Environment variables"),pl(),Ds(10,"option",6),NC(11,"Spring properties"),pl()(),Ds(12,"select",7),mg("change",function(c){return a.status.set(c.target.value)}),Ds(13,"option",5),NC(14,"Set and unset"),pl(),Ds(15,"option",8),NC(16,"Set only"),pl(),Ds(17,"option",9),NC(18,"Unset only"),pl()()(),Lw(19,B,2,0,"p",10)(20,V,2,0,"p",11)(21,j,2,0,"p",12)(22,O,2,0,"p",11)(23,Q,15,0,"div",13)),i&2&&(BE(),ug("query",a.rowFilter.query()),BE(4),ug("value",a.source()),BE(3),ug("value",a.Source.ENVIRONMENT),BE(2),ug("value",a.Source.PROPERTY),BE(2),ug("value",a.status()),BE(7),jw(a.loadError()?19:a.isLoading()?20:a.rows().length===0?21:a.visibleRows().length===0?22:23));},dependencies:[at,hn,Io,ko,P],encapsulation:2})};export{A as PlatformConfigurationComponent};