@whoz-oss/coday-client 0.0.0-workstream-forge.261 → 0.0.0-workstream-forge.264

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 (63) hide show
  1. package/browser/{chunk-ClmH7wru.js → chunk-5l4dJKzj.js} +1 -1
  2. package/browser/chunk-6G_HDlLt.js +1 -0
  3. package/browser/{chunk-DVnreUZp.js → chunk-8ZA-dXSc.js} +1 -1
  4. package/browser/{chunk-DyMrL6Ee.js → chunk-B1-Po7IP.js} +1 -1
  5. package/browser/{chunk-BEGeHvbU.js → chunk-B1ETqMnn.js} +1 -1
  6. package/browser/{chunk-BByf0AaZ.js → chunk-B6ucC9JA.js} +1 -1
  7. package/browser/{chunk-CWxtFbYp.js → chunk-B8yw58sL.js} +1 -1
  8. package/browser/{chunk-BKhlmnMI.js → chunk-B9m_Pv-N.js} +1 -1
  9. package/browser/chunk-BAFDJC7n.js +1 -0
  10. package/browser/chunk-BCtLUKA1.js +1 -0
  11. package/browser/{chunk-DLuLiHuX.js → chunk-BEGiDML0.js} +1 -1
  12. package/browser/{chunk-C6WfP1id.js → chunk-BItNUZzz.js} +1 -1
  13. package/browser/chunk-BMgJXfSE.js +1 -0
  14. package/browser/{chunk-3LrWBzrF.js → chunk-BUdZ5OqC.js} +1 -1
  15. package/browser/{chunk-C4XRMKqd.js → chunk-BVY2wOIp.js} +1 -1
  16. package/browser/chunk-BeAWBIRs.js +671 -0
  17. package/browser/{chunk-Bxl-W5rv.js → chunk-BeGVJrPy.js} +1 -1
  18. package/browser/chunk-BfJl60vA.js +1 -0
  19. package/browser/{chunk-DI1Jsft5.js → chunk-BkRwWFjx.js} +1 -1
  20. package/browser/{chunk-CmNMnl1X.js → chunk-BoLw7dqx.js} +1 -1
  21. package/browser/{chunk-p_4THMZn.js → chunk-BzTXrMsf.js} +1 -1
  22. package/browser/{chunk-DQ6_qIZF.js → chunk-C1mIsJc9.js} +1 -1
  23. package/browser/{chunk-BJ-aqn_T.js → chunk-C3fz6Nhs.js} +1 -1
  24. package/browser/{chunk-BiY5nHbl.js → chunk-CXhczMHJ.js} +1 -1
  25. package/browser/{chunk-CrljCfTT.js → chunk-CfLZEoOb.js} +1 -1
  26. package/browser/chunk-ChYykPZM.js +1 -0
  27. package/browser/chunk-CkDaEVkZ.js +1 -0
  28. package/browser/chunk-CmjEguYB.js +1 -0
  29. package/browser/chunk-Cq9rgtVx.js +1 -0
  30. package/browser/chunk-CvFTKrrN.js +1 -0
  31. package/browser/{chunk-Cw-HKK2W.js → chunk-D15w64SG.js} +1 -1
  32. package/browser/{chunk-D61AUiEX.js → chunk-D8O-XquS.js} +1 -1
  33. package/browser/chunk-D9cyFDnZ.js +1 -0
  34. package/browser/chunk-DAC1_8mf.js +1 -0
  35. package/browser/{chunk-FMElf1Kh.js → chunk-DA_ON43Y.js} +1 -1
  36. package/browser/{chunk-B4oSnH6q.js → chunk-DSe6H4u5.js} +1 -1
  37. package/browser/{chunk-CbELThsL.js → chunk-DYGNedc1.js} +1 -1
  38. package/browser/{chunk-Cck7m2qM.js → chunk-Db_G9wnV.js} +1 -1
  39. package/browser/{chunk-CjF3kh6X.js → chunk-DxjesQXu.js} +1 -1
  40. package/browser/{chunk-CZ6YsQnn.js → chunk-IMqSwtoo.js} +1 -1
  41. package/browser/{chunk-7p42eTQE.js → chunk-MzRAkbwR.js} +1 -1
  42. package/browser/chunk-Tz-PZzVS.js +1 -0
  43. package/browser/{chunk-CBB_i9zm.js → chunk-Vn-xaj9q.js} +1 -1
  44. package/browser/{chunk-C80imceV.js → chunk-fbDk9ppW.js} +1 -1
  45. package/browser/{chunk-BL3wnbf2.js → chunk-jfM6q-6w.js} +1 -1
  46. package/browser/{chunk-B0YWgYUz.js → chunk-t3EN_XZw.js} +1 -1
  47. package/browser/index.html +1 -1
  48. package/browser/{main-DZHLOK7A.js → main-P6EOYPYG.js} +1 -1
  49. package/package.json +1 -1
  50. package/browser/chunk-BE-UpkfJ.js +0 -1
  51. package/browser/chunk-BXDGxrbm.js +0 -1
  52. package/browser/chunk-BduQv2OD.js +0 -1
  53. package/browser/chunk-C6mk1TXU.js +0 -1
  54. package/browser/chunk-CaSrm-yj.js +0 -1
  55. package/browser/chunk-CsMJN87z.js +0 -1
  56. package/browser/chunk-DARQ9uHM.js +0 -1
  57. package/browser/chunk-DF7k_FKN.js +0 -1
  58. package/browser/chunk-DGm40OPY.js +0 -1
  59. package/browser/chunk-DH3KwJPn.js +0 -1
  60. package/browser/chunk-DWro011L.js +0 -1
  61. package/browser/chunk-DglDAX_u.js +0 -1
  62. package/browser/chunk-Wkqwvdp3.js +0 -1
  63. package/browser/chunk-zs4CYUQt.js +0 -674
@@ -1 +0,0 @@
1
- import {n}from'./chunk-CfgXrte_.js';import {O}from'./chunk-BL3wnbf2.js';import {v}from'./chunk-C80imceV.js';import {g,W as W$1,t as F,K as we,$ as $i,U as U$1,ad as ne,a1 as ga,aa as br,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,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 H=(i,e)=>e.key;function U(i,e){if(i&1&&(Es(0,"p",3),AC(1),hl()),i&2){let t=tC();VE(),Fg(t.deletion.error());}}function z(i,e){i&1&&(Es(0,"p",4),AC(1,"Loading AI providers\u2026"),hl());}function J(i,e){i&1&&(Es(0,"p",5),AC(1,"No AI providers available."),hl());}function Q(i,e){i&1&&(Es(0,"p",4),AC(1,"No AI providers match the current filter."),hl());}function W(i,e){i&1&&(Es(0,"ds-tag",17),AC(1,"Read-only"),hl());}function X(i,e){if(i&1){let t=Qw();Es(0,"button",22),vg("click",function(){pf(t);let d=tC().$implicit,c=tC(2);return hf(c.duplicate(d))}),AC(1," Duplicate "),hl();}if(i&2){let t=tC().$implicit;lg("aria-label","Duplicate "+t.config.name);}}function Y(i,e){if(i&1){let t=Qw();Es(0,"button",22),vg("click",function(){pf(t);let d=tC(2).$implicit,c=tC(2);return hf(c.edit(d))}),AC(1," Edit "),hl();}if(i&2){let t=tC(2).$implicit;lg("aria-label","Edit "+t.config.name);}}function Z(i,e){if(i&1){let t=Qw();Bw(0,Y,2,1,"button",20),Es(1,"agentos-row-delete-action",23),vg("deleteRequested",function(){pf(t);let d=tC().$implicit,c=tC(2);return hf(c.deletion.request(d.key))})("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(i&2){let t=tC().$implicit,r=tC(2);Vw(r.deletion.confirmingId()!==t.key?0:-1),VE(),dg("rowKey",t.key)("rowLabel",t.config.name)("state",r.deletion);}}function ee(i,e){i&1&&(Es(0,"button",21),AC(1,"Inherited"),hl());}function te(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)(6,"div",15)(7,"ds-tag",16),AC(8),hl(),Bw(9,W,2,0,"ds-tag",17),hl()(),Es(10,"td",18)(11,"div",19),Bw(12,X,2,1,"button",20),Bw(13,Z,2,4)(14,ee,2,0,"button",21),hl()()()),i&2){let t=e.$implicit,r=tC(2);VE(2),Fg(t.config.name),VE(2),Fg(t.config.apiType),VE(3),dg("variant",t.scopeLabel==="Platform"?"neutral":t.scopeLabel==="Personal"?"outline":"accent"),VE(),Fg(t.scopeLabel),VE(),Vw(t.canMutate?-1:9),VE(3),Vw(r.deletion.confirmingId()!==t.key?12:-1),VE(),Vw(t.canMutate?13:14);}}function ie(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,"API 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,te,15,7,"tr",9,H),hl()()()),i&2){let t=tC();VE(14),zw(t.rowFilter.filteredRows());}}var G=class i{route=g(W$1);router=g(F);destroyRef=g(we);state=g(O);namespaceRole=g(v);namespaceId=this.route.snapshot.params.namespaceId;isAdmin=$i(false);isLoading=$i(true);rows=$i([]);deletion=k();rowFilter=O$1(this.rows,e=>[e.config.name,e.config.apiType,e.scopeLabel].join(" "));ngOnInit(){this.route.paramMap.pipe(U$1(this.destroyRef)).subscribe(e=>{let t=e.get("namespaceId")??"";t&&t!==this.namespaceId&&(this.namespaceId=t),this.state.setNamespace(t);}),this.route.paramMap.pipe(ne(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,"ai-providers","new"],{queryParams:{scope:n(this.isAdmin())}});}edit(e){!e.canMutate||!e.config.id||this.router.navigate(["/agentos",this.namespaceId,"ai-providers",e.config.id,"edit"],{queryParams:{scope:e.scope}});}confirmDelete(e){!e.canMutate||!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.`});}duplicate(e){if(!e.config.id)return;let t=e.scope==="platform"||e.scope==="namespace"&&!this.isAdmin()?"userOnNs":e.scope;this.router.navigate(["/agentos",this.namespaceId,"ai-providers","new"],{queryParams:{scope:t,template:e.config.id,templateScope:e.scope}});}toRows(e){return [...this.mapScope(e.platform,"platform","Platform",false),...this.mapScope(e.namespace,"namespace","Namespace",this.isAdmin()),...this.mapScope(e.userOnNs,"userOnNs","Personal",true),...this.mapScope(e.userGlobal,"userGlobal","Personal",true)]}mapScope(e,t,r,d){return e.map((c,K)=>({key:`${t}:${c.id??K}`,config:c,scope:t,scopeLabel:r,canMutate:d}))}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=Dw({type:i,selectors:[["agentos-ai-providers-all-scopes"]],decls:9,vars:3,consts:[["title","AI providers","description","AI providers available in this namespace, including inherited platform and personal entries."],["label","Filter AI providers","placeholder","Filter AI providers\u2026",3,"queryChange","query"],["dsButton","","variant","primary","type","button",3,"click"],["role","alert",1,"settings-table__error"],["role","status",1,"settings-table__status"],[1,"settings-table__status"],[1,"settings-table__wrap"],["dsTable","","role","table","aria-label","AI providers"],["role","rowgroup"],["role","row"],["role","columnheader"],[1,"sr-only"],["role","cell","data-label","Name","data-title","",1,"settings-table__name"],["role","cell","data-label","API type",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"],["type","button","disabled",""],["type","button",3,"click"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"deleteRequested","deleteConfirmed","deleteCancelled","rowKey","rowLabel","state"]],template:function(t,r){t&1&&(Es(0,"ds-section-header",0)(1,"agentos-table-filter",1),vg("queryChange",function(c){return r.rowFilter.query.set(c)}),hl(),Es(2,"button",2),vg("click",function(){return r.openCreateForm()}),AC(3,"New AI provider"),hl()(),Bw(4,U,2,1,"p",3),Bw(5,z,2,0,"p",4)(6,J,2,0,"p",5)(7,Q,2,0,"p",4)(8,ie,16,0,"div",6)),t&2&&(VE(),dg("query",r.rowFilter.query()),VE(3),Vw(r.deletion.error()?4:-1),VE(),Vw(r.isLoading()?5:r.rows().length===0?6:r.rowFilter.filteredRows().length===0?7:8));},dependencies:[at,fn,ko,Fo,P,P$1],encapsulation:2})};export{G as AiProvidersAllScopesComponent};
@@ -1 +0,0 @@
1
- import {z as k$1,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,aq as k,ap as F$1,Z as Tr,$ as $i,a1 as ga,at as Cy,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,Q as Qw,w as pf,x as hf,u as Dl,n as lg}from'./main-DZHLOK7A.js';var K=(o,t)=>t.key;function H(o,t){if(o&1&&(Es(0,"p",3),AC(1),hl()),o&2){let e=tC();VE(),Fg(e.deletion.error());}}function U(o,t){o&1&&(Es(0,"p",4),AC(1,"Loading AI models\u2026"),hl());}function z(o,t){o&1&&(Es(0,"p",5),AC(1,"No platform AI models defined yet."),hl());}function G(o,t){o&1&&(Es(0,"p",4),AC(1,"No AI models match the current filter."),hl());}function J(o,t){if(o&1){let e=Qw();Es(0,"button",21),vg("click",function(){pf(e);let r=tC().$implicit,m=tC(2);return hf(m.edit(r))}),AC(1,"Edit"),hl();}if(o&2){let e=tC().$implicit;lg("aria-label","Edit "+e.title);}}function O(o,t){if(o&1){let e=Qw();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),AC(10),hl(),Es(11,"td",17)(12,"div",18),Bw(13,J,2,1,"button",19),Es(14,"agentos-row-delete-action",20),vg("deleteRequested",function(){let r=pf(e).$implicit,m=tC(2);return hf(m.deletion.request(r.key))})("deleteConfirmed",function(){let r=pf(e).$implicit,m=tC(2);return hf(m.confirmDelete(r))})("deleteCancelled",function(){pf(e);let r=tC(2);return hf(r.deletion.cancel())}),hl()()()();}if(o&2){let e=t.$implicit,a=tC(2);VE(2),Fg(e.title),VE(2),Fg(e.providerName),VE(2),Dl(" ",e.model.apiModelName," "),VE(2),Fg(e.model.priority),VE(2),Dl(" ",e.model.reasoningEffort?e.model.reasoningEffort.toLowerCase():"\u2014"," "),VE(3),Vw(a.deletion.confirmingId()!==e.key?13:-1),VE(),dg("rowKey",e.key)("rowLabel",e.title)("state",a.deletion);}}function Q(o,t){if(o&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,"Priority"),hl(),Es(12,"th",10),AC(13,"Reasoning effort"),hl(),Es(14,"th",10)(15,"span",11),AC(16,"Actions"),hl()()()(),Es(17,"tbody",8),$w(18,O,15,9,"tr",9,K),hl()()()),o&2){let e=tC();VE(18),zw(e.rowFilter.filteredRows());}}var j=class o{router=g(F);destroyRef=g(we);aiModelController=g(k);aiProviderController=g(F$1);refresh$=new Tr(void 0);isLoading=$i(true);deletion=k$1();rows=$i([]);rowFilter=O$1(this.rows,t=>[t.title,t.model.apiModelName,t.providerName].filter(Boolean).join(" "));constructor(){this.refresh$.pipe(ga(()=>(this.isLoading.set(true),Cy([this.aiModelController.listPlatformLevelAiModel(),this.aiProviderController.listAiProvider("none")]))),U$1(this.destroyRef)).subscribe({next:([t,e])=>{let a=new Map(e.map(r=>[r.id??"",r.name]));this.rows.set(t.map((r,m)=>({key:r.id??`model:${m}`,model:r,title:r.alias??r.apiModelName,providerName:a.get(r.aiProviderId)??r.aiProviderId}))),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}openCreateForm(){this.router.navigate(["/agentos","admin","ai-models","new"]);}edit(t){t.model.id&&this.router.navigate(["/agentos","admin","ai-models",t.model.id,"edit"]);}confirmDelete(t){t.model.id&&this.deletion.execute(t.key,{request$:this.aiModelController.deleteAiModel(t.model.id).pipe(U$1(this.destroyRef)),onSuccess:()=>this.refresh$.next(),errorMessage:`Deleting "${t.title}" failed. Try again.`});}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=Dw({type:o,selectors:[["agentos-platform-ai-models"]],decls:9,vars:3,consts:[["title","Platform AI models","description","AI models shared across every namespace."],["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","Platform 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","Priority"],["role","cell","data-label","Reasoning effort"],["role","cell","data-label","Actions","data-actions",""],[1,"settings-table__actions"],["type","button"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"deleteRequested","deleteConfirmed","deleteCancelled","rowKey","rowLabel","state"],["type","button",3,"click"]],template:function(e,a){e&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 AI model"),hl()(),Bw(4,H,2,1,"p",3),Bw(5,U,2,0,"p",4)(6,z,2,0,"p",5)(7,G,2,0,"p",4)(8,Q,20,0,"div",6)),e&2&&(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,P,P$1],encapsulation:2})};export{j as PlatformAiModelsComponent};
@@ -1 +0,0 @@
1
- import {O as O$1}from'./chunk-Bxl-W5rv.js';import {g,t as F,K as we,af as G$1,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,Q as Qw,n as lg,w as pf,x as hf}from'./main-DZHLOK7A.js';import {z as k,j as O$2,e as at,c as fn,k as ko,P,B as P$1}from'./chunk-zs4CYUQt.js';import'./chunk-BE-UpkfJ.js';var j=(t,e)=>e.id??e.name;function A(t,e){if(t&1&&(Es(0,"p",3),AC(1),hl()),t&2){let n=tC();VE(),Fg(n.deletion.error());}}function K(t,e){t&1&&(Es(0,"p",4),AC(1,"Loading integrations\u2026"),hl());}function H(t,e){t&1&&(Es(0,"p",5),AC(1,"No platform integrations defined yet."),hl());}function U(t,e){t&1&&(Es(0,"p",4),AC(1,"No integrations match the current filter."),hl());}function z(t,e){if(t&1){let n=Qw();Es(0,"button",18),vg("click",function(){pf(n);let d=tC().$implicit,m=tC(2);return hf(m.edit(d))}),AC(1,"Edit"),hl();}if(t&2){let n=tC().$implicit;lg("aria-label","Edit "+n.name);}}function G(t,e){if(t&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.confirmDelete(d))})("deleteCancelled",function(){pf(n);let d=tC(3);return hf(d.deletion.cancel())}),hl();}if(t&2){let n=tC().$implicit,r=tC(2);dg("rowKey",n.id)("rowLabel",n.name)("state",r.deletion);}}function J(t,e){if(t&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()()()),t&2){let n=e.$implicit,r=tC(2);VE(2),Fg(n.name),VE(2),Fg(n.integrationType),VE(3),Vw(r.deletion.confirmingId()!==n.id?7:-1),VE(),Vw(n.id?8:-1);}}function O(t,e){if(t&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)(9,"span",11),AC(10,"Actions"),hl()()()(),Es(11,"tbody",8),$w(12,J,9,4,"tr",9,j),hl()()()),t&2){let n=tC();VE(12),zw(n.rowFilter.filteredRows());}}var B=class t{router=g(F);destroyRef=g(we);state=g(O$1);integrationConfigController=g(G$1);refresh$=new Tr(void 0);isLoading=$i(true);deletion=k();configs=$i([]);rowFilter=O$2(this.configs,e=>[e.name,e.integrationType].filter(Boolean).join(" "));constructor(){this.refresh$.pipe(ga(()=>(this.isLoading.set(true),this.state.loadPlatformConfigs())),U$1(this.destroyRef)).subscribe({next:e=>{this.configs.set(e),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}openCreateForm(){this.router.navigate(["/agentos","admin","integration-configs","new"]);}edit(e){this.router.navigate(["/agentos","admin","integration-configs",e.id??"","edit"]);}confirmDelete(e){e.id&&this.deletion.execute(e.id,{request$:this.integrationConfigController.deleteIntegrationConfig(e.id).pipe(U$1(this.destroyRef)),onSuccess:()=>this.refresh$.next(),errorMessage:`Deleting "${e.name}" failed. Try again.`});}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Dw({type:t,selectors:[["agentos-platform-integration-configs"]],decls:9,vars:3,consts:[["title","Platform integrations","description","Integration configurations shared across every namespace."],["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","Platform 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","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,r){n&1&&(Es(0,"ds-section-header",0)(1,"agentos-table-filter",1),vg("queryChange",function(m){return r.rowFilter.query.set(m)}),hl(),Es(2,"button",2),vg("click",function(){return r.openCreateForm()}),AC(3,"New integration"),hl()(),Bw(4,A,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",r.rowFilter.query()),VE(3),Vw(r.deletion.error()?4:-1),VE(),Vw(r.isLoading()?5:r.configs().length===0?6:r.rowFilter.filteredRows().length===0?7:8));},dependencies:[at,fn,ko,P,P$1],encapsulation:2})};export{B as PlatformIntegrationConfigsComponent};
@@ -1 +0,0 @@
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 +0,0 @@
1
- import {o}from'./chunk-CjF3kh6X.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,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,w as pf,x as hf,n as lg}from'./main-DZHLOK7A.js';var K=(i,e)=>e.id??e.name;function O(i,e){if(i&1&&(Es(0,"p",3),AC(1),hl()),i&2){let t=tC();VE(),Fg(t.deletion.error());}}function A(i,e){i&1&&(Es(0,"p",4),AC(1,"Loading skills\u2026"),hl());}function H(i,e){i&1&&(Es(0,"p",5),AC(1,"No platform skills defined yet."),hl());}function U(i,e){i&1&&(Es(0,"p",4),AC(1,"No skills match the current filter."),hl());}function z(i,e){i&1&&(Es(0,"ds-tag",15),AC(1,"SKILL.md"),hl());}function G(i,e){if(i&1){let t=Qw();Es(0,"button",21),vg("click",function(){pf(t);let d=tC(2).$implicit,m=tC(2);return hf(m.edit(d))}),AC(1,"Edit"),hl();}if(i&2){let t=tC(2).$implicit;lg("aria-label","Edit "+t.name);}}function J(i,e){if(i&1){let t=Qw();Es(0,"button",21),vg("click",function(){pf(t);let d=tC().$implicit,m=tC(2);return hf(m.inspect(d))}),AC(1,"View"),hl(),Bw(2,G,2,1,"button",22);}if(i&2){let t=tC().$implicit;lg("aria-label","View "+t.name),VE(2),Vw(t.readOnly?-1:2);}}function Q(i,e){if(i&1){let t=Qw();Es(0,"agentos-row-delete-action",23),vg("deleteRequested",function(){pf(t);let d=tC().$implicit,m=tC(2);return hf(m.deletion.request(d.id))})("deleteConfirmed",function(){pf(t);let d=tC().$implicit,m=tC(2);return hf(m.confirmDelete(d))})("deleteCancelled",function(){pf(t);let d=tC(3);return hf(d.deletion.cancel())}),hl();}if(i&2){let t=tC().$implicit,l=tC(2);dg("rowKey",t.id)("rowLabel",t.name)("state",l.deletion);}}function W(i,e){if(i&1&&(Es(0,"tr",9)(1,"td",12)(2,"div",13)(3,"span",14),AC(4),hl(),Bw(5,z,2,0,"ds-tag",15),hl()(),Es(6,"td",16),AC(7),hl(),Es(8,"td",17),AC(9),hl(),Es(10,"td",18)(11,"div",19),Bw(12,J,3,2),Bw(13,Q,1,3,"agentos-row-delete-action",20),hl()()()),i&2){let t=e.$implicit,l=tC(2);VE(4),Fg(t.name),VE(),Vw(t.readOnly?5:-1),VE(2),Dl(" ",t.description||"\u2014"," "),VE(2),Fg(l.resourceCount(t)),VE(3),Vw(l.deletion.confirmingId()!==t.id?12:-1),VE(),Vw(!t.readOnly&&t.id?13:-1);}}function X(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,"Description"),hl(),Es(8,"th",10),AC(9,"Resources"),hl(),Es(10,"th",10)(11,"span",11),AC(12,"Actions"),hl()()()(),Es(13,"tbody",8),$w(14,W,14,6,"tr",9,K),hl()()()),i&2){let t=tC();VE(14),zw(t.rowFilter.filteredRows());}}var B=class i{router=g(F);destroyRef=g(we);skillState=g(o);refresh$=new Tr(void 0);isLoading=$i(true);deletion=k();skills=$i([]);rowFilter=O$1(this.skills,e=>[e.name,e.description].filter(Boolean).join(" "));constructor(){this.refresh$.pipe(ga(()=>(this.isLoading.set(true),this.skillState.listPlatform())),U$1(this.destroyRef)).subscribe({next:e=>{this.skills.set(e),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}resourceCount(e){return Object.keys(e.resources??{}).length}openCreateForm(){this.router.navigate(["/agentos","admin","skills","new"]);}inspect(e){e.id&&this.router.navigate(["/agentos","admin","skills",e.id,"inspect"]);}edit(e){e.id&&this.router.navigate(["/agentos","admin","skills",e.id,"edit"]);}confirmDelete(e){e.id&&this.deletion.execute(e.id,{request$:this.skillState.delete(e.id).pipe(U$1(this.destroyRef)),onSuccess:()=>this.refresh$.next(),errorMessage:t=>t.status===403?`Deleting "${e.name}" requires platform administrator rights.`:`Deleting "${e.name}" failed. Try again.`});}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=Dw({type:i,selectors:[["agentos-platform-skills"]],decls:9,vars:3,consts:[["title","Platform skills","description","Skills shared across every namespace."],["label","Filter skills","placeholder","Filter skills\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 skills"],["role","rowgroup"],["role","row"],["role","columnheader"],[1,"sr-only"],["role","cell","data-label","Name","data-title",""],[1,"settings-table__tags"],[1,"settings-table__name"],["variant","neutral"],["role","cell","data-label","Description",1,"settings-table__secondary"],["role","cell","data-label","Resources"],["role","cell","data-label","Actions","data-actions",""],[1,"settings-table__actions"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"rowKey","rowLabel","state"],["type","button",3,"click"],["type","button"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"deleteRequested","deleteConfirmed","deleteCancelled","rowKey","rowLabel","state"]],template:function(t,l){t&1&&(Es(0,"ds-section-header",0)(1,"agentos-table-filter",1),vg("queryChange",function(m){return l.rowFilter.query.set(m)}),hl(),Es(2,"button",2),vg("click",function(){return l.openCreateForm()}),AC(3,"New skill"),hl()(),Bw(4,O,2,1,"p",3),Bw(5,A,2,0,"p",4)(6,H,2,0,"p",5)(7,U,2,0,"p",4)(8,X,16,0,"div",6)),t&2&&(VE(),dg("query",l.rowFilter.query()),VE(3),Vw(l.deletion.error()?4:-1),VE(),Vw(l.isLoading()?5:l.skills().length===0?6:l.rowFilter.filteredRows().length===0?7:8));},dependencies:[at,fn,ko,Fo,P,P$1],encapsulation:2})};export{B as PlatformSkillsComponent};
@@ -1 +0,0 @@
1
- import {E as m,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 as W$1,t as F,K as we,Z as Tr,$ as $i,a1 as ga,ac as by,a2 as ha,aa as br,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,w as pf,x as hf,n as lg}from'./main-DZHLOK7A.js';var U=(n,e)=>e.key;function z(n,e){if(n&1&&(Es(0,"p",3),AC(1),hl()),n&2){let t=tC();VE(),Fg(t.deletion.error());}}function G(n,e){n&1&&(Es(0,"p",4),AC(1,"Loading prompts\u2026"),hl());}function O(n,e){n&1&&(Es(0,"p",5),AC(1,"No prompts available."),hl());}function Q(n,e){n&1&&(Es(0,"p",4),AC(1,"No prompts match the current filter."),hl());}function W(n,e){n&1&&(Es(0,"ds-tag",17),AC(1,"Read-only"),hl());}function X(n,e){if(n&1){let t=Qw();Es(0,"button",23),vg("click",function(){pf(t);let l=tC(2).$implicit,m=tC(2);return hf(m.edit(l))}),AC(1," Edit "),hl();}if(n&2){let t=tC(2).$implicit;lg("aria-label","Edit "+t.prompt.name);}}function Y(n,e){if(n&1){let t=Qw();Bw(0,X,2,1,"button",21),Es(1,"agentos-row-delete-action",22),vg("deleteRequested",function(){pf(t);let l=tC().$implicit,m=tC(2);return hf(m.deletion.request(l.key))})("deleteConfirmed",function(){pf(t);let l=tC().$implicit,m=tC(2);return hf(m.confirmDelete(l))})("deleteCancelled",function(){pf(t);let l=tC(3);return hf(l.deletion.cancel())}),hl();}if(n&2){let t=tC().$implicit,i=tC(2);Vw(i.deletion.confirmingId()!==t.key?0:-1),VE(),dg("rowKey",t.key)("rowLabel",t.prompt.name)("state",i.deletion);}}function Z(n,e){n&1&&(Es(0,"button",20),AC(1,"Inherited"),hl());}function ee(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,W,2,0,"ds-tag",17),hl()(),Es(10,"td",18)(11,"div",19),Bw(12,Y,2,4)(13,Z,2,0,"button",20),hl()()()),n&2){let t=e.$implicit;VE(2),Fg(t.prompt.name),VE(2),Dl(" ",t.prompt.description||"\u2014"," "),VE(3),dg("variant",t.scope==="platform"?"neutral":"accent"),VE(),Fg(t.scope==="platform"?"Platform":"Namespace"),VE(),Vw(t.scope==="platform"?9:-1),VE(3),Vw(t.scope==="namespace"?12:13);}}function te(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,"Scope"),hl(),Es(10,"th",10)(11,"span",11),AC(12,"Actions"),hl()()()(),Es(13,"tbody",8),$w(14,ee,14,6,"tr",9,U),hl()()()),n&2){let t=tC();VE(14),zw(t.rowFilter.filteredRows());}}var J=class n{route=g(W$1);router=g(F);destroyRef=g(we);promptState=g(m);namespaceId=this.route.snapshot.params.namespaceId;refresh$=new Tr(void 0);isLoading=$i(true);deletion=k();rows=$i([]);rowFilter=O$1(this.rows,e=>[e.prompt.name,e.prompt.description,e.scope].filter(Boolean).join(" "));allPrompts$=this.refresh$.pipe(ga(()=>(this.isLoading.set(true),by({platform:this.promptState.listPlatform().pipe(ha(()=>br([]))),namespace:this.promptState.listByNamespace(this.namespaceId)}))));constructor(){this.allPrompts$.pipe(U$1(this.destroyRef)).subscribe({next:({platform:e,namespace:t})=>{this.rows.set([...e.map((i,l)=>({key:`platform:${i.id??l}`,prompt:i,scope:"platform"})),...t.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,"prompts","new"]);}edit(e){e.scope==="platform"||!e.prompt.id||this.router.navigate(["/agentos",this.namespaceId,"prompts",e.prompt.id,"edit"]);}confirmDelete(e){e.scope==="platform"||!e.prompt.id||this.deletion.execute(e.key,{request$:this.promptState.delete(e.prompt.id).pipe(U$1(this.destroyRef)),onSuccess:()=>this.refresh$.next(),errorMessage:`Deleting "${e.prompt.name}" failed. Try again.`});}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=Dw({type:n,selectors:[["agentos-namespace-prompts"]],decls:9,vars:3,consts:[["title","Prompts","description","Prompts available in this namespace, including prompts inherited from the platform."],["label","Filter prompts","placeholder","Filter 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","Prompts"],["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","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,i){t&1&&(Es(0,"ds-section-header",0)(1,"agentos-table-filter",1),vg("queryChange",function(m){return i.rowFilter.query.set(m)}),hl(),Es(2,"button",2),vg("click",function(){return i.openCreateForm()}),AC(3,"New prompt"),hl()(),Bw(4,z,2,1,"p",3),Bw(5,G,2,0,"p",4)(6,O,2,0,"p",5)(7,Q,2,0,"p",4)(8,te,16,0,"div",6)),t&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{J as NamespacePromptsComponent};
@@ -1 +0,0 @@
1
- import {j as O$1,e as at,c as fn,k as ko,l as Fo,P}from'./chunk-zs4CYUQt.js';import {g,K as we,Y as W,Z as Tr,$ as $i,o as oT,a0 as Be,a1 as ga,a2 as ha,a3 as rn,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,q as $w,v as tC,z as zw,u as Dl,F as Fg}from'./main-DZHLOK7A.js';function q(e){if(e.sensitive)return e.configured?{status:"hidden",text:"set (hidden)"}:{status:"unset",text:"not set"};if(!e.configured)return {status:"unset",text:"unset"};let t=e.value??"",i=t.trim().toLowerCase();return i==="true"?{status:"on",text:"on"}:i==="false"?{status:"off",text:"off"}:{status:"value",text:t===""?"(empty)":t}}var U=(e,t)=>t.key;function B(e,t){e&1&&(Es(0,"p",10),AC(1,"Loading the configuration failed. Try refreshing."),hl());}function V(e,t){e&1&&(Es(0,"p",11),AC(1,"Loading configuration\u2026"),hl());}function j(e,t){e&1&&(Es(0,"p",12),AC(1,"The service reported no settings."),hl());}function O(e,t){e&1&&(Es(0,"p",11),AC(1,"No settings match the current filters."),hl());}function Y(e,t){e&1&&(Es(0,"ds-tag",22),AC(1,"on"),hl());}function z(e,t){e&1&&(Es(0,"ds-tag",20),AC(1,"off"),hl());}function H(e,t){if(e&1&&(Es(0,"ds-tag",20),AC(1),hl()),e&2){let i=tC().$implicit;VE(),Fg(i.display.text);}}function G(e,t){if(e&1&&(Es(0,"ds-tag",23),AC(1),hl()),e&2){let i=tC().$implicit;VE(),Fg(i.display.text);}}function J(e,t){if(e&1&&(Es(0,"span",24),AC(1),hl()),e&2){let i=tC().$implicit;VE(),Fg(i.display.text);}}function K(e,t){if(e&1&&(Es(0,"tr",16)(1,"td",18),AC(2),hl(),Es(3,"td",19)(4,"ds-tag",20),AC(5),hl()(),Es(6,"td",21),Bw(7,Y,2,0,"ds-tag",22)(8,z,2,0,"ds-tag",20)(9,H,2,1,"ds-tag",20)(10,G,2,1,"ds-tag",23)(11,J,2,1,"span",24),hl(),Es(12,"td",25),AC(13),hl()()),e&2){let i,a=t.$implicit,m=tC(2);VE(2),Dl(" ",a.entry.key," "),VE(3),Dl(" ",a.entry.source===m.Source.ENVIRONMENT?"Environment":"Property"," "),VE(2),Vw((i=a.display.status)==="on"?7:i==="off"?8:i==="hidden"?9:i==="unset"?10:11),VE(6),Dl(" ",a.entry.description||"\u2014"," ");}}function Q(e,t){if(e&1&&(Es(0,"div",13)(1,"table",14)(2,"thead",15)(3,"tr",16)(4,"th",17),AC(5,"Setting"),hl(),Es(6,"th",17),AC(7,"Source"),hl(),Es(8,"th",17),AC(9,"Value"),hl(),Es(10,"th",17),AC(11,"Description"),hl()()(),Es(12,"tbody",15),$w(13,K,14,4,"tr",16,U),hl()()()),e&2){let i=tC();VE(13),zw(i.visibleRows());}}var A=class e{destroyRef=g(we);configurationController=g(W);refresh$=new Tr(void 0);isLoading=$i(true);loadError=$i(false);rows=$i([]);source=$i("ALL");status=$i("ALL");rowFilter=O$1(this.rows,t=>[t.entry.key,t.entry.description,t.entry.value].filter(Boolean).join(" "));visibleRows=oT(()=>this.rowFilter.filteredRows().filter(t=>{let i=this.source(),a=this.status();return i!=="ALL"&&t.entry.source!==i?false:a==="SET"?t.entry.configured:a==="UNSET"?!t.entry.configured:true}));Source=Be;constructor(){this.refresh$.pipe(ga(()=>(this.isLoading.set(true),this.loadError.set(false),this.configurationController.listEffectiveConfiguration().pipe(ha(()=>(this.loadError.set(true),this.isLoading.set(false),rn))))),U$1(this.destroyRef)).subscribe(t=>{this.rows.set(t.map(i=>({key:`${i.source}:${i.key}`,entry:i,display:q(i)}))),this.isLoading.set(false);});}reload(){this.refresh$.next();}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=Dw({type:e,selectors:[["agentos-platform-configuration"]],decls:24,vars:6,consts:[["title","Configuration","description","Effective environment variables and Spring properties of the running service. Secrets are never shown, only whether they are set."],["label","Filter settings","placeholder","Filter settings\u2026",3,"queryChange","query"],["dsButton","","type","button",3,"click"],[1,"settings-table__toolbar"],["aria-label","Filter by source",1,"ds-control",2,"width","auto",3,"change","value"],["value","ALL"],[3,"value"],["aria-label","Filter by state",1,"ds-control",2,"width","auto",3,"change","value"],["value","SET"],["value","UNSET"],["role","alert",1,"settings-table__error"],["role","status",1,"settings-table__status"],[1,"settings-table__status"],[1,"settings-table__wrap"],["dsTable","","role","table","aria-label","Effective configuration"],["role","rowgroup"],["role","row"],["role","columnheader"],["role","cell","data-label","Setting","data-title","",1,"settings-table__name","ds-mono"],["role","cell","data-label","Source"],["variant","neutral"],["role","cell","data-label","Value"],["variant","accent"],["variant","outline"],[1,"ds-mono"],["role","cell","data-label","Description",1,"settings-table__secondary"]],template:function(i,a){i&1&&(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.reload()}),AC(3,"Refresh"),hl()(),Es(4,"div",3)(5,"select",4),vg("change",function(c){return a.source.set(c.target.value)}),Es(6,"option",5),AC(7,"All sources"),hl(),Es(8,"option",6),AC(9,"Environment variables"),hl(),Es(10,"option",6),AC(11,"Spring properties"),hl()(),Es(12,"select",7),vg("change",function(c){return a.status.set(c.target.value)}),Es(13,"option",5),AC(14,"Set and unset"),hl(),Es(15,"option",8),AC(16,"Set only"),hl(),Es(17,"option",9),AC(18,"Unset only"),hl()()(),Bw(19,B,2,0,"p",10)(20,V,2,0,"p",11)(21,j,2,0,"p",12)(22,O,2,0,"p",11)(23,Q,15,0,"div",13)),i&2&&(VE(),dg("query",a.rowFilter.query()),VE(4),dg("value",a.source()),VE(3),dg("value",a.Source.ENVIRONMENT),VE(2),dg("value",a.Source.PROPERTY),VE(2),dg("value",a.status()),VE(7),Vw(a.loadError()?19:a.isLoading()?20:a.rows().length===0?21:a.visibleRows().length===0?22:23));},dependencies:[at,fn,ko,Fo,P],encapsulation:2})};export{A as PlatformConfigurationComponent};
@@ -1 +0,0 @@
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 +0,0 @@
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 +0,0 @@
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 +0,0 @@
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 +0,0 @@
1
- import {E as m,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,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';var j=(t,e)=>e.id??e.name;function A(t,e){if(t&1&&(Es(0,"p",3),AC(1),hl()),t&2){let n=tC();VE(),Fg(n.deletion.error());}}function K(t,e){t&1&&(Es(0,"p",4),AC(1,"Loading prompts\u2026"),hl());}function H(t,e){t&1&&(Es(0,"p",5),AC(1,"No platform prompts defined yet."),hl());}function U(t,e){t&1&&(Es(0,"p",4),AC(1,"No prompts match the current filter."),hl());}function z(t,e){if(t&1){let n=Qw();Es(0,"button",18),vg("click",function(){pf(n);let m=tC().$implicit,p=tC(2);return hf(p.edit(m))}),AC(1,"Edit"),hl();}if(t&2){let n=tC().$implicit;lg("aria-label","Edit "+n.name);}}function G(t,e){if(t&1){let n=Qw();Es(0,"agentos-row-delete-action",19),vg("deleteRequested",function(){pf(n);let m=tC().$implicit,p=tC(2);return hf(p.deletion.request(m.id))})("deleteConfirmed",function(){pf(n);let m=tC().$implicit,p=tC(2);return hf(p.confirmDelete(m))})("deleteCancelled",function(){pf(n);let m=tC(3);return hf(m.deletion.cancel())}),hl();}if(t&2){let n=tC().$implicit,r=tC(2);dg("rowKey",n.id)("rowLabel",n.name)("state",r.deletion);}}function J(t,e){if(t&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()()()),t&2){let n=e.$implicit,r=tC(2);VE(2),Fg(n.name),VE(2),Dl(" ",n.description||"\u2014"," "),VE(3),Vw(r.deletion.confirmingId()!==n.id?7:-1),VE(),Vw(n.id?8:-1);}}function O(t,e){if(t&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)(9,"span",11),AC(10,"Actions"),hl()()()(),Es(11,"tbody",8),$w(12,J,9,4,"tr",9,j),hl()()()),t&2){let n=tC();VE(12),zw(n.rowFilter.filteredRows());}}var B=class t{router=g(F);destroyRef=g(we);promptState=g(m);refresh$=new Tr(void 0);isLoading=$i(true);deletion=k();prompts=$i([]);rowFilter=O$1(this.prompts,e=>[e.name,e.description].filter(Boolean).join(" "));constructor(){this.refresh$.pipe(ga(()=>(this.isLoading.set(true),this.promptState.listPlatform())),U$1(this.destroyRef)).subscribe({next:e=>{this.prompts.set(e),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}openCreateForm(){this.router.navigate(["/agentos","admin","prompts","new"]);}edit(e){e.id&&this.router.navigate(["/agentos","admin","prompts",e.id,"edit"]);}confirmDelete(e){e.id&&this.deletion.execute(e.id,{request$:this.promptState.delete(e.id).pipe(U$1(this.destroyRef)),onSuccess:()=>this.refresh$.next(),errorMessage:`Deleting "${e.name}" failed. Try again.`});}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=Dw({type:t,selectors:[["agentos-platform-prompts"]],decls:9,vars:3,consts:[["title","Platform prompts","description","Prompts shared across every namespace."],["label","Filter prompts","placeholder","Filter 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 prompts"],["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","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,r){n&1&&(Es(0,"ds-section-header",0)(1,"agentos-table-filter",1),vg("queryChange",function(p){return r.rowFilter.query.set(p)}),hl(),Es(2,"button",2),vg("click",function(){return r.openCreateForm()}),AC(3,"New prompt"),hl()(),Bw(4,A,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",r.rowFilter.query()),VE(3),Vw(r.deletion.error()?4:-1),VE(),Vw(r.isLoading()?5:r.prompts().length===0?6:r.rowFilter.filteredRows().length===0?7:8));},dependencies:[at,fn,ko,P,P$1],encapsulation:2})};export{B as PlatformPromptsComponent};