@whoz-oss/coday-client 0.0.0-workstream-forge.266 → 0.0.0-workstream-messaging.9

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-B2OdW-y7.js +1 -0
  2. package/browser/chunk-B4aagjFN.js +1 -0
  3. package/browser/chunk-BDBFLLoa.js +2 -0
  4. package/browser/chunk-BS4UgHRO.js +1 -0
  5. package/browser/chunk-BZ4F5_xt.js +1 -0
  6. package/browser/chunk-BZ8SegKy.js +1 -0
  7. package/browser/chunk-BatABxZT.js +1 -0
  8. package/browser/chunk-Bb1dx-Ci.js +1 -0
  9. package/browser/chunk-Bh7y7EIZ.js +1 -0
  10. package/browser/chunk-BjTEffSr.js +1 -0
  11. package/browser/{chunk-MzRAkbwR.js → chunk-BnIh2Agv.js} +1 -1
  12. package/browser/chunk-BsPrQGCO.js +1 -0
  13. package/browser/chunk-BtzGwr18.js +1 -0
  14. package/browser/chunk-Bv223hQn.js +1 -0
  15. package/browser/chunk-BxNPtuPg.js +1 -0
  16. package/browser/{chunk-BzTXrMsf.js → chunk-C4mkvgOW.js} +1 -1
  17. package/browser/{chunk-IMqSwtoo.js → chunk-C6aXXb6M.js} +1 -1
  18. package/browser/chunk-C86Xogns.js +1 -0
  19. package/browser/chunk-CEHHoMbA.js +2 -0
  20. package/browser/chunk-CHRZly0o.js +1 -0
  21. package/browser/chunk-CKcknwaO.js +1 -0
  22. package/browser/chunk-CZkST2Zn.js +1 -0
  23. package/browser/{chunk-DA_ON43Y.js → chunk-CdzB1hlk.js} +1 -1
  24. package/browser/chunk-CkbrWR16.js +1 -0
  25. package/browser/chunk-Cng5sc1A.js +1 -0
  26. package/browser/chunk-CpLFr6wl.js +1 -0
  27. package/browser/chunk-CwbSc94v.js +1 -0
  28. package/browser/chunk-DCYS0PGC.js +1 -0
  29. package/browser/chunk-DGU69dIe.js +1 -0
  30. package/browser/chunk-D_dIjWIZ.js +1 -0
  31. package/browser/chunk-DcX96pJb.js +1 -0
  32. package/browser/chunk-Ddc_ENU1.js +1 -0
  33. package/browser/chunk-DmkvfivC.js +1 -0
  34. package/browser/{chunk-D15w64SG.js → chunk-DnJZx-N1.js} +1 -1
  35. package/browser/{chunk-DxjesQXu.js → chunk-Do3ec7CW.js} +1 -1
  36. package/browser/{chunk-C3fz6Nhs.js → chunk-DoVW4Qid.js} +1 -1
  37. package/browser/chunk-DvtbHzPu.js +671 -0
  38. package/browser/chunk-DymDoxBo.js +1 -0
  39. package/browser/chunk-DzQphzTy.js +1 -0
  40. package/browser/chunk-KYe8W5ss.js +1 -0
  41. package/browser/chunk-MdjBSjZT.js +1 -0
  42. package/browser/chunk-RltTZwlz.js +1 -0
  43. package/browser/{chunk-CXhczMHJ.js → chunk-_ojJ8Ms-.js} +1 -1
  44. package/browser/chunk-bst4n40I.js +1 -0
  45. package/browser/chunk-iZXu2H1x.js +1 -0
  46. package/browser/chunk-lCKocljz.js +1 -0
  47. package/browser/chunk-t-Kfnaoc.js +1 -0
  48. package/browser/chunk-tEeX_Ukz.js +1 -0
  49. package/browser/chunk-yULRQNfZ.js +1 -0
  50. package/browser/index.html +1 -1
  51. package/browser/main-OQ262YIZ.js +1254 -0
  52. package/package.json +1 -1
  53. package/browser/chunk-5l4dJKzj.js +0 -1
  54. package/browser/chunk-6G_HDlLt.js +0 -1
  55. package/browser/chunk-8ZA-dXSc.js +0 -2
  56. package/browser/chunk-B1-Po7IP.js +0 -1
  57. package/browser/chunk-B1ETqMnn.js +0 -1
  58. package/browser/chunk-B6ucC9JA.js +0 -1
  59. package/browser/chunk-B8yw58sL.js +0 -1
  60. package/browser/chunk-B9m_Pv-N.js +0 -1
  61. package/browser/chunk-BAFDJC7n.js +0 -1
  62. package/browser/chunk-BCtLUKA1.js +0 -1
  63. package/browser/chunk-BEGiDML0.js +0 -1
  64. package/browser/chunk-BItNUZzz.js +0 -1
  65. package/browser/chunk-BMgJXfSE.js +0 -1
  66. package/browser/chunk-BUdZ5OqC.js +0 -1
  67. package/browser/chunk-BVY2wOIp.js +0 -1
  68. package/browser/chunk-BeAWBIRs.js +0 -671
  69. package/browser/chunk-BeGVJrPy.js +0 -1
  70. package/browser/chunk-BfJl60vA.js +0 -1
  71. package/browser/chunk-BkRwWFjx.js +0 -2
  72. package/browser/chunk-BoLw7dqx.js +0 -1
  73. package/browser/chunk-C1mIsJc9.js +0 -1
  74. package/browser/chunk-CfLZEoOb.js +0 -1
  75. package/browser/chunk-ChYykPZM.js +0 -1
  76. package/browser/chunk-CkDaEVkZ.js +0 -1
  77. package/browser/chunk-CmjEguYB.js +0 -1
  78. package/browser/chunk-Cq9rgtVx.js +0 -1
  79. package/browser/chunk-CvFTKrrN.js +0 -1
  80. package/browser/chunk-D8O-XquS.js +0 -1
  81. package/browser/chunk-D9cyFDnZ.js +0 -1
  82. package/browser/chunk-DAC1_8mf.js +0 -1
  83. package/browser/chunk-DSe6H4u5.js +0 -1
  84. package/browser/chunk-DYGNedc1.js +0 -1
  85. package/browser/chunk-Db_G9wnV.js +0 -1
  86. package/browser/chunk-Tz-PZzVS.js +0 -1
  87. package/browser/chunk-Vn-xaj9q.js +0 -1
  88. package/browser/chunk-fbDk9ppW.js +0 -1
  89. package/browser/chunk-jfM6q-6w.js +0 -1
  90. package/browser/chunk-t3EN_XZw.js +0 -1
  91. package/browser/main-P6EOYPYG.js +0 -1253
@@ -0,0 +1 @@
1
+ import {ae as N,v as vn,d as yn,e as fn,h as hn,_ as _n,i as at,u as un}from'./chunk-DvtbHzPu.js';import {g,W,F,a_ as D,ak as U,v as we,M as Mi,x as U$1,B,a$ as Fm,a as ew,o as os,K as qh,b as pC,z as zu,H as Hh,I as Iw,c as IE,J as Vh,w as ww,Y as Yu,L as Lw,l as lg}from'./main-OQ262YIZ.js';function P(l,t){if(l&1&&(os(0,"ds-notice"),pC(1),zu()),l&2){let n=Lw();IE(),lg(n.launchError());}}var T=class l{route=g(W);router=g(F);caseController=g(D);caseState=g(N);agentConfigController=g(U);destroyRef=g(we);namespaceId=this.route.snapshot.params.namespaceId;agentConfigId=this.route.snapshot.params.agentConfigId;resolvedAgentConfig=null;payloadJson=Mi("");launchError=Mi(null);isLaunching=Mi(false);isLoading=Mi(false);ngOnInit(){this.isLoading.set(true),this.agentConfigController.getByIdAgentConfig(this.agentConfigId).pipe(U$1(this.destroyRef)).subscribe({next:t=>{this.resolvedAgentConfig=t,t.loopConfig!=null&&this.payloadJson.set(JSON.stringify(t.loopConfig,null,2)),this.isLoading.set(false);},error:()=>{this.isLoading.set(false);}});}launch(){return B(this,null,function*(){this.launchError.set(null),this.isLaunching.set(true);try{let t=this.resolvedAgentConfig??(yield Fm(this.agentConfigController.getByIdAgentConfig(this.agentConfigId))),n=yield Fm(this.caseController.createCase({namespaceId:this.namespaceId}));this.caseState.addCase(n);let e=n.id??"",d={content:`@${t.name} start`};yield Fm(this.caseController.addMessageCase(e,d)),this.router.navigate(["/agentos/home"],{queryParams:{ns:this.namespaceId,case:e}});}catch(t){console.error("[AgentConfigLaunch] Failed to launch loop agent",t),this.launchError.set("Failed to launch the agent loop. Please check the console for details."),this.isLaunching.set(false);}})}back(){this.router.navigate(["/agentos",this.namespaceId,"agent-configs",this.agentConfigId,"edit"]);}static \u0275fac=function(n){return new(n||l)};static \u0275cmp=ew({type:l,selectors:[["agentos-agent-config-launch"]],decls:17,vars:6,consts:[["title","Launch loop agent"],["dsButton","","variant","ghost","type","button","title","Back to agent config",3,"click"],[1,"ds-hint"],["label","Loop configuration (read-only)","controlId","agent-loop-payload"],["dsControl","","mono","","id","agent-loop-payload","rows","15","readonly","","spellcheck","false","autocomplete","off",3,"value","disabled"],["dsButton","","variant","primary","type","button",3,"click","disabled"],["dsButton","","type","button",3,"click","disabled"]],template:function(n,e){n&1&&(os(0,"ds-page")(1,"ds-section-header",0)(2,"button",1),qh("click",function(){return e.back()}),pC(3," \u2190 Edit agent config "),zu()(),os(4,"p",2),pC(5," The loop configuration below is read from "),os(6,"code"),pC(7,"AgentConfig.loopConfig"),zu(),pC(8," and will be used by the backend when the agent loop starts. A new Case will be created and one child case will be launched per entity found. "),zu(),os(9,"ds-form-field",3),Hh(10,"textarea",4),zu(),Iw(11,P,2,1,"ds-notice"),os(12,"ds-form-actions")(13,"button",5),qh("click",function(){return e.launch()}),pC(14),zu(),os(15,"button",6),qh("click",function(){return e.back()}),pC(16,"Cancel"),zu()()()),n&2&&(IE(10),Vh("value",e.payloadJson())("disabled",e.isLaunching()||e.isLoading()),IE(),ww(e.launchError()?11:-1),IE(2),Vh("disabled",e.isLaunching()),IE(),Yu(" ",e.isLaunching()?"Launching\u2026":"Launch"," "),IE(),Vh("disabled",e.isLaunching()));},dependencies:[vn,yn,fn,hn,_n,at,un],encapsulation:2})};export{T as AgentConfigLaunchComponent};
@@ -0,0 +1 @@
1
+ import {o}from'./chunk-Do3ec7CW.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-DvtbHzPu.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,P as Pd,n as Ld,h as Bh}from'./main-OQ262YIZ.js';var K=(i,e)=>e.id??e.name;function O(i,e){if(i&1&&(os(0,"p",3),pC(1),zu()),i&2){let t=Lw();IE(),lg(t.deletion.error());}}function A(i,e){i&1&&(os(0,"p",4),pC(1,"Loading skills\u2026"),zu());}function H(i,e){i&1&&(os(0,"p",5),pC(1,"No platform skills defined yet."),zu());}function U(i,e){i&1&&(os(0,"p",4),pC(1,"No skills match the current filter."),zu());}function z(i,e){i&1&&(os(0,"ds-tag",15),pC(1,"SKILL.md"),zu());}function G(i,e){if(i&1){let t=Rw();os(0,"button",21),qh("click",function(){Pd(t);let d=Lw(2).$implicit,m=Lw(2);return Ld(m.edit(d))}),pC(1,"Edit"),zu();}if(i&2){let t=Lw(2).$implicit;Bh("aria-label","Edit "+t.name);}}function J(i,e){if(i&1){let t=Rw();os(0,"button",21),qh("click",function(){Pd(t);let d=Lw().$implicit,m=Lw(2);return Ld(m.inspect(d))}),pC(1,"View"),zu(),Iw(2,G,2,1,"button",22);}if(i&2){let t=Lw().$implicit;Bh("aria-label","View "+t.name),IE(2),ww(t.readOnly?-1:2);}}function Q(i,e){if(i&1){let t=Rw();os(0,"agentos-row-delete-action",23),qh("deleteRequested",function(){Pd(t);let d=Lw().$implicit,m=Lw(2);return Ld(m.deletion.request(d.id))})("deleteConfirmed",function(){Pd(t);let d=Lw().$implicit,m=Lw(2);return Ld(m.confirmDelete(d))})("deleteCancelled",function(){Pd(t);let d=Lw(3);return Ld(d.deletion.cancel())}),zu();}if(i&2){let t=Lw().$implicit,l=Lw(2);Vh("rowKey",t.id)("rowLabel",t.name)("state",l.deletion);}}function W(i,e){if(i&1&&(os(0,"tr",9)(1,"td",12)(2,"div",13)(3,"span",14),pC(4),zu(),Iw(5,z,2,0,"ds-tag",15),zu()(),os(6,"td",16),pC(7),zu(),os(8,"td",17),pC(9),zu(),os(10,"td",18)(11,"div",19),Iw(12,J,3,2),Iw(13,Q,1,3,"agentos-row-delete-action",20),zu()()()),i&2){let t=e.$implicit,l=Lw(2);IE(4),lg(t.name),IE(),ww(t.readOnly?5:-1),IE(2),Yu(" ",t.description||"\u2014"," "),IE(2),lg(l.resourceCount(t)),IE(3),ww(l.deletion.confirmingId()!==t.id?12:-1),IE(),ww(!t.readOnly&&t.id?13:-1);}}function X(i,e){if(i&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),pC(9,"Resources"),zu(),os(10,"th",10)(11,"span",11),pC(12,"Actions"),zu()()()(),os(13,"tbody",8),Tw(14,W,14,6,"tr",9,K),zu()()()),i&2){let t=Lw();IE(14),_w(t.rowFilter.filteredRows());}}var B=class i{router=g(F);destroyRef=g(we);skillState=g(o);refresh$=new vr(void 0);isLoading=Mi(true);deletion=k();skills=Mi([]);rowFilter=O$1(this.skills,e=>[e.name,e.description].filter(Boolean).join(" "));constructor(){this.refresh$.pipe(Ys(()=>(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=ew({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&&(os(0,"ds-section-header",0)(1,"agentos-table-filter",1),qh("queryChange",function(m){return l.rowFilter.query.set(m)}),zu(),os(2,"button",2),qh("click",function(){return l.openCreateForm()}),pC(3,"New skill"),zu()(),Iw(4,O,2,1,"p",3),Iw(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&&(IE(),Vh("query",l.rowFilter.query()),IE(3),ww(l.deletion.error()?4:-1),IE(),ww(l.isLoading()?5:l.skills().length===0?6:l.rowFilter.filteredRows().length===0?7:8));},dependencies:[at,yn,Vo,Ao,P,P$1],encapsulation:2})};export{B as PlatformSkillsComponent};
@@ -0,0 +1 @@
1
+ import {g as g$1}from'./chunk-Bv223hQn.js';import {j as e}from'./chunk-DvtbHzPu.js';import {g,v as we,M as Mi,i as VC,x as U,a as ew,X as Kb,G as Gu,b as pC,d as Wu,I as Iw,c as IE,Y as Yu,$ as dg,w as ww,R as Rw,a0 as RC,U as Uh,Z as Zh,P as Pd,L as Lw,n as Ld,l as lg,a1 as FC,f as Gh}from'./main-OQ262YIZ.js';function R(r,n){if(r&1){let e=Rw();Gu(0,"span",11),pC(1,"Remove it? The bots it created stay."),Wu(),Gu(2,"button",15),Zh("click",function(){Pd(e);let t=Lw(2);return Ld(t.remove())}),pC(3," Remove "),Wu(),Gu(4,"button",13),Zh("click",function(){Pd(e);let t=Lw(2);return Ld(t.confirmingRemove.set(false))}),pC(5,"Cancel"),Wu();}if(r&2){let e=Lw(2);IE(2),Gh("disabled",e.busy());}}function I(r,n){if(r&1){let e=Rw();Gu(0,"button",13),Zh("click",function(){Pd(e);let t=Lw(2);return Ld(t.confirmingRemove.set(true))}),pC(1,"Remove"),Wu();}}function V(r,n){if(r&1){let e=Rw();Gu(0,"div",5)(1,"span",9),pC(2),Wu(),Gu(3,"span",10),pC(4),Wu(),Gu(5,"span",11),pC(6),RC(7,"date"),Wu(),Uh(8,"span",12),Gu(9,"button",13),Zh("click",function(){Pd(e);let t=Lw();return Ld(t.replacing.set(!t.replacing()))}),pC(10,"Replace"),Wu(),Iw(11,R,6,1)(12,I,2,0,"button",14),Wu();}if(r&2){let e=n,o=Lw();IE(2),Yu("@",e.username),IE(2),lg(o.statusLabel(e.status)),IE(2),Yu("since ",FC(7,4,e.createdAt,"mediumDate")),IE(5),ww(o.confirmingRemove()?11:12);}}function z(r,n){if(r&1&&(Gu(0,"ol",6)(1,"li"),pC(2),Wu(),Gu(3,"li"),pC(4,"In BotFather's Mini App, open the bot's settings and turn Bot Management Mode on."),Wu(),Gu(5,"li"),pC(6,"Paste the bot's token below. It is stored encrypted and never shown again."),Wu()()),r&2){let e=Lw();IE(2),Yu("In ",e.platformName,', create a bot with @BotFather (/newbot), for example "AgentOS".');}}function B(r,n){if(r&1){let e=Rw();Gu(0,"form",16),Zh("submit",function(t){Pd(e);let p=Lw();return t.preventDefault(),Ld(p.save())}),Gu(1,"label",17),pC(2,"Bot manager token"),Wu(),Gu(3,"input",18),Zh("input",function(t){Pd(e);let p=Lw();return Ld(p.token.set(t.target.value))}),Wu(),Gu(4,"button",19),pC(5),Wu()();}if(r&2){let e=Lw();IE(3),Gh("value",e.token()),IE(),Gh("disabled",e.busy()||!e.token().trim()),IE(),Yu(" ",e.manager()?"Replace":"Set"," ");}}function L(r,n){r&1&&(Gu(0,"p",8),pC(1),Wu()),r&2&&(IE(),lg(n));}var D=class r{botConfig=g(g$1);destroyRef=g(we);platform="TELEGRAM";platformName=e("TELEGRAM");managers=Mi([]);manager=VC(()=>this.managers().find(n=>n.platform===this.platform)??null);replacing=Mi(false);confirmingRemove=Mi(false);token=Mi("");busy=Mi(false);error=Mi(null);ngOnInit(){this.run(this.botConfig.managers(),n=>this.managers.set(n),"Could not load the bot managers.");}statusLabel(n){return n==="RUNNING"?"Running":n.replace("_"," ").toLowerCase()}save(){let n=this.token().trim();n&&this.run(this.botConfig.setManager(this.platform,n),e=>{this.token.set(""),this.replacing.set(false),this.managers.update(o=>[...o.filter(t=>t.platform!==e.platform),e]);},`${this.platformName} refused this token, or the bot cannot manage other bots yet.`);}remove(){this.confirmingRemove.set(false),this.run(this.botConfig.removeManager(this.platform),()=>this.managers.update(n=>n.filter(e=>e.platform!==this.platform)),"Could not remove the bot manager.");}run(n,e,o){this.error.set(null),this.busy.set(true),n.pipe(U(this.destroyRef)).subscribe({next:t=>{this.busy.set(false),e(t);},error:t=>{console.error("[AdminMessaging]",o,t),this.busy.set(false),this.error.set(t?.error?.message??o);}});}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=ew({type:r,selectors:[["agentos-admin-messaging"]],decls:12,vars:6,consts:[[1,"admin-messaging"],[1,"admin-messaging__title"],[1,"admin-messaging__section"],[1,"admin-messaging__section-title"],[1,"admin-messaging__hint"],[1,"admin-messaging__row"],[1,"admin-messaging__steps"],[1,"admin-messaging__token"],["role","alert",1,"admin-messaging__error"],[1,"admin-messaging__bot"],[1,"admin-messaging__status"],[1,"admin-messaging__note"],[1,"admin-messaging__spacer"],["type","button",1,"admin-messaging__btn",3,"click"],["type","button",1,"admin-messaging__btn"],["type","button",1,"admin-messaging__btn","admin-messaging__btn--danger",3,"click","disabled"],[1,"admin-messaging__token",3,"submit"],["for","admin-messaging-token",1,"admin-messaging__label"],["id","admin-messaging-token","type","password","name","token","autocomplete","off","placeholder","123456789:AA\u2026",1,"admin-messaging__input",3,"input","value"],["type","submit",1,"admin-messaging__btn","admin-messaging__btn--primary",3,"disabled"]],template:function(e,o){if(e&1&&(Gu(0,"div",0)(1,"h1",1),pC(2,"Messaging"),Wu(),Gu(3,"section",2)(4,"h2",3),pC(5),Wu(),Gu(6,"p",4),pC(7),Wu(),Iw(8,V,13,7,"div",5)(9,z,7,1,"ol",6),Iw(10,B,6,3,"form",7),Iw(11,L,2,1,"p",8),Wu()()),e&2){let t,p;IE(5),Yu("",o.platformName," bot manager"),IE(2),dg(" The bot manager creates the ",o.platformName," bots of agents for the admins of their namespace: on an agent's page, Create a bot opens ",o.platformName,", the admin confirms, and the bot answers as the agent. Nobody copies a token. Without a bot manager, an agent can still get a bot created with @BotFather, from its token. "),IE(),ww((t=o.manager())?8:9,t),IE(2),ww(!o.manager()||o.replacing()?10:-1),IE(),ww((p=o.error())?11:-1,p);}},dependencies:[Kb],styles:[".admin-messaging[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.admin-messaging__title[_ngcontent-%COMP%]{margin:0;font-family:var(--font-heading);font-size:1.25rem;font-weight:600;color:var(--color-text)}.admin-messaging__hint[_ngcontent-%COMP%], .admin-messaging__note[_ngcontent-%COMP%]{margin:0;font-size:.8125rem;color:var(--color-text-secondary)}.admin-messaging__warning[_ngcontent-%COMP%]{margin:0;font-size:.8125rem;color:var(--color-warning, #b26a00)}.admin-messaging__error[_ngcontent-%COMP%]{margin:0;font-size:.8125rem;color:var(--color-error, #c62828)}.admin-messaging__row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem}.admin-messaging__spacer[_ngcontent-%COMP%]{flex:1}.admin-messaging__bot[_ngcontent-%COMP%]{font-family:var(--font-mono, monospace);font-size:.9375rem;color:var(--color-accent);text-decoration:none}.admin-messaging__bot[_ngcontent-%COMP%]:hover{text-decoration:underline}.admin-messaging__status[_ngcontent-%COMP%]{padding:.1rem .5rem;border:1px solid var(--color-divider);border-radius:var(--radius-sm, 0);font-size:.75rem;font-weight:600}.admin-messaging__status--ok[_ngcontent-%COMP%]{border-color:var(--color-success, #2e7d32);color:var(--color-success, #2e7d32)}.admin-messaging__status--off[_ngcontent-%COMP%]{color:var(--color-text-secondary)}.admin-messaging__status--warn[_ngcontent-%COMP%]{border-color:var(--color-warning, #b26a00);color:var(--color-warning, #b26a00)}.admin-messaging__token[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem}.admin-messaging__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text-secondary)}.admin-messaging__input[_ngcontent-%COMP%]{flex:1;min-width:16rem;padding:.4rem .6rem;border:1px solid var(--color-divider);border-radius:var(--radius-sm, 0);background:var(--color-bg);color:var(--color-text);font-family:var(--font-mono, monospace);font-size:.875rem}.admin-messaging__btn[_ngcontent-%COMP%]{padding:.4rem .9rem;border:1px solid var(--color-divider);border-radius:var(--radius-sm, 0);background:transparent;color:var(--color-text);font-size:13px;font-family:var(--font-heading);font-weight:600;text-decoration:none;cursor:pointer}.admin-messaging__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover);border-color:var(--color-neutral-500)}.admin-messaging__btn[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:default}.admin-messaging__btn--primary[_ngcontent-%COMP%]{border-color:var(--color-accent);color:var(--color-accent)}.admin-messaging__btn--danger[_ngcontent-%COMP%]{border-color:var(--color-error, #c62828);color:var(--color-error, #c62828)}.admin-messaging__section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem}.admin-messaging__section-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}.admin-messaging__steps[_ngcontent-%COMP%]{margin:0;padding-left:1.25rem;font-size:.875rem;color:var(--color-text);line-height:1.6}"]})};export{D as AdminMessagingComponent};
@@ -0,0 +1 @@
1
+ import {e}from'./chunk-C6dIhkYp.js';import {O as O$1}from'./chunk-RltTZwlz.js';import {g,W,v as we,M as Mi,x as U,a as ew,o as os,H as Hh,I as Iw,z as zu,c as IE,w as ww,b as pC,L as Lw,l as lg}from'./main-OQ262YIZ.js';import {v as vn,d as yn,l as dn,_ as _n,m as mn,A as Ao}from'./chunk-DvtbHzPu.js';import'./chunk-iZXu2H1x.js';function O(r,e){r&1&&(os(0,"p",1),pC(1,"Loading integration\u2026"),zu());}function T(r,e){r&1&&(os(0,"ds-notice"),pC(1,"Failed to load this integration configuration."),zu());}function L(r,e){r&1&&(os(0,"div",3)(1,"ds-tag",9),pC(2,"YAML"),zu(),os(3,"ds-tag",10),pC(4,"Read-only"),zu()());}function k(r,e){if(r&1&&(os(0,"ds-card",2),Iw(1,L,5,0,"div",3),os(2,"dl",4)(3,"dt"),pC(4,"Name"),zu(),os(5,"dd"),pC(6),zu(),os(7,"dt"),pC(8,"Type"),zu(),os(9,"dd",5),pC(10),zu(),os(11,"dt"),pC(12,"Description"),zu(),os(13,"dd"),pC(14),zu(),os(15,"dt"),pC(16,"Scope"),zu(),os(17,"dd"),pC(18),zu(),os(19,"dt"),pC(20,"Source"),zu(),os(21,"dd"),pC(22),zu(),os(23,"dt"),pC(24,"Auto grant"),zu(),os(25,"dd"),pC(26),zu(),os(27,"dt"),pC(28,"Auth setting"),zu(),os(29,"dd"),pC(30),zu()()(),os(31,"ds-card",6)(32,"p",7),pC(33,"Sensitive values are always redacted."),zu(),os(34,"pre",8),pC(35),zu()()),r&2){let o=e,a=Lw();IE(),ww(a.source()==="FILESYSTEM"?1:-1),IE(5),lg(o.name),IE(4),lg(o.integrationType),IE(4),lg(o.description||"\u2014"),IE(4),lg(a.scopeOf(o)),IE(4),lg(a.source()),IE(4),lg(o.autoGrant?"Enabled":"Disabled"),IE(4),lg(o.authSettingName||"None"),IE(5),lg(a.parameters());}}var w="\u2022\u2022\u2022\u2022\u2022\u2022",A=/(?:api[-_]?key|token|secret|password|passphrase|credential|private[-_]?key|client[-_]?secret|authorization|cookie)/i,V=class r{route=g(W);destroyRef=g(we);state=g(O$1);integrationId=this.route.snapshot.params.integrationId;isLoading=Mi(true);hasError=Mi(false);config=Mi(null);source=Mi("NEO4J");parameters=Mi("{}");ngOnInit(){this.state.getById(this.integrationId).pipe(U(this.destroyRef)).subscribe({next:e$1=>{this.config.set(e$1),this.source.set(e(e$1)),this.parameters.set(JSON.stringify(this.redact(e$1.parameters),null,2)),this.isLoading.set(false);},error:()=>{this.hasError.set(true),this.isLoading.set(false);}});}scopeOf(e){let o=e.userId?e.namespaceId?"userOnNs":"userGlobal":e.namespaceId?"namespace":"platform";return {platform:"Platform",namespace:"Namespace",userOnNs:"Personal on namespace",userGlobal:"Personal global"}[o]}redact(e,o=""){return A.test(o)?w:e===null||typeof e=="boolean"||typeof e=="number"?e:typeof e=="string"?this.containsCredential(e)?w:e:Array.isArray(e)?e.map(a=>this.redact(a,o)):typeof e=="object"?Object.fromEntries(Object.entries(e).map(([a,m])=>[a,this.redact(m,a)])):String(e??"")}containsCredential(e){return /^(?:bearer\s+|basic\s+|sk[-_]|gh[opusr]_|xox[baprs]-|-----begin (?:rsa |ec |openssh )?private key-----)/i.test(e.trim())}static \u0275fac=function(o){return new(o||r)};static \u0275cmp=ew({type:r,selectors:[["agentos-integration-config-view"]],decls:5,vars:1,consts:[["title","Integration configuration"],["role","status",1,"ds-hint"],["heading","General"],[1,"settings-table__tags"],["dsDefinitionList",""],[1,"ds-mono"],["heading","Parameters"],[1,"ds-hint"],[1,"ds-pre"],["variant","neutral"],["variant","outline"]],template:function(o,a){if(o&1&&(os(0,"ds-page"),Hh(1,"ds-section-header",0),Iw(2,O,2,0,"p",1)(3,T,2,0,"ds-notice")(4,k,36,9),zu()),o&2){let m;IE(2),ww(a.isLoading()?2:a.hasError()?3:(m=a.config())?4:-1,m);}},dependencies:[vn,yn,dn,_n,mn,Ao],encapsulation:2})};export{V as IntegrationConfigViewComponent};
@@ -0,0 +1 @@
1
+ import {i}from'./chunk-iZXu2H1x.js';import {y}from'./chunk-DvtbHzPu.js';import {g,aj as G,aP as we,a3 as vr,aw as $m,a5 as Ys,a6 as Zs,ae as Dr,ah as te,aK as my,a9 as Hl,aa as k}from'./main-OQ262YIZ.js';var u=s=>s,N="none",w="me",O=class s{nsController=g(G);exportService=g(we);userState=g(y);refresh$=new vr(void 0);namespaceId$=new vr(null);vm$=$m([this.namespaceId$,this.refresh$]).pipe(Ys(([e])=>{let n=this.loadPlatformConfigs().pipe(Zs(()=>Dr([]))),t=this.loadUserConfigs("global").pipe(Zs(()=>Dr([])));return e?$m([n,this.loadNamespaceConfigs(e).pipe(Zs(()=>Dr([]))),this.loadUserConfigs(e).pipe(Zs(()=>Dr([]))),t]).pipe(te(([i,r,c,g])=>({platform:i,namespace:r,userOnNs:c,userGlobal:g}))):$m([n,t]).pipe(te(([i,r])=>({platform:i,namespace:[],userOnNs:[],userGlobal:r})))}),my({bufferSize:1,refCount:true}));setNamespace(e){this.namespaceId$.value!==e&&this.namespaceId$.next(e);}refresh(){this.refresh$.next();}loadPlatformConfigs(){return this.nsController.listIntegrationConfig(N)}loadUserConfigs(e){let n=e==="global"?N:e;return this.nsController.listIntegrationConfig(n,w)}userGlobal$=i(this.refresh$,()=>this.loadUserConfigs("global"),[]);loadNamespaceConfigs(e){return e?this.nsController.listIntegrationConfig(e):Dr([])}getById(e,n){return this.nsController.getByIdIntegrationConfig(e)}create(e,n,t){let r=this.userState.currentUser()?.id;if((n==="userOnNs"||n==="userGlobal")&&!r)throw new Error(`Cannot create ${n} config before UserStateService.loadMe() resolves \u2014 call loadMe() at app init`);if(n==="platform"){let g={name:e.name,integrationType:e.integrationType,description:e.description,parameters:e.parameters,authSettingName:e.authSettingName??void 0,autoGrant:e.autoGrant??false};return this.nsController.createIntegrationConfig(u(g)).pipe(Hl(()=>this.refresh()))}if(n==="namespace"){if(!t)throw new Error("Cannot create namespace-scoped config without a namespaceId");let g={name:e.name,integrationType:e.integrationType,description:e.description,namespaceId:t,parameters:e.parameters,authSettingName:e.authSettingName??void 0,autoGrant:e.autoGrant??false};return this.nsController.createIntegrationConfig(u(g)).pipe(Hl(()=>this.refresh()))}if(n==="userOnNs"&&!t)throw new Error("Cannot create userOnNs config without a namespaceId");let c={name:e.name,integrationType:e.integrationType,description:e.description,userId:r,namespaceId:n==="userOnNs"?t:void 0,parameters:e.parameters,authSettingName:e.authSettingName??void 0,autoGrant:e.autoGrant??false};return this.nsController.createIntegrationConfig(u(c)).pipe(Hl(()=>this.refresh()))}update(e,n,t,i){let r={name:n.name,integrationType:n.integrationType,description:n.description,userId:i.userId,namespaceId:i.namespaceId,parameters:n.parameters,authSettingName:n.authSettingName??void 0,autoGrant:n.autoGrant??false};return this.nsController.updateIntegrationConfig(e,u(r)).pipe(Hl(()=>this.refresh()))}delete(e,n){return this.nsController.deleteIntegrationConfig(e).pipe(Hl(()=>this.refresh()))}exportAsYaml(e){return this.exportService.exportAsYaml(e)}static \u0275fac=function(n){return new(n||s)};static \u0275prov=k({token:s,factory:s.\u0275fac,providedIn:"root"})};export{O};
@@ -1 +1 @@
1
- import {v}from'./chunk-fbDk9ppW.js';import {I}from'./chunk-Db_G9wnV.js';import {O}from'./chunk-BeGVJrPy.js';import {g,W,t as F,K as we,a8 as _,a9 as F$1,aa as br,$ as $i,ab as le,o as oT,a1 as ga,U,O as Of,ac as by,D as Dw,E as Es,R as vg,b as AC,c as hl,a as Bw,d as VE,P as dg,i as Vw,a2 as ha,ad as ne,Q as Qw,q as $w,ae as Lw,S as NI,f as fg,v as tC,z as zw,T as AI,u as Dl,F as Fg,w as pf,x as hf}from'./main-P6EOYPYG.js';import {p as pt,T as Te$1,b as bn,v as vn,d as yn,e as fn,l as pn,h as hn,k as dn,i as at,u as un,n as cn,K as Kt,a as fd,M as Mo,D as Do,U as Ut,o as Mn,Q as Qt,C as Ca,c as fo,g as go,N as Nn,R as Rn,Y as Yt}from'./chunk-BeAWBIRs.js';import'./chunk-Cq9rgtVx.js';var be=(i,e)=>e.value;function _e(i,e){i&1&&(Es(0,"p",2),AC(1,"Loading\u2026"),hl());}function xe(i,e){if(i&1&&(Es(0,"label",6),fg(1,"input",22),NI(),AC(2),hl()),i&2){let t=e.$implicit,n=tC(2);VE(),dg("value",t.value)("formControl",n.scopeControl)("disabled",t.value==="namespace"&&!n.isAdmin()),AI(),VE(),Dl(" ",t.label," ");}}function Ie(i,e){if(i&1&&(Es(0,"option",10),AC(1),hl()),i&2){let t=e.$implicit;dg("value",t.type),VE(),Fg(t.displayName);}}function Ne(i,e){if(i&1&&(Es(0,"option",10),AC(1),hl()),i&2){let t=e.$implicit;dg("value",t.value),VE(),Fg(t.label);}}function Ae(i,e){if(i&1&&(Es(0,"div",18)(1,"label",6),fg(2,"input",23),NI(),AC(3," Grant automatically "),hl(),Es(4,"p",2),AC(5),hl()()),i&2){let t=tC(2);VE(2),dg("formControl",t.autoGrantControl),AI(),VE(3),Dl(" Give this integration to ",t.autoGrantReach(),", without each agent having to declare it. An agent can still opt out by mapping this configuration to an empty tool list. ");}}function Ee(i,e){if(i&1){let t=Qw();Es(0,"ds-card")(1,"ds-json-schema-form",24),vg("valueChange",function(a){pf(t);let p=tC(2);return hf(p.onParamsChange(a))}),hl()();}if(i&2){let t=tC(2);VE(),dg("schema",e)("value",t.initialParams());}}function Fe(i,e){if(i&1){let t=Qw();Es(0,"button",25),vg("click",function(){pf(t);let a=tC(2);return hf(a.exportYaml())}),AC(1),hl();}if(i&2){let t=tC(2);dg("disabled",t.isExporting()),VE(),Dl(" ",t.isExporting()?"Exporting\u2026":"Export as YAML"," ");}}function Te(i,e){if(i&1){let t=Qw();Es(0,"form",4),vg("ngSubmit",function(){pf(t);let a=tC();return hf(a.submit())}),Es(1,"ds-fieldset",5),$w(2,xe,3,4,"label",6,Lw().trackByScope,true),hl(),Es(4,"ds-form-field",7)(5,"select",8)(6,"option",9),AC(7,"Select type"),hl(),$w(8,Ie,2,2,"option",10,Lw().trackByType,true),hl(),NI(),hl(),Es(10,"ds-form-field",11),fg(11,"input",12),NI(),hl(),Es(12,"ds-form-field",13),fg(13,"textarea",14),NI(),hl(),Es(14,"ds-form-field",15)(15,"select",16)(16,"option",17),AC(17,"None"),hl(),$w(18,Ne,2,2,"option",10,be),hl(),NI(),hl(),Bw(20,Ae,6,2,"div",18),Bw(21,Ee,2,2,"ds-card"),Es(22,"ds-form-actions")(23,"button",19),AC(24),hl(),Bw(25,Fe,2,2,"button",20),Es(26,"button",21),vg("click",function(){pf(t);let a=tC();return hf(a.cancel())}),AC(27,"Cancel"),hl()()();}if(i&2){let t,n=tC();dg("formGroup",n.form),VE(),dg("disabled",n.isEditMode()),VE(),zw(n.scopeOptions),VE(3),dg("formControl",n.typeControl),AI(),VE(3),zw(n.integrationTypes()),VE(3),dg("formControl",n.nameControl),AI(),VE(2),dg("formControl",n.descriptionControl),AI(),VE(2),dg("formControl",n.authSettingNameControl),AI(),VE(),dg("ngValue",null),VE(2),zw(n.authSettingOptions()),VE(2),Vw(n.isAutoGrantable()?20:-1),VE(),Vw((t=n.schema())?21:-1,t),VE(2),dg("disabled",n.nameControl.invalid||n.typeControl.invalid||n.isSubmitting()),VE(),Dl(" ",n.isEditMode()?"Save changes":"Create"," "),VE(),Vw(n.isEditMode()?25:-1);}}var Ve=new Set(["platform","namespace","userOnNs","userGlobal"]),w=Object.freeze({platform:"Configuration plateforme",namespace:"Configuration du namespace",userOnNs:"Pour moi sur ce namespace",userGlobal:"Pour moi globalement"}),ve=class i{route=g(W);router=g(F);destroyRef=g(we);state=g(O);integrationTypeController=g(_);authSettingState=g(I);namespaceRole=g(v);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=!this.namespaceId;isAdmin=F$1(this.isPlatformMode?br(true):this.namespaceRole.isAdminOfNamespace$(this.namespaceId),{initialValue:this.isPlatformMode});form=new pt({name:new Te$1("",{nonNullable:true,validators:[bn.required,bn.minLength(1)]}),description:new Te$1(null),type:new Te$1("",{nonNullable:true,validators:[bn.required]}),scope:new Te$1("namespace",{nonNullable:true}),autoGrant:new Te$1(false,{nonNullable:true})});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get typeControl(){return this.form.controls.type}get scopeControl(){return this.form.controls.scope}get autoGrantControl(){return this.form.controls.autoGrant}isEditMode=$i(false);isSubmitting=$i(false);isLoading=$i(false);isExporting=$i(false);scopeOptions=[{value:"platform",label:w.platform},{value:"namespace",label:w.namespace},{value:"userOnNs",label:w.userOnNs},{value:"userGlobal",label:w.userGlobal}];authSettingNameControl=new Te$1(null);loadedAuthSettings=$i([]);authSettingsLoaded=$i(false);savedAuthSettingName=$i(null);authSettingsScope$=new le;authSettingOptions=oT(()=>{let e=this.loadedAuthSettings(),t=this.savedAuthSettingName();return !t||!this.authSettingsLoaded()||e.some(n=>n.value===t)?e:[...e,{value:t,label:`${t} (not found)`}]});paramsValue=$i(null);initialParams=$i(null);integrationTypes=F$1(this.integrationTypeController.listTypesIntegrationType(),{initialValue:[]});selectedType=F$1(this.form.controls.type.valueChanges,{initialValue:this.form.controls.type.value});scopeValue=F$1(this.form.controls.scope.valueChanges,{initialValue:this.form.controls.scope.value});schema=oT(()=>{let e=this.selectedType();return e?this.integrationTypes().find(n=>n.type===e)?.configSchema??null:null});isAutoGrantable=oT(()=>{let e=this.selectedType();return e?this.integrationTypes().find(t=>t.type===e)?.autoGrantable??false:false});autoGrantReach=oT(()=>{switch(this.scopeValue()){case "platform":return "every agent of this environment";case "namespace":return "every agent of this namespace";default:return "your own runs"}});existingConfig=null;constructor(){this.authSettingsScope$.pipe(ga(e=>this.loadAuthSettingLayers(e)),U(this.destroyRef)).subscribe(e=>{this.loadedAuthSettings.set(this.toAuthSettingOptions(e)),this.authSettingsLoaded.set(true);}),Of(()=>{if(this.isAdmin()||this.isEditMode())return;["platform","namespace"].includes(this.scopeControl.value)&&this.scopeControl.setValue("userOnNs");});}ngOnInit(){this.namespaceId&&this.state.setNamespace(this.namespaceId);let e=this.route.snapshot.paramMap,t=this.route.snapshot.queryParamMap,n=e.get("integrationId");if(n){this.isEditMode.set(true),this.scopeControl.disable(),this.loadConfig(n);return}if(this.isPlatformMode){this.scopeControl.setValue("platform"),this.scopeControl.disable(),this.loadAuthSettingsForScope("platform");return}let a=this.parseScope(t.get("scope"));this.scopeControl.setValue(a),this.loadAuthSettingsForScope(a),this.scopeControl.valueChanges.pipe(U(this.destroyRef)).subscribe(D=>{this.loadAuthSettingsForScope(D);});let p=t.get("template");p&&this.hydrateFromTemplate(p);}parseScope(e){return e&&Ve.has(e)?e:"namespace"}deriveScopeFromConfig(e){return !e.userId&&!e.namespaceId?"platform":e.userId?e.namespaceId?"userOnNs":"userGlobal":"namespace"}loadConfig(e){this.isLoading.set(true),this.state.getById(e).pipe(U(this.destroyRef)).subscribe({next:t=>{this.existingConfig=t;let n=this.deriveScopeFromConfig(t);this.scopeControl.setValue(n),this.applyConfigToForm(t),this.loadAuthSettingsForScope(n),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),console.warn(`[IntegrationForm] Could not load config '${e}' \u2014 navigating back`),this.navigateBack();}});}hydrateFromTemplate(e){this.isLoading.set(true),this.state.getById(e).pipe(U(this.destroyRef)).subscribe({next:t=>{this.applyConfigToForm(t),this.isLoading.set(false),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:true});},error:t=>{console.warn(`[IntegrationForm] Could not hydrate from template ${e}:`,t),this.isLoading.set(false),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:true});}});}applyConfigToForm(e){this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??null),this.typeControl.setValue(e.integrationType),this.initialParams.set(e.parameters),this.paramsValue.set(e.parameters),this.authSettingNameControl.setValue(e.authSettingName??null),this.savedAuthSettingName.set(e.authSettingName??null),this.autoGrantControl.setValue(e.autoGrant??false);}loadAuthSettingsForScope(e){this.authSettingsLoaded.set(false),this.authSettingsScope$.next(e);}loadAuthSettingLayers(e){let t=(p,D)=>D.pipe(ha(()=>br([])),ne(Se=>({label:p,settings:Se}))),n=t("platform",this.authSettingState.loadPlatformSettings()),a=t("mine",this.authSettingState.loadUserSettings("global"));return e==="platform"||e==="userGlobal"?by([a,n]):by([t("mine",this.authSettingState.loadUserSettings(this.namespaceId)),t("namespace",this.authSettingState.loadNamespaceSettings(this.namespaceId)),a,n])}toAuthSettingOptions(e){let t=new Map;for(let{label:n,settings:a}of e)for(let{name:p}of a)p&&t.set(p,(t.get(p)??new Set).add(n));return [...t.entries()].sort(([n],[a])=>n.localeCompare(a)).map(([n,a])=>({value:n,label:`${n} (${[...a].join(", ")})`}))}onParamsChange(e){this.paramsValue.set(e);}submit(){if(this.nameControl.invalid||this.typeControl.invalid||this.isSubmitting())return;if(this.isEditMode()&&!this.existingConfig?.id){this.navigateBack();return}this.isSubmitting.set(true);let e=this.descriptionControl.value?.trim(),t={name:this.nameControl.value.trim(),description:e||null,integrationType:this.typeControl.value,parameters:this.paramsValue(),authSettingName:this.authSettingNameControl.value||null,autoGrant:this.isAutoGrantable()&&this.autoGrantControl.value},n=this.form.getRawValue().scope;(this.isEditMode()&&this.existingConfig?.id?this.state.update(this.existingConfig.id,t,n,this.existingConfig):this.state.create(t,n,this.namespaceId??null)).pipe(U(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(false)});}exportYaml(){let e=this.existingConfig?.id;!e||this.isExporting()||(this.isExporting.set(true),this.state.exportAsYaml(e).pipe(U(this.destroyRef)).subscribe({next:t=>{let n=new Blob([t],{type:"application/yaml"}),a=URL.createObjectURL(n),p=document.createElement("a");p.href=a,p.download=`${this.existingConfig?.name??"integration"}.yaml`,p.click(),URL.revokeObjectURL(a),this.isExporting.set(false);},error:()=>this.isExporting.set(false)}));}cancel(){this.navigateBack();}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","integration-configs"]):this.router.navigate(["/agentos",this.namespaceId,"integrations"]);}trackByType(e,t){return t.type}trackByScope(e,t){return t.value}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=Dw({type:i,selectors:[["agentos-integration-form"]],decls:6,vars:2,consts:[[3,"title"],["dsButton","","variant","ghost","type","button","title","Back to integrations",3,"click"],[1,"ds-hint"],[1,"ds-form",3,"formGroup"],[1,"ds-form",3,"ngSubmit","formGroup"],["legend","Scope",3,"disabled"],["dsCheck",""],["label","Type","controlId","integration-type","required",""],["dsControl","","id","integration-type",3,"formControl"],["value","","disabled",""],[3,"value"],["label","Name","controlId","integration-name","required",""],["dsControl","","id","integration-name","type","text","placeholder","Integration name","autocomplete","off",3,"formControl"],["label","Description","controlId","integration-description"],["dsControl","","id","integration-description","placeholder","Optional description","rows","3",3,"formControl"],["label","Auth Setting","controlId","integration-auth-setting","hint","Only the name is saved. It is resolved at run time for the user running the case, the most specific layer winning (user on this namespace > namespace > user > platform), so a shared integration can rely on each user's own auth setting of that name."],["dsControl","","id","integration-auth-setting",3,"formControl"],[3,"ngValue"],[1,"ds-stack","ds-stack--sm"],["dsButton","","variant","primary","type","submit",3,"disabled"],["dsButton","","type","button",3,"disabled"],["dsButton","","type","button",3,"click"],["type","radio",3,"value","formControl","disabled"],["type","checkbox",3,"formControl"],[3,"valueChange","schema","value"],["dsButton","","type","button",3,"click","disabled"]],template:function(t,n){t&1&&(Es(0,"ds-page")(1,"ds-section-header",0)(2,"button",1),vg("click",function(){return n.cancel()}),AC(3," \u2190 Integrations "),hl()(),Bw(4,_e,2,0,"p",2)(5,Te,28,12,"form",3),hl()),t&2&&(VE(),dg("title",n.isEditMode()?"Edit integration":"New integration"),VE(3),Vw(n.isLoading()?4:5));},dependencies:[vn,yn,fn,pn,hn,dn,at,un,cn,Kt,fd,Mo,Do,Ut,Mn,Qt,Ca,fo,go,Nn,Rn,Yt],encapsulation:2})};export{ve as IntegrationFormComponent};
1
+ import {v}from'./chunk-t-Kfnaoc.js';import {I}from'./chunk-DGU69dIe.js';import {O}from'./chunk-RltTZwlz.js';import {g,W,F,v as we,ac as _,ad as F$1,ae as Dr,M as Mi,af as ue,i as VC,a5 as Ys,x as U,s as sf,ag as Gm,a as ew,o as os,K as qh,b as pC,z as zu,I as Iw,c as IE,J as Vh,w as ww,a6 as Zs,ah as te,R as Rw,T as Tw,ai as Dw,N as lI,H as Hh,L as Lw,_ as _w,Q as fI,Y as Yu,l as lg,P as Pd,n as Ld}from'./main-OQ262YIZ.js';import {p as pt,T as Te$1,b as bn,v as vn,d as yn,e as fn,n as pn,h as hn,l as dn,i as at,u as un,o as cn,K as Kt,a as fd,M as Mo,D as Do,U as Ut,q as Mn,Q as Qt,C as Ca,c as fo,g as go,N as Nn,R as Rn,Y as Yt}from'./chunk-DvtbHzPu.js';import'./chunk-iZXu2H1x.js';var be=(i,e)=>e.value;function _e(i,e){i&1&&(os(0,"p",2),pC(1,"Loading\u2026"),zu());}function xe(i,e){if(i&1&&(os(0,"label",6),Hh(1,"input",22),lI(),pC(2),zu()),i&2){let t=e.$implicit,n=Lw(2);IE(),Vh("value",t.value)("formControl",n.scopeControl)("disabled",t.value==="namespace"&&!n.isAdmin()),fI(),IE(),Yu(" ",t.label," ");}}function Ie(i,e){if(i&1&&(os(0,"option",10),pC(1),zu()),i&2){let t=e.$implicit;Vh("value",t.type),IE(),lg(t.displayName);}}function Ne(i,e){if(i&1&&(os(0,"option",10),pC(1),zu()),i&2){let t=e.$implicit;Vh("value",t.value),IE(),lg(t.label);}}function Ae(i,e){if(i&1&&(os(0,"div",18)(1,"label",6),Hh(2,"input",23),lI(),pC(3," Grant automatically "),zu(),os(4,"p",2),pC(5),zu()()),i&2){let t=Lw(2);IE(2),Vh("formControl",t.autoGrantControl),fI(),IE(3),Yu(" Give this integration to ",t.autoGrantReach(),", without each agent having to declare it. An agent can still opt out by mapping this configuration to an empty tool list. ");}}function Ee(i,e){if(i&1){let t=Rw();os(0,"ds-card")(1,"ds-json-schema-form",24),qh("valueChange",function(a){Pd(t);let p=Lw(2);return Ld(p.onParamsChange(a))}),zu()();}if(i&2){let t=Lw(2);IE(),Vh("schema",e)("value",t.initialParams());}}function Fe(i,e){if(i&1){let t=Rw();os(0,"button",25),qh("click",function(){Pd(t);let a=Lw(2);return Ld(a.exportYaml())}),pC(1),zu();}if(i&2){let t=Lw(2);Vh("disabled",t.isExporting()),IE(),Yu(" ",t.isExporting()?"Exporting\u2026":"Export as YAML"," ");}}function Te(i,e){if(i&1){let t=Rw();os(0,"form",4),qh("ngSubmit",function(){Pd(t);let a=Lw();return Ld(a.submit())}),os(1,"ds-fieldset",5),Tw(2,xe,3,4,"label",6,Dw().trackByScope,true),zu(),os(4,"ds-form-field",7)(5,"select",8)(6,"option",9),pC(7,"Select type"),zu(),Tw(8,Ie,2,2,"option",10,Dw().trackByType,true),zu(),lI(),zu(),os(10,"ds-form-field",11),Hh(11,"input",12),lI(),zu(),os(12,"ds-form-field",13),Hh(13,"textarea",14),lI(),zu(),os(14,"ds-form-field",15)(15,"select",16)(16,"option",17),pC(17,"None"),zu(),Tw(18,Ne,2,2,"option",10,be),zu(),lI(),zu(),Iw(20,Ae,6,2,"div",18),Iw(21,Ee,2,2,"ds-card"),os(22,"ds-form-actions")(23,"button",19),pC(24),zu(),Iw(25,Fe,2,2,"button",20),os(26,"button",21),qh("click",function(){Pd(t);let a=Lw();return Ld(a.cancel())}),pC(27,"Cancel"),zu()()();}if(i&2){let t,n=Lw();Vh("formGroup",n.form),IE(),Vh("disabled",n.isEditMode()),IE(),_w(n.scopeOptions),IE(3),Vh("formControl",n.typeControl),fI(),IE(3),_w(n.integrationTypes()),IE(3),Vh("formControl",n.nameControl),fI(),IE(2),Vh("formControl",n.descriptionControl),fI(),IE(2),Vh("formControl",n.authSettingNameControl),fI(),IE(),Vh("ngValue",null),IE(2),_w(n.authSettingOptions()),IE(2),ww(n.isAutoGrantable()?20:-1),IE(),ww((t=n.schema())?21:-1,t),IE(2),Vh("disabled",n.nameControl.invalid||n.typeControl.invalid||n.isSubmitting()),IE(),Yu(" ",n.isEditMode()?"Save changes":"Create"," "),IE(),ww(n.isEditMode()?25:-1);}}var Ve=new Set(["platform","namespace","userOnNs","userGlobal"]),w=Object.freeze({platform:"Configuration plateforme",namespace:"Configuration du namespace",userOnNs:"Pour moi sur ce namespace",userGlobal:"Pour moi globalement"}),ve=class i{route=g(W);router=g(F);destroyRef=g(we);state=g(O);integrationTypeController=g(_);authSettingState=g(I);namespaceRole=g(v);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=!this.namespaceId;isAdmin=F$1(this.isPlatformMode?Dr(true):this.namespaceRole.isAdminOfNamespace$(this.namespaceId),{initialValue:this.isPlatformMode});form=new pt({name:new Te$1("",{nonNullable:true,validators:[bn.required,bn.minLength(1)]}),description:new Te$1(null),type:new Te$1("",{nonNullable:true,validators:[bn.required]}),scope:new Te$1("namespace",{nonNullable:true}),autoGrant:new Te$1(false,{nonNullable:true})});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get typeControl(){return this.form.controls.type}get scopeControl(){return this.form.controls.scope}get autoGrantControl(){return this.form.controls.autoGrant}isEditMode=Mi(false);isSubmitting=Mi(false);isLoading=Mi(false);isExporting=Mi(false);scopeOptions=[{value:"platform",label:w.platform},{value:"namespace",label:w.namespace},{value:"userOnNs",label:w.userOnNs},{value:"userGlobal",label:w.userGlobal}];authSettingNameControl=new Te$1(null);loadedAuthSettings=Mi([]);authSettingsLoaded=Mi(false);savedAuthSettingName=Mi(null);authSettingsScope$=new ue;authSettingOptions=VC(()=>{let e=this.loadedAuthSettings(),t=this.savedAuthSettingName();return !t||!this.authSettingsLoaded()||e.some(n=>n.value===t)?e:[...e,{value:t,label:`${t} (not found)`}]});paramsValue=Mi(null);initialParams=Mi(null);integrationTypes=F$1(this.integrationTypeController.listTypesIntegrationType(),{initialValue:[]});selectedType=F$1(this.form.controls.type.valueChanges,{initialValue:this.form.controls.type.value});scopeValue=F$1(this.form.controls.scope.valueChanges,{initialValue:this.form.controls.scope.value});schema=VC(()=>{let e=this.selectedType();return e?this.integrationTypes().find(n=>n.type===e)?.configSchema??null:null});isAutoGrantable=VC(()=>{let e=this.selectedType();return e?this.integrationTypes().find(t=>t.type===e)?.autoGrantable??false:false});autoGrantReach=VC(()=>{switch(this.scopeValue()){case "platform":return "every agent of this environment";case "namespace":return "every agent of this namespace";default:return "your own runs"}});existingConfig=null;constructor(){this.authSettingsScope$.pipe(Ys(e=>this.loadAuthSettingLayers(e)),U(this.destroyRef)).subscribe(e=>{this.loadedAuthSettings.set(this.toAuthSettingOptions(e)),this.authSettingsLoaded.set(true);}),sf(()=>{if(this.isAdmin()||this.isEditMode())return;["platform","namespace"].includes(this.scopeControl.value)&&this.scopeControl.setValue("userOnNs");});}ngOnInit(){this.namespaceId&&this.state.setNamespace(this.namespaceId);let e=this.route.snapshot.paramMap,t=this.route.snapshot.queryParamMap,n=e.get("integrationId");if(n){this.isEditMode.set(true),this.scopeControl.disable(),this.loadConfig(n);return}if(this.isPlatformMode){this.scopeControl.setValue("platform"),this.scopeControl.disable(),this.loadAuthSettingsForScope("platform");return}let a=this.parseScope(t.get("scope"));this.scopeControl.setValue(a),this.loadAuthSettingsForScope(a),this.scopeControl.valueChanges.pipe(U(this.destroyRef)).subscribe(D=>{this.loadAuthSettingsForScope(D);});let p=t.get("template");p&&this.hydrateFromTemplate(p);}parseScope(e){return e&&Ve.has(e)?e:"namespace"}deriveScopeFromConfig(e){return !e.userId&&!e.namespaceId?"platform":e.userId?e.namespaceId?"userOnNs":"userGlobal":"namespace"}loadConfig(e){this.isLoading.set(true),this.state.getById(e).pipe(U(this.destroyRef)).subscribe({next:t=>{this.existingConfig=t;let n=this.deriveScopeFromConfig(t);this.scopeControl.setValue(n),this.applyConfigToForm(t),this.loadAuthSettingsForScope(n),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),console.warn(`[IntegrationForm] Could not load config '${e}' \u2014 navigating back`),this.navigateBack();}});}hydrateFromTemplate(e){this.isLoading.set(true),this.state.getById(e).pipe(U(this.destroyRef)).subscribe({next:t=>{this.applyConfigToForm(t),this.isLoading.set(false),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:true});},error:t=>{console.warn(`[IntegrationForm] Could not hydrate from template ${e}:`,t),this.isLoading.set(false),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:true});}});}applyConfigToForm(e){this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??null),this.typeControl.setValue(e.integrationType),this.initialParams.set(e.parameters),this.paramsValue.set(e.parameters),this.authSettingNameControl.setValue(e.authSettingName??null),this.savedAuthSettingName.set(e.authSettingName??null),this.autoGrantControl.setValue(e.autoGrant??false);}loadAuthSettingsForScope(e){this.authSettingsLoaded.set(false),this.authSettingsScope$.next(e);}loadAuthSettingLayers(e){let t=(p,D)=>D.pipe(Zs(()=>Dr([])),te(Se=>({label:p,settings:Se}))),n=t("platform",this.authSettingState.loadPlatformSettings()),a=t("mine",this.authSettingState.loadUserSettings("global"));return e==="platform"||e==="userGlobal"?Gm([a,n]):Gm([t("mine",this.authSettingState.loadUserSettings(this.namespaceId)),t("namespace",this.authSettingState.loadNamespaceSettings(this.namespaceId)),a,n])}toAuthSettingOptions(e){let t=new Map;for(let{label:n,settings:a}of e)for(let{name:p}of a)p&&t.set(p,(t.get(p)??new Set).add(n));return [...t.entries()].sort(([n],[a])=>n.localeCompare(a)).map(([n,a])=>({value:n,label:`${n} (${[...a].join(", ")})`}))}onParamsChange(e){this.paramsValue.set(e);}submit(){if(this.nameControl.invalid||this.typeControl.invalid||this.isSubmitting())return;if(this.isEditMode()&&!this.existingConfig?.id){this.navigateBack();return}this.isSubmitting.set(true);let e=this.descriptionControl.value?.trim(),t={name:this.nameControl.value.trim(),description:e||null,integrationType:this.typeControl.value,parameters:this.paramsValue(),authSettingName:this.authSettingNameControl.value||null,autoGrant:this.isAutoGrantable()&&this.autoGrantControl.value},n=this.form.getRawValue().scope;(this.isEditMode()&&this.existingConfig?.id?this.state.update(this.existingConfig.id,t,n,this.existingConfig):this.state.create(t,n,this.namespaceId??null)).pipe(U(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(false)});}exportYaml(){let e=this.existingConfig?.id;!e||this.isExporting()||(this.isExporting.set(true),this.state.exportAsYaml(e).pipe(U(this.destroyRef)).subscribe({next:t=>{let n=new Blob([t],{type:"application/yaml"}),a=URL.createObjectURL(n),p=document.createElement("a");p.href=a,p.download=`${this.existingConfig?.name??"integration"}.yaml`,p.click(),URL.revokeObjectURL(a),this.isExporting.set(false);},error:()=>this.isExporting.set(false)}));}cancel(){this.navigateBack();}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","integration-configs"]):this.router.navigate(["/agentos",this.namespaceId,"integrations"]);}trackByType(e,t){return t.type}trackByScope(e,t){return t.value}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=ew({type:i,selectors:[["agentos-integration-form"]],decls:6,vars:2,consts:[[3,"title"],["dsButton","","variant","ghost","type","button","title","Back to integrations",3,"click"],[1,"ds-hint"],[1,"ds-form",3,"formGroup"],[1,"ds-form",3,"ngSubmit","formGroup"],["legend","Scope",3,"disabled"],["dsCheck",""],["label","Type","controlId","integration-type","required",""],["dsControl","","id","integration-type",3,"formControl"],["value","","disabled",""],[3,"value"],["label","Name","controlId","integration-name","required",""],["dsControl","","id","integration-name","type","text","placeholder","Integration name","autocomplete","off",3,"formControl"],["label","Description","controlId","integration-description"],["dsControl","","id","integration-description","placeholder","Optional description","rows","3",3,"formControl"],["label","Auth Setting","controlId","integration-auth-setting","hint","Only the name is saved. It is resolved at run time for the user running the case, the most specific layer winning (user on this namespace > namespace > user > platform), so a shared integration can rely on each user's own auth setting of that name."],["dsControl","","id","integration-auth-setting",3,"formControl"],[3,"ngValue"],[1,"ds-stack","ds-stack--sm"],["dsButton","","variant","primary","type","submit",3,"disabled"],["dsButton","","type","button",3,"disabled"],["dsButton","","type","button",3,"click"],["type","radio",3,"value","formControl","disabled"],["type","checkbox",3,"formControl"],[3,"valueChange","schema","value"],["dsButton","","type","button",3,"click","disabled"]],template:function(t,n){t&1&&(os(0,"ds-page")(1,"ds-section-header",0)(2,"button",1),qh("click",function(){return n.cancel()}),pC(3," \u2190 Integrations "),zu()(),Iw(4,_e,2,0,"p",2)(5,Te,28,12,"form",3),zu()),t&2&&(IE(),Vh("title",n.isEditMode()?"Edit integration":"New integration"),IE(3),ww(n.isLoading()?4:5));},dependencies:[vn,yn,fn,pn,hn,dn,at,un,cn,Kt,fd,Mo,Do,Ut,Mn,Qt,Ca,fo,go,Nn,Rn,Yt],encapsulation:2})};export{ve as IntegrationFormComponent};
@@ -0,0 +1 @@
1
+ import {O as O$1,i as at,d as yn,V as Vo,A as Ao,k as P}from'./chunk-DvtbHzPu.js';import {g,v as we,a2 as W,a3 as vr,M as Mi,i as VC,a4 as Ne,a5 as Ys,a6 as Zs,a7 as Kt,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,T as Tw,L as Lw,_ as _w,Y as Yu,l as lg}from'./main-OQ262YIZ.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&&(os(0,"p",10),pC(1,"Loading the configuration failed. Try refreshing."),zu());}function V(e,t){e&1&&(os(0,"p",11),pC(1,"Loading configuration\u2026"),zu());}function j(e,t){e&1&&(os(0,"p",12),pC(1,"The service reported no settings."),zu());}function O(e,t){e&1&&(os(0,"p",11),pC(1,"No settings match the current filters."),zu());}function Y(e,t){e&1&&(os(0,"ds-tag",22),pC(1,"on"),zu());}function z(e,t){e&1&&(os(0,"ds-tag",20),pC(1,"off"),zu());}function H(e,t){if(e&1&&(os(0,"ds-tag",20),pC(1),zu()),e&2){let i=Lw().$implicit;IE(),lg(i.display.text);}}function G(e,t){if(e&1&&(os(0,"ds-tag",23),pC(1),zu()),e&2){let i=Lw().$implicit;IE(),lg(i.display.text);}}function J(e,t){if(e&1&&(os(0,"span",24),pC(1),zu()),e&2){let i=Lw().$implicit;IE(),lg(i.display.text);}}function K(e,t){if(e&1&&(os(0,"tr",16)(1,"td",18),pC(2),zu(),os(3,"td",19)(4,"ds-tag",20),pC(5),zu()(),os(6,"td",21),Iw(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),zu(),os(12,"td",25),pC(13),zu()()),e&2){let i,a=t.$implicit,m=Lw(2);IE(2),Yu(" ",a.entry.key," "),IE(3),Yu(" ",a.entry.source===m.Source.ENVIRONMENT?"Environment":"Property"," "),IE(2),ww((i=a.display.status)==="on"?7:i==="off"?8:i==="hidden"?9:i==="unset"?10:11),IE(6),Yu(" ",a.entry.description||"\u2014"," ");}}function Q(e,t){if(e&1&&(os(0,"div",13)(1,"table",14)(2,"thead",15)(3,"tr",16)(4,"th",17),pC(5,"Setting"),zu(),os(6,"th",17),pC(7,"Source"),zu(),os(8,"th",17),pC(9,"Value"),zu(),os(10,"th",17),pC(11,"Description"),zu()()(),os(12,"tbody",15),Tw(13,K,14,4,"tr",16,U),zu()()()),e&2){let i=Lw();IE(13),_w(i.visibleRows());}}var A=class e{destroyRef=g(we);configurationController=g(W);refresh$=new vr(void 0);isLoading=Mi(true);loadError=Mi(false);rows=Mi([]);source=Mi("ALL");status=Mi("ALL");rowFilter=O$1(this.rows,t=>[t.entry.key,t.entry.description,t.entry.value].filter(Boolean).join(" "));visibleRows=VC(()=>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=Ne;constructor(){this.refresh$.pipe(Ys(()=>(this.isLoading.set(true),this.loadError.set(false),this.configurationController.listEffectiveConfiguration().pipe(Zs(()=>(this.loadError.set(true),this.isLoading.set(false),Kt))))),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=ew({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&&(os(0,"ds-section-header",0)(1,"agentos-table-filter",1),qh("queryChange",function(c){return a.rowFilter.query.set(c)}),zu(),os(2,"button",2),qh("click",function(){return a.reload()}),pC(3,"Refresh"),zu()(),os(4,"div",3)(5,"select",4),qh("change",function(c){return a.source.set(c.target.value)}),os(6,"option",5),pC(7,"All sources"),zu(),os(8,"option",6),pC(9,"Environment variables"),zu(),os(10,"option",6),pC(11,"Spring properties"),zu()(),os(12,"select",7),qh("change",function(c){return a.status.set(c.target.value)}),os(13,"option",5),pC(14,"Set and unset"),zu(),os(15,"option",8),pC(16,"Set only"),zu(),os(17,"option",9),pC(18,"Unset only"),zu()()(),Iw(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&&(IE(),Vh("query",a.rowFilter.query()),IE(4),Vh("value",a.source()),IE(3),Vh("value",a.Source.ENVIRONMENT),IE(2),Vh("value",a.Source.PROPERTY),IE(2),Vh("value",a.status()),IE(7),ww(a.loadError()?19:a.isLoading()?20:a.rows().length===0?21:a.visibleRows().length===0?22:23));},dependencies:[at,yn,Vo,Ao,P],encapsulation:2})};export{A as PlatformConfigurationComponent};
@@ -0,0 +1 @@
1
+ import {a5 as Ys,a6 as Zs,ae as Dr,aK as my}from'./main-OQ262YIZ.js';function i(t,o,p){return t.pipe(Ys(()=>o().pipe(Zs(()=>Dr(p)))),my({bufferSize:1,refCount:true}))}export{i};
@@ -0,0 +1 @@
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-DvtbHzPu.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-OQ262YIZ.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};
@@ -0,0 +1 @@
1
+ import {y}from'./chunk-DvtbHzPu.js';import {g,aI as ce,aJ as T,ae as Dr,a5 as Ys,ah as te,a6 as Zs,aK as my,aa as k}from'./main-OQ262YIZ.js';var v=class i{userState=g(y);membership=g(ce);currentUser$=T(this.userState.currentUser);cache=new Map;isAdminOfNamespace$(e){if(!e)return Dr(false);let t=this.cache.get(e);if(t)return t;let s=this.currentUser$.pipe(Ys(a=>a?a.isAdmin?Dr(true):this.membership.getMembersNamespaceMembership(e).pipe(te(d=>d.some(n=>n.id===a.id&&n.role==="ADMIN")),Zs(()=>Dr(false))):Dr(false)),my({bufferSize:1,refCount:false}));return this.cache.set(e,s),s}static \u0275fac=function(t){return new(t||i)};static \u0275prov=k({token:i,factory:i.\u0275fac,providedIn:"root"})};export{v};
@@ -0,0 +1 @@
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-DvtbHzPu.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-OQ262YIZ.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};
@@ -0,0 +1 @@
1
+ import {c}from'./chunk-BnIh2Agv.js';import {p as pt,T as Te$1,b as bn,K as Kt,a as fd,M as Mo,D as Do,U as Ut,P as Pn,q as Mn,Q as Qt,c as fo,g as go,t as ta,N as Nn,R as Rn,v as vn,d as yn,e as fn,n as pn,h as hn,_ as _n,i as at,u as un,o as cn}from'./chunk-DvtbHzPu.js';import {g,W,F,v as we$1,ak as U,al as We,am as De$1,M as Mi,an as Ge,ad as F$1,ao as Vl,i as VC,ag as Gm,x as U$1,a6 as Zs,ae as Dr,E as x,C as w,a as ew,o as os,K as qh,b as pC,z as zu,I as Iw,c as IE,J as Vh,Y as Yu,w as ww,R as Rw,H as Hh,N as lI,T as Tw,L as Lw,Q as fI,_ as _w,l as lg,P as Pd,n as Ld,O as Op}from'./main-OQ262YIZ.js';var V=(n,t)=>t.value,ve=(n,t)=>t.id;function be(n,t){n&1&&(os(0,"p",2),pC(1,"Loading\u2026"),zu());}function _e(n,t){if(n&1&&(os(0,"ds-form-field",9),Hh(1,"input",38),zu()),n&2){let e=Lw(2);IE(),Vh("value",e.resolveAgentConfigName(e.agentConfigIdControl.value));}}function Se(n,t){if(n&1&&(os(0,"a",39),pC(1,"Add an agent config"),zu(),pC(2," first. ")),n&2){let e=Lw(3);Vh("href","/agentos/"+e.namespaceId+"/agent-configs/new",Op);}}function xe(n,t){if(n&1&&(os(0,"ds-form-field",10)(1,"p",2),pC(2," No agent configs available in this scope yet. "),Iw(3,Se,3,1),zu()()),n&2){let e=Lw(2);IE(3),ww(e.isPlatformMode?-1:3);}}function Ee(n,t){if(n&1&&(os(0,"option",17),pC(1),zu()),n&2){let e=t.$implicit;Vh("value",e.id),IE(),lg(e.name);}}function De(n,t){if(n&1&&(os(0,"ds-form-field",11)(1,"select",40)(2,"option",41),pC(3,"Select an agent config\u2026"),zu(),Tw(4,Ee,2,2,"option",17,ve),zu(),lI(),zu()),n&2){let e=Lw(2);Vh("error",e.agentConfigIdControl.invalid&&e.agentConfigIdControl.touched?"Agent Config is required.":null),IE(),Vh("formControl",e.agentConfigIdControl),fI(),IE(3),_w(e.availableAgentConfigs());}}function Te(n,t){if(n&1&&(os(0,"option",17),pC(1),zu()),n&2){let e=t.$implicit;Vh("value",e.value),IE(),lg(e.label);}}function Ne(n,t){if(n&1){let e=Rw();os(0,"label",31)(1,"input",43),qh("change",function(){let f=Pd(e).$implicit,h=Lw(3);return Ld(h.toggleDay(f.value))}),zu(),pC(2),zu();}if(n&2){let e=t.$implicit,l=Lw(3);IE(),Vh("checked",l.isDaySelected(e.value)),IE(),Yu(" ",e.label," ");}}function Ie(n,t){if(n&1&&(os(0,"ds-form-field",18)(1,"div",42),Tw(2,Ne,3,2,"label",31,V),zu()()),n&2){let e=Lw(2);IE(2),_w(e.dayOptions);}}function Me(n,t){if(n&1&&(os(0,"option",17),pC(1),zu()),n&2){let e=t.$implicit;Vh("value",e.value),IE(),lg(e.label);}}function Pe(n,t){if(n&1&&(os(0,"ds-form-field",28),Hh(1,"input",44),lI(),zu()),n&2){let e=Lw(2);Vh("error",e.form.hasError("endDateRequired")&&e.endDateControl.touched?"End date is required.":null),IE(),Vh("formControl",e.endDateControl),fI();}}function we(n,t){if(n&1&&(os(0,"ds-form-field",29),Hh(1,"input",45),lI(),zu()),n&2){let e=Lw(2);Vh("error",e.form.hasError("occurrenceCountRequired")&&e.occurrenceCountControl.touched?"Must be at least 1.":null),IE(),Vh("formControl",e.occurrenceCountControl),fI();}}function Fe(n,t){if(n&1&&(os(0,"ds-notice"),pC(1),zu()),n&2){let e=Lw(2);IE(),lg(e.errorMessage());}}function Oe(n,t){if(n&1){let e=Rw();os(0,"form",4),qh("ngSubmit",function(){Pd(e);let f=Lw();return Ld(f.submit())}),os(1,"ds-form-field",5),Hh(2,"input",6),lI(),zu(),os(3,"ds-form-field",7),Hh(4,"input",8),lI(),zu(),Iw(5,_e,2,1,"ds-form-field",9)(6,xe,4,1,"ds-form-field",10)(7,De,6,2,"ds-form-field",11),os(8,"ds-form-field",12),Hh(9,"textarea",13),lI(),zu(),os(10,"ds-fieldset",14)(11,"ds-form-field",15)(12,"select",16),Tw(13,Te,2,2,"option",17,V),zu(),lI(),zu(),Iw(15,Ie,4,0,"ds-form-field",18),os(16,"ds-form-field",19)(17,"div",20),Hh(18,"input",21),lI(),os(19,"span",22),pC(20,"UTC"),zu()()()(),os(21,"ds-fieldset",23)(22,"ds-form-field",24),Hh(23,"input",25),lI(),zu(),os(24,"ds-form-field",26)(25,"select",27),Tw(26,Me,2,2,"option",17,V),zu(),lI(),zu(),Iw(28,Pe,2,2,"ds-form-field",28),Iw(29,we,2,2,"ds-form-field",29),zu(),os(30,"div",30)(31,"label",31),Hh(32,"input",32),lI(),pC(33," Enabled "),zu(),os(34,"p",33),pC(35,"When disabled, the scheduled prompt is saved but will not run on schedule."),zu()(),os(36,"ds-form-field",34),Hh(37,"textarea",35),lI(),zu(),Iw(38,Fe,2,1,"ds-notice"),os(39,"ds-form-actions")(40,"button",36),pC(41),zu(),os(42,"button",37),qh("click",function(){Pd(e);let f=Lw();return Ld(f.cancel())}),pC(43,"Cancel"),zu()()();}if(n&2){let e=Lw();Vh("formGroup",e.form),IE(),Vh("error",e.nameControl.invalid&&e.nameControl.touched?"Name is required.":null),IE(),Vh("formControl",e.nameControl),fI(),IE(2),Vh("formControl",e.descriptionControl),fI(),IE(),ww(e.isEditMode()?5:e.availableAgentConfigs().length===0?6:7),IE(3),Vh("error",e.promptContentControl.invalid&&e.promptContentControl.touched?"Opening message is required.":null),IE(),Vh("formControl",e.promptContentControl),fI(),IE(3),Vh("formControl",e.unitControl),fI(),IE(),_w(e.schedulerUnits),IE(2),ww(e.showDayFilter()?15:-1),IE(),Vh("error",e.timeUtcControl.invalid&&e.timeUtcControl.touched?"Valid time is required (HH:mm).":null),IE(2),Vh("formControl",e.timeUtcControl),fI(),IE(4),Vh("error",e.startDateControl.invalid&&e.startDateControl.touched?"Start date is required.":null),IE(),Vh("formControl",e.startDateControl),fI(),IE(2),Vh("formControl",e.endTypeControl),fI(),IE(),_w(e.endTypes),IE(2),ww(e.showEndDate()?28:-1),IE(),ww(e.showOccurrenceCount()?29:-1),IE(3),Vh("formControl",e.enabledControl),fI(),IE(4),Vh("error",e.externalMetadataJsonControl.invalid&&e.externalMetadataJsonControl.touched?"Invalid JSON.":null),IE(),Vh("formControl",e.externalMetadataJsonControl),fI(),IE(),ww(e.errorMessage()?38:-1),IE(2),Vh("disabled",e.form.invalid||e.isSubmitting()),IE(),Yu(" ",e.isEditMode()?"Save changes":"Create scheduled prompt"," ");}}var ye=class n{route=g(W);router=g(F);destroyRef=g(we$1);state=g(c);agentConfigController=g(U);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=!this.namespaceId;form=new pt({name:new Te$1("",{nonNullable:true,validators:[bn.required]}),description:new Te$1(null),agentConfigId:new Te$1("",{nonNullable:true,validators:[bn.required]}),promptContent:new Te$1("",{nonNullable:true,validators:[bn.required]}),unit:new Te$1(De$1.WEEK,{nonNullable:true,validators:[bn.required]}),days:new Te$1([],{nonNullable:true}),timeUtc:new Te$1("09:00",{nonNullable:true,validators:[bn.required,bn.pattern(/^([01]\d|2[0-3]):[0-5]\d$/)]}),startDate:new Te$1("",{nonNullable:true,validators:[bn.required]}),endType:new Te$1(We.NEVER,{nonNullable:true,validators:[bn.required]}),endDate:new Te$1(null),occurrenceCount:new Te$1(null),enabled:new Te$1(true,{nonNullable:true}),externalMetadataJson:new Te$1("",{nonNullable:true,validators:[ke]})},{validators:[Ae,Ve]});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get agentConfigIdControl(){return this.form.controls.agentConfigId}get promptContentControl(){return this.form.controls.promptContent}get unitControl(){return this.form.controls.unit}get daysControl(){return this.form.controls.days}get timeUtcControl(){return this.form.controls.timeUtc}get startDateControl(){return this.form.controls.startDate}get endTypeControl(){return this.form.controls.endType}get endDateControl(){return this.form.controls.endDate}get occurrenceCountControl(){return this.form.controls.occurrenceCount}get enabledControl(){return this.form.controls.enabled}get externalMetadataJsonControl(){return this.form.controls.externalMetadataJson}isEditMode=Mi(false);isSubmitting=Mi(false);isLoading=Mi(false);errorMessage=Mi(null);SchedulerUnit=De$1;SchedulerEndType=We;schedulerUnits=[{value:De$1.WEEK,label:"Week(s)"},{value:De$1.MONTH,label:"Month(s)"}];endTypes=[{value:We.NEVER,label:"Never"},{value:We.ON_DATE,label:"On date"},{value:We.OCCURRENCES,label:"After N occurrences"}];dayOptions=Object.entries(Ge).map(([t,e])=>({value:t,label:e}));unitSignal=F$1(this.unitControl.valueChanges.pipe(Vl(this.unitControl.value)));endTypeSignal=F$1(this.endTypeControl.valueChanges.pipe(Vl(this.endTypeControl.value)));showDayFilter=VC(()=>this.unitSignal()===De$1.WEEK);showEndDate=VC(()=>this.endTypeSignal()===We.ON_DATE);showOccurrenceCount=VC(()=>this.endTypeSignal()===We.OCCURRENCES);agentConfigs=Mi([]);availableAgentConfigs=this.agentConfigs.asReadonly();existingPrompt=null;ngOnInit(){this.startDateControl.setValue(Re());let t=this.route.snapshot.paramMap.get("scheduledPromptId");t?(this.isEditMode.set(true),this.loadPromptAndResources(t)):this.loadResources();}loadPromptAndResources(t){this.isLoading.set(true),Gm({prompt:this.state.getById(t),agentConfigs:this.agentConfigs$()}).pipe(U$1(this.destroyRef)).subscribe({next:({prompt:e,agentConfigs:l})=>{this.existingPrompt=e,this.agentConfigs.set(l),this.hydrateForm(e),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),this.navigateBack();}});}loadResources(){this.agentConfigs$().pipe(U$1(this.destroyRef)).subscribe(t=>this.agentConfigs.set(t));}agentConfigs$(){return (this.isPlatformMode?this.agentConfigController.listPlatformAgentsAgentConfig():this.agentConfigController.listByParentAgentConfig(this.namespaceId)).pipe(Zs(()=>Dr([])))}hydrateForm(t){this.nameControl.setValue(t.name),this.descriptionControl.setValue(t.description??null),this.agentConfigIdControl.setValue(t.agentConfigId),this.promptContentControl.setValue(t.promptContent),this.unitControl.setValue(t.recurrence.unit),this.daysControl.setValue(t.recurrence.days??[]),this.timeUtcControl.setValue(t.recurrence.timeUtc),this.startDateControl.setValue(t.planning.startDate),this.endTypeControl.setValue(t.planning.endType),this.endDateControl.setValue(t.planning.endDate??null),this.occurrenceCountControl.setValue(t.planning.maxOccurrenceCount??null),this.enabledControl.setValue(t.enabled),this.externalMetadataJsonControl.setValue(t.externalMetadata?JSON.stringify(t.externalMetadata,null,2):"");}isDaySelected(t){return this.daysControl.value.includes(t)}toggleDay(t){let e=this.daysControl.value,l=e.includes(t)?e.filter(f=>f!==t):[...e,t];this.daysControl.setValue(l);}resolveAgentConfigName(t){return this.agentConfigs().find(e=>e.id===t)?.name??t}submit(){if(this.form.invalid||this.isSubmitting())return;this.isSubmitting.set(true),this.errorMessage.set(null);let t=this.isEditMode()&&!!this.existingPrompt?.id,e=this.endTypeControl.value,l=x(w({},this.existingPrompt??{}),{namespaceId:this.namespaceId??null,name:this.nameControl.value.trim(),description:this.descriptionControl.value?.trim()||void 0,agentConfigId:t?this.existingPrompt.agentConfigId:this.agentConfigIdControl.value,promptContent:this.promptContentControl.value.trim(),recurrence:{unit:this.unitControl.value,days:this.daysControl.value,timeUtc:this.timeUtcControl.value},planning:{startDate:this.startDateControl.value,endType:e,endDate:e===We.ON_DATE?this.endDateControl.value??void 0:void 0,maxOccurrenceCount:e===We.OCCURRENCES?this.occurrenceCountControl.value??void 0:void 0},enabled:this.enabledControl.value,removed:this.existingPrompt?.removed??false,externalMetadata:(()=>{let h=this.externalMetadataJsonControl.value.trim();return h?JSON.parse(h):null})()});(t?this.state.update(this.existingPrompt.id,l):this.state.create(l)).pipe(U$1(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:h=>{this.isSubmitting.set(false),h.status===409?this.errorMessage.set(`A scheduled prompt named "${l.name}" already exists in this scope.`):h.status===400?this.errorMessage.set(h.error?.message??"Invalid scheduled prompt data."):this.errorMessage.set("An unexpected error occurred. Please try again.");}});}cancel(){this.navigateBack();}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","scheduled-prompts"]):this.router.navigate(["/agentos",this.namespaceId,"scheduled-prompts"]);}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ew({type:n,selectors:[["agentos-scheduled-prompt-form"]],decls:6,vars:3,consts:[[3,"title"],["dsButton","","variant","ghost","type","button","title","Back to scheduled prompts",3,"click"],[1,"ds-hint"],[1,"ds-form",3,"formGroup"],[1,"ds-form",3,"ngSubmit","formGroup"],["label","Name","controlId","sp-name","required","","hint",'Free-form name (e.g. "Weekly Report"). Cannot be changed after creation.',3,"error"],["dsControl","","id","sp-name","type","text","placeholder","e.g. Weekly Report","autocomplete","off",3,"formControl"],["label","Description","controlId","sp-description"],["dsControl","","id","sp-description","type","text","placeholder","Optional \u2014 short description","autocomplete","off",3,"formControl"],["label","Agent Config","required","","hint","Agent Config cannot be changed after creation."],["label","Agent Config","required",""],["label","Agent Config","controlId","sp-agent-config","required","","hint","Immutable after creation.",3,"error"],["label","Opening message","controlId","sp-prompt-content","required","","hint","The message sent to the agent when the scheduled prompt fires.",3,"error"],["dsControl","","id","sp-prompt-content","rows","6","placeholder","Enter the message sent to the agent when the scheduled prompt fires\u2026",3,"formControl"],["legend","Recurrence"],["label","Unit","controlId","sp-unit","required",""],["dsControl","","id","sp-unit",3,"formControl"],[3,"value"],["label","Days of week","hint","Leave empty to run every day of the week."],["label","Time (UTC)","controlId","sp-time","required","",3,"error"],[1,"ds-inline"],["dsControl","","id","sp-time","type","time",3,"formControl"],[1,"ds-meta"],["legend","Planning"],["label","Start date","controlId","sp-start-date","required","",3,"error"],["dsControl","","id","sp-start-date","type","date",3,"formControl"],["label","Ends","controlId","sp-end-type","required",""],["dsControl","","id","sp-end-type",3,"formControl"],["label","End date","controlId","sp-end-date","required","",3,"error"],["label","Number of occurrences","controlId","sp-occurrence-count","required","",3,"error"],[1,"ds-stack","ds-stack--sm"],["dsCheck",""],["type","checkbox",3,"formControl"],[1,"ds-hint","ds-indent"],["label","External Metadata","controlId","sp-external-metadata","hint","Optional. Opaque JSON object stored as-is. Leave empty to clear.",3,"error"],["dsControl","","mono","","id","sp-external-metadata","rows","6","placeholder",'{ "key": "value" }',"spellcheck","false","autocomplete","off",3,"formControl"],["dsButton","","variant","primary","type","submit",3,"disabled"],["dsButton","","type","button",3,"click"],["dsControl","","type","text","readonly","",3,"value"],[3,"href"],["dsControl","","id","sp-agent-config",3,"formControl"],["value","","disabled",""],[1,"ds-inline","ds-inline--wrap"],["type","checkbox",3,"change","checked"],["dsControl","","id","sp-end-date","type","date",3,"formControl"],["dsControl","","id","sp-occurrence-count","type","number","min","1",1,"ds-control--narrow",3,"formControl"]],template:function(e,l){e&1&&(os(0,"ds-page")(1,"ds-section-header",0)(2,"button",1),qh("click",function(){return l.cancel()}),pC(3),zu()(),Iw(4,be,2,0,"p",2)(5,Oe,44,22,"form",3),zu()),e&2&&(IE(),Vh("title",l.isEditMode()?"Edit scheduled prompt":"New scheduled prompt"),IE(2),Yu(" \u2190 ",l.isPlatformMode?"Platform scheduled prompts":"Scheduled prompts"," "),IE(),ww(l.isLoading()?4:5));},dependencies:[Kt,fd,Mo,Do,Ut,Pn,Mn,Qt,fo,go,ta,Nn,Rn,vn,yn,fn,pn,hn,_n,at,un,cn],encapsulation:2})};function Ae(n){let t=n.get("endType")?.value,e=n.get("endDate")?.value;return t===We.ON_DATE&&!e?{endDateRequired:true}:null}function Ve(n){let t=n.get("endType")?.value,e=n.get("occurrenceCount")?.value;return t===We.OCCURRENCES&&(e==null||e<1)?{occurrenceCountRequired:true}:null}function ke(n){let t=n.value?.trim();if(!t)return null;try{return JSON.parse(t),null}catch(e){return {invalidJson:true}}}function Re(){let n=new Date,t=n.getFullYear(),e=String(n.getMonth()+1).padStart(2,"0"),l=String(n.getDate()).padStart(2,"0");return `${t}-${e}-${l}`}export{ye as ScheduledPromptFormComponent};
@@ -33,5 +33,5 @@
33
33
  <style>:root{--color-bg:#f5f6f8;--color-bg-solid:#f5f6f8;--color-bg-secondary:rgba(255, 255, 255, .7);--color-bg-secondary-rgb:255 255 255;--color-text:#1d1d1f;--color-text-secondary:#6e6e73;--color-text-inverse:#ffffff;--color-text-tertiary:#a1a1a6;--color-primary:#007aff;--color-primary-hover:#0051d5;--color-accent:#8b5cf6;--color-link:#007aff;--color-border:rgba(0, 0, 0, .1);--color-border-light:rgba(40, 40, 40, .08);--color-input-bg:rgba(255, 255, 255, .8);--color-bg-hover:rgba(0, 0, 0, .04);--color-success:#34c759;--color-success-bg:#e3f5e1;--color-error:#ff3b30;--color-warning:#ff9500;--color-info:#5ac8fa;--color-message-user:rgba(0, 122, 255, .1);--color-message-ai:rgba(255, 255, 255, .8);--color-code-bg:rgba(142, 142, 147, .12);--color-code-text:#ff375f;--glass-bg:rgba(255, 255, 255, .72);--glass-border:rgba(255, 255, 255, .18);--glass-shadow:0 8px 32px 0 rgba(31, 38, 135, .15);--glass-backdrop-blur:blur(20px);--color-modal-bg:#ffffff;--color-surface:#ffffff;--color-modal-border:rgba(0, 0, 0, .12);--color-modal-shadow:0 8px 40px rgba(0, 0, 0, .18), 0 2px 8px rgba(0, 0, 0, .1);--color-shadow:rgba(0, 0, 0, .08);--color-overlay:rgba(0, 0, 0, .4);--color-surface-hover:var(--color-bg-hover);--color-surface-secondary:rgba(0, 0, 0, .03);--color-surface-muted:rgba(0, 0, 0, .05);--color-divider:rgba(0, 0, 0, .1)}*{box-sizing:border-box}html{color-scheme:light}html{--mat-sys-background:light-dark(#faf9fd, #121316);--mat-sys-error:light-dark(#ba1a1a, #ffb4ab);--mat-sys-error-container:light-dark(#ffdad6, #93000a);--mat-sys-inverse-on-surface:light-dark(#f2f0f4, #2f3033);--mat-sys-inverse-primary:light-dark(#abc7ff, #005cbb);--mat-sys-inverse-surface:light-dark(#2f3033, #e3e2e6);--mat-sys-on-background:light-dark(#1a1b1f, #e3e2e6);--mat-sys-on-error:light-dark(#ffffff, #690005);--mat-sys-on-error-container:light-dark(#93000a, #ffdad6);--mat-sys-on-primary:light-dark(#ffffff, #002f65);--mat-sys-on-primary-container:light-dark(#00458f, #d7e3ff);--mat-sys-on-primary-fixed:light-dark(#001b3f, #001b3f);--mat-sys-on-primary-fixed-variant:light-dark(#00458f, #00458f);--mat-sys-on-secondary:light-dark(#ffffff, #283041);--mat-sys-on-secondary-container:light-dark(#3e4759, #dae2f9);--mat-sys-on-secondary-fixed:light-dark(#131c2b, #131c2b);--mat-sys-on-secondary-fixed-variant:light-dark(#3e4759, #3e4759);--mat-sys-on-surface:light-dark(#1a1b1f, #e3e2e6);--mat-sys-on-surface-variant:light-dark(#44474e, #e0e2ec);--mat-sys-on-tertiary:light-dark(#ffffff, #002f65);--mat-sys-on-tertiary-container:light-dark(#00458f, #d7e3ff);--mat-sys-on-tertiary-fixed:light-dark(#001b3f, #001b3f);--mat-sys-on-tertiary-fixed-variant:light-dark(#00458f, #00458f);--mat-sys-outline:light-dark(#74777f, #8e9099);--mat-sys-outline-variant:light-dark(#c4c6d0, #44474e);--mat-sys-primary:light-dark(#005cbb, #abc7ff);--mat-sys-primary-container:light-dark(#d7e3ff, #00458f);--mat-sys-primary-fixed:light-dark(#d7e3ff, #d7e3ff);--mat-sys-primary-fixed-dim:light-dark(#abc7ff, #abc7ff);--mat-sys-scrim:light-dark(#000000, #000000);--mat-sys-secondary:light-dark(#565e71, #bec6dc);--mat-sys-secondary-container:light-dark(#dae2f9, #3e4759);--mat-sys-secondary-fixed:light-dark(#dae2f9, #dae2f9);--mat-sys-secondary-fixed-dim:light-dark(#bec6dc, #bec6dc);--mat-sys-shadow:light-dark(#000000, #000000);--mat-sys-surface:light-dark(#faf9fd, #121316);--mat-sys-surface-bright:light-dark(#faf9fd, #38393c);--mat-sys-surface-container:light-dark(#efedf0, #1f2022);--mat-sys-surface-container-high:light-dark(#e9e7eb, #292a2c);--mat-sys-surface-container-highest:light-dark(#e3e2e6, #343537);--mat-sys-surface-container-low:light-dark(#f4f3f6, #1a1b1f);--mat-sys-surface-container-lowest:light-dark(#ffffff, #0d0e11);--mat-sys-surface-dim:light-dark(#dbd9dd, #121316);--mat-sys-surface-tint:light-dark(#005cbb, #abc7ff);--mat-sys-surface-variant:light-dark(#e0e2ec, #44474e);--mat-sys-tertiary:light-dark(#005cbb, #abc7ff);--mat-sys-tertiary-container:light-dark(#d7e3ff, #00458f);--mat-sys-tertiary-fixed:light-dark(#d7e3ff, #d7e3ff);--mat-sys-tertiary-fixed-dim:light-dark(#abc7ff, #abc7ff);--mat-sys-neutral-variant20:#2d3038;--mat-sys-neutral10:#1a1b1f;--mat-sys-level0:0px 0px 0px 0px rgba(0, 0, 0, .2), 0px 0px 0px 0px rgba(0, 0, 0, .14), 0px 0px 0px 0px rgba(0, 0, 0, .12);--mat-sys-level1:0px 2px 1px -1px rgba(0, 0, 0, .2), 0px 1px 1px 0px rgba(0, 0, 0, .14), 0px 1px 3px 0px rgba(0, 0, 0, .12);--mat-sys-level2:0px 3px 3px -2px rgba(0, 0, 0, .2), 0px 3px 4px 0px rgba(0, 0, 0, .14), 0px 1px 8px 0px rgba(0, 0, 0, .12);--mat-sys-level3:0px 3px 5px -1px rgba(0, 0, 0, .2), 0px 6px 10px 0px rgba(0, 0, 0, .14), 0px 1px 18px 0px rgba(0, 0, 0, .12);--mat-sys-level4:0px 5px 5px -3px rgba(0, 0, 0, .2), 0px 8px 10px 1px rgba(0, 0, 0, .14), 0px 3px 14px 2px rgba(0, 0, 0, .12);--mat-sys-level5:0px 7px 8px -4px rgba(0, 0, 0, .2), 0px 12px 17px 2px rgba(0, 0, 0, .14), 0px 5px 22px 4px rgba(0, 0, 0, .12);--mat-sys-body-large:400 1rem / 1.5rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-body-large-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-body-large-line-height:1.5rem;--mat-sys-body-large-size:1rem;--mat-sys-body-large-tracking:.031rem;--mat-sys-body-large-weight:400;--mat-sys-body-medium:400 .875rem / 1.25rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-body-medium-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-body-medium-line-height:1.25rem;--mat-sys-body-medium-size:.875rem;--mat-sys-body-medium-tracking:.016rem;--mat-sys-body-medium-weight:400;--mat-sys-body-small:400 .75rem / 1rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-body-small-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-body-small-line-height:1rem;--mat-sys-body-small-size:.75rem;--mat-sys-body-small-tracking:.025rem;--mat-sys-body-small-weight:400;--mat-sys-display-large:400 3.562rem / 4rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-display-large-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-display-large-line-height:4rem;--mat-sys-display-large-size:3.562rem;--mat-sys-display-large-tracking:-.016rem;--mat-sys-display-large-weight:400;--mat-sys-display-medium:400 2.812rem / 3.25rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-display-medium-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-display-medium-line-height:3.25rem;--mat-sys-display-medium-size:2.812rem;--mat-sys-display-medium-tracking:0;--mat-sys-display-medium-weight:400;--mat-sys-display-small:400 2.25rem / 2.75rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-display-small-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-display-small-line-height:2.75rem;--mat-sys-display-small-size:2.25rem;--mat-sys-display-small-tracking:0;--mat-sys-display-small-weight:400;--mat-sys-headline-large:400 2rem / 2.5rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-headline-large-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-headline-large-line-height:2.5rem;--mat-sys-headline-large-size:2rem;--mat-sys-headline-large-tracking:0;--mat-sys-headline-large-weight:400;--mat-sys-headline-medium:400 1.75rem / 2.25rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-headline-medium-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-headline-medium-line-height:2.25rem;--mat-sys-headline-medium-size:1.75rem;--mat-sys-headline-medium-tracking:0;--mat-sys-headline-medium-weight:400;--mat-sys-headline-small:400 1.5rem / 2rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-headline-small-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-headline-small-line-height:2rem;--mat-sys-headline-small-size:1.5rem;--mat-sys-headline-small-tracking:0;--mat-sys-headline-small-weight:400;--mat-sys-label-large:500 .875rem / 1.25rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-label-large-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-label-large-line-height:1.25rem;--mat-sys-label-large-size:.875rem;--mat-sys-label-large-tracking:.006rem;--mat-sys-label-large-weight:500;--mat-sys-label-large-weight-prominent:700;--mat-sys-label-medium:500 .75rem / 1rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-label-medium-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-label-medium-line-height:1rem;--mat-sys-label-medium-size:.75rem;--mat-sys-label-medium-tracking:.031rem;--mat-sys-label-medium-weight:500;--mat-sys-label-medium-weight-prominent:700;--mat-sys-label-small:500 .688rem / 1rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-label-small-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-label-small-line-height:1rem;--mat-sys-label-small-size:.688rem;--mat-sys-label-small-tracking:.031rem;--mat-sys-label-small-weight:500;--mat-sys-title-large:400 1.375rem / 1.75rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-title-large-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-title-large-line-height:1.75rem;--mat-sys-title-large-size:1.375rem;--mat-sys-title-large-tracking:0;--mat-sys-title-large-weight:400;--mat-sys-title-medium:500 1rem / 1.5rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-title-medium-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-title-medium-line-height:1.5rem;--mat-sys-title-medium-size:1rem;--mat-sys-title-medium-tracking:.009rem;--mat-sys-title-medium-weight:500;--mat-sys-title-small:500 .875rem / 1.25rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-title-small-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-title-small-line-height:1.25rem;--mat-sys-title-small-size:.875rem;--mat-sys-title-small-tracking:.006rem;--mat-sys-title-small-weight:500;--mat-sys-corner-extra-large:28px;--mat-sys-corner-extra-large-top:28px 28px 0 0;--mat-sys-corner-extra-small:4px;--mat-sys-corner-extra-small-top:4px 4px 0 0;--mat-sys-corner-full:9999px;--mat-sys-corner-large:16px;--mat-sys-corner-large-end:0 16px 16px 0;--mat-sys-corner-large-start:16px 0 0 16px;--mat-sys-corner-large-top:16px 16px 0 0;--mat-sys-corner-medium:12px;--mat-sys-corner-none:0;--mat-sys-corner-small:8px;--mat-sys-dragged-state-layer-opacity:.16;--mat-sys-focus-state-layer-opacity:.12;--mat-sys-hover-state-layer-opacity:.08;--mat-sys-pressed-state-layer-opacity:.12;--mat-snack-bar-container-shape:transparent;--mat-snack-bar-container-color:transparent;--mat-snack-bar-supporting-text-color:var(--color-text)}html,body{margin:0;padding:0;width:100%;height:100%}body{background:var(--color-bg);color:var(--color-text);font-family:-apple-system,BlinkMacSystemFont,SF Pro Display,Segoe UI,Helvetica Neue,Arial,sans-serif;transition:background .3s ease,color .3s ease;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;padding:0!important}</style><link rel="stylesheet" href="styles-6KD2P5NP.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles-6KD2P5NP.css"></noscript></head>
34
34
  <body>
35
35
  <app-root></app-root>
36
- <script src="polyfills-2FSRUXKO.js" type="module"></script><script src="main-P6EOYPYG.js" type="module"></script></body>
36
+ <script src="polyfills-2FSRUXKO.js" type="module"></script><script src="main-OQ262YIZ.js" type="module"></script></body>
37
37
  </html>