@whoz-oss/coday-client 0.0.0-workstream-messaging.11 → 0.0.0-workstream-forge.278

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 (91) hide show
  1. package/browser/chunk-16x50-2o.js +1 -0
  2. package/browser/chunk-4sEBawqk.js +1 -0
  3. package/browser/{chunk-BE9_RSN2.js → chunk-6fDAAwY8.js} +1 -1
  4. package/browser/chunk-7pogBin0.js +1 -0
  5. package/browser/chunk-9P3XaWWg.js +1 -0
  6. package/browser/chunk-B4OgWFKq.js +1 -0
  7. package/browser/chunk-B4f2_ca9.js +2 -0
  8. package/browser/chunk-BA-i5BKD.js +1 -0
  9. package/browser/chunk-BBFrt_ui.js +1 -0
  10. package/browser/chunk-BBhwwK7X.js +1 -0
  11. package/browser/chunk-BCtndyUL.js +1 -0
  12. package/browser/chunk-BE6h6pT_.js +1 -0
  13. package/browser/chunk-BQ5imqmR.js +1 -0
  14. package/browser/chunk-BSmzFmke.js +1 -0
  15. package/browser/chunk-BT3Kc2zZ.js +1 -0
  16. package/browser/chunk-BUz52zHO.js +1 -0
  17. package/browser/{chunk-DX5hDq00.js → chunk-BXOJ2TCq.js} +1 -1
  18. package/browser/chunk-BgGkMHQh.js +1 -0
  19. package/browser/{chunk-Cdc4bldZ.js → chunk-Bi5i4Kkf.js} +1 -1
  20. package/browser/{chunk-B0uIZBmR.js → chunk-BlijPSJE.js} +1 -1
  21. package/browser/chunk-Bzw6eX2O.js +2 -0
  22. package/browser/chunk-C-SfjwGQ.js +1 -0
  23. package/browser/chunk-C4-DYb1G.js +1 -0
  24. package/browser/chunk-CB3QL_VJ.js +1 -0
  25. package/browser/chunk-CODcIR_k.js +1 -0
  26. package/browser/{chunk-DT39vMjm.js → chunk-CXNhEZjs.js} +1 -1
  27. package/browser/{chunk-3Gitpl_W.js → chunk-CY2foyNy.js} +1 -1
  28. package/browser/chunk-Cy47rqqD.js +1 -0
  29. package/browser/chunk-D3SHcns-.js +1 -0
  30. package/browser/chunk-DA0pzWja.js +1 -0
  31. package/browser/chunk-DGXWmn-4.js +1 -0
  32. package/browser/chunk-DHcXUI30.js +1 -0
  33. package/browser/{chunk-SMCp3GcF.js → chunk-DSTLb91j.js} +1 -1
  34. package/browser/chunk-DSY07m68.js +671 -0
  35. package/browser/chunk-DVqVR--u.js +1 -0
  36. package/browser/chunk-DWwEMYi2.js +1 -0
  37. package/browser/chunk-DXhejKLu.js +1 -0
  38. package/browser/{chunk-CM0r-RA8.js → chunk-DZ4B-YtP.js} +1 -1
  39. package/browser/chunk-DrmwwKVW.js +1 -0
  40. package/browser/chunk-Dz60Uxy_.js +1 -0
  41. package/browser/chunk-InQGdgxF.js +1 -0
  42. package/browser/chunk-Zao0hsES.js +1 -0
  43. package/browser/chunk-bP8lCYXZ.js +1 -0
  44. package/browser/chunk-lXS49hV2.js +1 -0
  45. package/browser/chunk-s-WZZxtO.js +1 -0
  46. package/browser/chunk-uWIGwngv.js +1 -0
  47. package/browser/index.html +1 -1
  48. package/browser/main-4HEE4DSD.js +1253 -0
  49. package/package.json +1 -1
  50. package/browser/chunk-3HWaG27c.js +0 -1
  51. package/browser/chunk-74ukJ4Xi.js +0 -1
  52. package/browser/chunk-B03vbh4f.js +0 -1
  53. package/browser/chunk-B3TB_PnM.js +0 -1
  54. package/browser/chunk-BYbk8T3K.js +0 -1
  55. package/browser/chunk-BlF0vroR.js +0 -1
  56. package/browser/chunk-Bn8HYTTM.js +0 -1
  57. package/browser/chunk-Bsqc_xnw.js +0 -1
  58. package/browser/chunk-Bvgg4-BU.js +0 -2
  59. package/browser/chunk-BxIVdFlW.js +0 -1
  60. package/browser/chunk-BzGzNc-T.js +0 -1
  61. package/browser/chunk-C1t3O1k4.js +0 -1
  62. package/browser/chunk-C40WwJqu.js +0 -1
  63. package/browser/chunk-C4i-jeuv.js +0 -1
  64. package/browser/chunk-CAAhkREQ.js +0 -1
  65. package/browser/chunk-CCKO622E.js +0 -1
  66. package/browser/chunk-CIHlLjrB.js +0 -1
  67. package/browser/chunk-CM6VQi9F.js +0 -1
  68. package/browser/chunk-CfX6vIYj.js +0 -1
  69. package/browser/chunk-Ch-yIotV.js +0 -1
  70. package/browser/chunk-CiRJa9KR.js +0 -1
  71. package/browser/chunk-Cmd42Ubi.js +0 -1
  72. package/browser/chunk-CrFtQd0x.js +0 -1
  73. package/browser/chunk-CxQaRSXz.js +0 -1
  74. package/browser/chunk-CzFv-twG.js +0 -1
  75. package/browser/chunk-D2mdz_SD.js +0 -1
  76. package/browser/chunk-D5QHsISQ.js +0 -1
  77. package/browser/chunk-DB_wGI-O.js +0 -1
  78. package/browser/chunk-DIF7cPtA.js +0 -1
  79. package/browser/chunk-DXtHX7ac.js +0 -1
  80. package/browser/chunk-DbK9IJQd.js +0 -1
  81. package/browser/chunk-Dg0rwtUo.js +0 -1
  82. package/browser/chunk-DqI0c9B5.js +0 -2
  83. package/browser/chunk-DwEcQtO1.js +0 -670
  84. package/browser/chunk-FY_ZYR73.js +0 -1
  85. package/browser/chunk-QpTN-Nr6.js +0 -1
  86. package/browser/chunk-axNMhn9i.js +0 -1
  87. package/browser/chunk-hp_96Xe0.js +0 -1
  88. package/browser/chunk-nLTwJihI.js +0 -1
  89. package/browser/chunk-vhSiFYge.js +0 -1
  90. package/browser/chunk-w7fu2Om4.js +0 -1
  91. package/browser/main-JXQYBZRK.js +0 -1254
@@ -1 +0,0 @@
1
- import {I as I$1}from'./chunk-Bsqc_xnw.js';import {g,F,v as we,a3 as vr,M as Mi,a5 as Ys,x as U$1,a as ew,o as os,K as qh,z as zu,b as pC,I as Iw,c as IE,J as Vh,w as ww,L as Lw,l as lg,T as Tw,_ as _w,Y as Yu,R as Rw,h as Bh,P as Pd,n as Ld}from'./main-JXQYBZRK.js';import {r as k,O as O$1,i as at,d as yn,V as Vo,k as P,w as P$1}from'./chunk-DwEcQtO1.js';import'./chunk-Dg0rwtUo.js';var B=(e,t)=>t.id??t.name;function j(e,t){if(e&1&&(os(0,"p",3),pC(1),zu()),e&2){let n=Lw();IE(),lg(n.deletion.error());}}function K(e,t){e&1&&(os(0,"p",4),pC(1,"Loading auth settings\u2026"),zu());}function H(e,t){e&1&&(os(0,"p",5),pC(1,"No platform auth settings defined yet."),zu());}function U(e,t){e&1&&(os(0,"p",4),pC(1,"No auth settings match the current filter."),zu());}function z(e,t){if(e&1){let n=Rw();os(0,"button",18),qh("click",function(){Pd(n);let d=Lw().$implicit,m=Lw(2);return Ld(m.onEdit(d))}),pC(1," Edit "),zu();}if(e&2){let n=Lw().$implicit;Bh("aria-label","Edit "+n.name);}}function G(e,t){if(e&1){let n=Rw();os(0,"agentos-row-delete-action",19),qh("deleteRequested",function(){Pd(n);let d=Lw().$implicit,m=Lw(2);return Ld(m.deletion.request(d.id))})("deleteConfirmed",function(){Pd(n);let d=Lw().$implicit,m=Lw(2);return Ld(m.onDelete(d))})("deleteCancelled",function(){Pd(n);let d=Lw(3);return Ld(d.deletion.cancel())}),zu();}if(e&2){let n=Lw().$implicit,a=Lw(2);Vh("rowKey",n.id)("rowLabel",n.name)("state",a.deletion);}}function J(e,t){if(e&1&&(os(0,"tr",9)(1,"td",12),pC(2),zu(),os(3,"td",13),pC(4),zu(),os(5,"td",14)(6,"div",15),Iw(7,z,2,1,"button",16),Iw(8,G,1,3,"agentos-row-delete-action",17),zu()()()),e&2){let n=t.$implicit,a=Lw(2);IE(2),lg(n.name),IE(2),Yu(" ",n.authType," "),IE(3),ww(a.deletion.confirmingId()!==n.id?7:-1),IE(),ww(n.id?8:-1);}}function O(e,t){if(e&1&&(os(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),pC(5,"Name"),zu(),os(6,"th",10),pC(7,"Authentication type"),zu(),os(8,"th",10)(9,"span",11),pC(10,"Actions"),zu()()()(),os(11,"tbody",8),Tw(12,J,9,4,"tr",9,B),zu()()()),e&2){let n=Lw();IE(12),_w(n.rowFilter.filteredRows());}}var I=class e{router=g(F);destroyRef=g(we);state=g(I$1);refresh$=new vr(void 0);isLoading=Mi(true);deletion=k();settings=Mi([]);rowFilter=O$1(this.settings,t=>[t.name,t.authType].filter(Boolean).join(" "));constructor(){this.refresh$.pipe(Ys(()=>(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=ew({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&&(os(0,"ds-section-header",0)(1,"agentos-table-filter",1),qh("queryChange",function(m){return a.rowFilter.query.set(m)}),zu(),os(2,"button",2),qh("click",function(){return a.openCreateForm()}),pC(3,"New auth setting"),zu()(),Iw(4,j,2,1,"p",3),Iw(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&&(IE(),Vh("query",a.rowFilter.query()),IE(3),ww(a.deletion.error()?4:-1),IE(),ww(a.isLoading()?5:a.settings().length===0?6:a.rowFilter.filteredRows().length===0?7:8));},dependencies:[at,yn,Vo,P,P$1],encapsulation:2})};export{I as PlatformAuthSettingsComponent};
@@ -1 +0,0 @@
1
- import {c}from'./chunk-Cdc4bldZ.js';import {r as k,O as O$1,i as at,d as yn,V as Vo,A as Ao,k as P,w as P$1}from'./chunk-DwEcQtO1.js';import {g,W,F,v as we,M as Mi,ag as Gm,a6 as Zs,ae as Dr,x as U,E as x,C as w,am as De,ap as _e,a as ew,o as os,K as qh,z as zu,b as pC,I as Iw,c as IE,J as Vh,w as ww,L as Lw,l as lg,T as Tw,_ as _w,R as Rw,P as Pd,n as Ld,h as Bh}from'./main-JXQYBZRK.js';var J=(n,t)=>t.key;function O(n,t){if(n&1&&(os(0,"p",3),pC(1),zu()),n&2){let e=Lw();IE(),lg(e.deletion.error());}}function Y(n,t){n&1&&(os(0,"p",4),pC(1,"Loading scheduled prompts\u2026"),zu());}function z(n,t){n&1&&(os(0,"p",5),pC(1,"No scheduled prompts available."),zu());}function G(n,t){n&1&&(os(0,"p",4),pC(1,"No scheduled prompts match the current filter."),zu());}function Q(n,t){if(n&1&&(os(0,"span",14),pC(1),zu()),n&2){let e=Lw().$implicit;IE(),lg(e.prompt.description);}}function X(n,t){n&1&&(os(0,"ds-tag",20),pC(1,"Read-only"),zu());}function Z(n,t){if(n&1){let e=Rw();os(0,"button",25),qh("click",function(){Pd(e);let l=Lw(2).$implicit,p=Lw(2);return Ld(p.toggle(l))}),pC(1),zu(),os(2,"button",25),qh("click",function(){Pd(e);let l=Lw(2).$implicit,p=Lw(2);return Ld(p.edit(l))}),pC(3," Edit "),zu();}if(n&2){let e=Lw(2).$implicit;IE(),lg(e.prompt.enabled?"Disable":"Enable"),IE(),Bh("aria-label","Edit "+e.prompt.name);}}function ee(n,t){if(n&1){let e=Rw();Iw(0,Z,4,2),os(1,"agentos-row-delete-action",24),qh("deleteRequested",function(){Pd(e);let l=Lw().$implicit,p=Lw(2);return Ld(p.deletion.request(l.key))})("deleteConfirmed",function(){Pd(e);let l=Lw().$implicit,p=Lw(2);return Ld(p.confirmDelete(l))})("deleteCancelled",function(){Pd(e);let l=Lw(3);return Ld(l.deletion.cancel())}),zu();}if(n&2){let e=Lw().$implicit,i=Lw(2);ww(i.deletion.confirmingId()!==e.key?0:-1),IE(),Vh("rowKey",e.key)("rowLabel",e.prompt.name)("state",i.deletion);}}function te(n,t){n&1&&(os(0,"button",23),pC(1,"Inherited"),zu());}function ne(n,t){if(n&1&&(os(0,"tr",9)(1,"td",12)(2,"span",13),pC(3),zu(),Iw(4,Q,2,1,"span",14),zu(),os(5,"td",15),pC(6),zu(),os(7,"td",16)(8,"ds-tag",17),pC(9),zu()(),os(10,"td",18)(11,"div",19)(12,"ds-tag",17),pC(13),zu(),Iw(14,X,2,0,"ds-tag",20),zu()(),os(15,"td",21)(16,"div",22),Iw(17,ee,2,4)(18,te,2,0,"button",23),zu()()()),n&2){let e=t.$implicit,i=Lw(2);IE(3),lg(e.prompt.name),IE(),ww(e.prompt.description?4:-1),IE(2),lg(i.scheduleLabel(e.prompt)),IE(2),Vh("variant",e.prompt.enabled?"accent":"outline"),IE(),lg(e.prompt.enabled?"Enabled":"Disabled"),IE(3),Vh("variant",e.scope==="platform"?"neutral":"accent"),IE(),lg(e.scope==="platform"?"Platform":"Namespace"),IE(),ww(e.scope==="platform"?14:-1),IE(3),ww(e.scope==="namespace"?17:18);}}function ie(n,t){if(n&1&&(os(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),pC(5,"Name"),zu(),os(6,"th",10),pC(7,"Schedule"),zu(),os(8,"th",10),pC(9,"Status"),zu(),os(10,"th",10),pC(11,"Scope"),zu(),os(12,"th",10)(13,"span",11),pC(14,"Actions"),zu()()()(),os(15,"tbody",8),Tw(16,ne,19,9,"tr",9,J),zu()()()),n&2){let e=Lw();IE(16),_w(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=Mi([]);isLoading=Mi(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(){Gm({platform:this.state.listPlatform().pipe(Zs(()=>Dr([]))),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===De.WEEK?"week":"month",l=e.unit===De.WEEK&&e.days?.length?` (${e.days.map(p=>_e[p]??p).join(", ")})`:"";return `Every ${i}${l} at ${e.timeUtc} UTC`}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ew({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&&(os(0,"ds-section-header",0)(1,"agentos-table-filter",1),qh("queryChange",function(p){return i.rowFilter.query.set(p)}),zu(),os(2,"button",2),qh("click",function(){return i.openCreateForm()}),pC(3,"New scheduled prompt"),zu()(),Iw(4,O,2,1,"p",3),Iw(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&&(IE(),Vh("query",i.rowFilter.query()),IE(3),ww(i.deletion.error()?4:-1),IE(),ww(i.isLoading()?5:i.rows().length===0?6:i.rowFilter.filteredRows().length===0?7:8));},dependencies:[at,yn,Vo,Ao,P,P$1],encapsulation:2})};export{H as ScheduledPromptListComponent};
@@ -1 +0,0 @@
1
- import {O as O$1}from'./chunk-C4i-jeuv.js';import {I}from'./chunk-Bsqc_xnw.js';import {O}from'./chunk-CfX6vIYj.js';import {g,v as we,M as Mi,i as VC,ad as F,aw as $m,ah as te,x as U,a as ew,o as os,H as Hh,I as Iw,z as zu,c as IE,w as ww,aF as Qs,E as x,C as w,X as Kb,b as pC,R as Rw,K as qh,L as Lw,J as Vh,G as Gu,d as Wu,T as Tw,_ as _w,N as lI,l as lg,Q as fI,Y as Yu,f as Gh,$ as dg,Z as Zh,P as Pd,n as Ld,ai as Dw,a0 as RC,a1 as FC,O as Op,aS as Gw}from'./main-JXQYBZRK.js';import {y,$ as k,a0 as R,a1 as a,p as pt,T as Te,a2 as v,a3 as V,K as Kt,a as fd,M as Mo,D as Do,U as Ut,Q as Qt,c as fo,g as go,R as Rn,E as Ea,v as vn,d as yn,e as fn,a4 as gn,h as hn,i as at$1,u as un,m as mn,a5 as ji,G as Ni,L as M,j as e,a6 as m,a7 as S}from'./chunk-DwEcQtO1.js';import'./chunk-Dg0rwtUo.js';var Ve=(n,t)=>t.id;function Fe(n,t){if(n&1){let e=Rw();Gu(0,"span",10),pC(1,"Unlink?"),Wu(),Gu(2,"button",11),Zh("click",function(){Pd(e);let a=Lw(),c=Lw(3);return Ld(c.unlink(a))}),pC(3," Confirm "),Wu(),Gu(4,"button",12),Zh("click",function(){Pd(e);let a=Lw(4);return Ld(a.pendingUnlinkId.set(null))}),pC(5,"Cancel"),Wu();}}function Ae(n,t){if(n&1){let e=Rw();Gu(0,"button",12),Zh("click",function(){Pd(e);let a=Lw(),c=Lw(3);return Ld(c.pendingUnlinkId.set(a.id))}),pC(1," Unlink "),Wu();}}function Le(n,t){if(n&1&&(Gu(0,"span",7),pC(1),Gu(2,"span",8),pC(3),RC(4,"date"),Wu()(),Iw(5,Fe,6,0)(6,Ae,2,0,"button",9)),n&2){let e=t,i=Lw(3);IE(),Yu(" ",e.displayName," "),IE(2),Yu("linked ",FC(4,3,e.linkedAt,"mediumDate")),IE(2),ww(i.pendingUnlinkId()===e.id?5:6);}}function Re(n,t){if(n&1){let e=Rw();Gu(0,"span",8),pC(1," Then send it this message: "),Gu(2,"code",14),pC(3),Wu(),Gu(4,"button",12),Zh("click",function(){let a=Pd(e),c=Lw(4);return Ld(c.copy(a))}),pC(5,"Copy"),Wu(),pC(6),RC(7,"date"),Wu();}if(n&2){let e=Lw();IE(3),lg(t),IE(3),Yu(" Valid until ",FC(7,2,e.expiresAt,"shortTime"),". ");}}function Ge(n,t){if(n&1&&(Gu(0,"span",8),pC(1),RC(2,"date"),Wu()),n&2){let e=Lw(),i=Lw().$implicit,a=Lw(2);IE(),dg(" Press Start in ",a.platformName(i.platform),", then come back here. Valid until ",FC(2,2,e.expiresAt,"shortTime"),". ");}}function $e(n,t){if(n&1&&(Gu(0,"a",13),pC(1),Wu(),Iw(2,Re,8,5,"span",8)(3,Ge,3,5,"span",8)),n&2){let e,i=t,a=Lw().$implicit;Gh("href",i.url,Op),IE(),Yu(" Open @",a.username," "),IE(),ww((e=i.code)?2:3,e);}}function Be(n,t){if(n&1){let e=Rw();Gu(0,"span",15),pC(1,"Not connected"),Wu(),Gu(2,"button",16),Zh("click",function(){Pd(e);let a=Lw().$implicit,c=Lw(2);return Ld(c.connect(a))}),pC(3," Connect "),Wu();}}function Ke(n,t){if(n&1&&(Gu(0,"div",3)(1,"span",5),pC(2),Gu(3,"a",6),pC(4),Wu()(),Iw(5,Le,7,6)(6,$e,4,3)(7,Be,4,0),Wu()),n&2){let e,i=t.$implicit,a=Lw(2);IE(2),Yu(" ",i.agentName," "),IE(),Gh("href",i.url,Op),IE(),dg(" @",i.username," on ",a.platformName(i.platform)," "),IE(),ww((e=a.identityOf(i))?5:(e=a.linkOf(i))?6:7,e);}}function je(n,t){if(n&1){let e=Rw();Gu(0,"div",3)(1,"span",5),pC(2),Gu(3,"span",8),pC(4),Wu()(),Gu(5,"span",7),pC(6),Wu(),Gu(7,"button",12),Zh("click",function(){let a=Pd(e).$implicit,c=Lw(2);return Ld(c.unlink(a))}),pC(8,"Unlink"),Wu()();}if(n&2){let e=t.$implicit,i=Lw(2);IE(2),Yu(" ",e.agentName??"A removed bot"," "),IE(2),lg(i.platformName(e.platform)),IE(2),lg(e.displayName);}}function ze(n,t){n&1&&(Gu(0,"p",4),pC(1),Wu()),n&2&&(IE(),lg(t));}function He(n,t){if(n&1&&(Gu(0,"div",0)(1,"h2",1),pC(2,"Messaging"),Wu(),Gu(3,"p",2),pC(4," Talk to your agents from a messaging application: each agent with a bot answers there, in your cases. "),Wu(),Tw(5,Ke,8,5,"div",3,Ve),Tw(7,je,9,3,"div",3,Ve),Iw(9,ze,2,1,"p",4),Wu()),n&2){let e,i=Lw();IE(5),_w(i.bots()),IE(2),_w(i.orphanIdentities()),IE(2),ww((e=i.error())?9:-1,e);}}var G=class n{messagingState=g(M);destroyRef=g(we);bots=this.messagingState.bots;platformName=e;orphanIdentities=VC(()=>this.messagingState.identities().filter(t=>!this.bots().some(e=>e.id===t.botId)));visible=VC(()=>this.bots().length>0||this.messagingState.identities().length>0);links=Mi({});pendingUnlinkId=Mi(null);error=Mi(null);constructor(){this.refresh(),Qs(window,"focus").pipe(U()).subscribe(()=>{Object.keys(this.links()).length>0&&this.refresh();});}identityOf(t){return this.messagingState.identities().find(e=>e.botId===t.id)}linkOf(t){return this.links()[t.id]}connect(t){this.error.set(null),this.messagingState.createLink(t.id).pipe(U(this.destroyRef)).subscribe({next:e=>this.links.update(i=>x(w({},i),{[t.id]:e})),error:e=>{console.error(`[MessagingAccounts] Could not get a link to @${t.username}:`,e),this.error.set(`Could not get a link to @${t.username}. Please try again.`);}});}copy(t){navigator.clipboard?.writeText(t).catch(()=>{});}unlink(t){this.pendingUnlinkId.set(null),this.messagingState.unlink(t.id).pipe(U(this.destroyRef)).subscribe({error:e=>{console.error(`[MessagingAccounts] Unlink failed for ${t.id}:`,e),this.error.set("Could not unlink the account. Please try again.");}});}refresh(){this.messagingState.load().pipe(U(this.destroyRef)).subscribe({next:([,t])=>this.links.update(e=>Object.fromEntries(Object.entries(e).filter(([i])=>!t.some(a=>a.botId===i)))),error:t=>console.error("[MessagingAccounts] Could not load the messaging accounts:",t)});}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ew({type:n,selectors:[["agentos-messaging-accounts"]],decls:1,vars:1,consts:[[1,"messaging-accounts"],[1,"messaging-accounts__title"],[1,"messaging-accounts__hint"],[1,"messaging-accounts__row"],["role","alert",1,"messaging-accounts__error"],[1,"messaging-accounts__platform"],["target","_blank","rel","noopener",1,"messaging-accounts__since",3,"href"],[1,"messaging-accounts__account"],[1,"messaging-accounts__since"],["type","button",1,"messaging-accounts__btn"],[1,"messaging-accounts__confirm"],["type","button",1,"messaging-accounts__btn","messaging-accounts__btn--danger",3,"click"],["type","button",1,"messaging-accounts__btn",3,"click"],["target","_blank","rel","noopener",1,"messaging-accounts__btn","messaging-accounts__btn--primary",3,"href"],[1,"messaging-accounts__code"],[1,"messaging-accounts__account","messaging-accounts__account--none"],["type","button",1,"messaging-accounts__btn","messaging-accounts__btn--primary",3,"click"]],template:function(e,i){e&1&&Iw(0,He,10,1,"div",0),e&2&&ww(i.visible()?0:-1);},dependencies:[Kb],styles:[".messaging-accounts[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.messaging-accounts__title[_ngcontent-%COMP%]{margin:0;font-family:var(--font-heading);font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.12em;color:var(--color-neutral-500);border-bottom:1px solid var(--color-divider);padding-bottom:.5rem}.messaging-accounts__hint[_ngcontent-%COMP%], .messaging-accounts__since[_ngcontent-%COMP%]{margin:0;font-size:.8125rem;color:var(--color-text-secondary)}.messaging-accounts__row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:baseline;gap:.75rem}.messaging-accounts__platform[_ngcontent-%COMP%]{display:inline-flex;flex-direction:column;gap:.125rem;min-width:180px;font-size:.875rem;font-weight:500;color:var(--color-text-secondary)}.messaging-accounts__platform[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none}.messaging-accounts__platform[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}.messaging-accounts__account[_ngcontent-%COMP%]{display:inline-flex;flex-direction:column;gap:.125rem;flex:1;font-size:.9375rem;color:var(--color-text)}.messaging-accounts__account--none[_ngcontent-%COMP%]{color:var(--color-text-secondary)}.messaging-accounts__confirm[_ngcontent-%COMP%]{font-size:.875rem;color:var(--color-text-secondary)}.messaging-accounts__btn[_ngcontent-%COMP%]{padding:.4rem .9rem;border:1px solid var(--color-divider);background:transparent;color:var(--color-text);font-size:13px;font-family:var(--font-heading);font-weight:600;text-decoration:none;cursor:pointer}.messaging-accounts__btn[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover);border-color:var(--color-neutral-500)}.messaging-accounts__btn--primary[_ngcontent-%COMP%]{border-color:var(--color-accent);color:var(--color-accent)}.messaging-accounts__btn--danger[_ngcontent-%COMP%]{border-color:var(--color-error, #c62828);color:var(--color-error, #c62828)}.messaging-accounts__error[_ngcontent-%COMP%]{margin:0;font-size:.875rem;color:var(--color-error, #c62828)}.messaging-accounts__code[_ngcontent-%COMP%]{padding:.1rem .4rem;border:1px solid var(--color-divider);border-radius:var(--radius-sm, 0);font-family:var(--font-mono, monospace);word-break:break-all}"]})};var Je=(n,t)=>t.value,Ye=(n,t)=>t.title;function We(n,t){n&1&&(os(0,"p",4),pC(1,"Loading\u2026"),zu());}function qe(n,t){if(n&1&&(os(0,"option",34),pC(1),zu()),n&2){let e=t.$implicit;Vh("value",e.value),IE(),lg(e.label);}}function Qe(n,t){if(n&1){let e=Rw();os(0,"form",22),qh("ngSubmit",function(){Pd(e);let a=Lw(2);return Ld(a.save())}),os(1,"ds-group",23)(2,"dl",24)(3,"dt"),pC(4,"Email"),zu(),os(5,"dd"),pC(6),zu(),os(7,"dt"),pC(8,"External ID"),zu(),os(9,"dd"),pC(10),zu()()(),os(11,"ds-group",25)(12,"ds-form-field",26),Hh(13,"input",27),lI(),zu(),os(14,"ds-form-field",28),Hh(15,"input",29),lI(),zu(),os(16,"ds-form-field",30),Hh(17,"textarea",31),lI(),zu(),os(18,"ds-form-field",32)(19,"select",33),Tw(20,qe,2,2,"option",34,Je),zu(),lI(),zu()(),os(22,"ds-form-actions")(23,"button",35),pC(24),zu(),os(25,"button",36),qh("click",function(){Pd(e);let a=Lw(2);return Ld(a.cancelEditing())}),pC(26,"Cancel"),zu()()();}if(n&2){let e=Lw(),i=Lw();Vh("formGroup",i.form),IE(6),lg(e.email),IE(4),lg(e.externalId),IE(3),fI(),IE(2),fI(),IE(2),fI(),IE(2),fI(),IE(),_w(i.languageOptions),IE(3),Vh("disabled",i.isSaving()),IE(),Yu(" ",i.isSaving()?"Saving\u2026":"Save changes"," ");}}function Xe(n,t){n&1&&(os(0,"p",4),pC(1," No global configuration yet. Create one from the Integrations / AI Providers / Auth Settings pages of your namespaces. "),zu());}function Ze(n,t){if(n&1){let e=Rw();os(0,"span",45),pC(1,"Delete?"),zu(),os(2,"button",46),qh("click",function(){Pd(e);let a=Lw().$implicit,c=Lw(5);return Ld(c.confirmDelete(a))}),pC(3,"Confirm"),zu(),os(4,"button",47),qh("click",function(){Pd(e);let a=Lw(6);return Ld(a.cancelDelete())}),pC(5,"Cancel"),zu();}}function et(n,t){if(n&1){let e=Rw();os(0,"button",47),qh("click",function(){Pd(e);let a=Lw().$implicit,c=Lw(5);return Ld(c.armDelete(a))}),pC(1,"Delete"),zu();}}function tt(n,t){if(n&1&&(os(0,"li",41)(1,"span",42),pC(2),zu(),os(3,"span",43),pC(4),zu(),Iw(5,Ze,6,0)(6,et,2,0,"button",44),zu()),n&2){let e=t.$implicit,i=Lw(5);IE(2),lg(e.name),IE(2),lg(e.subtitle),IE(),ww(i.isPendingDelete(e)?5:6);}}function nt(n,t){if(n&1&&(os(0,"span",39),pC(1),zu(),os(2,"ul",40),Tw(3,tt,7,3,"li",41,Dw().trackEntry,true),zu()),n&2){let e=t.$implicit;IE(),lg(e.title),IE(2),_w(e.entries);}}function it(n,t){if(n&1&&Tw(0,nt,5,1,null,null,Ye),n&2){let e=Lw(3);_w(e.recapSections());}}function ot(n,t){if(n&1){let e=Rw();os(0,"ds-group",23)(1,"dl",24)(2,"dt"),pC(3,"Email"),zu(),os(4,"dd"),pC(5),zu(),os(6,"dt"),pC(7,"External ID"),zu(),os(8,"dd"),pC(9),zu()()(),os(10,"ds-group",25)(11,"dl",24)(12,"dt"),pC(13,"First name"),zu(),os(14,"dd"),pC(15),zu(),os(16,"dt"),pC(17,"Last name"),zu(),os(18,"dd"),pC(19),zu(),os(20,"dt"),pC(21,"Bio"),zu(),os(22,"dd"),pC(23),zu(),os(24,"dt"),pC(25,"Language"),zu(),os(26,"dd"),pC(27),zu()()(),os(28,"ds-form-actions")(29,"button",37),qh("click",function(){Pd(e);let a=Lw(2);return Ld(a.startEditing())}),pC(30,"Edit profile"),zu()(),os(31,"ds-disclosure",38),qh("toggled",function(){Pd(e);let a=Lw(2);return Ld(a.toggleOverrides())}),Iw(32,Xe,2,0,"p",4)(33,it,2,0),zu();}if(n&2){let e=Lw(),i=Lw();IE(5),lg(e.email),IE(4),lg(e.externalId),IE(6),lg(e.firstname||"\u2014"),IE(4),lg(e.lastname||"\u2014"),IE(4),lg(e.bio||"\u2014"),IE(4),lg(e.preferredLanguage||"\u2014"),IE(4),Vh("heading","My global user configurations ("+i.recap().total+")")("open",i.isOverridesExpanded()),IE(),ww(i.recap().total===0?32:33);}}function rt(n,t){if(n&1){let e=Rw();os(0,"ds-group",5)(1,"ds-form-field",6)(2,"ds-segmented",7),qh("valueChange",function(a){Pd(e);let c=Lw();return Ld(c.setThemeVariant(a))}),zu()(),os(3,"ds-form-field",8)(4,"ds-segmented",9),qh("valueChange",function(a){Pd(e);let c=Lw();return Ld(c.setTheme(a))}),zu()()(),os(5,"ds-group",10)(6,"ds-form-field",11)(7,"ds-segmented",12),qh("valueChange",function(a){Pd(e);let c=Lw();return Ld(c.setEnterKeyBehavior(a))}),zu()()(),os(8,"ds-group",13)(9,"ds-form-field",14)(10,"ds-segmented",15),qh("valueChange",function(a){Pd(e);let c=Lw();return Ld(c.setShowTechnical(a))}),zu()()(),os(11,"ds-group",16)(12,"ds-form-field",17)(13,"input",18,0),qh("change",function(){Pd(e);let a=Gw(14),c=Lw();return Ld(c.setIdeProjectRoot(a.value))}),zu()(),os(15,"ds-form-field",19)(16,"input",20,1),qh("change",function(){Pd(e);let a=Gw(17),c=Lw();return Ld(c.setIdeUrlTemplate(a.value))}),zu()()(),Hh(18,"agentos-messaging-accounts"),Iw(19,Qe,27,5,"form",21)(20,ot,34,9);}if(n&2){let e=Lw();IE(),Vh("hint",e.activeVariantDescription()),IE(),Vh("options",e.themeVariantOptions)("value",e.themeVariant()),IE(),Vh("hint",e.modeOverridden()?e.activeVariantLabel()+" does not support this mode; your choice is kept for other skins.":null),IE(),Vh("options",e.modeOptions())("value",e.shownMode()),IE(3),Vh("options",e.enterKeyOptions)("value",e.enterKeyBehavior()),IE(3),Vh("options",e.showTechnicalOptions)("value",e.showTechnical()),IE(3),Vh("value",e.ideProjectRoot()),IE(3),Vh("value",e.ideUrlTemplate()),IE(3),ww(e.isEditing()?19:20);}}function at(n,t){n&1&&(os(0,"p",4),pC(1,"Unable to load profile."),zu());}var Ue=class n{userState=g(y);destroyRef=g(we);integrationState=g(O);providerState=g(O$1);authSettingState=g(I);themePort=g(k);preferencesPort=g(R);isEditing=Mi(false);isLoading=Mi(false);isSaving=Mi(false);isOverridesExpanded=Mi(false);currentUser=this.userState.currentUser;theme=this.themePort.theme;themeMode=VC(()=>this.themePort.theme().mode);themeOptions=[{value:"light",label:"Light"},{value:"dark",label:"Dark"},{value:"system",label:"System"}];themeVariant=VC(()=>this.themePort.theme().variant);themeVariantOptions=a.map(({id:t,label:e,description:i})=>({value:t,label:e,description:i}));modeOverridden=VC(()=>!V(this.themeVariant(),this.themeMode()));activeVariantLabel=VC(()=>m(this.themeVariant()).label);activeVariantDescription=VC(()=>m(this.themeVariant()).description);modeOptions=VC(()=>this.themeOptions.map(t=>x(w({},t),{disabled:this.isModeDisabled(t.value)})));shownMode=VC(()=>this.modeOverridden()?S(this.themeVariant(),this.themeMode(),false):this.themeMode());enterKeyBehavior=this.preferencesPort.enterKeyBehavior;enterKeyOptions=[{value:"send",label:"Send"},{value:"newline",label:"New line"}];showTechnical=this.preferencesPort.showTechnical;showTechnicalOptions=[{value:true,label:"Shown"},{value:false,label:"Hidden"}];ideProjectRoot=this.preferencesPort.ideProjectRoot;ideUrlTemplate=this.preferencesPort.ideUrlTemplate;languageOptions=[{value:"",label:"No preference (English fallback)"},{value:"fr",label:"French"},{value:"de",label:"German"},{value:"es",label:"Spanish"},{value:"pt",label:"Portuguese"},{value:"it",label:"Italian"},{value:"nl",label:"Dutch"},{value:"pl",label:"Polish"},{value:"ja",label:"Japanese"},{value:"zh",label:"Chinese"}];form=new pt({firstname:new Te("",{nonNullable:true}),lastname:new Te("",{nonNullable:true}),bio:new Te("",{nonNullable:true}),preferredLanguage:new Te("",{nonNullable:true})});recap=F($m([this.integrationState.userGlobal$,this.providerState.userGlobal$,this.authSettingState.userGlobal$]).pipe(te(([t,e,i])=>{let a=t.map(v=>({category:"integration",id:v.id??"",name:v.name,subtitle:v.integrationType})),c=e.map(v=>({category:"aiProvider",id:v.id??"",name:v.name,subtitle:v.apiType})),J=i.map(v=>({category:"authSetting",id:v.id??"",name:v.name,subtitle:v.authType}));return {integrations:a,aiProviders:c,authSettings:J,total:a.length+c.length+J.length}})),{initialValue:{integrations:[],aiProviders:[],authSettings:[],total:0}});recapSections=VC(()=>{let t=this.recap();return [{title:"Integrations",entries:t.integrations},{title:"AI Providers",entries:t.aiProviders},{title:"My global auth settings",entries:t.authSettings}].filter(e=>e.entries.length>0)});ngOnInit(){if(this.currentUser()){this.syncFormFromState();return}this.isLoading.set(true),this.userState.loadMe().pipe(U(this.destroyRef)).subscribe({next:()=>{this.syncFormFromState(),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}startEditing(){this.syncFormFromState(),this.isEditing.set(true);}cancelEditing(){this.isEditing.set(false);}setTheme(t){this.themePort.setTheme({variant:this.themePort.theme().variant,mode:t});}setThemeVariant(t){v(t)&&this.themePort.setTheme({variant:t,mode:this.themePort.theme().mode});}isModeDisabled(t){return !V(this.themeVariant(),t)}setEnterKeyBehavior(t){this.preferencesPort.setEnterKeyBehavior(t);}setShowTechnical(t){this.preferencesPort.setShowTechnical(t);}setIdeProjectRoot(t){this.preferencesPort.setIdeProjectRoot(t);}setIdeUrlTemplate(t){this.preferencesPort.setIdeUrlTemplate(t);}save(){if(this.isSaving())return;this.isSaving.set(true);let t=this.form.controls.preferredLanguage.value.trim();this.userState.updateMe({firstname:this.form.controls.firstname.value.trim()||void 0,lastname:this.form.controls.lastname.value.trim()||void 0,bio:this.form.controls.bio.value.trim()||void 0,preferredLanguage:t||void 0}).pipe(U(this.destroyRef)).subscribe({next:()=>{this.isSaving.set(false),this.isEditing.set(false);},error:()=>this.isSaving.set(false)});}toggleOverrides(){this.isOverridesExpanded.update(t=>!t),this.pendingDeleteKey.set(null);}pendingDeleteKey=Mi(null);isPendingDelete(t){return this.pendingDeleteKey()===this.entryKey(t)}armDelete(t){t.id&&this.pendingDeleteKey.set(this.entryKey(t));}cancelDelete(){this.pendingDeleteKey.set(null);}confirmDelete(t){if(!t.id)return;this.pendingDeleteKey.set(null),(t.category==="integration"?this.integrationState.delete(t.id,"userGlobal"):t.category==="authSetting"?this.authSettingState.delete(t.id,"userGlobal"):this.providerState.delete(t.id,"userGlobal")).pipe(U(this.destroyRef)).subscribe({error:i=>{console.error(`[UserProfile] Delete failed for ${t.category}:${t.id}:`,i);}});}entryKey(t){return `${t.category}:${t.id}`}trackEntry(t,e){return this.entryKey(e)}syncFormFromState(){let t=this.currentUser();t&&this.form.setValue({firstname:t.firstname??"",lastname:t.lastname??"",bio:t.bio??"",preferredLanguage:t.preferredLanguage??""});}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ew({type:n,selectors:[["agentos-user-profile"]],decls:5,vars:1,consts:[["projectRootInput",""],["urlTemplateInput",""],["framed",""],["title","My profile"],[1,"ds-hint"],["heading","Appearance"],["label","Skin",3,"hint"],["label","Skin",3,"valueChange","options","value"],["label","Mode",3,"hint"],["label","Color mode",3,"valueChange","options","value"],["heading","Composer"],["label","Enter key","hint",'In "New line" mode, press Ctrl or Cmd + Enter to send.'],["label","Enter key behavior",3,"valueChange","options","value"],["heading","Case chat"],["label","Technical logs","hint","Show system log lines (agent status, tool selection...) in the case chat."],["label","Technical logs",3,"valueChange","options","value"],["heading","IDE links"],["label","IDE project root (absolute path)","controlId","ide-project-root","hint","Folder of the project on this machine. Relative file references in agent replies open from it."],["dsControl","","id","ide-project-root","type","text","placeholder","/Users/you/Workspace/project",3,"change","value"],["label","IDE URL template","controlId","ide-url-template","hint","Opens a file in IntelliJ IDEA. {file} is the URL-encoded absolute path, {line} and {column} the position."],["dsControl","","id","ide-url-template","type","text",3,"change","value"],[1,"ds-form",3,"formGroup"],[1,"ds-form",3,"ngSubmit","formGroup"],["heading","Identity"],["dsDefinitionList",""],["heading","Profile"],["label","First name","controlId","up-firstname"],["dsControl","","id","up-firstname","type","text","placeholder","Your first name","formControlName","firstname","autocomplete","given-name"],["label","Last name","controlId","up-lastname"],["dsControl","","id","up-lastname","type","text","placeholder","Your last name","formControlName","lastname","autocomplete","family-name"],["label","Bio","controlId","up-bio"],["dsControl","","id","up-bio","placeholder","A short description about yourself","formControlName","bio","rows","4"],["label","Language","controlId","up-preferredLanguage"],["dsControl","","id","up-preferredLanguage","formControlName","preferredLanguage"],[3,"value"],["dsButton","","variant","primary","type","submit",3,"disabled"],["dsButton","","type","button",3,"click"],["dsButton","","variant","primary","type","button",3,"click"],[3,"toggled","heading","open"],[1,"ds-micro"],[1,"ds-list"],[1,"ds-row"],[1,"ds-strong","ds-row__grow"],[1,"ds-meta"],["dsButton","","variant","ghost","type","button"],[1,"ds-error"],["dsButton","","variant","danger","type","button",3,"click"],["dsButton","","variant","ghost","type","button",3,"click"]],template:function(e,i){if(e&1&&(os(0,"ds-page",2),Hh(1,"ds-section-header",3),Iw(2,We,2,0,"p",4)(3,rt,21,13)(4,at,2,0,"p",4),zu()),e&2){let a;IE(2),ww(i.isLoading()?2:(a=i.currentUser())?3:4,a);}},dependencies:[Kt,fd,Mo,Do,Ut,Qt,fo,go,Rn,Ea,vn,yn,fn,gn,hn,at$1,un,mn,ji,Ni,G],encapsulation:2})};export{Ue as UserProfileComponent};
@@ -1 +0,0 @@
1
- import {g as g$1,aH as ie,aa as k}from'./main-JXQYBZRK.js';var g=class r{botController=g$1(ie);agentBots(t,e){return this.botController.listAgentMessagingBots(t,e)}attach(t,e,s,i,l){return this.botController.attachMessagingBot(t,e,{platform:s,token:i,appToken:l})}manifest(t,e,s){return this.botController.getMessagingBotAppManifest(t,e,s)}requestCreation(t,e,s){return this.botController.requestMessagingBotCreation(t,e,{platform:s})}setEnabled(t,e){return this.botController.updateMessagingBot(t,{enabled:e})}remove(t){return this.botController.deleteMessagingBot(t)}managers(){return this.botController.listMessagingBotManagers()}setManager(t,e){return this.botController.setMessagingBotManager({platform:t,token:e})}removeManager(t){return this.botController.deleteMessagingBotManager(t)}static \u0275fac=function(e){return new(e||r)};static \u0275prov=k({token:r,factory:r.\u0275fac,providedIn:"root"})};export{g};
@@ -1 +0,0 @@
1
- import {c}from'./chunk-Cdc4bldZ.js';import {r as k,O as O$1,i as at,d as yn,V as Vo,A as Ao,k as P,w as P$1}from'./chunk-DwEcQtO1.js';import {g,F,v as we,M as Mi,x as U$1,am as De,ap as _e,a as ew,o as os,K as qh,z as zu,b as pC,I as Iw,c as IE,J as Vh,w as ww,L as Lw,l as lg,T as Tw,_ as _w,R as Rw,P as Pd,n as Ld,h as Bh}from'./main-JXQYBZRK.js';var M=(n,t)=>t.id??t.name;function U(n,t){if(n&1&&(os(0,"p",3),pC(1),zu()),n&2){let e=Lw();IE(),lg(e.deletion.error());}}function B(n,t){n&1&&(os(0,"p",4),pC(1,"Loading scheduled prompts\u2026"),zu());}function j(n,t){n&1&&(os(0,"p",5),pC(1,"No platform scheduled prompts defined yet."),zu());}function W(n,t){n&1&&(os(0,"p",4),pC(1,"No scheduled prompts match the current filter."),zu());}function H(n,t){if(n&1&&(os(0,"span",14),pC(1),zu()),n&2){let e=Lw().$implicit;IE(),lg(e.description);}}function O(n,t){if(n&1){let e=Rw();os(0,"button",21),qh("click",function(){Pd(e);let s=Lw().$implicit,c=Lw(2);return Ld(c.toggle(s))}),pC(1),zu(),os(2,"button",21),qh("click",function(){Pd(e);let s=Lw().$implicit,c=Lw(2);return Ld(c.edit(s))}),pC(3,"Edit"),zu();}if(n&2){let e=Lw().$implicit;IE(),lg(e.enabled?"Disable":"Enable"),IE(),Bh("aria-label","Edit "+e.name);}}function Y(n,t){if(n&1){let e=Rw();os(0,"agentos-row-delete-action",22),qh("deleteRequested",function(){Pd(e);let s=Lw().$implicit,c=Lw(2);return Ld(c.deletion.request(s.id))})("deleteConfirmed",function(){Pd(e);let s=Lw().$implicit,c=Lw(2);return Ld(c.confirmDelete(s))})("deleteCancelled",function(){Pd(e);let s=Lw(3);return Ld(s.deletion.cancel())}),zu();}if(n&2){let e=Lw().$implicit,i=Lw(2);Vh("rowKey",e.id)("rowLabel",e.name)("state",i.deletion);}}function z(n,t){if(n&1&&(os(0,"tr",9)(1,"td",12)(2,"span",13),pC(3),zu(),Iw(4,H,2,1,"span",14),zu(),os(5,"td",15),pC(6),zu(),os(7,"td",16)(8,"ds-tag",17),pC(9),zu()(),os(10,"td",18)(11,"div",19),Iw(12,O,4,2),Iw(13,Y,1,3,"agentos-row-delete-action",20),zu()()()),n&2){let e=t.$implicit,i=Lw(2);IE(3),lg(e.name),IE(),ww(e.description?4:-1),IE(2),lg(i.scheduleLabel(e)),IE(2),Vh("variant",e.enabled?"accent":"outline"),IE(),lg(e.enabled?"Enabled":"Disabled"),IE(3),ww(i.deletion.confirmingId()!==e.id?12:-1),IE(),ww(e.id?13:-1);}}function G(n,t){if(n&1&&(os(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),pC(5,"Name"),zu(),os(6,"th",10),pC(7,"Schedule"),zu(),os(8,"th",10),pC(9,"Status"),zu(),os(10,"th",10)(11,"span",11),pC(12,"Actions"),zu()()()(),os(13,"tbody",8),Tw(14,z,14,7,"tr",9,M),zu()()()),n&2){let e=Lw();IE(14),_w(e.rowFilter.filteredRows());}}var A=class n{router=g(F);destroyRef=g(we);state=g(c);prompts=Mi([]);isLoading=Mi(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===De.WEEK?"week":"month",s=e.unit===De.WEEK&&e.days?.length?` (${e.days.map(c=>_e[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=ew({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&&(os(0,"ds-section-header",0)(1,"agentos-table-filter",1),qh("queryChange",function(c){return i.rowFilter.query.set(c)}),zu(),os(2,"button",2),qh("click",function(){return i.openCreateForm()}),pC(3,"New scheduled prompt"),zu()(),Iw(4,U,2,1,"p",3),Iw(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&&(IE(),Vh("query",i.rowFilter.query()),IE(3),ww(i.deletion.error()?4:-1),IE(),ww(i.isLoading()?5:i.prompts().length===0?6:i.rowFilter.filteredRows().length===0?7:8));},dependencies:[at,yn,Vo,Ao,P,P$1],encapsulation:2})};export{A as PlatformScheduledPromptsComponent};
@@ -1 +0,0 @@
1
- import {r as k$1,O as O$1,i as at,d as yn,V as Vo,k as P,w as P$1}from'./chunk-DwEcQtO1.js';import {g,F,v as we,au as k,at as F$1,a3 as vr,M as Mi,a5 as Ys,aw as $m,x as U$1,a as ew,o as os,K as qh,z as zu,b as pC,I as Iw,c as IE,J as Vh,w as ww,L as Lw,l as lg,T as Tw,_ as _w,R as Rw,P as Pd,n as Ld,Y as Yu,h as Bh}from'./main-JXQYBZRK.js';var K=(o,t)=>t.key;function H(o,t){if(o&1&&(os(0,"p",3),pC(1),zu()),o&2){let e=Lw();IE(),lg(e.deletion.error());}}function U(o,t){o&1&&(os(0,"p",4),pC(1,"Loading AI models\u2026"),zu());}function z(o,t){o&1&&(os(0,"p",5),pC(1,"No platform AI models defined yet."),zu());}function G(o,t){o&1&&(os(0,"p",4),pC(1,"No AI models match the current filter."),zu());}function J(o,t){if(o&1){let e=Rw();os(0,"button",21),qh("click",function(){Pd(e);let r=Lw().$implicit,m=Lw(2);return Ld(m.edit(r))}),pC(1,"Edit"),zu();}if(o&2){let e=Lw().$implicit;Bh("aria-label","Edit "+e.title);}}function O(o,t){if(o&1){let e=Rw();os(0,"tr",9)(1,"td",12),pC(2),zu(),os(3,"td",13),pC(4),zu(),os(5,"td",14),pC(6),zu(),os(7,"td",15),pC(8),zu(),os(9,"td",16),pC(10),zu(),os(11,"td",17)(12,"div",18),Iw(13,J,2,1,"button",19),os(14,"agentos-row-delete-action",20),qh("deleteRequested",function(){let r=Pd(e).$implicit,m=Lw(2);return Ld(m.deletion.request(r.key))})("deleteConfirmed",function(){let r=Pd(e).$implicit,m=Lw(2);return Ld(m.confirmDelete(r))})("deleteCancelled",function(){Pd(e);let r=Lw(2);return Ld(r.deletion.cancel())}),zu()()()();}if(o&2){let e=t.$implicit,a=Lw(2);IE(2),lg(e.title),IE(2),lg(e.providerName),IE(2),Yu(" ",e.model.apiModelName," "),IE(2),lg(e.model.priority),IE(2),Yu(" ",e.model.reasoningEffort?e.model.reasoningEffort.toLowerCase():"\u2014"," "),IE(3),ww(a.deletion.confirmingId()!==e.key?13:-1),IE(),Vh("rowKey",e.key)("rowLabel",e.title)("state",a.deletion);}}function Q(o,t){if(o&1&&(os(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),pC(5,"Name"),zu(),os(6,"th",10),pC(7,"Provider"),zu(),os(8,"th",10),pC(9,"API model name"),zu(),os(10,"th",10),pC(11,"Priority"),zu(),os(12,"th",10),pC(13,"Reasoning effort"),zu(),os(14,"th",10)(15,"span",11),pC(16,"Actions"),zu()()()(),os(17,"tbody",8),Tw(18,O,15,9,"tr",9,K),zu()()()),o&2){let e=Lw();IE(18),_w(e.rowFilter.filteredRows());}}var j=class o{router=g(F);destroyRef=g(we);aiModelController=g(k);aiProviderController=g(F$1);refresh$=new vr(void 0);isLoading=Mi(true);deletion=k$1();rows=Mi([]);rowFilter=O$1(this.rows,t=>[t.title,t.model.apiModelName,t.providerName].filter(Boolean).join(" "));constructor(){this.refresh$.pipe(Ys(()=>(this.isLoading.set(true),$m([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=ew({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&&(os(0,"ds-section-header",0)(1,"agentos-table-filter",1),qh("queryChange",function(m){return a.rowFilter.query.set(m)}),zu(),os(2,"button",2),qh("click",function(){return a.openCreateForm()}),pC(3,"New AI model"),zu()(),Iw(4,H,2,1,"p",3),Iw(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&&(IE(),Vh("query",a.rowFilter.query()),IE(3),ww(a.deletion.error()?4:-1),IE(),ww(a.isLoading()?5:a.rows().length===0?6:a.rowFilter.filteredRows().length===0?7:8));},dependencies:[at,yn,Vo,P,P$1],encapsulation:2})};export{j as PlatformAiModelsComponent};
@@ -1 +0,0 @@
1
- import {x as m,r as k,O as O$1,i as at,d as yn,V as Vo,k as P,w as P$1}from'./chunk-DwEcQtO1.js';import {g,F,v as we,a3 as vr,M as Mi,a5 as Ys,x as U$1,a as ew,o as os,K as qh,z as zu,b as pC,I as Iw,c as IE,J as Vh,w as ww,L as Lw,l as lg,T as Tw,_ as _w,Y as Yu,R as Rw,h as Bh,P as Pd,n as Ld}from'./main-JXQYBZRK.js';var j=(t,e)=>e.id??e.name;function A(t,e){if(t&1&&(os(0,"p",3),pC(1),zu()),t&2){let n=Lw();IE(),lg(n.deletion.error());}}function K(t,e){t&1&&(os(0,"p",4),pC(1,"Loading prompts\u2026"),zu());}function H(t,e){t&1&&(os(0,"p",5),pC(1,"No platform prompts defined yet."),zu());}function U(t,e){t&1&&(os(0,"p",4),pC(1,"No prompts match the current filter."),zu());}function z(t,e){if(t&1){let n=Rw();os(0,"button",18),qh("click",function(){Pd(n);let m=Lw().$implicit,p=Lw(2);return Ld(p.edit(m))}),pC(1,"Edit"),zu();}if(t&2){let n=Lw().$implicit;Bh("aria-label","Edit "+n.name);}}function G(t,e){if(t&1){let n=Rw();os(0,"agentos-row-delete-action",19),qh("deleteRequested",function(){Pd(n);let m=Lw().$implicit,p=Lw(2);return Ld(p.deletion.request(m.id))})("deleteConfirmed",function(){Pd(n);let m=Lw().$implicit,p=Lw(2);return Ld(p.confirmDelete(m))})("deleteCancelled",function(){Pd(n);let m=Lw(3);return Ld(m.deletion.cancel())}),zu();}if(t&2){let n=Lw().$implicit,r=Lw(2);Vh("rowKey",n.id)("rowLabel",n.name)("state",r.deletion);}}function J(t,e){if(t&1&&(os(0,"tr",9)(1,"td",12),pC(2),zu(),os(3,"td",13),pC(4),zu(),os(5,"td",14)(6,"div",15),Iw(7,z,2,1,"button",16),Iw(8,G,1,3,"agentos-row-delete-action",17),zu()()()),t&2){let n=e.$implicit,r=Lw(2);IE(2),lg(n.name),IE(2),Yu(" ",n.description||"\u2014"," "),IE(3),ww(r.deletion.confirmingId()!==n.id?7:-1),IE(),ww(n.id?8:-1);}}function O(t,e){if(t&1&&(os(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),pC(5,"Name"),zu(),os(6,"th",10),pC(7,"Description"),zu(),os(8,"th",10)(9,"span",11),pC(10,"Actions"),zu()()()(),os(11,"tbody",8),Tw(12,J,9,4,"tr",9,j),zu()()()),t&2){let n=Lw();IE(12),_w(n.rowFilter.filteredRows());}}var B=class t{router=g(F);destroyRef=g(we);promptState=g(m);refresh$=new vr(void 0);isLoading=Mi(true);deletion=k();prompts=Mi([]);rowFilter=O$1(this.prompts,e=>[e.name,e.description].filter(Boolean).join(" "));constructor(){this.refresh$.pipe(Ys(()=>(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=ew({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&&(os(0,"ds-section-header",0)(1,"agentos-table-filter",1),qh("queryChange",function(p){return r.rowFilter.query.set(p)}),zu(),os(2,"button",2),qh("click",function(){return r.openCreateForm()}),pC(3,"New prompt"),zu()(),Iw(4,A,2,1,"p",3),Iw(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&&(IE(),Vh("query",r.rowFilter.query()),IE(3),ww(r.deletion.error()?4:-1),IE(),ww(r.isLoading()?5:r.prompts().length===0?6:r.rowFilter.filteredRows().length===0?7:8));},dependencies:[at,yn,Vo,P,P$1],encapsulation:2})};export{B as PlatformPromptsComponent};