@whoz-oss/coday-client 0.0.0-workstream-forge.260 → 0.0.0-workstream-forge.263

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-CjF3kh6X.js → chunk-B-RP7_Ff.js} +1 -1
  2. package/browser/{chunk-B4oSnH6q.js → chunk-B6SdySbZ.js} +1 -1
  3. package/browser/{chunk-C6mk1TXU.js → chunk-BKTNOJf3.js} +1 -1
  4. package/browser/{chunk-DLuLiHuX.js → chunk-BRE9pdVg.js} +1 -1
  5. package/browser/{chunk-Wkqwvdp3.js → chunk-BSCycf5m.js} +1 -1
  6. package/browser/{chunk-Bxl-W5rv.js → chunk-BWgH5ifY.js} +1 -1
  7. package/browser/{chunk-BEGeHvbU.js → chunk-B_FCzqTc.js} +1 -1
  8. package/browser/{chunk-DF7k_FKN.js → chunk-BjRO2Fvi.js} +1 -1
  9. package/browser/{chunk-CsMJN87z.js → chunk-BmZeMBqL.js} +1 -1
  10. package/browser/{chunk-BduQv2OD.js → chunk-Bu7f6Zft.js} +1 -1
  11. package/browser/{chunk-CBB_i9zm.js → chunk-BzSGYUfS.js} +1 -1
  12. package/browser/{chunk-CZ6YsQnn.js → chunk-C0EI__dc.js} +1 -1
  13. package/browser/{chunk-B0YWgYUz.js → chunk-C4K--O8X.js} +1 -1
  14. package/browser/chunk-C5-HyIli.js +670 -0
  15. package/browser/{chunk-FMElf1Kh.js → chunk-C8AVqeHV.js} +1 -1
  16. package/browser/{chunk-DglDAX_u.js → chunk-CBsGTNPw.js} +1 -1
  17. package/browser/{chunk-CmNMnl1X.js → chunk-CCQX_iC7.js} +1 -1
  18. package/browser/chunk-CErgoGuy.js +1 -0
  19. package/browser/{chunk-D61AUiEX.js → chunk-CGXEdB9v.js} +1 -1
  20. package/browser/{chunk-DGm40OPY.js → chunk-CLobvWQe.js} +1 -1
  21. package/browser/{chunk-BL3wnbf2.js → chunk-CPBC1Xfb.js} +1 -1
  22. package/browser/{chunk-DH3KwJPn.js → chunk-CT27ZBx1.js} +1 -1
  23. package/browser/{chunk-CaSrm-yj.js → chunk-CfVEsWYo.js} +1 -1
  24. package/browser/{chunk-DWro011L.js → chunk-CkfKd9le.js} +1 -1
  25. package/browser/{chunk-DI1Jsft5.js → chunk-DDLbv71E.js} +1 -1
  26. package/browser/{chunk-ClmH7wru.js → chunk-DKwH66R-.js} +1 -1
  27. package/browser/{chunk-C80imceV.js → chunk-DSBR7BB1.js} +1 -1
  28. package/browser/{chunk-CrljCfTT.js → chunk-DXP8WhWD.js} +1 -1
  29. package/browser/{chunk-DVnreUZp.js → chunk-DY5GaL9q.js} +1 -1
  30. package/browser/{chunk-Cw-HKK2W.js → chunk-DZqPrp4_.js} +1 -1
  31. package/browser/{chunk-C4XRMKqd.js → chunk-DhLMUMDO.js} +1 -1
  32. package/browser/{chunk-CWxtFbYp.js → chunk-DjAcquyS.js} +1 -1
  33. package/browser/{chunk-DyMrL6Ee.js → chunk-Dmvl2VVZ.js} +1 -1
  34. package/browser/{chunk-p_4THMZn.js → chunk-Dn4S3owf.js} +1 -1
  35. package/browser/{chunk-DARQ9uHM.js → chunk-Dr8n1idd.js} +1 -1
  36. package/browser/{chunk-7p42eTQE.js → chunk-Dx3T5h4S.js} +1 -1
  37. package/browser/{chunk-BJ-aqn_T.js → chunk-G0SGYgOy.js} +1 -1
  38. package/browser/{chunk-BByf0AaZ.js → chunk-JadGDAwQ.js} +1 -1
  39. package/browser/{chunk-DQ6_qIZF.js → chunk-KtIuYOCt.js} +1 -1
  40. package/browser/{chunk-3LrWBzrF.js → chunk-QFZmQcVZ.js} +1 -1
  41. package/browser/{chunk-BKhlmnMI.js → chunk-VhonxBgn.js} +1 -1
  42. package/browser/{chunk-CbELThsL.js → chunk-i90ntSnJ.js} +1 -1
  43. package/browser/{chunk-BXDGxrbm.js → chunk-jeBNbDmc.js} +1 -1
  44. package/browser/{chunk-C6WfP1id.js → chunk-smZ6Ucyg.js} +1 -1
  45. package/browser/{chunk-Cck7m2qM.js → chunk-szCUHbC4.js} +1 -1
  46. package/browser/{chunk-BiY5nHbl.js → chunk-xH5IhMJJ.js} +1 -1
  47. package/browser/index.html +1 -1
  48. package/browser/{main-DZHLOK7A.js → main-B5VGWTF5.js} +1 -1
  49. package/package.json +1 -1
  50. package/browser/chunk-BE-UpkfJ.js +0 -1
  51. package/browser/chunk-zs4CYUQt.js +0 -674
@@ -1 +1 @@
1
- import {o}from'./chunk-CjF3kh6X.js';import {p as pt,T as Te,g as gn,q as qt,m as md,H as Ht,a as po,h as ho,A as An,O as On,b as hn,c as fn,u as un,d as cn,D as pn,e as at,i as sn,l as Fo}from'./chunk-zs4CYUQt.js';import {g,W,t as F,K as we,$ as $i,U,N as x,L as w,D as Dw,au as $t,E as Es,R as vg,b as AC,c as hl,a as Bw,d as VE,P as dg,i as Vw,v as tC,Q as Qw,f as fg,S as NI,q as $w,am as Hw,T as AI,z as zw,u as Dl,w as pf,x as hf,F as Fg}from'./main-DZHLOK7A.js';function ie(i,t){if(i&1&&(Es(0,"a",2),AC(1,"View skill \u2192"),hl()),i&2){let e=tC();dg("routerLink",e.inspectRoute());}}function oe(i,t){i&1&&(Es(0,"ds-tag",3),AC(1,"Platform level"),hl());}function ne(i,t){i&1&&(Es(0,"p",4),AC(1,"Loading\u2026"),hl());}function re(i,t){if(i&1){let e=Qw();Es(0,"div",15)(1,"div",19),fg(2,"input",20),NI(),Es(3,"button",21),vg("click",function(){let l=pf(e).$implicit,te=tC(2);return hf(te.removeResource(l))}),AC(4," \xD7 "),hl()(),fg(5,"textarea",22),NI(),hl();}if(i&2){let e=t.$implicit;VE(2),dg("formControl",e.path),AI(),VE(3),dg("formControl",e.content),AI();}}function ae(i,t){if(i&1&&(Es(0,"ds-notice"),AC(1),hl()),i&2){let e=tC(2);VE(),Fg(e.errorMessage());}}function se(i,t){if(i&1){let e=Qw();Es(0,"form",6),vg("ngSubmit",function(){pf(e);let l=tC();return hf(l.submit())}),Es(1,"ds-form-field",7),fg(2,"input",8),NI(),hl(),Es(3,"ds-form-field",9),fg(4,"textarea",10),NI(),hl(),Es(5,"ds-form-field",11),fg(6,"textarea",12),NI(),hl(),Es(7,"ds-form-field",13)(8,"div",14),$w(9,re,6,2,"div",15,Hw),Es(11,"div")(12,"button",16),vg("click",function(){pf(e);let l=tC();return hf(l.addResource())}),AC(13,"+ Add resource"),hl()()()(),Bw(14,ae,2,1,"ds-notice"),Es(15,"ds-form-actions")(16,"button",17),AC(17),hl(),Es(18,"button",18),vg("click",function(){pf(e);let l=tC();return hf(l.cancel())}),AC(19,"Cancel"),hl()()();}if(i&2){let e=tC();dg("formGroup",e.form),VE(),dg("error",e.nameControl.invalid&&e.nameControl.touched?"A valid, non-empty name is required.":null),VE(),dg("formControl",e.nameControl),AI(),VE(2),dg("formControl",e.descriptionControl),AI(),VE(2),dg("formControl",e.bodyControl),AI(),VE(3),zw(e.resourceRows()),VE(5),Vw(e.errorMessage()?14:-1),VE(2),dg("disabled",e.form.invalid||e.isSubmitting()),VE(),Dl(" ",e.isSubmitting()?"Saving\u2026":e.isEditMode()?"Save changes":"Create"," ");}}var ee=class i{route=g(W);router=g(F);destroyRef=g(we);skillState=g(o);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=!this.namespaceId;isEditMode=$i(false);isLoading=$i(false);isSubmitting=$i(false);errorMessage=$i(null);existingSkill=null;form=new pt({name:new Te("",{nonNullable:true,validators:[gn.required,gn.maxLength(100),gn.pattern(/^[a-zA-Z0-9_.-]+( [a-zA-Z0-9_.-]+)*$/)]}),description:new Te("",{nonNullable:true,validators:[gn.required,gn.maxLength(500),gn.pattern(/\S/)]}),body:new Te("",{nonNullable:true,validators:[gn.required,gn.pattern(/\S/)]})});resourceRows=$i([]);get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get bodyControl(){return this.form.controls.body}ngOnInit(){let t=this.route.snapshot.paramMap.get("skillId");t&&(this.isEditMode.set(true),this.isLoading.set(true),this.skillState.getById(t).pipe(U(this.destroyRef)).subscribe({next:e=>{if(e.readOnly){this.router.navigate(this.inspectRoute());return}this.existingSkill=e,this.form.patchValue({name:e.name,description:e.description,body:e.body}),this.resourceRows.set(Object.entries(e.resources??{}).map(([o,l])=>({path:new Te(o,{nonNullable:true}),content:new Te(l,{nonNullable:true})}))),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),this.navigateBack();}}));}addResource(){this.resourceRows.update(t=>[...t,{path:new Te("",{nonNullable:true}),content:new Te("",{nonNullable:true})}]);}removeResource(t){this.resourceRows.update(e=>e.filter(o=>o!==t));}buildResourcesPayload(){let t=this.resourceRows().map(e=>[e.path.value.trim(),e.content.value]).filter(([e])=>e.length>0);return Object.fromEntries(t)}submit(){if(this.form.invalid||this.isSubmitting())return;this.isSubmitting.set(true),this.errorMessage.set(null);let t=x(w({},this.existingSkill??{}),{namespaceId:this.namespaceId??null,name:this.nameControl.value.trim(),description:this.descriptionControl.value.trim(),body:this.bodyControl.value,resources:this.buildResourcesPayload()});(this.isEditMode()?this.skillState.update(this.existingSkill?.id??"",t):this.skillState.create(t)).pipe(U(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:o=>{this.isSubmitting.set(false),o.status===409?this.errorMessage.set(`A skill named "${this.nameControl.value.trim()}" already exists in this scope.`):o.status===400?this.errorMessage.set("The server rejected this skill. A filesystem-backed skill cannot be modified."):this.errorMessage.set("Saving the skill failed.");}});}cancel(){this.navigateBack();}inspectRoute(){let t=this.route.snapshot.paramMap.get("skillId")??"";return this.isPlatformMode?["/agentos","admin","skills",t,"inspect"]:["/agentos",this.namespaceId,"skills",t,"inspect"]}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","skills"]):this.router.navigate(["/agentos",this.namespaceId,"skills"]);}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=Dw({type:i,selectors:[["agentos-skill-form"]],decls:8,vars:4,consts:[[3,"title"],["dsButton","","variant","ghost","type","button","title","Back to skills",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"],["label","Name","controlId","skill-name","hint","The value an agent's skillSelectors entry must match. Letters, digits, dash, dot, underscore and single spaces; 100 characters max.",3,"error"],["dsControl","","id","skill-name","type","text","autocomplete","off",3,"formControl"],["label","Description","controlId","skill-description","hint","This is what the agent sees in its skill catalog \u2014 it decides from this line alone whether to read the skill. 500 characters max."],["dsControl","","id","skill-description","rows","2",3,"formControl"],["label","Body","controlId","skill-body","hint","Markdown instructions returned verbatim by the readSkill tool when the agent asks for this skill."],["dsControl","","mono","","id","skill-body","rows","16",3,"formControl"],["label","Resources","hint","Optional files the agent can read with readSkillResource, by relative path."],[1,"ds-stack"],[1,"ds-stack","ds-stack--sm"],["dsButton","","variant","ghost","type","button",3,"click"],["dsButton","","variant","primary","type","submit",3,"disabled"],["dsButton","","type","button",3,"click"],[1,"ds-inline"],["dsControl","","mono","","type","text","placeholder","e.g. references/checklist.md","aria-label","Resource path","autocomplete","off",3,"formControl"],["dsButton","","variant","icon-danger","type","button","title","Remove","aria-label","Remove resource",3,"click"],["dsControl","","mono","","rows","4","aria-label","Resource content",3,"formControl"]],template:function(e,o){e&1&&(Es(0,"ds-page")(1,"ds-section-header",0)(2,"button",1),vg("click",function(){return o.cancel()}),AC(3,"\u2190 Skills"),hl(),Bw(4,ie,2,1,"a",2),Bw(5,oe,2,0,"ds-tag",3),hl(),Bw(6,ne,2,0,"p",4)(7,se,20,8,"form",5),hl()),e&2&&(VE(),dg("title",o.isEditMode()?"Edit skill":"New skill"),VE(3),Vw(o.isEditMode()?4:-1),VE(),Vw(o.isPlatformMode?5:-1),VE(),Vw(o.isLoading()?6:7));},dependencies:[qt,md,Ht,po,ho,An,On,$t,hn,fn,un,cn,pn,at,sn,Fo],encapsulation:2})};export{ee as SkillFormComponent};
1
+ import {o}from'./chunk-B-RP7_Ff.js';import {p as pt,T as Te,g as gn,q as qt,m as md,H as Ht,a as po,h as ho,A as An,O as On,b as hn,c as fn,u as un,d as cn,D as pn,e as at,i as sn,l as Fo}from'./chunk-C5-HyIli.js';import {g,W,t as F,K as we,$ as $i,U,N as x,L as w,D as Dw,au as $t,E as Es,R as vg,b as AC,c as hl,a as Bw,d as VE,P as dg,i as Vw,v as tC,Q as Qw,f as fg,S as NI,q as $w,am as Hw,T as AI,z as zw,u as Dl,w as pf,x as hf,F as Fg}from'./main-B5VGWTF5.js';function ie(i,t){if(i&1&&(Es(0,"a",2),AC(1,"View skill \u2192"),hl()),i&2){let e=tC();dg("routerLink",e.inspectRoute());}}function oe(i,t){i&1&&(Es(0,"ds-tag",3),AC(1,"Platform level"),hl());}function ne(i,t){i&1&&(Es(0,"p",4),AC(1,"Loading\u2026"),hl());}function re(i,t){if(i&1){let e=Qw();Es(0,"div",15)(1,"div",19),fg(2,"input",20),NI(),Es(3,"button",21),vg("click",function(){let l=pf(e).$implicit,te=tC(2);return hf(te.removeResource(l))}),AC(4," \xD7 "),hl()(),fg(5,"textarea",22),NI(),hl();}if(i&2){let e=t.$implicit;VE(2),dg("formControl",e.path),AI(),VE(3),dg("formControl",e.content),AI();}}function ae(i,t){if(i&1&&(Es(0,"ds-notice"),AC(1),hl()),i&2){let e=tC(2);VE(),Fg(e.errorMessage());}}function se(i,t){if(i&1){let e=Qw();Es(0,"form",6),vg("ngSubmit",function(){pf(e);let l=tC();return hf(l.submit())}),Es(1,"ds-form-field",7),fg(2,"input",8),NI(),hl(),Es(3,"ds-form-field",9),fg(4,"textarea",10),NI(),hl(),Es(5,"ds-form-field",11),fg(6,"textarea",12),NI(),hl(),Es(7,"ds-form-field",13)(8,"div",14),$w(9,re,6,2,"div",15,Hw),Es(11,"div")(12,"button",16),vg("click",function(){pf(e);let l=tC();return hf(l.addResource())}),AC(13,"+ Add resource"),hl()()()(),Bw(14,ae,2,1,"ds-notice"),Es(15,"ds-form-actions")(16,"button",17),AC(17),hl(),Es(18,"button",18),vg("click",function(){pf(e);let l=tC();return hf(l.cancel())}),AC(19,"Cancel"),hl()()();}if(i&2){let e=tC();dg("formGroup",e.form),VE(),dg("error",e.nameControl.invalid&&e.nameControl.touched?"A valid, non-empty name is required.":null),VE(),dg("formControl",e.nameControl),AI(),VE(2),dg("formControl",e.descriptionControl),AI(),VE(2),dg("formControl",e.bodyControl),AI(),VE(3),zw(e.resourceRows()),VE(5),Vw(e.errorMessage()?14:-1),VE(2),dg("disabled",e.form.invalid||e.isSubmitting()),VE(),Dl(" ",e.isSubmitting()?"Saving\u2026":e.isEditMode()?"Save changes":"Create"," ");}}var ee=class i{route=g(W);router=g(F);destroyRef=g(we);skillState=g(o);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=!this.namespaceId;isEditMode=$i(false);isLoading=$i(false);isSubmitting=$i(false);errorMessage=$i(null);existingSkill=null;form=new pt({name:new Te("",{nonNullable:true,validators:[gn.required,gn.maxLength(100),gn.pattern(/^[a-zA-Z0-9_.-]+( [a-zA-Z0-9_.-]+)*$/)]}),description:new Te("",{nonNullable:true,validators:[gn.required,gn.maxLength(500),gn.pattern(/\S/)]}),body:new Te("",{nonNullable:true,validators:[gn.required,gn.pattern(/\S/)]})});resourceRows=$i([]);get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get bodyControl(){return this.form.controls.body}ngOnInit(){let t=this.route.snapshot.paramMap.get("skillId");t&&(this.isEditMode.set(true),this.isLoading.set(true),this.skillState.getById(t).pipe(U(this.destroyRef)).subscribe({next:e=>{if(e.readOnly){this.router.navigate(this.inspectRoute());return}this.existingSkill=e,this.form.patchValue({name:e.name,description:e.description,body:e.body}),this.resourceRows.set(Object.entries(e.resources??{}).map(([o,l])=>({path:new Te(o,{nonNullable:true}),content:new Te(l,{nonNullable:true})}))),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),this.navigateBack();}}));}addResource(){this.resourceRows.update(t=>[...t,{path:new Te("",{nonNullable:true}),content:new Te("",{nonNullable:true})}]);}removeResource(t){this.resourceRows.update(e=>e.filter(o=>o!==t));}buildResourcesPayload(){let t=this.resourceRows().map(e=>[e.path.value.trim(),e.content.value]).filter(([e])=>e.length>0);return Object.fromEntries(t)}submit(){if(this.form.invalid||this.isSubmitting())return;this.isSubmitting.set(true),this.errorMessage.set(null);let t=x(w({},this.existingSkill??{}),{namespaceId:this.namespaceId??null,name:this.nameControl.value.trim(),description:this.descriptionControl.value.trim(),body:this.bodyControl.value,resources:this.buildResourcesPayload()});(this.isEditMode()?this.skillState.update(this.existingSkill?.id??"",t):this.skillState.create(t)).pipe(U(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:o=>{this.isSubmitting.set(false),o.status===409?this.errorMessage.set(`A skill named "${this.nameControl.value.trim()}" already exists in this scope.`):o.status===400?this.errorMessage.set("The server rejected this skill. A filesystem-backed skill cannot be modified."):this.errorMessage.set("Saving the skill failed.");}});}cancel(){this.navigateBack();}inspectRoute(){let t=this.route.snapshot.paramMap.get("skillId")??"";return this.isPlatformMode?["/agentos","admin","skills",t,"inspect"]:["/agentos",this.namespaceId,"skills",t,"inspect"]}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","skills"]):this.router.navigate(["/agentos",this.namespaceId,"skills"]);}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=Dw({type:i,selectors:[["agentos-skill-form"]],decls:8,vars:4,consts:[[3,"title"],["dsButton","","variant","ghost","type","button","title","Back to skills",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"],["label","Name","controlId","skill-name","hint","The value an agent's skillSelectors entry must match. Letters, digits, dash, dot, underscore and single spaces; 100 characters max.",3,"error"],["dsControl","","id","skill-name","type","text","autocomplete","off",3,"formControl"],["label","Description","controlId","skill-description","hint","This is what the agent sees in its skill catalog \u2014 it decides from this line alone whether to read the skill. 500 characters max."],["dsControl","","id","skill-description","rows","2",3,"formControl"],["label","Body","controlId","skill-body","hint","Markdown instructions returned verbatim by the readSkill tool when the agent asks for this skill."],["dsControl","","mono","","id","skill-body","rows","16",3,"formControl"],["label","Resources","hint","Optional files the agent can read with readSkillResource, by relative path."],[1,"ds-stack"],[1,"ds-stack","ds-stack--sm"],["dsButton","","variant","ghost","type","button",3,"click"],["dsButton","","variant","primary","type","submit",3,"disabled"],["dsButton","","type","button",3,"click"],[1,"ds-inline"],["dsControl","","mono","","type","text","placeholder","e.g. references/checklist.md","aria-label","Resource path","autocomplete","off",3,"formControl"],["dsButton","","variant","icon-danger","type","button","title","Remove","aria-label","Remove resource",3,"click"],["dsControl","","mono","","rows","4","aria-label","Resource content",3,"formControl"]],template:function(e,o){e&1&&(Es(0,"ds-page")(1,"ds-section-header",0)(2,"button",1),vg("click",function(){return o.cancel()}),AC(3,"\u2190 Skills"),hl(),Bw(4,ie,2,1,"a",2),Bw(5,oe,2,0,"ds-tag",3),hl(),Bw(6,ne,2,0,"p",4)(7,se,20,8,"form",5),hl()),e&2&&(VE(),dg("title",o.isEditMode()?"Edit skill":"New skill"),VE(3),Vw(o.isEditMode()?4:-1),VE(),Vw(o.isPlatformMode?5:-1),VE(),Vw(o.isLoading()?6:7));},dependencies:[qt,md,Ht,po,ho,An,On,$t,hn,fn,un,cn,pn,at,sn,Fo],encapsulation:2})};export{ee as SkillFormComponent};
@@ -1 +1 @@
1
- import {I as I$1}from'./chunk-Cck7m2qM.js';import {g,t as F,K as we,Z as Tr,$ as $i,a1 as ga,U as U$1,D as Dw,E as Es,R as vg,c as hl,b as AC,a as Bw,d as VE,P as dg,i as Vw,v as tC,F as Fg,q as $w,z as zw,u as Dl,Q as Qw,n as lg,w as pf,x as hf}from'./main-DZHLOK7A.js';import {z as k,j as O$1,e as at,c as fn,k as ko,P,B as P$1}from'./chunk-zs4CYUQt.js';import'./chunk-BE-UpkfJ.js';var B=(e,t)=>t.id??t.name;function j(e,t){if(e&1&&(Es(0,"p",3),AC(1),hl()),e&2){let n=tC();VE(),Fg(n.deletion.error());}}function K(e,t){e&1&&(Es(0,"p",4),AC(1,"Loading auth settings\u2026"),hl());}function H(e,t){e&1&&(Es(0,"p",5),AC(1,"No platform auth settings defined yet."),hl());}function U(e,t){e&1&&(Es(0,"p",4),AC(1,"No auth settings match the current filter."),hl());}function z(e,t){if(e&1){let n=Qw();Es(0,"button",18),vg("click",function(){pf(n);let d=tC().$implicit,m=tC(2);return hf(m.onEdit(d))}),AC(1," Edit "),hl();}if(e&2){let n=tC().$implicit;lg("aria-label","Edit "+n.name);}}function G(e,t){if(e&1){let n=Qw();Es(0,"agentos-row-delete-action",19),vg("deleteRequested",function(){pf(n);let d=tC().$implicit,m=tC(2);return hf(m.deletion.request(d.id))})("deleteConfirmed",function(){pf(n);let d=tC().$implicit,m=tC(2);return hf(m.onDelete(d))})("deleteCancelled",function(){pf(n);let d=tC(3);return hf(d.deletion.cancel())}),hl();}if(e&2){let n=tC().$implicit,a=tC(2);dg("rowKey",n.id)("rowLabel",n.name)("state",a.deletion);}}function J(e,t){if(e&1&&(Es(0,"tr",9)(1,"td",12),AC(2),hl(),Es(3,"td",13),AC(4),hl(),Es(5,"td",14)(6,"div",15),Bw(7,z,2,1,"button",16),Bw(8,G,1,3,"agentos-row-delete-action",17),hl()()()),e&2){let n=t.$implicit,a=tC(2);VE(2),Fg(n.name),VE(2),Dl(" ",n.authType," "),VE(3),Vw(a.deletion.confirmingId()!==n.id?7:-1),VE(),Vw(n.id?8:-1);}}function O(e,t){if(e&1&&(Es(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),AC(5,"Name"),hl(),Es(6,"th",10),AC(7,"Authentication type"),hl(),Es(8,"th",10)(9,"span",11),AC(10,"Actions"),hl()()()(),Es(11,"tbody",8),$w(12,J,9,4,"tr",9,B),hl()()()),e&2){let n=tC();VE(12),zw(n.rowFilter.filteredRows());}}var I=class e{router=g(F);destroyRef=g(we);state=g(I$1);refresh$=new Tr(void 0);isLoading=$i(true);deletion=k();settings=$i([]);rowFilter=O$1(this.settings,t=>[t.name,t.authType].filter(Boolean).join(" "));constructor(){this.refresh$.pipe(ga(()=>(this.isLoading.set(true),this.state.loadPlatformSettings())),U$1(this.destroyRef)).subscribe({next:t=>{this.settings.set(t),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}openCreateForm(){this.router.navigate(["/agentos","admin","auth-settings","new"]);}onEdit(t){t.id&&this.router.navigate(["/agentos","admin","auth-settings",t.id,"edit"]);}onDelete(t){t.id&&this.deletion.execute(t.id,{request$:this.state.delete(t.id,"platform").pipe(U$1(this.destroyRef)),onSuccess:()=>this.refresh$.next(),errorMessage:`Deleting "${t.name}" failed. Try again.`});}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Dw({type:e,selectors:[["agentos-platform-auth-settings"]],decls:9,vars:3,consts:[["title","Platform auth settings","description","Authentication settings shared across every namespace."],["label","Filter auth settings","placeholder","Filter auth settings\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 auth settings"],["role","rowgroup"],["role","row"],["role","columnheader"],[1,"sr-only"],["role","cell","data-label","Name","data-title","",1,"settings-table__name"],["role","cell","data-label","Authentication type",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(n,a){n&1&&(Es(0,"ds-section-header",0)(1,"agentos-table-filter",1),vg("queryChange",function(m){return a.rowFilter.query.set(m)}),hl(),Es(2,"button",2),vg("click",function(){return a.openCreateForm()}),AC(3,"New auth setting"),hl()(),Bw(4,j,2,1,"p",3),Bw(5,K,2,0,"p",4)(6,H,2,0,"p",5)(7,U,2,0,"p",4)(8,O,14,0,"div",6)),n&2&&(VE(),dg("query",a.rowFilter.query()),VE(3),Vw(a.deletion.error()?4:-1),VE(),Vw(a.isLoading()?5:a.settings().length===0?6:a.rowFilter.filteredRows().length===0?7:8));},dependencies:[at,fn,ko,P,P$1],encapsulation:2})};export{I as PlatformAuthSettingsComponent};
1
+ import {I as I$1}from'./chunk-szCUHbC4.js';import {g,t as F,K as we,Z as Tr,$ as $i,a1 as ga,U as U$1,D as Dw,E as Es,R as vg,c as hl,b as AC,a as Bw,d as VE,P as dg,i as Vw,v as tC,F as Fg,q as $w,z as zw,u as Dl,Q as Qw,n as lg,w as pf,x as hf}from'./main-B5VGWTF5.js';import {z as k,j as O$1,e as at,c as fn,k as ko,P,B as P$1}from'./chunk-C5-HyIli.js';import'./chunk-CErgoGuy.js';var B=(e,t)=>t.id??t.name;function j(e,t){if(e&1&&(Es(0,"p",3),AC(1),hl()),e&2){let n=tC();VE(),Fg(n.deletion.error());}}function K(e,t){e&1&&(Es(0,"p",4),AC(1,"Loading auth settings\u2026"),hl());}function H(e,t){e&1&&(Es(0,"p",5),AC(1,"No platform auth settings defined yet."),hl());}function U(e,t){e&1&&(Es(0,"p",4),AC(1,"No auth settings match the current filter."),hl());}function z(e,t){if(e&1){let n=Qw();Es(0,"button",18),vg("click",function(){pf(n);let d=tC().$implicit,m=tC(2);return hf(m.onEdit(d))}),AC(1," Edit "),hl();}if(e&2){let n=tC().$implicit;lg("aria-label","Edit "+n.name);}}function G(e,t){if(e&1){let n=Qw();Es(0,"agentos-row-delete-action",19),vg("deleteRequested",function(){pf(n);let d=tC().$implicit,m=tC(2);return hf(m.deletion.request(d.id))})("deleteConfirmed",function(){pf(n);let d=tC().$implicit,m=tC(2);return hf(m.onDelete(d))})("deleteCancelled",function(){pf(n);let d=tC(3);return hf(d.deletion.cancel())}),hl();}if(e&2){let n=tC().$implicit,a=tC(2);dg("rowKey",n.id)("rowLabel",n.name)("state",a.deletion);}}function J(e,t){if(e&1&&(Es(0,"tr",9)(1,"td",12),AC(2),hl(),Es(3,"td",13),AC(4),hl(),Es(5,"td",14)(6,"div",15),Bw(7,z,2,1,"button",16),Bw(8,G,1,3,"agentos-row-delete-action",17),hl()()()),e&2){let n=t.$implicit,a=tC(2);VE(2),Fg(n.name),VE(2),Dl(" ",n.authType," "),VE(3),Vw(a.deletion.confirmingId()!==n.id?7:-1),VE(),Vw(n.id?8:-1);}}function O(e,t){if(e&1&&(Es(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),AC(5,"Name"),hl(),Es(6,"th",10),AC(7,"Authentication type"),hl(),Es(8,"th",10)(9,"span",11),AC(10,"Actions"),hl()()()(),Es(11,"tbody",8),$w(12,J,9,4,"tr",9,B),hl()()()),e&2){let n=tC();VE(12),zw(n.rowFilter.filteredRows());}}var I=class e{router=g(F);destroyRef=g(we);state=g(I$1);refresh$=new Tr(void 0);isLoading=$i(true);deletion=k();settings=$i([]);rowFilter=O$1(this.settings,t=>[t.name,t.authType].filter(Boolean).join(" "));constructor(){this.refresh$.pipe(ga(()=>(this.isLoading.set(true),this.state.loadPlatformSettings())),U$1(this.destroyRef)).subscribe({next:t=>{this.settings.set(t),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}openCreateForm(){this.router.navigate(["/agentos","admin","auth-settings","new"]);}onEdit(t){t.id&&this.router.navigate(["/agentos","admin","auth-settings",t.id,"edit"]);}onDelete(t){t.id&&this.deletion.execute(t.id,{request$:this.state.delete(t.id,"platform").pipe(U$1(this.destroyRef)),onSuccess:()=>this.refresh$.next(),errorMessage:`Deleting "${t.name}" failed. Try again.`});}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=Dw({type:e,selectors:[["agentos-platform-auth-settings"]],decls:9,vars:3,consts:[["title","Platform auth settings","description","Authentication settings shared across every namespace."],["label","Filter auth settings","placeholder","Filter auth settings\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 auth settings"],["role","rowgroup"],["role","row"],["role","columnheader"],[1,"sr-only"],["role","cell","data-label","Name","data-title","",1,"settings-table__name"],["role","cell","data-label","Authentication type",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(n,a){n&1&&(Es(0,"ds-section-header",0)(1,"agentos-table-filter",1),vg("queryChange",function(m){return a.rowFilter.query.set(m)}),hl(),Es(2,"button",2),vg("click",function(){return a.openCreateForm()}),AC(3,"New auth setting"),hl()(),Bw(4,j,2,1,"p",3),Bw(5,K,2,0,"p",4)(6,H,2,0,"p",5)(7,U,2,0,"p",4)(8,O,14,0,"div",6)),n&2&&(VE(),dg("query",a.rowFilter.query()),VE(3),Vw(a.deletion.error()?4:-1),VE(),Vw(a.isLoading()?5:a.settings().length===0?6:a.rowFilter.filteredRows().length===0?7:8));},dependencies:[at,fn,ko,P,P$1],encapsulation:2})};export{I as PlatformAuthSettingsComponent};
@@ -1 +1 @@
1
- import {a}from'./chunk-1nyEsjkY.js';import {o}from'./chunk-CjF3kh6X.js';import {I as s,b as hn,c as fn,r as rn,D as pn,e as at,n as ln,l as Fo,J as Pi,K as On}from'./chunk-zs4CYUQt.js';import {g,W,t as F,K as we,$ as $i,o as oT,U,ac as by,a2 as ha,aa as br,D as Dw,au as $t,E as Es,R as vg,b as AC,c as hl,a as Bw,d as VE,i as Vw,v as tC,P as dg,Q as Qw,f as fg,av as QC,F as Fg,u as Dl,aw as XC,q as $w,z as zw,ao as Uw,w as pf,x as hf,ax as YD}from'./main-DZHLOK7A.js';var Y=(e,t)=>t.name+t.grant;function Z(e,t){if(e&1&&(Es(0,"a",2),AC(1,"Edit skill \u2192"),hl()),e&2){let n=tC();dg("routerLink",n.editRoute());}}function ee(e,t){e&1&&(Es(0,"ds-tag",3),AC(1,"Platform level"),hl());}function te(e,t){e&1&&(Es(0,"p",4),AC(1,"Loading\u2026"),hl());}function ne(e,t){e&1&&(Es(0,"ds-notice"),AC(1,"Failed to load skill."),hl());}function ie(e,t){if(e&1&&(Es(0,"dt"),AC(1,"Created by"),hl(),Es(2,"dd"),AC(3),hl()),e&2){let n=tC(2);VE(3),Fg(n.createdBy);}}function oe(e,t){if(e&1&&(Es(0,"dt"),AC(1,"Last updated"),hl(),Es(2,"dd"),AC(3),hl()),e&2){let n=tC(2);VE(3),Fg(n.updatedOn);}}function ae(e,t){if(e&1&&(Bw(0,ie,4,1),Bw(1,oe,4,1)),e&2){let n=tC();Vw(n.createdBy?0:-1),VE(),Vw(n.updatedOn?1:-1);}}function le(e,t){e&1&&(Es(0,"p",4),AC(1," A platform skill is offered to every namespace. Open it from a namespace to see which of its agents use it. "),hl());}function se(e,t){e&1&&(Es(0,"p",4),AC(1,"Loading\u2026"),hl());}function re(e,t){e&1&&(Es(0,"ds-notice"),AC(1," The agent configs could not be read, so it is unknown whether any agent uses this skill. "),hl());}function de(e,t){e&1&&(Es(0,"p",4),AC(1,"No agent references this skill."),hl());}function ce(e,t){e&1&&(Es(0,"ds-tag",15),AC(1,"platform agent"),hl());}function me(e,t){e&1&&(Es(0,"ds-tag",15),AC(1,"via *"),hl());}function pe(e,t){if(e&1&&(Es(0,"li",13)(1,"span",14),AC(2),hl(),Bw(3,ce,2,0,"ds-tag",15),Bw(4,me,2,0,"ds-tag",15),hl()),e&2){let n=t.$implicit;VE(2),Fg(n.name),VE(),Vw(n.platform?3:-1),VE(),Vw(n.grant==="all"?4:-1);}}function ue(e,t){if(e&1&&(Es(0,"ul",12),$w(1,pe,5,3,"li",13,Y),hl(),Es(3,"p",4),AC(4," An agent listed "),Es(5,"code"),AC(6,"via *"),hl(),AC(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. "),hl()),e&2){let n=tC(2);VE(),zw(n.consumers());}}function _e(e,t){e&1&&(Es(0,"p",4),AC(1,"No resources bundled with this skill."),hl());}function ge(e,t){if(e&1){let n=Qw();Es(0,"li")(1,"ds-disclosure",16),vg("toggled",function(){let r=pf(n).$implicit,g=tC(3);return hf(g.toggleResource(r))}),Es(2,"pre",17),AC(3),hl()()();}if(e&2){let n=t.$implicit,o=tC(3);VE(),dg("heading",n)("open",o.isResourceExpanded(n)),VE(2),Fg(o.resourceContent(n));}}function Ce(e,t){if(e&1&&(Es(0,"ul",12),$w(1,ge,4,3,"li",null,Uw),hl()),e&2){let n=tC(2);VE(),zw(n.resourcePaths());}}function fe(e,t){if(e&1){let n=Qw();Es(0,"ds-card",5)(1,"dl",6)(2,"dt"),AC(3,"Name"),hl(),Es(4,"dd",7),AC(5),hl(),Es(6,"dt"),AC(7,"Description"),hl(),Es(8,"dd"),AC(9),hl(),Es(10,"dt"),AC(11,"Scope"),hl(),Es(12,"dd"),AC(13),hl(),Es(14,"dt"),AC(15,"Storage"),hl(),Es(16,"dd")(17,"ds-tag",8),AC(18),hl()(),Bw(19,ae,2,2),hl()(),Es(20,"ds-card",9),Bw(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),hl(),Es(26,"ds-card")(27,"ds-disclosure",10),vg("toggled",function(){pf(n);let r=tC();return hf(r.toggleBody())}),fg(28,"div",11),QC(29,"agentosMarkdown"),hl()(),Es(30,"ds-card",9),Bw(31,_e,2,0,"p",4)(32,Ce,3,0,"ul",12),hl();}if(e&2){let n=t,o=tC();VE(5),Fg(n.name),VE(4),Fg(n.description),VE(4),Fg(n.namespaceId?"Namespace":"Platform"),VE(4),dg("variant",o.isFilesystemBacked()?"outline":"neutral"),VE(),Dl(" ",o.isFilesystemBacked()?"SKILL.md file (read-only)":"Database"," "),VE(),Vw(o.isFilesystemBacked()?-1:19),VE(),dg("heading","Used by"+(!o.isPlatformMode&&!o.consumersLoading()&&!o.consumersUnavailable()?" ("+o.consumers().length+")":"")),VE(),Vw(o.isPlatformMode?21:o.consumersLoading()?22:o.consumersUnavailable()?23:o.consumers().length===0?24:25),VE(6),dg("open",!o.bodyCollapsed()),VE(),dg("innerHTML",XC(29,12,n.body),YD),VE(2),dg("heading","Resources ("+o.resourcePaths().length+")"),VE(),Vw(o.resourcePaths().length===0?31:32);}}var X=class e{route=g(W);router=g(F);destroyRef=g(we);skillState=g(o);agentState=g(s);namespaceId=this.route.snapshot.params.namespaceId;skillId=this.route.snapshot.params.skillId;isPlatformMode=!this.namespaceId;isLoading=$i(true);hasError=$i(false);skill=$i(null);bodyCollapsed=$i(false);expandedResources=$i(new Set);resourcePaths=oT(()=>Object.keys(this.skill()?.resources??{}).sort());isFilesystemBacked=oT(()=>this.skill()?.readOnly===true);consumers=$i([]);consumersUnavailable=$i(false);consumersLoading=$i(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),by({namespace:this.agentState.listByNamespace(this.namespaceId),platform:this.agentState.listPlatform().pipe(ha(()=>br([])))}).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=Dw({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&&(Es(0,"ds-page")(1,"ds-section-header",0)(2,"button",1),vg("click",function(){return o.back()}),AC(3,"\u2190 Skills"),hl(),Bw(4,Z,2,1,"a",2),Bw(5,ee,2,0,"ds-tag",3),hl(),Bw(6,te,2,0,"p",4)(7,ne,2,0,"ds-notice")(8,fe,33,14),hl()),n&2){let r;VE(4),Vw(o.skill()&&!o.isFilesystemBacked()?4:-1),VE(),Vw(o.isPlatformMode?5:-1),VE(),Vw(o.isLoading()?6:o.hasError()?7:(r=o.skill())?8:-1,r);}},dependencies:[$t,hn,fn,rn,pn,at,ln,Fo,Pi,On],encapsulation:2})};export{X as SkillInspectComponent};
1
+ import {a}from'./chunk-1nyEsjkY.js';import {o}from'./chunk-B-RP7_Ff.js';import {I as s,b as hn,c as fn,r as rn,D as pn,e as at,n as ln,l as Fo,J as Pi,K as On}from'./chunk-C5-HyIli.js';import {g,W,t as F,K as we,$ as $i,o as oT,U,ac as by,a2 as ha,aa as br,D as Dw,au as $t,E as Es,R as vg,b as AC,c as hl,a as Bw,d as VE,i as Vw,v as tC,P as dg,Q as Qw,f as fg,av as QC,F as Fg,u as Dl,aw as XC,q as $w,z as zw,ao as Uw,w as pf,x as hf,ax as YD}from'./main-B5VGWTF5.js';var Y=(e,t)=>t.name+t.grant;function Z(e,t){if(e&1&&(Es(0,"a",2),AC(1,"Edit skill \u2192"),hl()),e&2){let n=tC();dg("routerLink",n.editRoute());}}function ee(e,t){e&1&&(Es(0,"ds-tag",3),AC(1,"Platform level"),hl());}function te(e,t){e&1&&(Es(0,"p",4),AC(1,"Loading\u2026"),hl());}function ne(e,t){e&1&&(Es(0,"ds-notice"),AC(1,"Failed to load skill."),hl());}function ie(e,t){if(e&1&&(Es(0,"dt"),AC(1,"Created by"),hl(),Es(2,"dd"),AC(3),hl()),e&2){let n=tC(2);VE(3),Fg(n.createdBy);}}function oe(e,t){if(e&1&&(Es(0,"dt"),AC(1,"Last updated"),hl(),Es(2,"dd"),AC(3),hl()),e&2){let n=tC(2);VE(3),Fg(n.updatedOn);}}function ae(e,t){if(e&1&&(Bw(0,ie,4,1),Bw(1,oe,4,1)),e&2){let n=tC();Vw(n.createdBy?0:-1),VE(),Vw(n.updatedOn?1:-1);}}function le(e,t){e&1&&(Es(0,"p",4),AC(1," A platform skill is offered to every namespace. Open it from a namespace to see which of its agents use it. "),hl());}function se(e,t){e&1&&(Es(0,"p",4),AC(1,"Loading\u2026"),hl());}function re(e,t){e&1&&(Es(0,"ds-notice"),AC(1," The agent configs could not be read, so it is unknown whether any agent uses this skill. "),hl());}function de(e,t){e&1&&(Es(0,"p",4),AC(1,"No agent references this skill."),hl());}function ce(e,t){e&1&&(Es(0,"ds-tag",15),AC(1,"platform agent"),hl());}function me(e,t){e&1&&(Es(0,"ds-tag",15),AC(1,"via *"),hl());}function pe(e,t){if(e&1&&(Es(0,"li",13)(1,"span",14),AC(2),hl(),Bw(3,ce,2,0,"ds-tag",15),Bw(4,me,2,0,"ds-tag",15),hl()),e&2){let n=t.$implicit;VE(2),Fg(n.name),VE(),Vw(n.platform?3:-1),VE(),Vw(n.grant==="all"?4:-1);}}function ue(e,t){if(e&1&&(Es(0,"ul",12),$w(1,pe,5,3,"li",13,Y),hl(),Es(3,"p",4),AC(4," An agent listed "),Es(5,"code"),AC(6,"via *"),hl(),AC(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. "),hl()),e&2){let n=tC(2);VE(),zw(n.consumers());}}function _e(e,t){e&1&&(Es(0,"p",4),AC(1,"No resources bundled with this skill."),hl());}function ge(e,t){if(e&1){let n=Qw();Es(0,"li")(1,"ds-disclosure",16),vg("toggled",function(){let r=pf(n).$implicit,g=tC(3);return hf(g.toggleResource(r))}),Es(2,"pre",17),AC(3),hl()()();}if(e&2){let n=t.$implicit,o=tC(3);VE(),dg("heading",n)("open",o.isResourceExpanded(n)),VE(2),Fg(o.resourceContent(n));}}function Ce(e,t){if(e&1&&(Es(0,"ul",12),$w(1,ge,4,3,"li",null,Uw),hl()),e&2){let n=tC(2);VE(),zw(n.resourcePaths());}}function fe(e,t){if(e&1){let n=Qw();Es(0,"ds-card",5)(1,"dl",6)(2,"dt"),AC(3,"Name"),hl(),Es(4,"dd",7),AC(5),hl(),Es(6,"dt"),AC(7,"Description"),hl(),Es(8,"dd"),AC(9),hl(),Es(10,"dt"),AC(11,"Scope"),hl(),Es(12,"dd"),AC(13),hl(),Es(14,"dt"),AC(15,"Storage"),hl(),Es(16,"dd")(17,"ds-tag",8),AC(18),hl()(),Bw(19,ae,2,2),hl()(),Es(20,"ds-card",9),Bw(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),hl(),Es(26,"ds-card")(27,"ds-disclosure",10),vg("toggled",function(){pf(n);let r=tC();return hf(r.toggleBody())}),fg(28,"div",11),QC(29,"agentosMarkdown"),hl()(),Es(30,"ds-card",9),Bw(31,_e,2,0,"p",4)(32,Ce,3,0,"ul",12),hl();}if(e&2){let n=t,o=tC();VE(5),Fg(n.name),VE(4),Fg(n.description),VE(4),Fg(n.namespaceId?"Namespace":"Platform"),VE(4),dg("variant",o.isFilesystemBacked()?"outline":"neutral"),VE(),Dl(" ",o.isFilesystemBacked()?"SKILL.md file (read-only)":"Database"," "),VE(),Vw(o.isFilesystemBacked()?-1:19),VE(),dg("heading","Used by"+(!o.isPlatformMode&&!o.consumersLoading()&&!o.consumersUnavailable()?" ("+o.consumers().length+")":"")),VE(),Vw(o.isPlatformMode?21:o.consumersLoading()?22:o.consumersUnavailable()?23:o.consumers().length===0?24:25),VE(6),dg("open",!o.bodyCollapsed()),VE(),dg("innerHTML",XC(29,12,n.body),YD),VE(2),dg("heading","Resources ("+o.resourcePaths().length+")"),VE(),Vw(o.resourcePaths().length===0?31:32);}}var X=class e{route=g(W);router=g(F);destroyRef=g(we);skillState=g(o);agentState=g(s);namespaceId=this.route.snapshot.params.namespaceId;skillId=this.route.snapshot.params.skillId;isPlatformMode=!this.namespaceId;isLoading=$i(true);hasError=$i(false);skill=$i(null);bodyCollapsed=$i(false);expandedResources=$i(new Set);resourcePaths=oT(()=>Object.keys(this.skill()?.resources??{}).sort());isFilesystemBacked=oT(()=>this.skill()?.readOnly===true);consumers=$i([]);consumersUnavailable=$i(false);consumersLoading=$i(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),by({namespace:this.agentState.listByNamespace(this.namespaceId),platform:this.agentState.listPlatform().pipe(ha(()=>br([])))}).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=Dw({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&&(Es(0,"ds-page")(1,"ds-section-header",0)(2,"button",1),vg("click",function(){return o.back()}),AC(3,"\u2190 Skills"),hl(),Bw(4,Z,2,1,"a",2),Bw(5,ee,2,0,"ds-tag",3),hl(),Bw(6,te,2,0,"p",4)(7,ne,2,0,"ds-notice")(8,fe,33,14),hl()),n&2){let r;VE(4),Vw(o.skill()&&!o.isFilesystemBacked()?4:-1),VE(),Vw(o.isPlatformMode?5:-1),VE(),Vw(o.isLoading()?6:o.hasError()?7:(r=o.skill())?8:-1,r);}},dependencies:[$t,hn,fn,rn,pn,at,ln,Fo,Pi,On],encapsulation:2})};export{X as SkillInspectComponent};
@@ -0,0 +1 @@
1
+ import {a1 as ga,a2 as ha,aa as br,aD as $y}from'./main-B5VGWTF5.js';function i(t,o,p){return t.pipe(ga(()=>o().pipe(ha(()=>br(p)))),$y({bufferSize:1,refCount:true}))}export{i};
@@ -1 +1 @@
1
- import {z as k$1,j as O,e as at,c as fn,k as ko,l as Fo,P,B as P$1}from'./chunk-zs4CYUQt.js';import {g,W as W$1,t as F,K as we,aq as k,ap as F$1,Z as Tr,$ as $i,a1 as ga,ac as by,a2 as ha,aa as br,U,D as Dw,E as Es,R as vg,c as hl,b as AC,a as Bw,d as VE,P as dg,i as Vw,v as tC,F as Fg,q as $w,z as zw,u as Dl,Q as Qw,w as pf,x as hf,n as lg}from'./main-DZHLOK7A.js';var G=(i,e)=>e.key;function Q(i,e){if(i&1&&(Es(0,"p",3),AC(1),hl()),i&2){let t=tC();VE(),Fg(t.deletion.error());}}function W(i,e){i&1&&(Es(0,"p",4),AC(1,"Loading AI models\u2026"),hl());}function X(i,e){i&1&&(Es(0,"p",5),AC(1,"No AI models configured."),hl());}function Y(i,e){i&1&&(Es(0,"p",4),AC(1,"No AI models match the current filter."),hl());}function Z(i,e){i&1&&(Es(0,"ds-tag",18),AC(1,"Read-only"),hl());}function ee(i,e){if(i&1){let t=Qw();Es(0,"button",24),vg("click",function(){pf(t);let s=tC(2).$implicit,m=tC(2);return hf(m.edit(s))}),AC(1,"Edit"),hl();}if(i&2){let t=tC(2).$implicit,n=tC(2);lg("aria-label","Edit "+n.title(t));}}function te(i,e){if(i&1){let t=Qw();Bw(0,ee,2,1,"button",22),Es(1,"agentos-row-delete-action",23),vg("deleteRequested",function(){pf(t);let s=tC().$implicit,m=tC(2);return hf(m.deletion.request(s.key))})("deleteConfirmed",function(){pf(t);let s=tC().$implicit,m=tC(2);return hf(m.confirmDelete(s))})("deleteCancelled",function(){pf(t);let s=tC(3);return hf(s.deletion.cancel())}),hl();}if(i&2){let t=tC().$implicit,n=tC(2);Vw(n.deletion.confirmingId()!==t.key?0:-1),VE(),dg("rowKey",t.key)("rowLabel",n.title(t))("state",n.deletion);}}function ie(i,e){i&1&&(Es(0,"button",21),AC(1,"Inherited"),hl());}function ne(i,e){if(i&1&&(Es(0,"tr",9)(1,"td",12),AC(2),hl(),Es(3,"td",13),AC(4),hl(),Es(5,"td",14),AC(6),hl(),Es(7,"td",15)(8,"div",16)(9,"ds-tag",17),AC(10),hl(),Bw(11,Z,2,0,"ds-tag",18),hl()(),Es(12,"td",19)(13,"div",20),Bw(14,te,2,4)(15,ie,2,0,"button",21),hl()()()),i&2){let t=e.$implicit,n=tC(2);VE(2),Fg(n.title(t)),VE(2),Fg(t.providerName),VE(2),Dl(" ",t.model.apiModelName," "),VE(3),dg("variant",t.scope==="platform"?"neutral":"accent"),VE(),Fg(t.scope==="platform"?"Platform":"Namespace"),VE(),Vw(t.scope==="platform"?11:-1),VE(3),Vw(t.scope==="namespace"?14:15);}}function oe(i,e){if(i&1&&(Es(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),AC(5,"Name"),hl(),Es(6,"th",10),AC(7,"Provider"),hl(),Es(8,"th",10),AC(9,"API model name"),hl(),Es(10,"th",10),AC(11,"Scope"),hl(),Es(12,"th",10)(13,"span",11),AC(14,"Actions"),hl()()()(),Es(15,"tbody",8),$w(16,ne,16,7,"tr",9,G),hl()()()),i&2){let t=tC();VE(16),zw(t.rowFilter.filteredRows());}}var z=class i{route=g(W$1);router=g(F);destroyRef=g(we);aiModelController=g(k);aiProviderController=g(F$1);namespaceId=this.route.snapshot.params.namespaceId;refresh$=new Tr(void 0);isLoading=$i(true);deletion=k$1();rows=$i([]);rowFilter=O(this.rows,e=>[e.model.alias,e.model.apiModelName,e.providerName,e.scope].filter(Boolean).join(" "));data$=this.refresh$.pipe(ga(()=>(this.isLoading.set(true),by({namespace:this.aiModelController.listByNamespaceIdAiModel(this.namespaceId),platform:this.aiModelController.listPlatformLevelAiModel().pipe(ha(()=>br([]))),providers:this.aiProviderController.listAiProvider(this.namespaceId)}).pipe(ga(({namespace:e,platform:t,providers:n})=>{let s=[...new Set([...t,...e].map(m=>m.aiProviderId))];return by({namespace:br(e),platform:br(t),providers:br(n),referencedProviders:this.aiProviderController.getByIdsAiProvider({ids:s,withRemoved:false}).pipe(ha(()=>br([])))})})))));constructor(){this.data$.pipe(U(this.destroyRef)).subscribe({next:({namespace:e,platform:t,providers:n,referencedProviders:s})=>{let m=new Map([...s,...n].map(c=>[c.id??"",c.name]));this.rows.set([...t.map((c,g)=>({key:`platform:${c.id??g}`,model:c,providerName:m.get(c.aiProviderId)??c.aiProviderId,scope:"platform"})),...e.map((c,g)=>({key:`namespace:${c.id??g}`,model:c,providerName:m.get(c.aiProviderId)??c.aiProviderId,scope:"namespace"}))]),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"ai-models","new"]);}edit(e){e.scope==="platform"||!e.model.id||this.router.navigate(["/agentos",this.namespaceId,"ai-models",e.model.id,"edit"]);}title(e){return e.model.alias??e.model.apiModelName}confirmDelete(e){e.scope==="platform"||!e.model.id||this.deletion.execute(e.key,{request$:this.aiModelController.deleteAiModel(e.model.id).pipe(U(this.destroyRef)),onSuccess:()=>this.refresh$.next(),errorMessage:`Deleting "${this.title(e)}" failed. Try again.`});}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=Dw({type:i,selectors:[["agentos-namespace-ai-models"]],decls:9,vars:3,consts:[["title","AI models","description","AI models configured for this namespace, including models inherited from the platform."],["label","Filter AI models","placeholder","Filter AI models\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","AI models"],["role","rowgroup"],["role","row"],["role","columnheader"],[1,"sr-only"],["role","cell","data-label","Name","data-title","",1,"settings-table__name"],["role","cell","data-label","Provider"],["role","cell","data-label","API model name",1,"settings-table__secondary"],["role","cell","data-label","Scope"],[1,"settings-table__tags"],[3,"variant"],["variant","outline"],["role","cell","data-label","Actions","data-actions",""],[1,"settings-table__actions"],["type","button","disabled",""],["type","button"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"deleteRequested","deleteConfirmed","deleteCancelled","rowKey","rowLabel","state"],["type","button",3,"click"]],template:function(t,n){t&1&&(Es(0,"ds-section-header",0)(1,"agentos-table-filter",1),vg("queryChange",function(m){return n.rowFilter.query.set(m)}),hl(),Es(2,"button",2),vg("click",function(){return n.openCreateForm()}),AC(3,"New AI model"),hl()(),Bw(4,Q,2,1,"p",3),Bw(5,W,2,0,"p",4)(6,X,2,0,"p",5)(7,Y,2,0,"p",4)(8,oe,18,0,"div",6)),t&2&&(VE(),dg("query",n.rowFilter.query()),VE(3),Vw(n.deletion.error()?4:-1),VE(),Vw(n.isLoading()?5:n.rows().length===0?6:n.rowFilter.filteredRows().length===0?7:8));},dependencies:[at,fn,ko,Fo,P,P$1],encapsulation:2})};export{z as NamespaceAiModelsComponent};
1
+ import {z as k$1,j as O,e as at,c as fn,k as ko,l as Fo,P,B as P$1}from'./chunk-C5-HyIli.js';import {g,W as W$1,t as F,K as we,aq as k,ap as F$1,Z as Tr,$ as $i,a1 as ga,ac as by,a2 as ha,aa as br,U,D as Dw,E as Es,R as vg,c as hl,b as AC,a as Bw,d as VE,P as dg,i as Vw,v as tC,F as Fg,q as $w,z as zw,u as Dl,Q as Qw,w as pf,x as hf,n as lg}from'./main-B5VGWTF5.js';var G=(i,e)=>e.key;function Q(i,e){if(i&1&&(Es(0,"p",3),AC(1),hl()),i&2){let t=tC();VE(),Fg(t.deletion.error());}}function W(i,e){i&1&&(Es(0,"p",4),AC(1,"Loading AI models\u2026"),hl());}function X(i,e){i&1&&(Es(0,"p",5),AC(1,"No AI models configured."),hl());}function Y(i,e){i&1&&(Es(0,"p",4),AC(1,"No AI models match the current filter."),hl());}function Z(i,e){i&1&&(Es(0,"ds-tag",18),AC(1,"Read-only"),hl());}function ee(i,e){if(i&1){let t=Qw();Es(0,"button",24),vg("click",function(){pf(t);let s=tC(2).$implicit,m=tC(2);return hf(m.edit(s))}),AC(1,"Edit"),hl();}if(i&2){let t=tC(2).$implicit,n=tC(2);lg("aria-label","Edit "+n.title(t));}}function te(i,e){if(i&1){let t=Qw();Bw(0,ee,2,1,"button",22),Es(1,"agentos-row-delete-action",23),vg("deleteRequested",function(){pf(t);let s=tC().$implicit,m=tC(2);return hf(m.deletion.request(s.key))})("deleteConfirmed",function(){pf(t);let s=tC().$implicit,m=tC(2);return hf(m.confirmDelete(s))})("deleteCancelled",function(){pf(t);let s=tC(3);return hf(s.deletion.cancel())}),hl();}if(i&2){let t=tC().$implicit,n=tC(2);Vw(n.deletion.confirmingId()!==t.key?0:-1),VE(),dg("rowKey",t.key)("rowLabel",n.title(t))("state",n.deletion);}}function ie(i,e){i&1&&(Es(0,"button",21),AC(1,"Inherited"),hl());}function ne(i,e){if(i&1&&(Es(0,"tr",9)(1,"td",12),AC(2),hl(),Es(3,"td",13),AC(4),hl(),Es(5,"td",14),AC(6),hl(),Es(7,"td",15)(8,"div",16)(9,"ds-tag",17),AC(10),hl(),Bw(11,Z,2,0,"ds-tag",18),hl()(),Es(12,"td",19)(13,"div",20),Bw(14,te,2,4)(15,ie,2,0,"button",21),hl()()()),i&2){let t=e.$implicit,n=tC(2);VE(2),Fg(n.title(t)),VE(2),Fg(t.providerName),VE(2),Dl(" ",t.model.apiModelName," "),VE(3),dg("variant",t.scope==="platform"?"neutral":"accent"),VE(),Fg(t.scope==="platform"?"Platform":"Namespace"),VE(),Vw(t.scope==="platform"?11:-1),VE(3),Vw(t.scope==="namespace"?14:15);}}function oe(i,e){if(i&1&&(Es(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),AC(5,"Name"),hl(),Es(6,"th",10),AC(7,"Provider"),hl(),Es(8,"th",10),AC(9,"API model name"),hl(),Es(10,"th",10),AC(11,"Scope"),hl(),Es(12,"th",10)(13,"span",11),AC(14,"Actions"),hl()()()(),Es(15,"tbody",8),$w(16,ne,16,7,"tr",9,G),hl()()()),i&2){let t=tC();VE(16),zw(t.rowFilter.filteredRows());}}var z=class i{route=g(W$1);router=g(F);destroyRef=g(we);aiModelController=g(k);aiProviderController=g(F$1);namespaceId=this.route.snapshot.params.namespaceId;refresh$=new Tr(void 0);isLoading=$i(true);deletion=k$1();rows=$i([]);rowFilter=O(this.rows,e=>[e.model.alias,e.model.apiModelName,e.providerName,e.scope].filter(Boolean).join(" "));data$=this.refresh$.pipe(ga(()=>(this.isLoading.set(true),by({namespace:this.aiModelController.listByNamespaceIdAiModel(this.namespaceId),platform:this.aiModelController.listPlatformLevelAiModel().pipe(ha(()=>br([]))),providers:this.aiProviderController.listAiProvider(this.namespaceId)}).pipe(ga(({namespace:e,platform:t,providers:n})=>{let s=[...new Set([...t,...e].map(m=>m.aiProviderId))];return by({namespace:br(e),platform:br(t),providers:br(n),referencedProviders:this.aiProviderController.getByIdsAiProvider({ids:s,withRemoved:false}).pipe(ha(()=>br([])))})})))));constructor(){this.data$.pipe(U(this.destroyRef)).subscribe({next:({namespace:e,platform:t,providers:n,referencedProviders:s})=>{let m=new Map([...s,...n].map(c=>[c.id??"",c.name]));this.rows.set([...t.map((c,g)=>({key:`platform:${c.id??g}`,model:c,providerName:m.get(c.aiProviderId)??c.aiProviderId,scope:"platform"})),...e.map((c,g)=>({key:`namespace:${c.id??g}`,model:c,providerName:m.get(c.aiProviderId)??c.aiProviderId,scope:"namespace"}))]),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"ai-models","new"]);}edit(e){e.scope==="platform"||!e.model.id||this.router.navigate(["/agentos",this.namespaceId,"ai-models",e.model.id,"edit"]);}title(e){return e.model.alias??e.model.apiModelName}confirmDelete(e){e.scope==="platform"||!e.model.id||this.deletion.execute(e.key,{request$:this.aiModelController.deleteAiModel(e.model.id).pipe(U(this.destroyRef)),onSuccess:()=>this.refresh$.next(),errorMessage:`Deleting "${this.title(e)}" failed. Try again.`});}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=Dw({type:i,selectors:[["agentos-namespace-ai-models"]],decls:9,vars:3,consts:[["title","AI models","description","AI models configured for this namespace, including models inherited from the platform."],["label","Filter AI models","placeholder","Filter AI models\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","AI models"],["role","rowgroup"],["role","row"],["role","columnheader"],[1,"sr-only"],["role","cell","data-label","Name","data-title","",1,"settings-table__name"],["role","cell","data-label","Provider"],["role","cell","data-label","API model name",1,"settings-table__secondary"],["role","cell","data-label","Scope"],[1,"settings-table__tags"],[3,"variant"],["variant","outline"],["role","cell","data-label","Actions","data-actions",""],[1,"settings-table__actions"],["type","button","disabled",""],["type","button"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"deleteRequested","deleteConfirmed","deleteCancelled","rowKey","rowLabel","state"],["type","button",3,"click"]],template:function(t,n){t&1&&(Es(0,"ds-section-header",0)(1,"agentos-table-filter",1),vg("queryChange",function(m){return n.rowFilter.query.set(m)}),hl(),Es(2,"button",2),vg("click",function(){return n.openCreateForm()}),AC(3,"New AI model"),hl()(),Bw(4,Q,2,1,"p",3),Bw(5,W,2,0,"p",4)(6,X,2,0,"p",5)(7,Y,2,0,"p",4)(8,oe,18,0,"div",6)),t&2&&(VE(),dg("query",n.rowFilter.query()),VE(3),Vw(n.deletion.error()?4:-1),VE(),Vw(n.isLoading()?5:n.rows().length===0?6:n.rowFilter.filteredRows().length===0?7:8));},dependencies:[at,fn,ko,Fo,P,P$1],encapsulation:2})};export{z as NamespaceAiModelsComponent};
@@ -1 +1 @@
1
- import {c}from'./chunk-7p42eTQE.js';import {z as k,j as O$1,e as at,c as fn,k as ko,l as Fo,P,B as P$1}from'./chunk-zs4CYUQt.js';import {g,W,t as F,K as we,$ as $i,ac as by,a2 as ha,aa as br,U,N as x,L as w,ai as ke,al as We,D as Dw,E as Es,R as vg,c as hl,b as AC,a as Bw,d as VE,P as dg,i as Vw,v as tC,F as Fg,q as $w,z as zw,Q as Qw,w as pf,x as hf,n as lg}from'./main-DZHLOK7A.js';var J=(n,t)=>t.key;function O(n,t){if(n&1&&(Es(0,"p",3),AC(1),hl()),n&2){let e=tC();VE(),Fg(e.deletion.error());}}function Y(n,t){n&1&&(Es(0,"p",4),AC(1,"Loading scheduled prompts\u2026"),hl());}function z(n,t){n&1&&(Es(0,"p",5),AC(1,"No scheduled prompts available."),hl());}function G(n,t){n&1&&(Es(0,"p",4),AC(1,"No scheduled prompts match the current filter."),hl());}function Q(n,t){if(n&1&&(Es(0,"span",14),AC(1),hl()),n&2){let e=tC().$implicit;VE(),Fg(e.prompt.description);}}function X(n,t){n&1&&(Es(0,"ds-tag",20),AC(1,"Read-only"),hl());}function Z(n,t){if(n&1){let e=Qw();Es(0,"button",25),vg("click",function(){pf(e);let l=tC(2).$implicit,p=tC(2);return hf(p.toggle(l))}),AC(1),hl(),Es(2,"button",25),vg("click",function(){pf(e);let l=tC(2).$implicit,p=tC(2);return hf(p.edit(l))}),AC(3," Edit "),hl();}if(n&2){let e=tC(2).$implicit;VE(),Fg(e.prompt.enabled?"Disable":"Enable"),VE(),lg("aria-label","Edit "+e.prompt.name);}}function ee(n,t){if(n&1){let e=Qw();Bw(0,Z,4,2),Es(1,"agentos-row-delete-action",24),vg("deleteRequested",function(){pf(e);let l=tC().$implicit,p=tC(2);return hf(p.deletion.request(l.key))})("deleteConfirmed",function(){pf(e);let l=tC().$implicit,p=tC(2);return hf(p.confirmDelete(l))})("deleteCancelled",function(){pf(e);let l=tC(3);return hf(l.deletion.cancel())}),hl();}if(n&2){let e=tC().$implicit,i=tC(2);Vw(i.deletion.confirmingId()!==e.key?0:-1),VE(),dg("rowKey",e.key)("rowLabel",e.prompt.name)("state",i.deletion);}}function te(n,t){n&1&&(Es(0,"button",23),AC(1,"Inherited"),hl());}function ne(n,t){if(n&1&&(Es(0,"tr",9)(1,"td",12)(2,"span",13),AC(3),hl(),Bw(4,Q,2,1,"span",14),hl(),Es(5,"td",15),AC(6),hl(),Es(7,"td",16)(8,"ds-tag",17),AC(9),hl()(),Es(10,"td",18)(11,"div",19)(12,"ds-tag",17),AC(13),hl(),Bw(14,X,2,0,"ds-tag",20),hl()(),Es(15,"td",21)(16,"div",22),Bw(17,ee,2,4)(18,te,2,0,"button",23),hl()()()),n&2){let e=t.$implicit,i=tC(2);VE(3),Fg(e.prompt.name),VE(),Vw(e.prompt.description?4:-1),VE(2),Fg(i.scheduleLabel(e.prompt)),VE(2),dg("variant",e.prompt.enabled?"accent":"outline"),VE(),Fg(e.prompt.enabled?"Enabled":"Disabled"),VE(3),dg("variant",e.scope==="platform"?"neutral":"accent"),VE(),Fg(e.scope==="platform"?"Platform":"Namespace"),VE(),Vw(e.scope==="platform"?14:-1),VE(3),Vw(e.scope==="namespace"?17:18);}}function ie(n,t){if(n&1&&(Es(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),AC(5,"Name"),hl(),Es(6,"th",10),AC(7,"Schedule"),hl(),Es(8,"th",10),AC(9,"Status"),hl(),Es(10,"th",10),AC(11,"Scope"),hl(),Es(12,"th",10)(13,"span",11),AC(14,"Actions"),hl()()()(),Es(15,"tbody",8),$w(16,ne,19,9,"tr",9,J),hl()()()),n&2){let e=tC();VE(16),zw(e.rowFilter.filteredRows());}}var H=class n{route=g(W);router=g(F);destroyRef=g(we);state=g(c);namespaceId=this.route.snapshot.params.namespaceId;rows=$i([]);isLoading=$i(true);deletion=k();rowFilter=O$1(this.rows,t=>[t.prompt.name,t.prompt.description,this.scheduleLabel(t.prompt),t.prompt.enabled?"Enabled":"Disabled",t.scope].filter(Boolean).join(" "));constructor(){by({platform:this.state.listPlatform().pipe(ha(()=>br([]))),namespace:this.state.listByNamespace(this.namespaceId)}).pipe(U(this.destroyRef)).subscribe({next:({platform:t,namespace:e})=>{this.rows.set([...t.map((i,l)=>({key:`platform:${i.id??l}`,prompt:i,scope:"platform"})),...e.map((i,l)=>({key:`namespace:${i.id??l}`,prompt:i,scope:"namespace"}))]),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"scheduled-prompts","new"]);}edit(t){t.scope==="platform"||!t.prompt.id||this.router.navigate(["/agentos",this.namespaceId,"scheduled-prompts",t.prompt.id,"edit"]);}toggle(t){if(t.scope==="platform")return;(t.prompt.enabled?this.state.disable(t.prompt.id??""):this.state.enable(t.prompt.id??"")).pipe(U(this.destroyRef)).subscribe(i=>this.rows.update(l=>l.map(p=>p.key===t.key?x(w({},p),{prompt:i}):p)));}confirmDelete(t){t.scope==="platform"||!t.prompt.id||this.deletion.execute(t.key,{request$:this.state.delete(t.prompt.id).pipe(U(this.destroyRef)),onSuccess:()=>this.rows.update(e=>e.filter(i=>i.key!==t.key)),errorMessage:`Deleting "${t.prompt.name}" failed. Try again.`});}scheduleLabel(t){let e=t.recurrence,i=e.unit===ke.WEEK?"week":"month",l=e.unit===ke.WEEK&&e.days?.length?` (${e.days.map(p=>We[p]??p).join(", ")})`:"";return `Every ${i}${l} at ${e.timeUtc} UTC`}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Dw({type:n,selectors:[["agentos-scheduled-prompt-list"]],decls:9,vars:3,consts:[["title","Scheduled prompts","description","Scheduled prompts for this namespace, including schedules inherited from the platform."],["label","Filter scheduled prompts","placeholder","Filter scheduled prompts\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","Scheduled prompts"],["role","rowgroup"],["role","row"],["role","columnheader"],[1,"sr-only"],["role","cell","data-label","Name","data-title",""],[1,"settings-table__name","settings-table__stacked"],[1,"settings-table__secondary","settings-table__stacked"],["role","cell","data-label","Schedule"],["role","cell","data-label","Status"],[3,"variant"],["role","cell","data-label","Scope"],[1,"settings-table__tags"],["variant","outline"],["role","cell","data-label","Actions","data-actions",""],[1,"settings-table__actions"],["type","button","disabled",""],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"deleteRequested","deleteConfirmed","deleteCancelled","rowKey","rowLabel","state"],["type","button",3,"click"]],template:function(e,i){e&1&&(Es(0,"ds-section-header",0)(1,"agentos-table-filter",1),vg("queryChange",function(p){return i.rowFilter.query.set(p)}),hl(),Es(2,"button",2),vg("click",function(){return i.openCreateForm()}),AC(3,"New scheduled prompt"),hl()(),Bw(4,O,2,1,"p",3),Bw(5,Y,2,0,"p",4)(6,z,2,0,"p",5)(7,G,2,0,"p",4)(8,ie,18,0,"div",6)),e&2&&(VE(),dg("query",i.rowFilter.query()),VE(3),Vw(i.deletion.error()?4:-1),VE(),Vw(i.isLoading()?5:i.rows().length===0?6:i.rowFilter.filteredRows().length===0?7:8));},dependencies:[at,fn,ko,Fo,P,P$1],encapsulation:2})};export{H as ScheduledPromptListComponent};
1
+ import {c}from'./chunk-Dx3T5h4S.js';import {z as k,j as O$1,e as at,c as fn,k as ko,l as Fo,P,B as P$1}from'./chunk-C5-HyIli.js';import {g,W,t as F,K as we,$ as $i,ac as by,a2 as ha,aa as br,U,N as x,L as w,ai as ke,al as We,D as Dw,E as Es,R as vg,c as hl,b as AC,a as Bw,d as VE,P as dg,i as Vw,v as tC,F as Fg,q as $w,z as zw,Q as Qw,w as pf,x as hf,n as lg}from'./main-B5VGWTF5.js';var J=(n,t)=>t.key;function O(n,t){if(n&1&&(Es(0,"p",3),AC(1),hl()),n&2){let e=tC();VE(),Fg(e.deletion.error());}}function Y(n,t){n&1&&(Es(0,"p",4),AC(1,"Loading scheduled prompts\u2026"),hl());}function z(n,t){n&1&&(Es(0,"p",5),AC(1,"No scheduled prompts available."),hl());}function G(n,t){n&1&&(Es(0,"p",4),AC(1,"No scheduled prompts match the current filter."),hl());}function Q(n,t){if(n&1&&(Es(0,"span",14),AC(1),hl()),n&2){let e=tC().$implicit;VE(),Fg(e.prompt.description);}}function X(n,t){n&1&&(Es(0,"ds-tag",20),AC(1,"Read-only"),hl());}function Z(n,t){if(n&1){let e=Qw();Es(0,"button",25),vg("click",function(){pf(e);let l=tC(2).$implicit,p=tC(2);return hf(p.toggle(l))}),AC(1),hl(),Es(2,"button",25),vg("click",function(){pf(e);let l=tC(2).$implicit,p=tC(2);return hf(p.edit(l))}),AC(3," Edit "),hl();}if(n&2){let e=tC(2).$implicit;VE(),Fg(e.prompt.enabled?"Disable":"Enable"),VE(),lg("aria-label","Edit "+e.prompt.name);}}function ee(n,t){if(n&1){let e=Qw();Bw(0,Z,4,2),Es(1,"agentos-row-delete-action",24),vg("deleteRequested",function(){pf(e);let l=tC().$implicit,p=tC(2);return hf(p.deletion.request(l.key))})("deleteConfirmed",function(){pf(e);let l=tC().$implicit,p=tC(2);return hf(p.confirmDelete(l))})("deleteCancelled",function(){pf(e);let l=tC(3);return hf(l.deletion.cancel())}),hl();}if(n&2){let e=tC().$implicit,i=tC(2);Vw(i.deletion.confirmingId()!==e.key?0:-1),VE(),dg("rowKey",e.key)("rowLabel",e.prompt.name)("state",i.deletion);}}function te(n,t){n&1&&(Es(0,"button",23),AC(1,"Inherited"),hl());}function ne(n,t){if(n&1&&(Es(0,"tr",9)(1,"td",12)(2,"span",13),AC(3),hl(),Bw(4,Q,2,1,"span",14),hl(),Es(5,"td",15),AC(6),hl(),Es(7,"td",16)(8,"ds-tag",17),AC(9),hl()(),Es(10,"td",18)(11,"div",19)(12,"ds-tag",17),AC(13),hl(),Bw(14,X,2,0,"ds-tag",20),hl()(),Es(15,"td",21)(16,"div",22),Bw(17,ee,2,4)(18,te,2,0,"button",23),hl()()()),n&2){let e=t.$implicit,i=tC(2);VE(3),Fg(e.prompt.name),VE(),Vw(e.prompt.description?4:-1),VE(2),Fg(i.scheduleLabel(e.prompt)),VE(2),dg("variant",e.prompt.enabled?"accent":"outline"),VE(),Fg(e.prompt.enabled?"Enabled":"Disabled"),VE(3),dg("variant",e.scope==="platform"?"neutral":"accent"),VE(),Fg(e.scope==="platform"?"Platform":"Namespace"),VE(),Vw(e.scope==="platform"?14:-1),VE(3),Vw(e.scope==="namespace"?17:18);}}function ie(n,t){if(n&1&&(Es(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),AC(5,"Name"),hl(),Es(6,"th",10),AC(7,"Schedule"),hl(),Es(8,"th",10),AC(9,"Status"),hl(),Es(10,"th",10),AC(11,"Scope"),hl(),Es(12,"th",10)(13,"span",11),AC(14,"Actions"),hl()()()(),Es(15,"tbody",8),$w(16,ne,19,9,"tr",9,J),hl()()()),n&2){let e=tC();VE(16),zw(e.rowFilter.filteredRows());}}var H=class n{route=g(W);router=g(F);destroyRef=g(we);state=g(c);namespaceId=this.route.snapshot.params.namespaceId;rows=$i([]);isLoading=$i(true);deletion=k();rowFilter=O$1(this.rows,t=>[t.prompt.name,t.prompt.description,this.scheduleLabel(t.prompt),t.prompt.enabled?"Enabled":"Disabled",t.scope].filter(Boolean).join(" "));constructor(){by({platform:this.state.listPlatform().pipe(ha(()=>br([]))),namespace:this.state.listByNamespace(this.namespaceId)}).pipe(U(this.destroyRef)).subscribe({next:({platform:t,namespace:e})=>{this.rows.set([...t.map((i,l)=>({key:`platform:${i.id??l}`,prompt:i,scope:"platform"})),...e.map((i,l)=>({key:`namespace:${i.id??l}`,prompt:i,scope:"namespace"}))]),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"scheduled-prompts","new"]);}edit(t){t.scope==="platform"||!t.prompt.id||this.router.navigate(["/agentos",this.namespaceId,"scheduled-prompts",t.prompt.id,"edit"]);}toggle(t){if(t.scope==="platform")return;(t.prompt.enabled?this.state.disable(t.prompt.id??""):this.state.enable(t.prompt.id??"")).pipe(U(this.destroyRef)).subscribe(i=>this.rows.update(l=>l.map(p=>p.key===t.key?x(w({},p),{prompt:i}):p)));}confirmDelete(t){t.scope==="platform"||!t.prompt.id||this.deletion.execute(t.key,{request$:this.state.delete(t.prompt.id).pipe(U(this.destroyRef)),onSuccess:()=>this.rows.update(e=>e.filter(i=>i.key!==t.key)),errorMessage:`Deleting "${t.prompt.name}" failed. Try again.`});}scheduleLabel(t){let e=t.recurrence,i=e.unit===ke.WEEK?"week":"month",l=e.unit===ke.WEEK&&e.days?.length?` (${e.days.map(p=>We[p]??p).join(", ")})`:"";return `Every ${i}${l} at ${e.timeUtc} UTC`}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Dw({type:n,selectors:[["agentos-scheduled-prompt-list"]],decls:9,vars:3,consts:[["title","Scheduled prompts","description","Scheduled prompts for this namespace, including schedules inherited from the platform."],["label","Filter scheduled prompts","placeholder","Filter scheduled prompts\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","Scheduled prompts"],["role","rowgroup"],["role","row"],["role","columnheader"],[1,"sr-only"],["role","cell","data-label","Name","data-title",""],[1,"settings-table__name","settings-table__stacked"],[1,"settings-table__secondary","settings-table__stacked"],["role","cell","data-label","Schedule"],["role","cell","data-label","Status"],[3,"variant"],["role","cell","data-label","Scope"],[1,"settings-table__tags"],["variant","outline"],["role","cell","data-label","Actions","data-actions",""],[1,"settings-table__actions"],["type","button","disabled",""],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"deleteRequested","deleteConfirmed","deleteCancelled","rowKey","rowLabel","state"],["type","button",3,"click"]],template:function(e,i){e&1&&(Es(0,"ds-section-header",0)(1,"agentos-table-filter",1),vg("queryChange",function(p){return i.rowFilter.query.set(p)}),hl(),Es(2,"button",2),vg("click",function(){return i.openCreateForm()}),AC(3,"New scheduled prompt"),hl()(),Bw(4,O,2,1,"p",3),Bw(5,Y,2,0,"p",4)(6,z,2,0,"p",5)(7,G,2,0,"p",4)(8,ie,18,0,"div",6)),e&2&&(VE(),dg("query",i.rowFilter.query()),VE(3),Vw(i.deletion.error()?4:-1),VE(),Vw(i.isLoading()?5:i.rows().length===0?6:i.rowFilter.filteredRows().length===0?7:8));},dependencies:[at,fn,ko,Fo,P,P$1],encapsulation:2})};export{H as ScheduledPromptListComponent};
@@ -1 +1 @@
1
- import {i}from'./chunk-BE-UpkfJ.js';import {y}from'./chunk-zs4CYUQt.js';import {g as g$1,ap as F,Z as Tr,at as Cy,a1 as ga,a2 as ha,aa as br,ad as ne,aD as $y,a5 as vd,L as w,a6 as x}from'./main-DZHLOK7A.js';var g="none",N="me",O=class p{nsController=g$1(F);userState=g$1(y);refresh$=new Tr(void 0);namespaceId$=new Tr(null);vm$=Cy([this.namespaceId$,this.refresh$]).pipe(ga(([e])=>{let r=this.loadPlatformProviders().pipe(ha(()=>br([])));return e?Cy([r,this.loadNamespaceProviders(e).pipe(ha(()=>br([]))),this.loadUserProviders(e).pipe(ha(()=>br([]))),this.loadUserProviders("global").pipe(ha(()=>br([])))]).pipe(ne(([i,n,s,t])=>({platform:i,namespace:n,userOnNs:s,userGlobal:t}))):Cy([r,this.loadNamespaceProviders("").pipe(ha(()=>br([]))),this.loadUserProviders("global").pipe(ha(()=>br([])))]).pipe(ne(([i,n,s])=>({platform:i,namespace:n,userOnNs:[],userGlobal:s})))}),$y({bufferSize:1,refCount:true}));setNamespace(e){this.namespaceId$.value!==e&&this.namespaceId$.next(e);}refresh(){this.refresh$.next();}loadUserProviders(e){let r=e==="global"?g:e;return this.nsController.listAiProvider(r,N)}userGlobal$=i(this.refresh$,()=>this.loadUserProviders("global"),[]);loadPlatformProviders(){return this.nsController.listAiProvider(g)}loadNamespaceProviders(e){return e?this.nsController.listAiProvider(e):br([])}getById(e,r){return this.nsController.getByIdAiProvider(e)}create(e,r,i){let s=this.userState.currentUser()?.id;if((r==="userOnNs"||r==="userGlobal")&&!s)throw new Error(`Cannot create ${r} provider before UserStateService.loadMe() resolves \u2014 call loadMe() at app init`);if(r==="namespace"){if(i===void 0||i==="")throw new Error("Cannot create namespace-scoped provider without a namespaceId");let S={name:e.name,apiType:e.apiType,description:e.description,baseUrl:e.baseUrl,apiKey:e.apiKey,headers:e.headers??void 0,namespaceId:i??void 0};return this.nsController.createAiProvider(S).pipe(vd(()=>this.refresh()))}if(r==="userOnNs"&&!i)throw new Error("Cannot create userOnNs provider without a namespaceId");let t={name:e.name,apiType:e.apiType,description:e.description,baseUrl:e.baseUrl,apiKey:e.apiKey,headers:e.headers??void 0,userId:s,namespaceId:r==="userOnNs"?i:void 0};return this.nsController.createAiProvider(t).pipe(vd(()=>this.refresh()))}update(e,r,i,n){let s=r.apiKey===null?{}:{apiKey:r.apiKey},t=w({name:r.name,apiType:r.apiType,description:r.description,baseUrl:r.baseUrl,headers:r.headers??void 0,namespaceId:n.namespaceId,userId:n.userId},s);return this.nsController.updateAiProvider(e,t).pipe(vd(()=>this.refresh()))}delete(e,r){return this.nsController.deleteAiProvider(e).pipe(vd(()=>this.refresh()))}static \u0275fac=function(r){return new(r||p)};static \u0275prov=x({token:p,factory:p.\u0275fac,providedIn:"root"})};export{O};
1
+ import {i}from'./chunk-CErgoGuy.js';import {y}from'./chunk-C5-HyIli.js';import {g as g$1,ap as F,Z as Tr,at as Cy,a1 as ga,a2 as ha,aa as br,ad as ne,aD as $y,a5 as vd,L as w,a6 as x}from'./main-B5VGWTF5.js';var g="none",N="me",O=class p{nsController=g$1(F);userState=g$1(y);refresh$=new Tr(void 0);namespaceId$=new Tr(null);vm$=Cy([this.namespaceId$,this.refresh$]).pipe(ga(([e])=>{let r=this.loadPlatformProviders().pipe(ha(()=>br([])));return e?Cy([r,this.loadNamespaceProviders(e).pipe(ha(()=>br([]))),this.loadUserProviders(e).pipe(ha(()=>br([]))),this.loadUserProviders("global").pipe(ha(()=>br([])))]).pipe(ne(([i,n,s,t])=>({platform:i,namespace:n,userOnNs:s,userGlobal:t}))):Cy([r,this.loadNamespaceProviders("").pipe(ha(()=>br([]))),this.loadUserProviders("global").pipe(ha(()=>br([])))]).pipe(ne(([i,n,s])=>({platform:i,namespace:n,userOnNs:[],userGlobal:s})))}),$y({bufferSize:1,refCount:true}));setNamespace(e){this.namespaceId$.value!==e&&this.namespaceId$.next(e);}refresh(){this.refresh$.next();}loadUserProviders(e){let r=e==="global"?g:e;return this.nsController.listAiProvider(r,N)}userGlobal$=i(this.refresh$,()=>this.loadUserProviders("global"),[]);loadPlatformProviders(){return this.nsController.listAiProvider(g)}loadNamespaceProviders(e){return e?this.nsController.listAiProvider(e):br([])}getById(e,r){return this.nsController.getByIdAiProvider(e)}create(e,r,i){let s=this.userState.currentUser()?.id;if((r==="userOnNs"||r==="userGlobal")&&!s)throw new Error(`Cannot create ${r} provider before UserStateService.loadMe() resolves \u2014 call loadMe() at app init`);if(r==="namespace"){if(i===void 0||i==="")throw new Error("Cannot create namespace-scoped provider without a namespaceId");let S={name:e.name,apiType:e.apiType,description:e.description,baseUrl:e.baseUrl,apiKey:e.apiKey,headers:e.headers??void 0,namespaceId:i??void 0};return this.nsController.createAiProvider(S).pipe(vd(()=>this.refresh()))}if(r==="userOnNs"&&!i)throw new Error("Cannot create userOnNs provider without a namespaceId");let t={name:e.name,apiType:e.apiType,description:e.description,baseUrl:e.baseUrl,apiKey:e.apiKey,headers:e.headers??void 0,userId:s,namespaceId:r==="userOnNs"?i:void 0};return this.nsController.createAiProvider(t).pipe(vd(()=>this.refresh()))}update(e,r,i,n){let s=r.apiKey===null?{}:{apiKey:r.apiKey},t=w({name:r.name,apiType:r.apiType,description:r.description,baseUrl:r.baseUrl,headers:r.headers??void 0,namespaceId:n.namespaceId,userId:n.userId},s);return this.nsController.updateAiProvider(e,t).pipe(vd(()=>this.refresh()))}delete(e,r){return this.nsController.deleteAiProvider(e).pipe(vd(()=>this.refresh()))}static \u0275fac=function(r){return new(r||p)};static \u0275prov=x({token:p,factory:p.\u0275fac,providedIn:"root"})};export{O};
@@ -1 +1 @@
1
- import {z as k,j as O$1,e as at,c as fn,k as ko,P,B as P$1}from'./chunk-zs4CYUQt.js';import {g,t as F,K as we,ag as U$1,Z as Tr,$ as $i,a1 as ga,U as U$2,D as Dw,E as Es,R as vg,c as hl,b as AC,a as Bw,d as VE,P as dg,i as Vw,v as tC,F as Fg,q as $w,z as zw,u as Dl,Q as Qw,w as pf,x as hf,n as lg}from'./main-DZHLOK7A.js';var B=(n,e)=>e.id??e.name;function j(n,e){if(n&1&&(Es(0,"p",3),AC(1),hl()),n&2){let t=tC();VE(),Fg(t.deletion.error());}}function K(n,e){n&1&&(Es(0,"p",4),AC(1,"Loading agent configs\u2026"),hl());}function H(n,e){n&1&&(Es(0,"p",5),AC(1,"No platform agent configs defined yet."),hl());}function U(n,e){n&1&&(Es(0,"p",4),AC(1,"No agent configs match the current filter."),hl());}function z(n,e){if(n&1){let t=Qw();Es(0,"button",19),vg("click",function(){pf(t);let d=tC().$implicit,c=tC(2);return hf(c.inspect(d))}),AC(1," Inspect "),hl(),Es(2,"button",19),vg("click",function(){pf(t);let d=tC().$implicit,c=tC(2);return hf(c.edit(d))}),AC(3,"Edit"),hl();}if(n&2){let t=tC().$implicit;lg("aria-label","Inspect "+t.name),VE(2),lg("aria-label","Edit "+t.name);}}function G(n,e){if(n&1){let t=Qw();Es(0,"agentos-row-delete-action",20),vg("deleteRequested",function(){pf(t);let d=tC().$implicit,c=tC(2);return hf(c.deletion.request(d.id))})("deleteConfirmed",function(){pf(t);let d=tC().$implicit,c=tC(2);return hf(c.confirmDelete(d))})("deleteCancelled",function(){pf(t);let d=tC(3);return hf(d.deletion.cancel())}),hl();}if(n&2){let t=tC().$implicit,a=tC(2);dg("rowKey",t.id)("rowLabel",t.name)("state",a.deletion);}}function J(n,e){if(n&1&&(Es(0,"tr",9)(1,"td",12),AC(2),hl(),Es(3,"td",13),AC(4),hl(),Es(5,"td",14),AC(6),hl(),Es(7,"td",15),AC(8),hl(),Es(9,"td",16)(10,"div",17),Bw(11,z,4,2),Bw(12,G,1,3,"agentos-row-delete-action",18),hl()()()),n&2){let t=e.$implicit,a=tC(2);VE(2),Fg(t.name),VE(2),Dl(" ",t.description||"\u2014"," "),VE(2),Fg(t.modelName||"\u2014"),VE(2),Fg(a.mode(t)),VE(3),Vw(a.deletion.confirmingId()!==t.id?11:-1),VE(),Vw(t.id?12:-1);}}function O(n,e){if(n&1&&(Es(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),AC(5,"Name"),hl(),Es(6,"th",10),AC(7,"Description"),hl(),Es(8,"th",10),AC(9,"Model"),hl(),Es(10,"th",10),AC(11,"Execution mode"),hl(),Es(12,"th",10)(13,"span",11),AC(14,"Actions"),hl()()()(),Es(15,"tbody",8),$w(16,J,13,6,"tr",9,B),hl()()()),n&2){let t=tC();VE(16),zw(t.rowFilter.filteredRows());}}var I=class n{router=g(F);destroyRef=g(we);agentConfigController=g(U$1);refresh$=new Tr(void 0);isLoading=$i(true);deletion=k();configs=$i([]);rowFilter=O$1(this.configs,e=>[e.name,e.description,e.modelName,this.mode(e)].filter(Boolean).join(" "));constructor(){this.refresh$.pipe(ga(()=>(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=Dw({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&&(Es(0,"ds-section-header",0)(1,"agentos-table-filter",1),vg("queryChange",function(c){return a.rowFilter.query.set(c)}),hl(),Es(2,"button",2),vg("click",function(){return a.openCreateForm()}),AC(3,"New agent config"),hl()(),Bw(4,j,2,1,"p",3),Bw(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&&(VE(),dg("query",a.rowFilter.query()),VE(3),Vw(a.deletion.error()?4:-1),VE(),Vw(a.isLoading()?5:a.configs().length===0?6:a.rowFilter.filteredRows().length===0?7:8));},dependencies:[at,fn,ko,P,P$1],encapsulation:2})};export{I as PlatformAgentConfigsComponent};
1
+ import {z as k,j as O$1,e as at,c as fn,k as ko,P,B as P$1}from'./chunk-C5-HyIli.js';import {g,t as F,K as we,ag as U$1,Z as Tr,$ as $i,a1 as ga,U as U$2,D as Dw,E as Es,R as vg,c as hl,b as AC,a as Bw,d as VE,P as dg,i as Vw,v as tC,F as Fg,q as $w,z as zw,u as Dl,Q as Qw,w as pf,x as hf,n as lg}from'./main-B5VGWTF5.js';var B=(n,e)=>e.id??e.name;function j(n,e){if(n&1&&(Es(0,"p",3),AC(1),hl()),n&2){let t=tC();VE(),Fg(t.deletion.error());}}function K(n,e){n&1&&(Es(0,"p",4),AC(1,"Loading agent configs\u2026"),hl());}function H(n,e){n&1&&(Es(0,"p",5),AC(1,"No platform agent configs defined yet."),hl());}function U(n,e){n&1&&(Es(0,"p",4),AC(1,"No agent configs match the current filter."),hl());}function z(n,e){if(n&1){let t=Qw();Es(0,"button",19),vg("click",function(){pf(t);let d=tC().$implicit,c=tC(2);return hf(c.inspect(d))}),AC(1," Inspect "),hl(),Es(2,"button",19),vg("click",function(){pf(t);let d=tC().$implicit,c=tC(2);return hf(c.edit(d))}),AC(3,"Edit"),hl();}if(n&2){let t=tC().$implicit;lg("aria-label","Inspect "+t.name),VE(2),lg("aria-label","Edit "+t.name);}}function G(n,e){if(n&1){let t=Qw();Es(0,"agentos-row-delete-action",20),vg("deleteRequested",function(){pf(t);let d=tC().$implicit,c=tC(2);return hf(c.deletion.request(d.id))})("deleteConfirmed",function(){pf(t);let d=tC().$implicit,c=tC(2);return hf(c.confirmDelete(d))})("deleteCancelled",function(){pf(t);let d=tC(3);return hf(d.deletion.cancel())}),hl();}if(n&2){let t=tC().$implicit,a=tC(2);dg("rowKey",t.id)("rowLabel",t.name)("state",a.deletion);}}function J(n,e){if(n&1&&(Es(0,"tr",9)(1,"td",12),AC(2),hl(),Es(3,"td",13),AC(4),hl(),Es(5,"td",14),AC(6),hl(),Es(7,"td",15),AC(8),hl(),Es(9,"td",16)(10,"div",17),Bw(11,z,4,2),Bw(12,G,1,3,"agentos-row-delete-action",18),hl()()()),n&2){let t=e.$implicit,a=tC(2);VE(2),Fg(t.name),VE(2),Dl(" ",t.description||"\u2014"," "),VE(2),Fg(t.modelName||"\u2014"),VE(2),Fg(a.mode(t)),VE(3),Vw(a.deletion.confirmingId()!==t.id?11:-1),VE(),Vw(t.id?12:-1);}}function O(n,e){if(n&1&&(Es(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),AC(5,"Name"),hl(),Es(6,"th",10),AC(7,"Description"),hl(),Es(8,"th",10),AC(9,"Model"),hl(),Es(10,"th",10),AC(11,"Execution mode"),hl(),Es(12,"th",10)(13,"span",11),AC(14,"Actions"),hl()()()(),Es(15,"tbody",8),$w(16,J,13,6,"tr",9,B),hl()()()),n&2){let t=tC();VE(16),zw(t.rowFilter.filteredRows());}}var I=class n{router=g(F);destroyRef=g(we);agentConfigController=g(U$1);refresh$=new Tr(void 0);isLoading=$i(true);deletion=k();configs=$i([]);rowFilter=O$1(this.configs,e=>[e.name,e.description,e.modelName,this.mode(e)].filter(Boolean).join(" "));constructor(){this.refresh$.pipe(ga(()=>(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=Dw({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&&(Es(0,"ds-section-header",0)(1,"agentos-table-filter",1),vg("queryChange",function(c){return a.rowFilter.query.set(c)}),hl(),Es(2,"button",2),vg("click",function(){return a.openCreateForm()}),AC(3,"New agent config"),hl()(),Bw(4,j,2,1,"p",3),Bw(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&&(VE(),dg("query",a.rowFilter.query()),VE(3),Vw(a.deletion.error()?4:-1),VE(),Vw(a.isLoading()?5:a.configs().length===0?6:a.rowFilter.filteredRows().length===0?7:8));},dependencies:[at,fn,ko,P,P$1],encapsulation:2})};export{I as PlatformAgentConfigsComponent};
@@ -1 +1 @@
1
- import {e}from'./chunk-C6dIhkYp.js';import {n}from'./chunk-CfgXrte_.js';import {v}from'./chunk-C80imceV.js';import {O}from'./chunk-Bxl-W5rv.js';import {g,W as W$1,t as F,K as we,I as J,$ as $i,U as U$1,ad as ne$1,a1 as ga,aa as br,D as Dw,E as Es,R as vg,c as hl,b as AC,a as Bw,P as dg,d as VE,i as Vw,v as tC,F as Fg,q as $w,z as zw,u as Dl,Q as Qw,n as lg,w as pf,x as hf}from'./main-DZHLOK7A.js';import {z as k,j as O$1,e as at,c as fn,k as ko,l as Fo,P,B as P$1}from'./chunk-zs4CYUQt.js';import'./chunk-BE-UpkfJ.js';var Q=(n,e)=>e.key;function W(n,e){if(n&1&&(Es(0,"p",3),AC(1),hl()),n&2){let t=tC();VE(),Fg(t.deletion.error());}}function X(n,e){n&1&&(Es(0,"p",4),AC(1,"Loading integrations\u2026"),hl());}function Z(n,e){n&1&&(Es(0,"p",5),AC(1,"No integrations available."),hl());}function ee(n,e){n&1&&(Es(0,"p",4),AC(1,"No integrations match the current filter."),hl());}function te(n,e){n&1&&(Es(0,"ds-tag",20),AC(1,"YAML"),hl(),Es(2,"ds-tag",21),AC(3,"Read-only"),hl());}function ne(n,e){if(n&1){let t=Qw();Es(0,"button",22),vg("click",function(){pf(t);let s=tC().$implicit,c=tC(2);return hf(c.view(s))}),AC(1,"View"),hl();}if(n&2){let t=tC().$implicit;lg("aria-label","View "+t.config.name);}}function ie(n,e){if(n&1){let t=Qw();Es(0,"button",22),vg("click",function(){pf(t);let s=tC(3).$implicit,c=tC(2);return hf(c.edit(s))}),AC(1," Edit "),hl();}if(n&2){let t=tC(3).$implicit;lg("aria-label","Edit "+t.config.name);}}function oe(n,e){if(n&1){let t=Qw();Es(0,"button",22),vg("click",function(){pf(t);let s=tC(2).$implicit,c=tC(2);return hf(c.duplicate(s))}),AC(1," Duplicate "),hl(),Bw(2,ie,2,1,"button",19);}if(n&2){let t=tC(2).$implicit;lg("aria-label","Duplicate "+t.config.name),VE(2),Vw(t.canEdit?2:-1);}}function ae(n,e){if(n&1){let t=Qw();Es(0,"agentos-row-delete-action",25),vg("deleteRequested",function(){pf(t);let s=tC(2).$implicit,c=tC(2);return hf(c.deletion.request(s.key))})("deleteConfirmed",function(){pf(t);let s=tC(2).$implicit,c=tC(2);return hf(c.confirmDelete(s))})("deleteCancelled",function(){pf(t);let s=tC(4);return hf(s.deletion.cancel())}),hl();}if(n&2){let t=tC(2).$implicit,a=tC(2);dg("rowKey",t.key)("rowLabel",t.config.name)("state",a.deletion);}}function re(n,e){n&1&&(Es(0,"button",24),AC(1,"Inherited"),hl());}function le(n,e){if(n&1&&(Bw(0,oe,3,2),Bw(1,ae,1,3,"agentos-row-delete-action",23),Bw(2,re,2,0,"button",24)),n&2){let t=tC().$implicit,a=tC(2);Vw(a.deletion.confirmingId()!==t.key?0:-1),VE(),Vw(t.canDelete?1:-1),VE(),Vw(!t.canEdit&&!t.canDelete?2:-1);}}function se(n,e){if(n&1&&(Es(0,"tr",9)(1,"td",12),AC(2),hl(),Es(3,"td",13),AC(4),hl(),Es(5,"td",14)(6,"div",15)(7,"ds-tag",16),AC(8),hl(),Bw(9,te,4,0),hl()(),Es(10,"td",17)(11,"div",18),Bw(12,ne,2,1,"button",19)(13,le,3,3),hl()()()),n&2){let t=e.$implicit;VE(2),Fg(t.config.name),VE(2),Dl(" ",t.config.integrationType," "),VE(3),dg("variant",t.scopeLabel==="Platform"?"neutral":t.scopeLabel==="Personal"?"outline":"accent"),VE(),Dl(" ",t.scopeLabel," "),VE(),Vw(t.source==="FILESYSTEM"?9:-1),VE(3),Vw(t.source==="FILESYSTEM"?12:13);}}function ce(n,e){if(n&1&&(Es(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),AC(5,"Name"),hl(),Es(6,"th",10),AC(7,"Type"),hl(),Es(8,"th",10),AC(9,"Scope"),hl(),Es(10,"th",10)(11,"span",11),AC(12,"Actions"),hl()()()(),Es(13,"tbody",8),$w(14,se,14,6,"tr",9,Q),hl()()()),n&2){let t=tC();VE(14),zw(t.rowFilter.filteredRows());}}var U=class n$1{route=g(W$1);router=g(F);destroyRef=g(we);state=g(O);namespaceRole=g(v);namespaceApi=g(J);namespaceId=this.route.snapshot.params.namespaceId;namespaceName=$i("this namespace");isAdmin=$i(false);isLoading=$i(true);rows=$i([]);deletion=k();rowFilter=O$1(this.rows,e=>[e.config.name,e.config.integrationType,e.scopeLabel,e.source].join(" "));ngOnInit(){this.state.setNamespace(this.namespaceId),this.namespaceId&&this.namespaceApi.getByIdNamespace(this.namespaceId).pipe(U$1(this.destroyRef)).subscribe({next:e=>this.namespaceName.set(e.name)}),this.route.paramMap.pipe(ne$1(e=>e.get("namespaceId")??""),ga(e=>e?this.namespaceRole.isAdminOfNamespace$(e):br(false)),U$1(this.destroyRef)).subscribe(e=>this.isAdmin.set(e)),this.state.vm$.pipe(U$1(this.destroyRef)).subscribe({next:e=>{this.rows.set(this.toRows(e)),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"integrations","new"],{queryParams:{scope:n(this.isAdmin())}});}view(e){e.config.id&&this.router.navigate(["/agentos",this.namespaceId,"integrations",e.config.id,"view"]);}edit(e){!e.canEdit||!e.config.id||this.router.navigate(["/agentos",this.namespaceId,"integrations",e.config.id,"edit"],{queryParams:{scope:e.scope}});}duplicate(e){if(e.source==="FILESYSTEM"||!e.config.id)return;let a=(e.scope==="platform"||e.scope==="namespace")&&!this.isAdmin()?"userOnNs":e.scope;this.router.navigate(["/agentos",this.namespaceId,"integrations","new"],{queryParams:{scope:a,template:e.config.id,templateScope:e.scope}});}confirmDelete(e){!e.canDelete||!e.config.id||this.deletion.execute(e.key,{request$:this.state.delete(e.config.id,e.scope).pipe(U$1(this.destroyRef)),errorMessage:`Deleting "${e.config.name}" failed. Try again.`});}toRows(e){return [...this.mapScope(e.platform,"platform","Platform",true),...this.mapScope(e.namespace,"namespace","Namespace",!this.isAdmin()),...this.mapScope(e.userOnNs,"userOnNs","Personal",false),...this.mapScope(e.userGlobal,"userGlobal","Personal",false)]}mapScope(e$1,t,a,s){return e$1.map((c,z)=>{let h=e(c),w=h==="NEO4J"&&!s;return {key:`${t}:${c.id??z}`,config:c,scope:t,scopeLabel:a,source:h,canEdit:w,canDelete:w}})}static \u0275fac=function(t){return new(t||n$1)};static \u0275cmp=Dw({type:n$1,selectors:[["agentos-integrations-all-scopes"]],decls:9,vars:4,consts:[["title","Integrations",3,"description"],["label","Filter integrations","placeholder","Filter integrations\u2026",3,"queryChange","query"],["dsButton","","variant","primary","type","button",3,"click"],["role","alert",1,"settings-table__error"],["role","status",1,"settings-table__status"],[1,"settings-table__status"],[1,"settings-table__wrap"],["dsTable","","role","table","aria-label","Integrations"],["role","rowgroup"],["role","row"],["role","columnheader"],[1,"sr-only"],["role","cell","data-label","Name","data-title","",1,"settings-table__name"],["role","cell","data-label","Type",1,"settings-table__secondary"],["role","cell","data-label","Scope"],[1,"settings-table__tags"],[3,"variant"],["role","cell","data-label","Actions","data-actions",""],[1,"settings-table__actions"],["type","button"],["variant","neutral"],["variant","outline"],["type","button",3,"click"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"rowKey","rowLabel","state"],["type","button","disabled",""],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"deleteRequested","deleteConfirmed","deleteCancelled","rowKey","rowLabel","state"]],template:function(t,a){t&1&&(Es(0,"ds-section-header",0)(1,"agentos-table-filter",1),vg("queryChange",function(c){return a.rowFilter.query.set(c)}),hl(),Es(2,"button",2),vg("click",function(){return a.openCreateForm()}),AC(3,"New integration"),hl()(),Bw(4,W,2,1,"p",3),Bw(5,X,2,0,"p",4)(6,Z,2,0,"p",5)(7,ee,2,0,"p",4)(8,ce,16,0,"div",6)),t&2&&(dg("description","Integrations for "+a.namespaceName()+", including entries inherited from the platform."),VE(),dg("query",a.rowFilter.query()),VE(3),Vw(a.deletion.error()?4:-1),VE(),Vw(a.isLoading()?5:a.rows().length===0?6:a.rowFilter.filteredRows().length===0?7:8));},dependencies:[at,fn,ko,Fo,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-DSBR7BB1.js';import {O}from'./chunk-BWgH5ifY.js';import {g,W as W$1,t as F,K as we,I as J,$ as $i,U as U$1,ad as ne$1,a1 as ga,aa as br,D as Dw,E as Es,R as vg,c as hl,b as AC,a as Bw,P as dg,d as VE,i as Vw,v as tC,F as Fg,q as $w,z as zw,u as Dl,Q as Qw,n as lg,w as pf,x as hf}from'./main-B5VGWTF5.js';import {z as k,j as O$1,e as at,c as fn,k as ko,l as Fo,P,B as P$1}from'./chunk-C5-HyIli.js';import'./chunk-CErgoGuy.js';var Q=(n,e)=>e.key;function W(n,e){if(n&1&&(Es(0,"p",3),AC(1),hl()),n&2){let t=tC();VE(),Fg(t.deletion.error());}}function X(n,e){n&1&&(Es(0,"p",4),AC(1,"Loading integrations\u2026"),hl());}function Z(n,e){n&1&&(Es(0,"p",5),AC(1,"No integrations available."),hl());}function ee(n,e){n&1&&(Es(0,"p",4),AC(1,"No integrations match the current filter."),hl());}function te(n,e){n&1&&(Es(0,"ds-tag",20),AC(1,"YAML"),hl(),Es(2,"ds-tag",21),AC(3,"Read-only"),hl());}function ne(n,e){if(n&1){let t=Qw();Es(0,"button",22),vg("click",function(){pf(t);let s=tC().$implicit,c=tC(2);return hf(c.view(s))}),AC(1,"View"),hl();}if(n&2){let t=tC().$implicit;lg("aria-label","View "+t.config.name);}}function ie(n,e){if(n&1){let t=Qw();Es(0,"button",22),vg("click",function(){pf(t);let s=tC(3).$implicit,c=tC(2);return hf(c.edit(s))}),AC(1," Edit "),hl();}if(n&2){let t=tC(3).$implicit;lg("aria-label","Edit "+t.config.name);}}function oe(n,e){if(n&1){let t=Qw();Es(0,"button",22),vg("click",function(){pf(t);let s=tC(2).$implicit,c=tC(2);return hf(c.duplicate(s))}),AC(1," Duplicate "),hl(),Bw(2,ie,2,1,"button",19);}if(n&2){let t=tC(2).$implicit;lg("aria-label","Duplicate "+t.config.name),VE(2),Vw(t.canEdit?2:-1);}}function ae(n,e){if(n&1){let t=Qw();Es(0,"agentos-row-delete-action",25),vg("deleteRequested",function(){pf(t);let s=tC(2).$implicit,c=tC(2);return hf(c.deletion.request(s.key))})("deleteConfirmed",function(){pf(t);let s=tC(2).$implicit,c=tC(2);return hf(c.confirmDelete(s))})("deleteCancelled",function(){pf(t);let s=tC(4);return hf(s.deletion.cancel())}),hl();}if(n&2){let t=tC(2).$implicit,a=tC(2);dg("rowKey",t.key)("rowLabel",t.config.name)("state",a.deletion);}}function re(n,e){n&1&&(Es(0,"button",24),AC(1,"Inherited"),hl());}function le(n,e){if(n&1&&(Bw(0,oe,3,2),Bw(1,ae,1,3,"agentos-row-delete-action",23),Bw(2,re,2,0,"button",24)),n&2){let t=tC().$implicit,a=tC(2);Vw(a.deletion.confirmingId()!==t.key?0:-1),VE(),Vw(t.canDelete?1:-1),VE(),Vw(!t.canEdit&&!t.canDelete?2:-1);}}function se(n,e){if(n&1&&(Es(0,"tr",9)(1,"td",12),AC(2),hl(),Es(3,"td",13),AC(4),hl(),Es(5,"td",14)(6,"div",15)(7,"ds-tag",16),AC(8),hl(),Bw(9,te,4,0),hl()(),Es(10,"td",17)(11,"div",18),Bw(12,ne,2,1,"button",19)(13,le,3,3),hl()()()),n&2){let t=e.$implicit;VE(2),Fg(t.config.name),VE(2),Dl(" ",t.config.integrationType," "),VE(3),dg("variant",t.scopeLabel==="Platform"?"neutral":t.scopeLabel==="Personal"?"outline":"accent"),VE(),Dl(" ",t.scopeLabel," "),VE(),Vw(t.source==="FILESYSTEM"?9:-1),VE(3),Vw(t.source==="FILESYSTEM"?12:13);}}function ce(n,e){if(n&1&&(Es(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),AC(5,"Name"),hl(),Es(6,"th",10),AC(7,"Type"),hl(),Es(8,"th",10),AC(9,"Scope"),hl(),Es(10,"th",10)(11,"span",11),AC(12,"Actions"),hl()()()(),Es(13,"tbody",8),$w(14,se,14,6,"tr",9,Q),hl()()()),n&2){let t=tC();VE(14),zw(t.rowFilter.filteredRows());}}var U=class n$1{route=g(W$1);router=g(F);destroyRef=g(we);state=g(O);namespaceRole=g(v);namespaceApi=g(J);namespaceId=this.route.snapshot.params.namespaceId;namespaceName=$i("this namespace");isAdmin=$i(false);isLoading=$i(true);rows=$i([]);deletion=k();rowFilter=O$1(this.rows,e=>[e.config.name,e.config.integrationType,e.scopeLabel,e.source].join(" "));ngOnInit(){this.state.setNamespace(this.namespaceId),this.namespaceId&&this.namespaceApi.getByIdNamespace(this.namespaceId).pipe(U$1(this.destroyRef)).subscribe({next:e=>this.namespaceName.set(e.name)}),this.route.paramMap.pipe(ne$1(e=>e.get("namespaceId")??""),ga(e=>e?this.namespaceRole.isAdminOfNamespace$(e):br(false)),U$1(this.destroyRef)).subscribe(e=>this.isAdmin.set(e)),this.state.vm$.pipe(U$1(this.destroyRef)).subscribe({next:e=>{this.rows.set(this.toRows(e)),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"integrations","new"],{queryParams:{scope:n(this.isAdmin())}});}view(e){e.config.id&&this.router.navigate(["/agentos",this.namespaceId,"integrations",e.config.id,"view"]);}edit(e){!e.canEdit||!e.config.id||this.router.navigate(["/agentos",this.namespaceId,"integrations",e.config.id,"edit"],{queryParams:{scope:e.scope}});}duplicate(e){if(e.source==="FILESYSTEM"||!e.config.id)return;let a=(e.scope==="platform"||e.scope==="namespace")&&!this.isAdmin()?"userOnNs":e.scope;this.router.navigate(["/agentos",this.namespaceId,"integrations","new"],{queryParams:{scope:a,template:e.config.id,templateScope:e.scope}});}confirmDelete(e){!e.canDelete||!e.config.id||this.deletion.execute(e.key,{request$:this.state.delete(e.config.id,e.scope).pipe(U$1(this.destroyRef)),errorMessage:`Deleting "${e.config.name}" failed. Try again.`});}toRows(e){return [...this.mapScope(e.platform,"platform","Platform",true),...this.mapScope(e.namespace,"namespace","Namespace",!this.isAdmin()),...this.mapScope(e.userOnNs,"userOnNs","Personal",false),...this.mapScope(e.userGlobal,"userGlobal","Personal",false)]}mapScope(e$1,t,a,s){return e$1.map((c,z)=>{let h=e(c),w=h==="NEO4J"&&!s;return {key:`${t}:${c.id??z}`,config:c,scope:t,scopeLabel:a,source:h,canEdit:w,canDelete:w}})}static \u0275fac=function(t){return new(t||n$1)};static \u0275cmp=Dw({type:n$1,selectors:[["agentos-integrations-all-scopes"]],decls:9,vars:4,consts:[["title","Integrations",3,"description"],["label","Filter integrations","placeholder","Filter integrations\u2026",3,"queryChange","query"],["dsButton","","variant","primary","type","button",3,"click"],["role","alert",1,"settings-table__error"],["role","status",1,"settings-table__status"],[1,"settings-table__status"],[1,"settings-table__wrap"],["dsTable","","role","table","aria-label","Integrations"],["role","rowgroup"],["role","row"],["role","columnheader"],[1,"sr-only"],["role","cell","data-label","Name","data-title","",1,"settings-table__name"],["role","cell","data-label","Type",1,"settings-table__secondary"],["role","cell","data-label","Scope"],[1,"settings-table__tags"],[3,"variant"],["role","cell","data-label","Actions","data-actions",""],[1,"settings-table__actions"],["type","button"],["variant","neutral"],["variant","outline"],["type","button",3,"click"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"rowKey","rowLabel","state"],["type","button","disabled",""],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"deleteRequested","deleteConfirmed","deleteCancelled","rowKey","rowLabel","state"]],template:function(t,a){t&1&&(Es(0,"ds-section-header",0)(1,"agentos-table-filter",1),vg("queryChange",function(c){return a.rowFilter.query.set(c)}),hl(),Es(2,"button",2),vg("click",function(){return a.openCreateForm()}),AC(3,"New integration"),hl()(),Bw(4,W,2,1,"p",3),Bw(5,X,2,0,"p",4)(6,Z,2,0,"p",5)(7,ee,2,0,"p",4)(8,ce,16,0,"div",6)),t&2&&(dg("description","Integrations for "+a.namespaceName()+", including entries inherited from the platform."),VE(),dg("query",a.rowFilter.query()),VE(3),Vw(a.deletion.error()?4:-1),VE(),Vw(a.isLoading()?5:a.rows().length===0?6:a.rowFilter.filteredRows().length===0?7:8));},dependencies:[at,fn,ko,Fo,P,P$1],encapsulation:2})};export{U as IntegrationsAllScopesComponent};
@@ -1 +1 @@
1
- import {c}from'./chunk-7p42eTQE.js';import {z as k,j as O$1,e as at,c as fn,k as ko,l as Fo,P,B as P$1}from'./chunk-zs4CYUQt.js';import {g,t as F,K as we,$ as $i,U as U$1,ai as ke,al as We,D as Dw,E as Es,R as vg,c as hl,b as AC,a as Bw,d as VE,P as dg,i as Vw,v as tC,F as Fg,q as $w,z as zw,Q as Qw,w as pf,x as hf,n as lg}from'./main-DZHLOK7A.js';var M=(n,t)=>t.id??t.name;function U(n,t){if(n&1&&(Es(0,"p",3),AC(1),hl()),n&2){let e=tC();VE(),Fg(e.deletion.error());}}function B(n,t){n&1&&(Es(0,"p",4),AC(1,"Loading scheduled prompts\u2026"),hl());}function j(n,t){n&1&&(Es(0,"p",5),AC(1,"No platform scheduled prompts defined yet."),hl());}function W(n,t){n&1&&(Es(0,"p",4),AC(1,"No scheduled prompts match the current filter."),hl());}function H(n,t){if(n&1&&(Es(0,"span",14),AC(1),hl()),n&2){let e=tC().$implicit;VE(),Fg(e.description);}}function O(n,t){if(n&1){let e=Qw();Es(0,"button",21),vg("click",function(){pf(e);let s=tC().$implicit,c=tC(2);return hf(c.toggle(s))}),AC(1),hl(),Es(2,"button",21),vg("click",function(){pf(e);let s=tC().$implicit,c=tC(2);return hf(c.edit(s))}),AC(3,"Edit"),hl();}if(n&2){let e=tC().$implicit;VE(),Fg(e.enabled?"Disable":"Enable"),VE(),lg("aria-label","Edit "+e.name);}}function Y(n,t){if(n&1){let e=Qw();Es(0,"agentos-row-delete-action",22),vg("deleteRequested",function(){pf(e);let s=tC().$implicit,c=tC(2);return hf(c.deletion.request(s.id))})("deleteConfirmed",function(){pf(e);let s=tC().$implicit,c=tC(2);return hf(c.confirmDelete(s))})("deleteCancelled",function(){pf(e);let s=tC(3);return hf(s.deletion.cancel())}),hl();}if(n&2){let e=tC().$implicit,i=tC(2);dg("rowKey",e.id)("rowLabel",e.name)("state",i.deletion);}}function z(n,t){if(n&1&&(Es(0,"tr",9)(1,"td",12)(2,"span",13),AC(3),hl(),Bw(4,H,2,1,"span",14),hl(),Es(5,"td",15),AC(6),hl(),Es(7,"td",16)(8,"ds-tag",17),AC(9),hl()(),Es(10,"td",18)(11,"div",19),Bw(12,O,4,2),Bw(13,Y,1,3,"agentos-row-delete-action",20),hl()()()),n&2){let e=t.$implicit,i=tC(2);VE(3),Fg(e.name),VE(),Vw(e.description?4:-1),VE(2),Fg(i.scheduleLabel(e)),VE(2),dg("variant",e.enabled?"accent":"outline"),VE(),Fg(e.enabled?"Enabled":"Disabled"),VE(3),Vw(i.deletion.confirmingId()!==e.id?12:-1),VE(),Vw(e.id?13:-1);}}function G(n,t){if(n&1&&(Es(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),AC(5,"Name"),hl(),Es(6,"th",10),AC(7,"Schedule"),hl(),Es(8,"th",10),AC(9,"Status"),hl(),Es(10,"th",10)(11,"span",11),AC(12,"Actions"),hl()()()(),Es(13,"tbody",8),$w(14,z,14,7,"tr",9,M),hl()()()),n&2){let e=tC();VE(14),zw(e.rowFilter.filteredRows());}}var A=class n{router=g(F);destroyRef=g(we);state=g(c);prompts=$i([]);isLoading=$i(true);deletion=k();rowFilter=O$1(this.prompts,t=>[t.name,t.description,this.scheduleLabel(t),t.enabled?"Enabled":"Disabled"].filter(Boolean).join(" "));constructor(){this.state.listPlatform().pipe(U$1(this.destroyRef)).subscribe({next:t=>{this.prompts.set(t),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}scheduleLabel(t){let{recurrence:e}=t,i=e.unit===ke.WEEK?"week":"month",s=e.unit===ke.WEEK&&e.days?.length?` (${e.days.map(c=>We[c]??c).join(", ")})`:"";return `Every ${i}${s} at ${e.timeUtc} UTC`}openCreateForm(){this.router.navigate(["/agentos","admin","scheduled-prompts","new"]);}edit(t){t.id&&this.router.navigate(["/agentos","admin","scheduled-prompts",t.id,"edit"]);}toggle(t){(t.enabled?this.state.disable(t.id??""):this.state.enable(t.id??"")).pipe(U$1(this.destroyRef)).subscribe(i=>this.patchPrompt(i));}confirmDelete(t){if(!t.id)return;let e=t.id;this.deletion.execute(e,{request$:this.state.delete(e).pipe(U$1(this.destroyRef)),onSuccess:()=>this.prompts.update(i=>i.filter(s=>s.id!==e)),errorMessage:`Deleting "${t.name}" failed. Try again.`});}patchPrompt(t){this.prompts.update(e=>e.map(i=>i.id===t.id?t:i));}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Dw({type:n,selectors:[["agentos-platform-scheduled-prompts"]],decls:9,vars:3,consts:[["title","Platform scheduled prompts","description","Scheduled prompts shared across every namespace."],["label","Filter scheduled prompts","placeholder","Filter scheduled prompts\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 scheduled prompts"],["role","rowgroup"],["role","row"],["role","columnheader"],[1,"sr-only"],["role","cell","data-label","Name","data-title",""],[1,"settings-table__name","settings-table__stacked"],[1,"settings-table__secondary","settings-table__stacked"],["role","cell","data-label","Schedule"],["role","cell","data-label","Status"],[3,"variant"],["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(e,i){e&1&&(Es(0,"ds-section-header",0)(1,"agentos-table-filter",1),vg("queryChange",function(c){return i.rowFilter.query.set(c)}),hl(),Es(2,"button",2),vg("click",function(){return i.openCreateForm()}),AC(3,"New scheduled prompt"),hl()(),Bw(4,U,2,1,"p",3),Bw(5,B,2,0,"p",4)(6,j,2,0,"p",5)(7,W,2,0,"p",4)(8,G,16,0,"div",6)),e&2&&(VE(),dg("query",i.rowFilter.query()),VE(3),Vw(i.deletion.error()?4:-1),VE(),Vw(i.isLoading()?5:i.prompts().length===0?6:i.rowFilter.filteredRows().length===0?7:8));},dependencies:[at,fn,ko,Fo,P,P$1],encapsulation:2})};export{A as PlatformScheduledPromptsComponent};
1
+ import {c}from'./chunk-Dx3T5h4S.js';import {z as k,j as O$1,e as at,c as fn,k as ko,l as Fo,P,B as P$1}from'./chunk-C5-HyIli.js';import {g,t as F,K as we,$ as $i,U as U$1,ai as ke,al as We,D as Dw,E as Es,R as vg,c as hl,b as AC,a as Bw,d as VE,P as dg,i as Vw,v as tC,F as Fg,q as $w,z as zw,Q as Qw,w as pf,x as hf,n as lg}from'./main-B5VGWTF5.js';var M=(n,t)=>t.id??t.name;function U(n,t){if(n&1&&(Es(0,"p",3),AC(1),hl()),n&2){let e=tC();VE(),Fg(e.deletion.error());}}function B(n,t){n&1&&(Es(0,"p",4),AC(1,"Loading scheduled prompts\u2026"),hl());}function j(n,t){n&1&&(Es(0,"p",5),AC(1,"No platform scheduled prompts defined yet."),hl());}function W(n,t){n&1&&(Es(0,"p",4),AC(1,"No scheduled prompts match the current filter."),hl());}function H(n,t){if(n&1&&(Es(0,"span",14),AC(1),hl()),n&2){let e=tC().$implicit;VE(),Fg(e.description);}}function O(n,t){if(n&1){let e=Qw();Es(0,"button",21),vg("click",function(){pf(e);let s=tC().$implicit,c=tC(2);return hf(c.toggle(s))}),AC(1),hl(),Es(2,"button",21),vg("click",function(){pf(e);let s=tC().$implicit,c=tC(2);return hf(c.edit(s))}),AC(3,"Edit"),hl();}if(n&2){let e=tC().$implicit;VE(),Fg(e.enabled?"Disable":"Enable"),VE(),lg("aria-label","Edit "+e.name);}}function Y(n,t){if(n&1){let e=Qw();Es(0,"agentos-row-delete-action",22),vg("deleteRequested",function(){pf(e);let s=tC().$implicit,c=tC(2);return hf(c.deletion.request(s.id))})("deleteConfirmed",function(){pf(e);let s=tC().$implicit,c=tC(2);return hf(c.confirmDelete(s))})("deleteCancelled",function(){pf(e);let s=tC(3);return hf(s.deletion.cancel())}),hl();}if(n&2){let e=tC().$implicit,i=tC(2);dg("rowKey",e.id)("rowLabel",e.name)("state",i.deletion);}}function z(n,t){if(n&1&&(Es(0,"tr",9)(1,"td",12)(2,"span",13),AC(3),hl(),Bw(4,H,2,1,"span",14),hl(),Es(5,"td",15),AC(6),hl(),Es(7,"td",16)(8,"ds-tag",17),AC(9),hl()(),Es(10,"td",18)(11,"div",19),Bw(12,O,4,2),Bw(13,Y,1,3,"agentos-row-delete-action",20),hl()()()),n&2){let e=t.$implicit,i=tC(2);VE(3),Fg(e.name),VE(),Vw(e.description?4:-1),VE(2),Fg(i.scheduleLabel(e)),VE(2),dg("variant",e.enabled?"accent":"outline"),VE(),Fg(e.enabled?"Enabled":"Disabled"),VE(3),Vw(i.deletion.confirmingId()!==e.id?12:-1),VE(),Vw(e.id?13:-1);}}function G(n,t){if(n&1&&(Es(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),AC(5,"Name"),hl(),Es(6,"th",10),AC(7,"Schedule"),hl(),Es(8,"th",10),AC(9,"Status"),hl(),Es(10,"th",10)(11,"span",11),AC(12,"Actions"),hl()()()(),Es(13,"tbody",8),$w(14,z,14,7,"tr",9,M),hl()()()),n&2){let e=tC();VE(14),zw(e.rowFilter.filteredRows());}}var A=class n{router=g(F);destroyRef=g(we);state=g(c);prompts=$i([]);isLoading=$i(true);deletion=k();rowFilter=O$1(this.prompts,t=>[t.name,t.description,this.scheduleLabel(t),t.enabled?"Enabled":"Disabled"].filter(Boolean).join(" "));constructor(){this.state.listPlatform().pipe(U$1(this.destroyRef)).subscribe({next:t=>{this.prompts.set(t),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}scheduleLabel(t){let{recurrence:e}=t,i=e.unit===ke.WEEK?"week":"month",s=e.unit===ke.WEEK&&e.days?.length?` (${e.days.map(c=>We[c]??c).join(", ")})`:"";return `Every ${i}${s} at ${e.timeUtc} UTC`}openCreateForm(){this.router.navigate(["/agentos","admin","scheduled-prompts","new"]);}edit(t){t.id&&this.router.navigate(["/agentos","admin","scheduled-prompts",t.id,"edit"]);}toggle(t){(t.enabled?this.state.disable(t.id??""):this.state.enable(t.id??"")).pipe(U$1(this.destroyRef)).subscribe(i=>this.patchPrompt(i));}confirmDelete(t){if(!t.id)return;let e=t.id;this.deletion.execute(e,{request$:this.state.delete(e).pipe(U$1(this.destroyRef)),onSuccess:()=>this.prompts.update(i=>i.filter(s=>s.id!==e)),errorMessage:`Deleting "${t.name}" failed. Try again.`});}patchPrompt(t){this.prompts.update(e=>e.map(i=>i.id===t.id?t:i));}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Dw({type:n,selectors:[["agentos-platform-scheduled-prompts"]],decls:9,vars:3,consts:[["title","Platform scheduled prompts","description","Scheduled prompts shared across every namespace."],["label","Filter scheduled prompts","placeholder","Filter scheduled prompts\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 scheduled prompts"],["role","rowgroup"],["role","row"],["role","columnheader"],[1,"sr-only"],["role","cell","data-label","Name","data-title",""],[1,"settings-table__name","settings-table__stacked"],[1,"settings-table__secondary","settings-table__stacked"],["role","cell","data-label","Schedule"],["role","cell","data-label","Status"],[3,"variant"],["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(e,i){e&1&&(Es(0,"ds-section-header",0)(1,"agentos-table-filter",1),vg("queryChange",function(c){return i.rowFilter.query.set(c)}),hl(),Es(2,"button",2),vg("click",function(){return i.openCreateForm()}),AC(3,"New scheduled prompt"),hl()(),Bw(4,U,2,1,"p",3),Bw(5,B,2,0,"p",4)(6,j,2,0,"p",5)(7,W,2,0,"p",4)(8,G,16,0,"div",6)),e&2&&(VE(),dg("query",i.rowFilter.query()),VE(3),Vw(i.deletion.error()?4:-1),VE(),Vw(i.isLoading()?5:i.prompts().length===0?6:i.rowFilter.filteredRows().length===0?7:8));},dependencies:[at,fn,ko,Fo,P,P$1],encapsulation:2})};export{A as PlatformScheduledPromptsComponent};