@whoz-oss/coday-client 0.0.0-workstream-forge.186 → 0.0.0-workstream-forge.188

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/browser/{chunk-BVAhKRxf.js → chunk-B-zcPBO8.js} +1 -1
  2. package/browser/{chunk-cW39VhFz.js → chunk-BPjzVRpl.js} +1 -1
  3. package/browser/{chunk-bmNwF1EA.js → chunk-BWqh21nV.js} +1 -1
  4. package/browser/{chunk-CqygV_yT.js → chunk-BX4khMt3.js} +1 -1
  5. package/browser/{chunk-cudzLb_7.js → chunk-BXNOJDqX.js} +1 -1
  6. package/browser/{chunk-BWV_tKo4.js → chunk-BYAmVsxf.js} +1 -1
  7. package/browser/{chunk-BcRntJ-f.js → chunk-Bb3YBtxe.js} +1 -1
  8. package/browser/{chunk-DhUPCR8x.js → chunk-BbMe6WPq.js} +1 -1
  9. package/browser/{chunk-CJ0bvrpa.js → chunk-BbWlZlS-.js} +1 -1
  10. package/browser/{chunk-Z5CORV68.js → chunk-Bc_n3Y3T.js} +1 -1
  11. package/browser/{chunk-IUT0U7MD.js → chunk-BgclSOnY.js} +1 -1
  12. package/browser/{chunk-Dip9hqws.js → chunk-BgvZmtCN.js} +1 -1
  13. package/browser/{chunk-CZ3swGRG.js → chunk-BiPID8lL.js} +1 -1
  14. package/browser/{chunk-CYpUOOXu.js → chunk-BsDDp7o4.js} +1 -1
  15. package/browser/{chunk-Dpp5qieV.js → chunk-C4XGfXnc.js} +1 -1
  16. package/browser/{chunk-CrlEsza5.js → chunk-CBvjo1Pj.js} +1 -1
  17. package/browser/{chunk-BCj_QScJ.js → chunk-CT9B44gl.js} +1 -1
  18. package/browser/chunk-CYQTjhJ4.js +1 -0
  19. package/browser/{chunk-Dy-jqKED.js → chunk-Cw0n1guB.js} +1 -1
  20. package/browser/{chunk-yNnoMggg.js → chunk-CwHKirz6.js} +1 -1
  21. package/browser/{chunk-BKcbagcs.js → chunk-D3zki1Mc.js} +1 -1
  22. package/browser/{chunk-CvH1PYW_.js → chunk-DD3SbBZq.js} +1 -1
  23. package/browser/{chunk-a30sSJMH.js → chunk-DGRCsCJq.js} +2 -2
  24. package/browser/{chunk-Cn9pDxST.js → chunk-DHXYyzs9.js} +1 -1
  25. package/browser/{chunk-CZq0sS47.js → chunk-DO3CTX5Y.js} +1 -1
  26. package/browser/{chunk-DHs2aKFP.js → chunk-DQm2i9Rg.js} +1 -1
  27. package/browser/{chunk-BDc-xbXC.js → chunk-DWXbpgmZ.js} +1 -1
  28. package/browser/{chunk-DxD41Wpl.js → chunk-DaY2sRwJ.js} +1 -1
  29. package/browser/{chunk-DzHTXkbw.js → chunk-DcpeHWax.js} +1 -1
  30. package/browser/{chunk-Cgo9jwAr.js → chunk-DoFYhR9o.js} +1 -1
  31. package/browser/chunk-DpGfd5zc.js +670 -0
  32. package/browser/{chunk-CRE2m4-M.js → chunk-Dq0QNyK6.js} +1 -1
  33. package/browser/{chunk-BP01ZR-w.js → chunk-DqUsm5_w.js} +1 -1
  34. package/browser/{chunk-BjECEnNM.js → chunk-Dr0VdNoR.js} +1 -1
  35. package/browser/{chunk-DDEKNHYj.js → chunk-DvAnCl4Z.js} +1 -1
  36. package/browser/{chunk-Bb14uEa9.js → chunk-DwXnhMXy.js} +1 -1
  37. package/browser/{chunk-CBqrb7sY.js → chunk-IfNttl3x.js} +1 -1
  38. package/browser/{chunk-D6ZmkGQx.js → chunk-LJOa6czj.js} +1 -1
  39. package/browser/{chunk-CkcpRLV2.js → chunk-NLFmBK9p.js} +1 -1
  40. package/browser/{chunk-bir_vdHS.js → chunk-fG05Gwye.js} +1 -1
  41. package/browser/{chunk-qFzWQjBe.js → chunk-nWfFoxeO.js} +1 -1
  42. package/browser/{chunk-BuW-L7NV.js → chunk-oePoI0kj.js} +1 -1
  43. package/browser/{chunk-WZ5n_WKd.js → chunk-u21z0dkm.js} +1 -1
  44. package/browser/{chunk-BTuAxVDp.js → chunk-wTlsFesR.js} +1 -1
  45. package/browser/{chunk-BaROBgKr.js → chunk-xwHC_Zl4.js} +1 -1
  46. package/browser/{chunk-C1HA3aCU.js → chunk-ysFxK5J6.js} +1 -1
  47. package/browser/index.html +1 -1
  48. package/browser/{main-HBKYHCPK.js → main-FNVOUHA6.js} +7 -7
  49. package/package.json +1 -1
  50. package/browser/chunk-BiMuA5X-.js +0 -670
  51. package/browser/chunk-DQ6ffgp1.js +0 -1
@@ -1 +1 @@
1
- import {o as o$1,r,i,l}from'./chunk-1nyEsjkY.js';import {o}from'./chunk-CrlEsza5.js';import {O}from'./chunk-CZ3swGRG.js';import {g,W as W$1,F,I as Ie,ae as U,aw as N,U as Ui,ax as Q,a8 as _,K as KC,a9 as F$1,ay as Se,x as U$1,a2 as da,aa as Cr,aj as Ty,az as ne,E as x,z as w,m as mw,as as $t$1,D as Ds,N as mg,M as MC,a as pl,P as Pw,j as jE,G as ug,L as Lw,ao as k,a6 as x$1,X as Xw,q as qw,l as lg,Q as SI,T as MI,e as cg,v as vl,V as Vw,H as Hw,O as Og,k as df,n as ff,aq as kg}from'./main-HBKYHCPK.js';import {a as pt$1,T as Te,b as fn,U as Ut$1,n as nd,o as bo,x as xo,L as Lt$1,k as kn,u as vn,G as Gt$1,m as mo,c as po,$ as $r,H as qr,V as Vn,A as An,d as pn,h as hn,e as cn,r as ln,g as dn,C as mn,i as at$1,j as an,t as rn,l as ko}from'./chunk-BiMuA5X-.js';import'./chunk-DQ6ffgp1.js';var W=class n{aiModelController=g(k);listAvailable(t){let e=this.aiModelController.listPlatformLevelAiModel().pipe(this.orEmpty("platform")),o=t?this.aiModelController.listByNamespaceIdAiModel(t).pipe(this.orEmpty("namespace")):Cr([]);return Ty({platform:e,namespace:o}).pipe(ne(({platform:r,namespace:d})=>[...r,...d]))}orEmpty(t){return da(e=>(console.error(`[ai-model-state] failed to load the ${t} AI models`,e),Cr([])))}static \u0275fac=function(e){return new(e||n)};static \u0275prov=x$1({token:n,factory:n.\u0275fac,providedIn:"root"})};var D="*";function Ge(n){return (n??[]).some(t=>t.trim()===D)}function Ue(n){let t=(n??[]).map(e=>e.trim()).filter(e=>e.length>0&&e!==D).map(e=>e.toLowerCase());return new Set(t)}function H(n){return n.includes(D)}function Xe(n){let t=n.replace(/[\\.[\]{}()^$|]/g,"\\$&").replace(/\*/g,".*");try{return new RegExp(`^${t}$`,"i")}catch(e){return null}}function z(n,t){return (t??[]).map(e=>e.trim()).filter(e=>e.length>0&&e!==D&&H(e)).some(e=>Xe(e)?.test(n)??false)}var je="AGENTOS_CONFIG",Qe=new Set(["HTTP_API","MCP_HTTP","MCP_STDIO","BASH","TMUX","GIT"]);function Ke(n){return n.configEnabled&&(n.hasSubAgents||n.integrationTypes.some(t=>Qe.has(t)))}var $=n=>n.trim().toLowerCase();function Ze(n,t){let e=o=>o.namespaceId?1:0;return e(n)-e(t)||n.priority-t.priority}var We=(n,t)=>n.label.localeCompare(t.label);function He(n,t){let e=new Map;for(let _ of n){let m=_.alias?.trim();if(!m)continue;let I=e.get($(m));(!I||Ze(_,I)>0)&&e.set($(m),_);}let o=[...e.values()].map(_=>({value:_.alias.trim(),label:`${_.alias.trim()} (${_.apiModelName})`})).sort(We),r=new Set,d=[];for(let _ of n){let m=_.apiModelName?.trim();!m||r.has($(m))||(r.add($(m)),e.has($(m))||d.push({value:m,label:m}));}d.sort(We);let f=t??"";if(f.trim().length===0||[...o,...d].some(_=>_.value===f))return {aliases:o,apiNames:d,current:null};let S=e.has($(f))||r.has($(f));return {aliases:o,apiNames:d,current:{value:f,label:S?f:`${f} (not in the list)`}}}var Ye=(n,t)=>t.value,et=(n,t)=>t.config.id,tt=(n,t)=>t.type,qe=(n,t)=>t.selector;function nt(n,t){if(n&1&&(Ds(0,"a",2),MC(1,"View resolved definition \u2192"),pl()),n&2){let e=Xw();ug("routerLink",e.inspectRoute());}}function ot(n,t){n&1&&(Ds(0,"ds-tag",3),MC(1,"Platform level"),pl());}function it(n,t){n&1&&(Ds(0,"p",4),MC(1,"Loading\u2026"),pl());}function at(n,t){if(n&1&&(lg(0,"input",17),SI()),n&2){let e=Xw(2);ug("formControl",e.modelNameControl),MI();}}function lt(n,t){if(n&1&&(Ds(0,"option",41),MC(1),pl()),n&2){let e=t;ug("ngValue",e.value),jE(),Og(e.label);}}function rt(n,t){if(n&1&&(Ds(0,"option",41),MC(1),pl()),n&2){let e=t.$implicit;ug("ngValue",e.value),jE(),Og(e.label);}}function st(n,t){if(n&1&&(Ds(0,"optgroup",42),Vw(1,rt,2,2,"option",41,Ye),pl()),n&2){let e=Xw(3);jE(),Hw(e.modelOptions().aliases);}}function dt(n,t){if(n&1&&(Ds(0,"option",41),MC(1),pl()),n&2){let e=t.$implicit;ug("ngValue",e.value),jE(),Og(e.label);}}function ct(n,t){if(n&1&&(Ds(0,"optgroup",43),Vw(1,dt,2,2,"option",41,Ye),pl()),n&2){let e=Xw(3);jE(),Hw(e.modelOptions().apiNames);}}function mt(n,t){if(n&1&&(Ds(0,"select",18)(1,"option",40),MC(2,"Select a model"),pl(),Pw(3,lt,2,2,"option",41),Pw(4,st,3,0,"optgroup",42),Pw(5,ct,3,0,"optgroup",43),pl(),SI()),n&2){let e,o=Xw(2);ug("formControl",o.modelNameControl),MI(),jE(),ug("ngValue",null),jE(2),Lw((e=o.modelOptions().current)?3:-1,e),jE(),Lw(o.modelOptions().aliases.length>0?4:-1),jE(),Lw(o.modelOptions().apiNames.length>0?5:-1);}}function ut(n,t){if(n&1&&(Ds(0,"span",44),MC(1),pl()),n&2){let e=Xw().$implicit;jE(),Og(e.config.integrationType);}}function gt(n,t){if(n&1&&(lg(0,"input",45),SI()),n&2){let e=Xw().$implicit;ug("formControl",e.toolsControl),cg("aria-label","Tools of "+e.config.name),MI();}}function pt(n,t){if(n&1){let e=qw();Ds(0,"div",10)(1,"label",11)(2,"input",23),mg("change",function(){let r=df(e).$implicit,d=Xw(3);return ff(d.toggleIntegration(r))}),pl(),Ds(3,"span",24),MC(4),pl(),Pw(5,ut,2,1,"span",44),pl(),Pw(6,gt,1,2,"input",45),pl();}if(n&2){let e=t.$implicit;jE(2),ug("checked",e.enabled()),jE(2),Og(e.config.name),jE(),Lw(e.config.integrationType?5:-1),jE(),Lw(e.enabled()?6:-1);}}function ft(n,t){if(n&1&&(Ds(0,"p",13),MC(1),pl()),n&2){let e=Xw().$implicit;jE(),vl(" Restricted to: ",e.restrictedTools.join(", ")," (set outside this form, preserved on save) ");}}function Ct(n,t){if(n&1){let e=qw();Ds(0,"div",10)(1,"label",24),MC(2),Ds(3,"span",44),MC(4,"built-in"),pl()(),Ds(5,"select",47),mg("change",function(r){let d=df(e).$implicit,f=Xw(4);return ff(f.setBuiltInState(d,r.target.value))}),Ds(6,"option",48),MC(7),pl(),Ds(8,"option",49),MC(9,"Enabled"),pl(),Ds(10,"option",50),MC(11,"Disabled"),pl()(),Pw(12,ft,2,1,"p",13),Ds(13,"p",13),MC(14),pl()();}if(n&2){let e=t.$implicit,o=Xw(4);jE(),cg("for","built-in-"+e.type),jE(),vl(" ",e.displayName," "),jE(3),ug("id","built-in-"+e.type)("value",e.state()),jE(2),Og(o.builtInDefaultLabel(e)),jE(5),Lw(e.state()==="on"&&e.restrictedTools?12:-1),jE(2),Og(e.description);}}function _t(n,t){if(n&1&&(Ds(0,"span",46),MC(1,"Built-in integrations"),pl(),Vw(2,Ct,15,7,"div",10,tt)),n&2){let e=Xw(3);jE(2),Hw(e.builtInRows());}}function bt(n,t){n&1&&(Ds(0,"ds-notice",26),MC(1," This agent can read the AgentOS configuration and also has a network integration or sub-agents: what it reads could be sent outside without any confirmation. Prefer a dedicated configuration agent without them. "),pl());}function ht(n,t){if(n&1&&(Ds(0,"ds-fieldset",21),Vw(1,pt,7,4,"div",10,et),Pw(3,_t,4,0),Pw(4,bt,2,0,"ds-notice",26),pl()),n&2){let e=Xw(2);jE(),Hw(e.integrationRows()),jE(2),Lw(e.builtInRows().length>0?3:-1),jE(),Lw(e.configAgentExposureWarning()?4:-1);}}function yt(n,t){n&1&&MC(0," A platform config can only list platform skills here: namespace skills are resolved per namespace when the agent runs. ");}function vt(n,t){n&1&&(Ds(0,"ds-notice",26),MC(1," Saving with this on replaces the selection below with "),Ds(2,"code",25),MC(3,"*"),pl(),MC(4,". "),pl());}function xt(n,t){n&1&&(Ds(0,"ds-notice"),MC(1," The skill catalogue could not be loaded. What this agent already declares is listed below and preserved on save. "),pl());}function St(n,t){n&1&&(Ds(0,"p",4),MC(1,"No skill available in this scope yet."),pl());}function At(n,t){n&1&&(Ds(0,"span",44),MC(1,"platform"),pl());}function wt(n,t){if(n&1&&(Ds(0,"span",44),MC(1),pl()),n&2){let e=Xw(4);jE(),vl(" ",e.skillCatalogueUnavailable()?"not verified":"no matching skill"," ");}}function Et(n,t){if(n&1&&(Ds(0,"p",13),MC(1),pl()),n&2){let e=Xw().$implicit;jE(),Og(e.description);}}function Tt(n,t){if(n&1){let e=qw();Ds(0,"div",10)(1,"label",11)(2,"input",51),mg("change",function(){let r=df(e).$implicit,d=Xw(3);return ff(d.toggleSkill(r))}),pl(),Ds(3,"span",24),MC(4),pl(),Pw(5,At,2,0,"span",44),Pw(6,wt,2,1,"span",44),pl(),Pw(7,Et,2,1,"p",13),pl();}if(n&2){let e=t.$implicit,o=Xw(3);jE(2),ug("checked",e.selected())("disabled",o.allSkillsSelected()),jE(2),Og(e.name),jE(),Lw(e.platform?5:-1),jE(),Lw(e.unresolved?6:-1),jE(),Lw(e.description?7:-1);}}function kt(n,t){if(n&1&&Vw(0,Tt,8,6,"div",10,qe),n&2){let e=Xw(2);Hw(e.skillRows());}}function It(n,t){if(n&1&&(Ds(0,"ds-form-field",30),lg(1,"textarea",52),SI(),Ds(2,"p",4),MC(3," Default payload for this loop agent. Overridden at launch time if the first message contains a valid "),Ds(4,"code"),MC(5,"AgentLoopPayload"),pl(),MC(6,". Leave empty if you always provide the payload at launch. "),pl()()),n&2){let e=Xw(2);ug("error",e.loopConfigControl.invalid&&e.loopConfigControl.touched?"Invalid JSON \u2014 please fix the syntax.":null),jE(),ug("placeholder",e.loopConfigPlaceholder)("formControl",e.loopConfigControl),MI();}}function Mt(n,t){n&1&&MC(0," A platform config can only list platform agents here: a namespace's agents are resolved per namespace when the agent runs. ");}function Rt(n,t){if(n&1&&MC(0),n&2){let e=Xw(3);kg(" That deletes ",e.droppedUnresolvedSubAgents()," flagged ",e.droppedUnresolvedSubAgents()===1?"selector":"selectors"," nothing matched, which this form cannot restore. ");}}function Ft(n,t){if(n&1&&(Ds(0,"ds-notice",26),MC(1," Saving with this on replaces the selection below with "),Ds(2,"code",25),MC(3,"*"),pl(),MC(4,". "),Pw(5,Rt,1,2),pl()),n&2){let e=Xw(2);jE(5),Lw(e.droppedUnresolvedSubAgents()>0?5:-1);}}function Nt(n,t){n&1&&(Ds(0,"ds-notice"),MC(1," The list of agents could not be loaded. What this agent already declares is listed below and preserved on save. "),pl());}function Dt(n,t){n&1&&(Ds(0,"p",4),MC(1,"No other agent is available in this scope yet."),pl());}function Lt(n,t){n&1&&(Ds(0,"span",44),MC(1,"pattern"),pl());}function Ot(n,t){n&1&&(Ds(0,"span",44),MC(1,"via pattern"),pl());}function Vt(n,t){if(n&1&&(Ds(0,"span",44),MC(1),pl()),n&2){let e=Xw(4);jE(),vl(" ",e.subAgentCandidatesUnavailable()?"not verified":"no matching agent"," ");}}function Pt(n,t){if(n&1){let e=qw();Ds(0,"button",55),mg("click",function(){df(e);let r=Xw().$implicit,d=Xw(3);return ff(d.removeSubAgent(r))}),MC(1," \xD7 "),pl();}if(n&2){let e=Xw().$implicit;cg("aria-label","Remove "+e.selector);}}function Bt(n,t){if(n&1){let e=qw();Ds(0,"div",32)(1,"label",53)(2,"input",51),mg("change",function(){let r=df(e).$implicit,d=Xw(3);return ff(d.toggleSubAgent(r))}),pl(),Ds(3,"span",24),MC(4),pl(),Pw(5,Lt,2,0,"span",44)(6,Ot,2,0,"span",44)(7,Vt,2,1,"span",44),pl(),Pw(8,Pt,2,1,"button",54),pl();}if(n&2){let e=t.$implicit,o=Xw(3);jE(2),ug("checked",e.selected())("disabled",o.allSubAgentsSelected()),jE(2),Og(e.name),jE(),Lw(e.pattern?5:e.grantedByPattern?6:e.unresolved?7:-1),jE(3),Lw(e.unresolved?8:-1);}}function $t(n,t){if(n&1&&Vw(0,Bt,9,5,"div",32,qe),n&2){let e=Xw(2);Hw(e.subAgentRows());}}function Gt(n,t){if(n&1){let e=qw();Ds(0,"div")(1,"button",56),mg("click",function(){df(e);let r=Xw(2);return ff(r.useDefaultDelegationTimeout())}),MC(2," Use server default "),pl()();}}function Ut(n,t){n&1&&(Ds(0,"ds-notice"),MC(1),pl()),n&2&&(jE(),Og(t));}function jt(n,t){if(n&1){let e=qw();Ds(0,"button",57),mg("click",function(){df(e);let r=Xw(2);return ff(r.exportYaml())}),MC(1),pl();}if(n&2){let e=Xw(2);ug("disabled",e.isExporting()),jE(),vl(" ",e.isExporting()?"Exporting\u2026":"Export as YAML"," ");}}function Kt(n,t){if(n&1){let e=qw();Ds(0,"form",6),mg("ngSubmit",function(){df(e);let r=Xw();return ff(r.submit())}),Ds(1,"ds-fieldset",7)(2,"ds-form-field",8),lg(3,"input",9),SI(),pl(),Ds(4,"div",10)(5,"label",11),lg(6,"input",12),SI(),MC(7," Enabled "),pl(),Ds(8,"p",13),MC(9,"Disabled agents are excluded from namespace resolution."),pl()(),Ds(10,"ds-form-field",14),lg(11,"input",15),SI(),pl(),Ds(12,"ds-form-field",16),Pw(13,at,1,1,"input",17)(14,mt,6,5,"select",18),pl(),Ds(15,"ds-form-field",19),lg(16,"textarea",20),SI(),pl()(),Pw(17,ht,5,2,"ds-fieldset",21),Ds(18,"ds-fieldset",22)(19,"p",4),MC(20," Instruction bundles this agent can read on demand. Selecting at least one grants it the "),Ds(21,"code"),MC(22,"readSkill"),pl(),MC(23," and "),Ds(24,"code"),MC(25,"readSkillResource"),pl(),MC(26," tools; selecting none grants neither. "),Pw(27,yt,1,0),pl(),Ds(28,"label",11)(29,"input",23),mg("change",function(){df(e);let r=Xw();return ff(r.toggleAllSkills())}),pl(),Ds(30,"span",24),MC(31,"Every skill in the catalogue ("),Ds(32,"code",25),MC(33,"*"),pl(),MC(34,")"),pl()(),Ds(35,"p",13),MC(36," Resolved at run time, so skills added later are granted too, without editing this agent. "),pl(),Pw(37,vt,5,0,"ds-notice",26),Pw(38,xt,2,0,"ds-notice"),Pw(39,St,2,0,"p",4)(40,kt,2,0),pl(),Ds(41,"ds-form-field",27)(42,"select",28)(43,"option",29),MC(44,"SIMPLE \u2014 Standard agent (single LLM call)"),pl(),Ds(45,"option",29),MC(46,"ADVANCED \u2014 Multi-step reasoning loop"),pl(),Ds(47,"option",29),MC(48,"LOOP \u2014 Bulk loop agent (no LLM, experimental)"),pl()(),SI(),pl(),Pw(49,It,7,3,"ds-form-field",30),Ds(50,"ds-fieldset",31)(51,"p",4),MC(52," The agents this one may delegate to. Selecting at least one grants it the "),Ds(53,"code"),MC(54,"DELEGATE__delegate"),pl(),MC(55," tool; selecting none grants it no way to delegate. Entries are matched against agent names, never ids. "),Pw(56,Mt,1,0),pl(),Ds(57,"label",11)(58,"input",23),mg("change",function(){df(e);let r=Xw();return ff(r.toggleAllSubAgents())}),pl(),Ds(59,"span",24),MC(60,"Every agent it can reach ("),Ds(61,"code",25),MC(62,"*"),pl(),MC(63,")"),pl()(),Ds(64,"p",13),MC(65," Resolved at run time, so agents added later can be delegated to as well, without editing this agent. "),pl(),Pw(66,Ft,6,1,"ds-notice",26),Pw(67,Nt,2,0,"ds-notice"),Pw(68,Dt,2,0,"p",4)(69,$t,2,0),Ds(70,"p",4),MC(71," Advanced \u2014 add a glob instead of picking a name, for example "),Ds(72,"code"),MC(73,"*Fixer"),pl(),MC(74," to cover BugFixer and StoryFixer. "),pl(),Ds(75,"div",32)(76,"input",33),mg("keydown.enter",function(){df(e);let r=Xw();return ff(r.addSubAgent())}),pl(),SI(),Ds(77,"button",34),mg("click",function(){df(e);let r=Xw();return ff(r.addSubAgent())}),MC(78," + "),pl()(),Ds(79,"ds-form-field",35),lg(80,"input",36),SI(),Pw(81,Gt,3,0,"div"),pl()(),Pw(82,Ut,2,1,"ds-notice"),Ds(83,"ds-form-actions")(84,"button",37),MC(85),pl(),Pw(86,jt,2,2,"button",38),Ds(87,"button",39),mg("click",function(){df(e);let r=Xw();return ff(r.cancel())}),MC(88,"Cancel"),pl()()();}if(n&2){let e,o=Xw();ug("formGroup",o.form),jE(3),ug("formControl",o.nameControl),MI(),jE(3),ug("formControl",o.enabledControl),MI(),jE(5),ug("formControl",o.descriptionControl),MI(),jE(2),Lw(o.modelAsFreeText()?13:14),jE(3),ug("formControl",o.instructionsControl),MI(),jE(),Lw(o.integrationRows().length>0||o.builtInRows().length>0?17:-1),jE(10),Lw(o.isPlatformMode?27:-1),jE(2),ug("checked",o.allSkillsSelected()),jE(8),Lw(o.namedSkillSelectionDropped()?37:-1),jE(),Lw(o.skillCatalogueUnavailable()?38:-1),jE(),Lw(o.skillRows().length===0?39:40),jE(3),ug("formControl",o.executionModeControl),MI(),jE(),ug("value",o.ExecutionMode.SIMPLE),jE(2),ug("value",o.ExecutionMode.ADVANCED),jE(2),ug("value",o.ExecutionMode.LOOP),jE(2),Lw(o.isLoopMode()?49:-1),jE(7),Lw(o.isPlatformMode?56:-1),jE(2),ug("checked",o.allSubAgentsSelected()),jE(8),Lw(o.namedSubAgentSelectionDropped()?66:-1),jE(),Lw(o.subAgentCandidatesUnavailable()?67:-1),jE(),Lw(o.subAgentRows().length===0?68:69),jE(8),ug("formControl",o.newSubAgentControl),MI(),jE(),ug("disabled",!o.newSubAgentControl.value.trim()),jE(2),ug("hint",o.delegationTimeoutHint())("error",o.delegationTimeoutControl.invalid?"Enter a valid positive whole number of seconds, or leave empty to inherit the server default.":null),jE(),ug("formControl",o.delegationTimeoutControl),cg("aria-invalid",o.delegationTimeoutControl.invalid),MI(),jE(),Lw(o.delegationTimeoutControl.value!==null?81:-1),jE(),Lw((e=o.submitError())?82:-1,e),jE(2),ug("disabled",o.form.invalid||o.isSubmitting()),jE(),vl(" ",o.isEditMode()?"Save changes":"Create"," "),jE(),Lw(o.isEditMode()?86:-1);}}var Je=class n{route=g(W$1);router=g(F);destroyRef=g(Ie);agentConfigController=g(U);defaultsController=g(N);defaultDelegationTimeoutSeconds=Ui(null);exportService=g(Q);integrationConfigState=g(O);integrationTypeController=g(_);skillState=g(o);aiModelState=g(W);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=!this.namespaceId;form=new pt$1({name:new Te("",{nonNullable:true,validators:[fn.required,fn.minLength(1)]}),description:new Te(null),modelName:new Te(null,{validators:[fn.required,n.notBlankValidator]}),instructions:new Te(null),executionMode:new Te("SIMPLE",{nonNullable:true}),delegationTimeoutSeconds:new Te(null,{validators:[fn.min(1),fn.max(2147483647),fn.pattern(/^\d+$/)]}),enabled:new Te(false,{nonNullable:true}),loopConfig:new Te(null,{validators:[n.jsonValidator]})});static notBlankValidator(t){let e=t.value;return typeof e=="string"&&e.length>0&&e.trim().length===0?{required:true}:null}static jsonValidator(t){let e=t.value?.trim();if(!e)return null;try{return JSON.parse(e),null}catch(o){return {invalidJson:true}}}get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get modelNameControl(){return this.form.controls.modelName}get instructionsControl(){return this.form.controls.instructions}get executionModeControl(){return this.form.controls.executionMode}get delegationTimeoutControl(){return this.form.controls.delegationTimeoutSeconds}useDefaultDelegationTimeout(){this.delegationTimeoutControl.setValue(null),this.delegationTimeoutControl.markAsDirty();}delegationTimeoutHint=KC(()=>{let t=this.defaultDelegationTimeoutSeconds();return `How long each delegation launched by this agent waits without activity from the sub-agent, including its own delegations. When it runs out, the sub-agent and its active descendants are stopped and can be resumed. Leave empty to use the server default${t!==null?`: ${t} s (${t/60} min)`:""}.`});get enabledControl(){return this.form.controls.enabled}get loopConfigControl(){return this.form.controls.loopConfig}executionModeValue=F$1(this.form.controls.executionMode.valueChanges,{initialValue:this.form.controls.executionMode.value});isLoopMode=KC(()=>this.executionModeValue()==="LOOP");subAgentRows=Ui([]);allSubAgentsSelected=Ui(false);subAgentCandidatesUnavailable=Ui(false);namedSubAgentSelectionDropped=KC(()=>this.allSubAgentsSelected()&&this.subAgentRows().some(t=>t.selected()));droppedUnresolvedSubAgents=KC(()=>this.allSubAgentsSelected()?this.subAgentRows().filter(t=>t.unresolved&&t.selected()).length:0);hasAnySubAgent=KC(()=>this.allSubAgentsSelected()||this.subAgentRows().some(t=>t.selected()));newSubAgentControl=new Te("",{nonNullable:true});isEditMode=Ui(false);isSubmitting=Ui(false);isLoading=Ui(false);isExporting=Ui(false);submitError=Ui(null);ExecutionMode=Se;loopConfigPlaceholder=JSON.stringify({search:{tool:"SearchTalents",params:{talentId:["6ac76692a909eaaae0b078d6"],resolveTargets:["MANAGER"],next:null}},act:{agentName:"ProfileCaretaker",promptTemplate:"This talent has not completed their profile. As their manager, I need you to help me review and improve it."}},null,2);builtInRows=Ui([]);inspectRoute(){let t=this.route.snapshot.paramMap.get("agentConfigId")??"";return this.isPlatformMode?["/agentos","admin","agent-configs",t,"inspect"]:["/agentos",this.namespaceId,"agent-configs",t,"inspect"]}configAgentExposureWarning=KC(()=>Ke({configEnabled:this.builtInRows().some(t=>t.type===je&&t.state()==="on"),integrationTypes:this.integrationRows().filter(t=>t.enabled()).map(t=>t.config.integrationType),hasSubAgents:this.hasAnySubAgent()}));modelOptions=Ui({aliases:[],apiNames:[],current:null});modelCatalogueLoaded=Ui(false);modelAsFreeText=KC(()=>{let{aliases:t,apiNames:e}=this.modelOptions();return this.modelCatalogueLoaded()&&t.length+e.length===0});applyModelCatalogue(t,e){this.modelOptions.set(He(t,e)),this.modelCatalogueLoaded.set(true);}integrationRows=Ui([]);skillRows=Ui([]);allSkillsSelected=Ui(false);skillCatalogueUnavailable=Ui(false);namedSkillSelectionDropped=KC(()=>this.allSkillsSelected()&&this.skillRows().some(t=>t.selected()));existingConfig=null;ngOnInit(){this.defaultsController.getAgentConfigDefaults().pipe(U$1(this.destroyRef),da(()=>Cr(null))).subscribe(e=>this.defaultDelegationTimeoutSeconds.set(e?.delegationTimeoutSeconds??null));let t=this.route.snapshot.paramMap.get("agentConfigId");t?(this.isEditMode.set(true),this.loadConfigAndIntegrations(t)):this.loadIntegrations(void 0);}loadConfigAndIntegrations(t){this.isLoading.set(true),Ty({config:this.agentConfigController.getByIdAgentConfig(t),namespaceIntegrations:this.namespaceId?this.integrationConfigState.loadNamespaceConfigs(this.namespaceId):Cr([]),platformIntegrations:this.integrationConfigState.loadPlatformConfigs(),builtInTypes:this.loadBuiltInTypes(),skillCatalogue:this.loadSkillCatalogue(),delegationCandidates:this.loadDelegationCandidates(),models:this.aiModelState.listAvailable(this.namespaceId)}).pipe(U$1(this.destroyRef)).subscribe({next:({config:e,namespaceIntegrations:o,platformIntegrations:r,builtInTypes:d,skillCatalogue:f,delegationCandidates:S,models:_})=>{this.existingConfig=e,this.applyModelCatalogue(_,e.modelName??null),this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??null),this.modelNameControl.setValue(e.modelName??null),this.instructionsControl.setValue(e.instructions??null);let m=e.executionMode??(e.advancedExecution?"ADVANCED":"SIMPLE");this.executionModeControl.setValue(m),this.delegationTimeoutControl.setValue(e.delegationTimeoutSeconds??null),this.enabledControl.setValue(e.enabled??true),this.loopConfigControl.setValue(e.loopConfig!=null?JSON.stringify(e.loopConfig,null,2):null);let I=[...r,...o];this.integrationRows.set(this.buildIntegrationRows(I,e.integrations??void 0)),this.builtInRows.set(this.buildBuiltInRows(d,e.integrations??void 0)),this.allSubAgentsSelected.set(Ge(e.subAgents)),this.subAgentRows.set(this.buildSubAgentRows(S,e.subAgents,e.name)),this.allSkillsSelected.set(o$1(e.skillSelectors)),this.skillRows.set(this.buildSkillRows(f,e.skillSelectors)),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),this.navigateBack();}});}loadIntegrations(t){Ty({namespaceIntegrations:this.namespaceId?this.integrationConfigState.loadNamespaceConfigs(this.namespaceId):Cr([]),platformIntegrations:this.integrationConfigState.loadPlatformConfigs(),builtInTypes:this.loadBuiltInTypes(),skillCatalogue:this.loadSkillCatalogue(),delegationCandidates:this.loadDelegationCandidates(),models:this.aiModelState.listAvailable(this.namespaceId)}).pipe(U$1(this.destroyRef)).subscribe({next:({namespaceIntegrations:e,platformIntegrations:o,builtInTypes:r,skillCatalogue:d,delegationCandidates:f,models:S})=>{this.applyModelCatalogue(S,null);let _=[...o,...e];this.integrationRows.set(this.buildIntegrationRows(_,t??void 0)),this.builtInRows.set(this.buildBuiltInRows(r,t??void 0)),this.allSubAgentsSelected.set(false),this.subAgentRows.set(this.buildSubAgentRows(f,void 0,null)),this.allSkillsSelected.set(false),this.skillRows.set(this.buildSkillRows(d,void 0));}});}loadSkillCatalogue(){return (this.namespaceId?this.skillState.listEffective(this.namespaceId):this.skillState.listPlatform().pipe(ne(e=>e.map(o=>({id:o.id??"",name:o.name,description:o.description,namespaceId:o.namespaceId??null,readOnly:o.readOnly===true}))))).pipe(da(e=>(console.error("[agent-config-form] failed to load the skill catalogue",e),this.skillCatalogueUnavailable.set(true),Cr([]))))}buildSkillRows(t,e){let r$1=(e??[]).map(m=>m.trim()).filter(m=>m.length>0).filter(m=>m!==r),d=i(r$1),f=new Set(t.map(m=>m.name.toLowerCase())),S=t.map(m=>({selector:m.name,name:m.name,description:m.description,platform:m.namespaceId==null,unresolved:false,selected:Ui(d.has(m.name.toLowerCase()))})),_=new Set;for(let m of r$1){let I=l(m).toLowerCase();f.has(I)||_.has(I)||(_.add(I),S.push({selector:m,name:m,description:"",platform:false,unresolved:true,selected:Ui(true)}));}return S}toggleSkill(t){t.selected.update(e=>!e);}toggleAllSkills(){this.allSkillsSelected.update(t=>!t);}buildSkillSelectorsPayload(){if(this.allSkillsSelected())return [r];let t=this.skillRows().filter(e=>e.selected()).map(e=>e.selector);return t.length>0?t:void 0}loadDelegationCandidates(){let t=this.agentConfigController.listPlatformAgentsAgentConfig(false).pipe(this.orNoCandidates()),e=this.namespaceId?this.agentConfigController.listByParentAgentConfig(this.namespaceId,false).pipe(this.orNoCandidates()):Cr([]);return Ty({platform:t,namespace:e}).pipe(ne(({platform:o,namespace:r})=>[...o,...r]),ne(o=>o.map(r=>r.name).filter(r=>r.length>0)),ne(o=>n.dedupeByKey(o)))}orNoCandidates(){return da(t=>(console.error("[agent-config-form] failed to load the delegation candidates",t),this.subAgentCandidatesUnavailable.set(true),Cr([])))}static dedupeByKey(t){let e=new Set;return t.filter(o=>{let r=o.toLowerCase();return e.has(r)?false:(e.add(r),true)})}buildSubAgentRows(t,e,o){let r=Ue(e),d=o?.toLowerCase()??null,f=t.filter(b=>{let G=b.toLowerCase();return G!==d||r.has(G)}),S=new Set(f.map(b=>b.toLowerCase())),_=f.map(b=>({selector:b,name:b,unresolved:false,pattern:false,grantedByPattern:z(b,e),selected:Ui(r.has(b.toLowerCase()))})),m=new Set,I=(e??[]).map(b=>b.trim()).filter(b=>b.length>0&&b!==D);for(let b of I){let G=b.toLowerCase();S.has(G)||m.has(G)||(m.add(G),_.push({selector:b,name:b,unresolved:true,pattern:H(b),grantedByPattern:false,selected:Ui(true)}));}return _}loadBuiltInTypes(){return this.integrationTypeController.listTypesIntegrationType().pipe(ne(t=>t.filter(e=>!e.configSchema)),da(t=>(console.error("[agent-config-form] failed to load integration types",t),Cr([]))))}buildIntegrationRows(t,e){return t.map(o=>{let r=o.name??"",d=e?.[r],f=e!=null&&r in e,S=Array.isArray(d)?d.join(", "):"";return {config:o,enabled:Ui(f),toolsControl:new Te(S,{nonNullable:true})}})}buildBuiltInRows(t,e){return t.map(o=>{let r=e!=null&&o.type in e,d=e?.[o.type],f=r?Array.isArray(d)&&d.length===0?"off":"on":"default";return {type:o.type,displayName:o.displayName,description:o.description,enabledByDefault:o.enabledByDefault===true,state:Ui(f),restrictedTools:Array.isArray(d)&&d.length>0?d:null}})}toggleIntegration(t){t.enabled.update(e=>!e);}setBuiltInState(t,e){t.state.set(e);}builtInDefaultLabel(t){return t.enabledByDefault?"Platform default (enabled)":"Platform default (disabled)"}addSubAgent(){let t=this.newSubAgentControl.value.trim();if(!t)return;let e=this.subAgentRows().find(o=>o.selector.toLowerCase()===t.toLowerCase());e?e.selected.set(true):t===D?this.allSubAgentsSelected.set(true):this.subAgentRows.update(o=>this.withPatternGrants([...o,{selector:t,name:t,unresolved:true,pattern:H(t),grantedByPattern:false,selected:Ui(true)}])),this.newSubAgentControl.reset("");}removeSubAgent(t){let e=t.selector.toLowerCase();this.subAgentRows.update(o=>this.withPatternGrants(o.filter(r=>r.selector.toLowerCase()!==e)));}toggleSubAgent(t){t.selected.update(e=>!e),t.pattern&&this.subAgentRows.update(e=>this.withPatternGrants(e));}withPatternGrants(t){let e=this.allSubAgentsSelected()?[]:t.filter(o=>o.selected()).map(o=>o.selector);return t.map(o=>o.unresolved?o:x(w({},o),{grantedByPattern:z(o.name,e)}))}toggleAllSubAgents(){this.allSubAgentsSelected.update(t=>!t),this.subAgentRows.update(t=>this.withPatternGrants(t));}buildSubAgentsPayload(){if(this.allSubAgentsSelected())return [D];let t=this.subAgentRows().filter(e=>e.selected()).map(e=>e.selector);return t.length>0?t:void 0}buildIntegrationsPayload(){let t={};for(let o of this.integrationRows().filter(r=>r.enabled())){let r=o.config.name??"",d=o.toolsControl.value.trim();t[r]=d===""?null:d.split(",").map(f=>f.trim()).filter(f=>f.length>0);}for(let o of this.builtInRows()){let r=o.state();r==="on"?t[o.type]=o.restrictedTools??null:r==="off"&&(t[o.type]=[]);}let e=new Set([...this.integrationRows().map(o=>o.config.name??""),...this.builtInRows().map(o=>o.type)]);for(let[o,r]of Object.entries(this.existingConfig?.integrations??{}))e.has(o)||(t[o]=r);return Object.keys(t).length>0?t:void 0}submit(){if(this.form.invalid||this.isSubmitting())return;this.addSubAgent(),this.submitError.set(null),this.isSubmitting.set(true);let t=x(w({},this.existingConfig??{}),{createdOn:this.existingConfig?.createdOn,updatedOn:this.existingConfig?.updatedOn,namespaceId:this.namespaceId,name:this.nameControl.value.trim(),description:this.descriptionControl.value?.trim()||void 0,modelName:this.modelNameControl.value?.trim()||void 0,instructions:this.instructionsControl.value?.trim()||void 0,integrations:this.buildIntegrationsPayload(),executionMode:this.executionModeControl.value,advancedExecution:this.executionModeControl.value==="ADVANCED",enabled:this.enabledControl.value,subAgents:this.buildSubAgentsPayload(),skillSelectors:this.buildSkillSelectorsPayload(),delegationTimeoutSeconds:this.delegationTimeoutControl.value,loopConfig:this.buildLoopConfigPayload()});(this.isEditMode()?this.agentConfigController.updateAgentConfig(this.existingConfig.id??"",t):this.agentConfigController.createAgentConfig(t)).pipe(U$1(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:o=>{this.isSubmitting.set(false),this.submitError.set(n.serverMessage(o));}});}static serverMessage(t){let o=t?.error?.message;if(typeof o=="string"&&o.trim().length>0)return o;let r=t?.status;return r===0?"The server could not be reached. The agent was not saved.":typeof r=="number"&&r>=500?`The server failed to save the agent (HTTP ${r}). Nothing was changed.`:"The server refused the save and gave no reason. Check the values and try again."}exportYaml(){let t=this.existingConfig?.id;!t||this.isExporting()||(this.isExporting.set(true),this.exportService.exportAsYaml(t).pipe(U$1(this.destroyRef)).subscribe({next:e=>{let o=new Blob([e],{type:"application/yaml"}),r=URL.createObjectURL(o),d=document.createElement("a");d.href=r,d.download=`${this.existingConfig?.name??"agent"}.yaml`,d.click(),URL.revokeObjectURL(r),this.isExporting.set(false);},error:()=>this.isExporting.set(false)}));}buildLoopConfigPayload(){let t=this.loopConfigControl.value?.trim();if(!t)return this.existingConfig?.loopConfig!=null?null:void 0;try{return JSON.parse(t)}catch(e){return}}cancel(){this.navigateBack();}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","agent-configs"]):this.router.navigate(["/agentos",this.namespaceId,"agent-configs"]);}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=mw({type:n,selectors:[["agentos-agent-config-form"]],decls:8,vars:4,consts:[[3,"title"],["dsButton","","variant","ghost","type","button","title","Back to agent configs",3,"click"],["headerMeta","",1,"ds-link",3,"routerLink"],["headerMeta","","variant","outline"],[1,"ds-hint"],[1,"ds-form",3,"formGroup"],[1,"ds-form",3,"ngSubmit","formGroup"],["legend","Agent"],["label","Name","controlId","agent-config-name","required",""],["dsControl","","id","agent-config-name","type","text","placeholder","e.g. Support agent","autocomplete","off",3,"formControl"],[1,"ds-stack","ds-stack--sm"],["dsCheck",""],["type","checkbox",3,"formControl"],[1,"ds-hint","ds-indent"],["label","Description","controlId","agent-config-description"],["dsControl","","id","agent-config-description","type","text","placeholder","Optional \u2014 short description of this agent","autocomplete","off",3,"formControl"],["label","Model","controlId","agent-config-model-name","required","","hint","Aliases are matched first, then API model names. Resolved when the agent runs."],["dsControl","","id","agent-config-model-name","type","text","placeholder","Model alias or name to use, e.g. BIG","autocomplete","off",3,"formControl"],["dsControl","","id","agent-config-model-name",3,"formControl"],["label","Instructions","controlId","agent-config-instructions"],["dsControl","","id","agent-config-instructions","rows","6","placeholder","Optional \u2014 system instructions for this agent",3,"formControl"],["legend","Integrations","hint","Select which integrations this agent can use. Leave tool names empty to allow all tools from an integration."],["legend","Skills"],["type","checkbox",3,"change","checked"],[1,"ds-strong"],[1,"ds-code"],["tone","warning"],["label","Execution mode","controlId","agent-config-execution-mode","hint",'SIMPLE runs a single LLM pass. ADVANCED uses an intention loop for complex tasks and requires a model that supports advanced execution, otherwise the agent fails to run. LOOP (experimental) starts one case per result of a tool, without an LLM \u2014 run it with "Launch loop" in the agent list menu.'],["dsControl","","id","agent-config-execution-mode",3,"formControl"],[3,"value"],["label","Loop configuration (JSON)","controlId","agent-config-loop-config",3,"error"],["legend","Sub-agents"],[1,"ds-inline"],["dsControl","","type","text","aria-label","New sub-agent pattern","placeholder","e.g. *Fixer","autocomplete","off",3,"keydown.enter","formControl"],["dsButton","","variant","icon","type","button","title","Add pattern","aria-label","Add pattern",3,"click","disabled"],["label","Delegation timeout (seconds)","controlId","delegation-timeout","hintId","delegation-timeout-hint","errorId","delegation-timeout-error",3,"hint","error"],["dsControl","","id","delegation-timeout","type","number","min","1","max","2147483647","step","1","placeholder","Server default","aria-describedby","delegation-timeout-hint delegation-timeout-error",3,"formControl"],["dsButton","","variant","primary","type","submit",3,"disabled"],["dsButton","","type","button",3,"disabled"],["dsButton","","type","button",3,"click"],["disabled","",3,"ngValue"],[3,"ngValue"],["label","Aliases"],["label","API model names"],[1,"ds-meta"],["dsControl","","type","text","placeholder","Tool names, comma-separated (empty = all tools)","autocomplete","off",1,"ds-indent",3,"formControl"],[1,"ds-micro"],["dsControl","",1,"ds-indent","ds-control--auto",3,"change","id","value"],["value","default"],["value","on"],["value","off"],["type","checkbox",3,"change","checked","disabled"],["dsControl","","mono","","id","agent-config-loop-config","rows","10","spellcheck","false","autocomplete","off",3,"placeholder","formControl"],["dsCheck","",1,"ds-grow"],["dsButton","","variant","icon-danger","type","button","title","Remove"],["dsButton","","variant","icon-danger","type","button","title","Remove",3,"click"],["dsButton","","variant","ghost","type","button",3,"click"],["dsButton","","type","button",3,"click","disabled"]],template:function(e,o){e&1&&(Ds(0,"ds-page")(1,"ds-section-header",0)(2,"button",1),mg("click",function(){return o.cancel()}),MC(3," \u2190 Agent configs "),pl(),Pw(4,nt,2,1,"a",2),Pw(5,ot,2,0,"ds-tag",3),pl(),Pw(6,it,2,0,"p",4)(7,Kt,89,33,"form",5),pl()),e&2&&(jE(),ug("title",o.isEditMode()?"Edit agent config":"New agent config"),jE(3),Lw(o.isEditMode()?4:-1),jE(),Lw(o.isPlatformMode?5:-1),jE(),Lw(o.isLoading()?6:7));},dependencies:[Ut$1,nd,bo,xo,Lt$1,kn,vn,Gt$1,mo,po,$r,qr,Vn,An,$t$1,pn,hn,cn,ln,dn,mn,at$1,an,rn,ko],encapsulation:2})};export{Je as AgentConfigFormComponent};
1
+ import {o as o$1,r,i,l}from'./chunk-1nyEsjkY.js';import {o}from'./chunk-CBvjo1Pj.js';import {O}from'./chunk-BiPID8lL.js';import {g,W as W$1,F,I as Ie,ae as U,aw as N,U as Ui,ax as Q,a8 as _,K as KC,a9 as F$1,ay as Se,x as U$1,a2 as da,aa as Cr,aj as Ty,az as ne,C as x,z as w,m as mw,as as $t$1,D as Ds,G as mg,M as MC,a as pl,P as Pw,j as jE,E as ug,L as Lw,ao as k,a6 as x$1,X as Xw,q as qw,l as lg,N as SI,Y as MI,e as cg,v as vl,V as Vw,H as Hw,O as Og,k as df,n as ff,aq as kg}from'./main-FNVOUHA6.js';import {a as pt$1,T as Te,b as fn,U as Ut$1,n as nd,o as bo,x as xo,L as Lt$1,k as kn,u as vn,G as Gt$1,m as mo,c as po,$ as $r,H as qr,V as Vn,A as An,d as pn,h as hn,e as cn,r as ln,g as dn,C as mn,i as at$1,j as an,t as rn,l as ko}from'./chunk-DpGfd5zc.js';import'./chunk-CYQTjhJ4.js';var W=class n{aiModelController=g(k);listAvailable(t){let e=this.aiModelController.listPlatformLevelAiModel().pipe(this.orEmpty("platform")),o=t?this.aiModelController.listByNamespaceIdAiModel(t).pipe(this.orEmpty("namespace")):Cr([]);return Ty({platform:e,namespace:o}).pipe(ne(({platform:r,namespace:d})=>[...r,...d]))}orEmpty(t){return da(e=>(console.error(`[ai-model-state] failed to load the ${t} AI models`,e),Cr([])))}static \u0275fac=function(e){return new(e||n)};static \u0275prov=x$1({token:n,factory:n.\u0275fac,providedIn:"root"})};var D="*";function Ge(n){return (n??[]).some(t=>t.trim()===D)}function Ue(n){let t=(n??[]).map(e=>e.trim()).filter(e=>e.length>0&&e!==D).map(e=>e.toLowerCase());return new Set(t)}function H(n){return n.includes(D)}function Xe(n){let t=n.replace(/[\\.[\]{}()^$|]/g,"\\$&").replace(/\*/g,".*");try{return new RegExp(`^${t}$`,"i")}catch(e){return null}}function z(n,t){return (t??[]).map(e=>e.trim()).filter(e=>e.length>0&&e!==D&&H(e)).some(e=>Xe(e)?.test(n)??false)}var je="AGENTOS_CONFIG",Qe=new Set(["HTTP_API","MCP_HTTP","MCP_STDIO","BASH","TMUX","GIT"]);function Ke(n){return n.configEnabled&&(n.hasSubAgents||n.integrationTypes.some(t=>Qe.has(t)))}var $=n=>n.trim().toLowerCase();function Ze(n,t){let e=o=>o.namespaceId?1:0;return e(n)-e(t)||n.priority-t.priority}var We=(n,t)=>n.label.localeCompare(t.label);function He(n,t){let e=new Map;for(let _ of n){let m=_.alias?.trim();if(!m)continue;let I=e.get($(m));(!I||Ze(_,I)>0)&&e.set($(m),_);}let o=[...e.values()].map(_=>({value:_.alias.trim(),label:`${_.alias.trim()} (${_.apiModelName})`})).sort(We),r=new Set,d=[];for(let _ of n){let m=_.apiModelName?.trim();!m||r.has($(m))||(r.add($(m)),e.has($(m))||d.push({value:m,label:m}));}d.sort(We);let f=t??"";if(f.trim().length===0||[...o,...d].some(_=>_.value===f))return {aliases:o,apiNames:d,current:null};let S=e.has($(f))||r.has($(f));return {aliases:o,apiNames:d,current:{value:f,label:S?f:`${f} (not in the list)`}}}var Ye=(n,t)=>t.value,et=(n,t)=>t.config.id,tt=(n,t)=>t.type,qe=(n,t)=>t.selector;function nt(n,t){if(n&1&&(Ds(0,"a",2),MC(1,"View resolved definition \u2192"),pl()),n&2){let e=Xw();ug("routerLink",e.inspectRoute());}}function ot(n,t){n&1&&(Ds(0,"ds-tag",3),MC(1,"Platform level"),pl());}function it(n,t){n&1&&(Ds(0,"p",4),MC(1,"Loading\u2026"),pl());}function at(n,t){if(n&1&&(lg(0,"input",17),SI()),n&2){let e=Xw(2);ug("formControl",e.modelNameControl),MI();}}function lt(n,t){if(n&1&&(Ds(0,"option",41),MC(1),pl()),n&2){let e=t;ug("ngValue",e.value),jE(),Og(e.label);}}function rt(n,t){if(n&1&&(Ds(0,"option",41),MC(1),pl()),n&2){let e=t.$implicit;ug("ngValue",e.value),jE(),Og(e.label);}}function st(n,t){if(n&1&&(Ds(0,"optgroup",42),Vw(1,rt,2,2,"option",41,Ye),pl()),n&2){let e=Xw(3);jE(),Hw(e.modelOptions().aliases);}}function dt(n,t){if(n&1&&(Ds(0,"option",41),MC(1),pl()),n&2){let e=t.$implicit;ug("ngValue",e.value),jE(),Og(e.label);}}function ct(n,t){if(n&1&&(Ds(0,"optgroup",43),Vw(1,dt,2,2,"option",41,Ye),pl()),n&2){let e=Xw(3);jE(),Hw(e.modelOptions().apiNames);}}function mt(n,t){if(n&1&&(Ds(0,"select",18)(1,"option",40),MC(2,"Select a model"),pl(),Pw(3,lt,2,2,"option",41),Pw(4,st,3,0,"optgroup",42),Pw(5,ct,3,0,"optgroup",43),pl(),SI()),n&2){let e,o=Xw(2);ug("formControl",o.modelNameControl),MI(),jE(),ug("ngValue",null),jE(2),Lw((e=o.modelOptions().current)?3:-1,e),jE(),Lw(o.modelOptions().aliases.length>0?4:-1),jE(),Lw(o.modelOptions().apiNames.length>0?5:-1);}}function ut(n,t){if(n&1&&(Ds(0,"span",44),MC(1),pl()),n&2){let e=Xw().$implicit;jE(),Og(e.config.integrationType);}}function gt(n,t){if(n&1&&(lg(0,"input",45),SI()),n&2){let e=Xw().$implicit;ug("formControl",e.toolsControl),cg("aria-label","Tools of "+e.config.name),MI();}}function pt(n,t){if(n&1){let e=qw();Ds(0,"div",10)(1,"label",11)(2,"input",23),mg("change",function(){let r=df(e).$implicit,d=Xw(3);return ff(d.toggleIntegration(r))}),pl(),Ds(3,"span",24),MC(4),pl(),Pw(5,ut,2,1,"span",44),pl(),Pw(6,gt,1,2,"input",45),pl();}if(n&2){let e=t.$implicit;jE(2),ug("checked",e.enabled()),jE(2),Og(e.config.name),jE(),Lw(e.config.integrationType?5:-1),jE(),Lw(e.enabled()?6:-1);}}function ft(n,t){if(n&1&&(Ds(0,"p",13),MC(1),pl()),n&2){let e=Xw().$implicit;jE(),vl(" Restricted to: ",e.restrictedTools.join(", ")," (set outside this form, preserved on save) ");}}function Ct(n,t){if(n&1){let e=qw();Ds(0,"div",10)(1,"label",24),MC(2),Ds(3,"span",44),MC(4,"built-in"),pl()(),Ds(5,"select",47),mg("change",function(r){let d=df(e).$implicit,f=Xw(4);return ff(f.setBuiltInState(d,r.target.value))}),Ds(6,"option",48),MC(7),pl(),Ds(8,"option",49),MC(9,"Enabled"),pl(),Ds(10,"option",50),MC(11,"Disabled"),pl()(),Pw(12,ft,2,1,"p",13),Ds(13,"p",13),MC(14),pl()();}if(n&2){let e=t.$implicit,o=Xw(4);jE(),cg("for","built-in-"+e.type),jE(),vl(" ",e.displayName," "),jE(3),ug("id","built-in-"+e.type)("value",e.state()),jE(2),Og(o.builtInDefaultLabel(e)),jE(5),Lw(e.state()==="on"&&e.restrictedTools?12:-1),jE(2),Og(e.description);}}function _t(n,t){if(n&1&&(Ds(0,"span",46),MC(1,"Built-in integrations"),pl(),Vw(2,Ct,15,7,"div",10,tt)),n&2){let e=Xw(3);jE(2),Hw(e.builtInRows());}}function bt(n,t){n&1&&(Ds(0,"ds-notice",26),MC(1," This agent can read the AgentOS configuration and also has a network integration or sub-agents: what it reads could be sent outside without any confirmation. Prefer a dedicated configuration agent without them. "),pl());}function ht(n,t){if(n&1&&(Ds(0,"ds-fieldset",21),Vw(1,pt,7,4,"div",10,et),Pw(3,_t,4,0),Pw(4,bt,2,0,"ds-notice",26),pl()),n&2){let e=Xw(2);jE(),Hw(e.integrationRows()),jE(2),Lw(e.builtInRows().length>0?3:-1),jE(),Lw(e.configAgentExposureWarning()?4:-1);}}function yt(n,t){n&1&&MC(0," A platform config can only list platform skills here: namespace skills are resolved per namespace when the agent runs. ");}function vt(n,t){n&1&&(Ds(0,"ds-notice",26),MC(1," Saving with this on replaces the selection below with "),Ds(2,"code",25),MC(3,"*"),pl(),MC(4,". "),pl());}function xt(n,t){n&1&&(Ds(0,"ds-notice"),MC(1," The skill catalogue could not be loaded. What this agent already declares is listed below and preserved on save. "),pl());}function St(n,t){n&1&&(Ds(0,"p",4),MC(1,"No skill available in this scope yet."),pl());}function At(n,t){n&1&&(Ds(0,"span",44),MC(1,"platform"),pl());}function wt(n,t){if(n&1&&(Ds(0,"span",44),MC(1),pl()),n&2){let e=Xw(4);jE(),vl(" ",e.skillCatalogueUnavailable()?"not verified":"no matching skill"," ");}}function Et(n,t){if(n&1&&(Ds(0,"p",13),MC(1),pl()),n&2){let e=Xw().$implicit;jE(),Og(e.description);}}function Tt(n,t){if(n&1){let e=qw();Ds(0,"div",10)(1,"label",11)(2,"input",51),mg("change",function(){let r=df(e).$implicit,d=Xw(3);return ff(d.toggleSkill(r))}),pl(),Ds(3,"span",24),MC(4),pl(),Pw(5,At,2,0,"span",44),Pw(6,wt,2,1,"span",44),pl(),Pw(7,Et,2,1,"p",13),pl();}if(n&2){let e=t.$implicit,o=Xw(3);jE(2),ug("checked",e.selected())("disabled",o.allSkillsSelected()),jE(2),Og(e.name),jE(),Lw(e.platform?5:-1),jE(),Lw(e.unresolved?6:-1),jE(),Lw(e.description?7:-1);}}function kt(n,t){if(n&1&&Vw(0,Tt,8,6,"div",10,qe),n&2){let e=Xw(2);Hw(e.skillRows());}}function It(n,t){if(n&1&&(Ds(0,"ds-form-field",30),lg(1,"textarea",52),SI(),Ds(2,"p",4),MC(3," Default payload for this loop agent. Overridden at launch time if the first message contains a valid "),Ds(4,"code"),MC(5,"AgentLoopPayload"),pl(),MC(6,". Leave empty if you always provide the payload at launch. "),pl()()),n&2){let e=Xw(2);ug("error",e.loopConfigControl.invalid&&e.loopConfigControl.touched?"Invalid JSON \u2014 please fix the syntax.":null),jE(),ug("placeholder",e.loopConfigPlaceholder)("formControl",e.loopConfigControl),MI();}}function Mt(n,t){n&1&&MC(0," A platform config can only list platform agents here: a namespace's agents are resolved per namespace when the agent runs. ");}function Rt(n,t){if(n&1&&MC(0),n&2){let e=Xw(3);kg(" That deletes ",e.droppedUnresolvedSubAgents()," flagged ",e.droppedUnresolvedSubAgents()===1?"selector":"selectors"," nothing matched, which this form cannot restore. ");}}function Ft(n,t){if(n&1&&(Ds(0,"ds-notice",26),MC(1," Saving with this on replaces the selection below with "),Ds(2,"code",25),MC(3,"*"),pl(),MC(4,". "),Pw(5,Rt,1,2),pl()),n&2){let e=Xw(2);jE(5),Lw(e.droppedUnresolvedSubAgents()>0?5:-1);}}function Nt(n,t){n&1&&(Ds(0,"ds-notice"),MC(1," The list of agents could not be loaded. What this agent already declares is listed below and preserved on save. "),pl());}function Dt(n,t){n&1&&(Ds(0,"p",4),MC(1,"No other agent is available in this scope yet."),pl());}function Lt(n,t){n&1&&(Ds(0,"span",44),MC(1,"pattern"),pl());}function Ot(n,t){n&1&&(Ds(0,"span",44),MC(1,"via pattern"),pl());}function Vt(n,t){if(n&1&&(Ds(0,"span",44),MC(1),pl()),n&2){let e=Xw(4);jE(),vl(" ",e.subAgentCandidatesUnavailable()?"not verified":"no matching agent"," ");}}function Pt(n,t){if(n&1){let e=qw();Ds(0,"button",55),mg("click",function(){df(e);let r=Xw().$implicit,d=Xw(3);return ff(d.removeSubAgent(r))}),MC(1," \xD7 "),pl();}if(n&2){let e=Xw().$implicit;cg("aria-label","Remove "+e.selector);}}function Bt(n,t){if(n&1){let e=qw();Ds(0,"div",32)(1,"label",53)(2,"input",51),mg("change",function(){let r=df(e).$implicit,d=Xw(3);return ff(d.toggleSubAgent(r))}),pl(),Ds(3,"span",24),MC(4),pl(),Pw(5,Lt,2,0,"span",44)(6,Ot,2,0,"span",44)(7,Vt,2,1,"span",44),pl(),Pw(8,Pt,2,1,"button",54),pl();}if(n&2){let e=t.$implicit,o=Xw(3);jE(2),ug("checked",e.selected())("disabled",o.allSubAgentsSelected()),jE(2),Og(e.name),jE(),Lw(e.pattern?5:e.grantedByPattern?6:e.unresolved?7:-1),jE(3),Lw(e.unresolved?8:-1);}}function $t(n,t){if(n&1&&Vw(0,Bt,9,5,"div",32,qe),n&2){let e=Xw(2);Hw(e.subAgentRows());}}function Gt(n,t){if(n&1){let e=qw();Ds(0,"div")(1,"button",56),mg("click",function(){df(e);let r=Xw(2);return ff(r.useDefaultDelegationTimeout())}),MC(2," Use server default "),pl()();}}function Ut(n,t){n&1&&(Ds(0,"ds-notice"),MC(1),pl()),n&2&&(jE(),Og(t));}function jt(n,t){if(n&1){let e=qw();Ds(0,"button",57),mg("click",function(){df(e);let r=Xw(2);return ff(r.exportYaml())}),MC(1),pl();}if(n&2){let e=Xw(2);ug("disabled",e.isExporting()),jE(),vl(" ",e.isExporting()?"Exporting\u2026":"Export as YAML"," ");}}function Kt(n,t){if(n&1){let e=qw();Ds(0,"form",6),mg("ngSubmit",function(){df(e);let r=Xw();return ff(r.submit())}),Ds(1,"ds-fieldset",7)(2,"ds-form-field",8),lg(3,"input",9),SI(),pl(),Ds(4,"div",10)(5,"label",11),lg(6,"input",12),SI(),MC(7," Enabled "),pl(),Ds(8,"p",13),MC(9,"Disabled agents are excluded from namespace resolution."),pl()(),Ds(10,"ds-form-field",14),lg(11,"input",15),SI(),pl(),Ds(12,"ds-form-field",16),Pw(13,at,1,1,"input",17)(14,mt,6,5,"select",18),pl(),Ds(15,"ds-form-field",19),lg(16,"textarea",20),SI(),pl()(),Pw(17,ht,5,2,"ds-fieldset",21),Ds(18,"ds-fieldset",22)(19,"p",4),MC(20," Instruction bundles this agent can read on demand. Selecting at least one grants it the "),Ds(21,"code"),MC(22,"readSkill"),pl(),MC(23," and "),Ds(24,"code"),MC(25,"readSkillResource"),pl(),MC(26," tools; selecting none grants neither. "),Pw(27,yt,1,0),pl(),Ds(28,"label",11)(29,"input",23),mg("change",function(){df(e);let r=Xw();return ff(r.toggleAllSkills())}),pl(),Ds(30,"span",24),MC(31,"Every skill in the catalogue ("),Ds(32,"code",25),MC(33,"*"),pl(),MC(34,")"),pl()(),Ds(35,"p",13),MC(36," Resolved at run time, so skills added later are granted too, without editing this agent. "),pl(),Pw(37,vt,5,0,"ds-notice",26),Pw(38,xt,2,0,"ds-notice"),Pw(39,St,2,0,"p",4)(40,kt,2,0),pl(),Ds(41,"ds-form-field",27)(42,"select",28)(43,"option",29),MC(44,"SIMPLE \u2014 Standard agent (single LLM call)"),pl(),Ds(45,"option",29),MC(46,"ADVANCED \u2014 Multi-step reasoning loop"),pl(),Ds(47,"option",29),MC(48,"LOOP \u2014 Bulk loop agent (no LLM, experimental)"),pl()(),SI(),pl(),Pw(49,It,7,3,"ds-form-field",30),Ds(50,"ds-fieldset",31)(51,"p",4),MC(52," The agents this one may delegate to. Selecting at least one grants it the "),Ds(53,"code"),MC(54,"DELEGATE__delegate"),pl(),MC(55," tool; selecting none grants it no way to delegate. Entries are matched against agent names, never ids. "),Pw(56,Mt,1,0),pl(),Ds(57,"label",11)(58,"input",23),mg("change",function(){df(e);let r=Xw();return ff(r.toggleAllSubAgents())}),pl(),Ds(59,"span",24),MC(60,"Every agent it can reach ("),Ds(61,"code",25),MC(62,"*"),pl(),MC(63,")"),pl()(),Ds(64,"p",13),MC(65," Resolved at run time, so agents added later can be delegated to as well, without editing this agent. "),pl(),Pw(66,Ft,6,1,"ds-notice",26),Pw(67,Nt,2,0,"ds-notice"),Pw(68,Dt,2,0,"p",4)(69,$t,2,0),Ds(70,"p",4),MC(71," Advanced \u2014 add a glob instead of picking a name, for example "),Ds(72,"code"),MC(73,"*Fixer"),pl(),MC(74," to cover BugFixer and StoryFixer. "),pl(),Ds(75,"div",32)(76,"input",33),mg("keydown.enter",function(){df(e);let r=Xw();return ff(r.addSubAgent())}),pl(),SI(),Ds(77,"button",34),mg("click",function(){df(e);let r=Xw();return ff(r.addSubAgent())}),MC(78," + "),pl()(),Ds(79,"ds-form-field",35),lg(80,"input",36),SI(),Pw(81,Gt,3,0,"div"),pl()(),Pw(82,Ut,2,1,"ds-notice"),Ds(83,"ds-form-actions")(84,"button",37),MC(85),pl(),Pw(86,jt,2,2,"button",38),Ds(87,"button",39),mg("click",function(){df(e);let r=Xw();return ff(r.cancel())}),MC(88,"Cancel"),pl()()();}if(n&2){let e,o=Xw();ug("formGroup",o.form),jE(3),ug("formControl",o.nameControl),MI(),jE(3),ug("formControl",o.enabledControl),MI(),jE(5),ug("formControl",o.descriptionControl),MI(),jE(2),Lw(o.modelAsFreeText()?13:14),jE(3),ug("formControl",o.instructionsControl),MI(),jE(),Lw(o.integrationRows().length>0||o.builtInRows().length>0?17:-1),jE(10),Lw(o.isPlatformMode?27:-1),jE(2),ug("checked",o.allSkillsSelected()),jE(8),Lw(o.namedSkillSelectionDropped()?37:-1),jE(),Lw(o.skillCatalogueUnavailable()?38:-1),jE(),Lw(o.skillRows().length===0?39:40),jE(3),ug("formControl",o.executionModeControl),MI(),jE(),ug("value",o.ExecutionMode.SIMPLE),jE(2),ug("value",o.ExecutionMode.ADVANCED),jE(2),ug("value",o.ExecutionMode.LOOP),jE(2),Lw(o.isLoopMode()?49:-1),jE(7),Lw(o.isPlatformMode?56:-1),jE(2),ug("checked",o.allSubAgentsSelected()),jE(8),Lw(o.namedSubAgentSelectionDropped()?66:-1),jE(),Lw(o.subAgentCandidatesUnavailable()?67:-1),jE(),Lw(o.subAgentRows().length===0?68:69),jE(8),ug("formControl",o.newSubAgentControl),MI(),jE(),ug("disabled",!o.newSubAgentControl.value.trim()),jE(2),ug("hint",o.delegationTimeoutHint())("error",o.delegationTimeoutControl.invalid?"Enter a valid positive whole number of seconds, or leave empty to inherit the server default.":null),jE(),ug("formControl",o.delegationTimeoutControl),cg("aria-invalid",o.delegationTimeoutControl.invalid),MI(),jE(),Lw(o.delegationTimeoutControl.value!==null?81:-1),jE(),Lw((e=o.submitError())?82:-1,e),jE(2),ug("disabled",o.form.invalid||o.isSubmitting()),jE(),vl(" ",o.isEditMode()?"Save changes":"Create"," "),jE(),Lw(o.isEditMode()?86:-1);}}var Je=class n{route=g(W$1);router=g(F);destroyRef=g(Ie);agentConfigController=g(U);defaultsController=g(N);defaultDelegationTimeoutSeconds=Ui(null);exportService=g(Q);integrationConfigState=g(O);integrationTypeController=g(_);skillState=g(o);aiModelState=g(W);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=!this.namespaceId;form=new pt$1({name:new Te("",{nonNullable:true,validators:[fn.required,fn.minLength(1)]}),description:new Te(null),modelName:new Te(null,{validators:[fn.required,n.notBlankValidator]}),instructions:new Te(null),executionMode:new Te("SIMPLE",{nonNullable:true}),delegationTimeoutSeconds:new Te(null,{validators:[fn.min(1),fn.max(2147483647),fn.pattern(/^\d+$/)]}),enabled:new Te(false,{nonNullable:true}),loopConfig:new Te(null,{validators:[n.jsonValidator]})});static notBlankValidator(t){let e=t.value;return typeof e=="string"&&e.length>0&&e.trim().length===0?{required:true}:null}static jsonValidator(t){let e=t.value?.trim();if(!e)return null;try{return JSON.parse(e),null}catch(o){return {invalidJson:true}}}get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get modelNameControl(){return this.form.controls.modelName}get instructionsControl(){return this.form.controls.instructions}get executionModeControl(){return this.form.controls.executionMode}get delegationTimeoutControl(){return this.form.controls.delegationTimeoutSeconds}useDefaultDelegationTimeout(){this.delegationTimeoutControl.setValue(null),this.delegationTimeoutControl.markAsDirty();}delegationTimeoutHint=KC(()=>{let t=this.defaultDelegationTimeoutSeconds();return `How long each delegation launched by this agent waits without activity from the sub-agent, including its own delegations. When it runs out, the sub-agent and its active descendants are stopped and can be resumed. Leave empty to use the server default${t!==null?`: ${t} s (${t/60} min)`:""}.`});get enabledControl(){return this.form.controls.enabled}get loopConfigControl(){return this.form.controls.loopConfig}executionModeValue=F$1(this.form.controls.executionMode.valueChanges,{initialValue:this.form.controls.executionMode.value});isLoopMode=KC(()=>this.executionModeValue()==="LOOP");subAgentRows=Ui([]);allSubAgentsSelected=Ui(false);subAgentCandidatesUnavailable=Ui(false);namedSubAgentSelectionDropped=KC(()=>this.allSubAgentsSelected()&&this.subAgentRows().some(t=>t.selected()));droppedUnresolvedSubAgents=KC(()=>this.allSubAgentsSelected()?this.subAgentRows().filter(t=>t.unresolved&&t.selected()).length:0);hasAnySubAgent=KC(()=>this.allSubAgentsSelected()||this.subAgentRows().some(t=>t.selected()));newSubAgentControl=new Te("",{nonNullable:true});isEditMode=Ui(false);isSubmitting=Ui(false);isLoading=Ui(false);isExporting=Ui(false);submitError=Ui(null);ExecutionMode=Se;loopConfigPlaceholder=JSON.stringify({search:{tool:"SearchTalents",params:{talentId:["6ac76692a909eaaae0b078d6"],resolveTargets:["MANAGER"],next:null}},act:{agentName:"ProfileCaretaker",promptTemplate:"This talent has not completed their profile. As their manager, I need you to help me review and improve it."}},null,2);builtInRows=Ui([]);inspectRoute(){let t=this.route.snapshot.paramMap.get("agentConfigId")??"";return this.isPlatformMode?["/agentos","admin","agent-configs",t,"inspect"]:["/agentos",this.namespaceId,"agent-configs",t,"inspect"]}configAgentExposureWarning=KC(()=>Ke({configEnabled:this.builtInRows().some(t=>t.type===je&&t.state()==="on"),integrationTypes:this.integrationRows().filter(t=>t.enabled()).map(t=>t.config.integrationType),hasSubAgents:this.hasAnySubAgent()}));modelOptions=Ui({aliases:[],apiNames:[],current:null});modelCatalogueLoaded=Ui(false);modelAsFreeText=KC(()=>{let{aliases:t,apiNames:e}=this.modelOptions();return this.modelCatalogueLoaded()&&t.length+e.length===0});applyModelCatalogue(t,e){this.modelOptions.set(He(t,e)),this.modelCatalogueLoaded.set(true);}integrationRows=Ui([]);skillRows=Ui([]);allSkillsSelected=Ui(false);skillCatalogueUnavailable=Ui(false);namedSkillSelectionDropped=KC(()=>this.allSkillsSelected()&&this.skillRows().some(t=>t.selected()));existingConfig=null;ngOnInit(){this.defaultsController.getAgentConfigDefaults().pipe(U$1(this.destroyRef),da(()=>Cr(null))).subscribe(e=>this.defaultDelegationTimeoutSeconds.set(e?.delegationTimeoutSeconds??null));let t=this.route.snapshot.paramMap.get("agentConfigId");t?(this.isEditMode.set(true),this.loadConfigAndIntegrations(t)):this.loadIntegrations(void 0);}loadConfigAndIntegrations(t){this.isLoading.set(true),Ty({config:this.agentConfigController.getByIdAgentConfig(t),namespaceIntegrations:this.namespaceId?this.integrationConfigState.loadNamespaceConfigs(this.namespaceId):Cr([]),platformIntegrations:this.integrationConfigState.loadPlatformConfigs(),builtInTypes:this.loadBuiltInTypes(),skillCatalogue:this.loadSkillCatalogue(),delegationCandidates:this.loadDelegationCandidates(),models:this.aiModelState.listAvailable(this.namespaceId)}).pipe(U$1(this.destroyRef)).subscribe({next:({config:e,namespaceIntegrations:o,platformIntegrations:r,builtInTypes:d,skillCatalogue:f,delegationCandidates:S,models:_})=>{this.existingConfig=e,this.applyModelCatalogue(_,e.modelName??null),this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??null),this.modelNameControl.setValue(e.modelName??null),this.instructionsControl.setValue(e.instructions??null);let m=e.executionMode??(e.advancedExecution?"ADVANCED":"SIMPLE");this.executionModeControl.setValue(m),this.delegationTimeoutControl.setValue(e.delegationTimeoutSeconds??null),this.enabledControl.setValue(e.enabled??true),this.loopConfigControl.setValue(e.loopConfig!=null?JSON.stringify(e.loopConfig,null,2):null);let I=[...r,...o];this.integrationRows.set(this.buildIntegrationRows(I,e.integrations??void 0)),this.builtInRows.set(this.buildBuiltInRows(d,e.integrations??void 0)),this.allSubAgentsSelected.set(Ge(e.subAgents)),this.subAgentRows.set(this.buildSubAgentRows(S,e.subAgents,e.name)),this.allSkillsSelected.set(o$1(e.skillSelectors)),this.skillRows.set(this.buildSkillRows(f,e.skillSelectors)),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),this.navigateBack();}});}loadIntegrations(t){Ty({namespaceIntegrations:this.namespaceId?this.integrationConfigState.loadNamespaceConfigs(this.namespaceId):Cr([]),platformIntegrations:this.integrationConfigState.loadPlatformConfigs(),builtInTypes:this.loadBuiltInTypes(),skillCatalogue:this.loadSkillCatalogue(),delegationCandidates:this.loadDelegationCandidates(),models:this.aiModelState.listAvailable(this.namespaceId)}).pipe(U$1(this.destroyRef)).subscribe({next:({namespaceIntegrations:e,platformIntegrations:o,builtInTypes:r,skillCatalogue:d,delegationCandidates:f,models:S})=>{this.applyModelCatalogue(S,null);let _=[...o,...e];this.integrationRows.set(this.buildIntegrationRows(_,t??void 0)),this.builtInRows.set(this.buildBuiltInRows(r,t??void 0)),this.allSubAgentsSelected.set(false),this.subAgentRows.set(this.buildSubAgentRows(f,void 0,null)),this.allSkillsSelected.set(false),this.skillRows.set(this.buildSkillRows(d,void 0));}});}loadSkillCatalogue(){return (this.namespaceId?this.skillState.listEffective(this.namespaceId):this.skillState.listPlatform().pipe(ne(e=>e.map(o=>({id:o.id??"",name:o.name,description:o.description,namespaceId:o.namespaceId??null,readOnly:o.readOnly===true}))))).pipe(da(e=>(console.error("[agent-config-form] failed to load the skill catalogue",e),this.skillCatalogueUnavailable.set(true),Cr([]))))}buildSkillRows(t,e){let r$1=(e??[]).map(m=>m.trim()).filter(m=>m.length>0).filter(m=>m!==r),d=i(r$1),f=new Set(t.map(m=>m.name.toLowerCase())),S=t.map(m=>({selector:m.name,name:m.name,description:m.description,platform:m.namespaceId==null,unresolved:false,selected:Ui(d.has(m.name.toLowerCase()))})),_=new Set;for(let m of r$1){let I=l(m).toLowerCase();f.has(I)||_.has(I)||(_.add(I),S.push({selector:m,name:m,description:"",platform:false,unresolved:true,selected:Ui(true)}));}return S}toggleSkill(t){t.selected.update(e=>!e);}toggleAllSkills(){this.allSkillsSelected.update(t=>!t);}buildSkillSelectorsPayload(){if(this.allSkillsSelected())return [r];let t=this.skillRows().filter(e=>e.selected()).map(e=>e.selector);return t.length>0?t:void 0}loadDelegationCandidates(){let t=this.agentConfigController.listPlatformAgentsAgentConfig(false).pipe(this.orNoCandidates()),e=this.namespaceId?this.agentConfigController.listByParentAgentConfig(this.namespaceId,false).pipe(this.orNoCandidates()):Cr([]);return Ty({platform:t,namespace:e}).pipe(ne(({platform:o,namespace:r})=>[...o,...r]),ne(o=>o.map(r=>r.name).filter(r=>r.length>0)),ne(o=>n.dedupeByKey(o)))}orNoCandidates(){return da(t=>(console.error("[agent-config-form] failed to load the delegation candidates",t),this.subAgentCandidatesUnavailable.set(true),Cr([])))}static dedupeByKey(t){let e=new Set;return t.filter(o=>{let r=o.toLowerCase();return e.has(r)?false:(e.add(r),true)})}buildSubAgentRows(t,e,o){let r=Ue(e),d=o?.toLowerCase()??null,f=t.filter(b=>{let G=b.toLowerCase();return G!==d||r.has(G)}),S=new Set(f.map(b=>b.toLowerCase())),_=f.map(b=>({selector:b,name:b,unresolved:false,pattern:false,grantedByPattern:z(b,e),selected:Ui(r.has(b.toLowerCase()))})),m=new Set,I=(e??[]).map(b=>b.trim()).filter(b=>b.length>0&&b!==D);for(let b of I){let G=b.toLowerCase();S.has(G)||m.has(G)||(m.add(G),_.push({selector:b,name:b,unresolved:true,pattern:H(b),grantedByPattern:false,selected:Ui(true)}));}return _}loadBuiltInTypes(){return this.integrationTypeController.listTypesIntegrationType().pipe(ne(t=>t.filter(e=>!e.configSchema)),da(t=>(console.error("[agent-config-form] failed to load integration types",t),Cr([]))))}buildIntegrationRows(t,e){return t.map(o=>{let r=o.name??"",d=e?.[r],f=e!=null&&r in e,S=Array.isArray(d)?d.join(", "):"";return {config:o,enabled:Ui(f),toolsControl:new Te(S,{nonNullable:true})}})}buildBuiltInRows(t,e){return t.map(o=>{let r=e!=null&&o.type in e,d=e?.[o.type],f=r?Array.isArray(d)&&d.length===0?"off":"on":"default";return {type:o.type,displayName:o.displayName,description:o.description,enabledByDefault:o.enabledByDefault===true,state:Ui(f),restrictedTools:Array.isArray(d)&&d.length>0?d:null}})}toggleIntegration(t){t.enabled.update(e=>!e);}setBuiltInState(t,e){t.state.set(e);}builtInDefaultLabel(t){return t.enabledByDefault?"Platform default (enabled)":"Platform default (disabled)"}addSubAgent(){let t=this.newSubAgentControl.value.trim();if(!t)return;let e=this.subAgentRows().find(o=>o.selector.toLowerCase()===t.toLowerCase());e?e.selected.set(true):t===D?this.allSubAgentsSelected.set(true):this.subAgentRows.update(o=>this.withPatternGrants([...o,{selector:t,name:t,unresolved:true,pattern:H(t),grantedByPattern:false,selected:Ui(true)}])),this.newSubAgentControl.reset("");}removeSubAgent(t){let e=t.selector.toLowerCase();this.subAgentRows.update(o=>this.withPatternGrants(o.filter(r=>r.selector.toLowerCase()!==e)));}toggleSubAgent(t){t.selected.update(e=>!e),t.pattern&&this.subAgentRows.update(e=>this.withPatternGrants(e));}withPatternGrants(t){let e=this.allSubAgentsSelected()?[]:t.filter(o=>o.selected()).map(o=>o.selector);return t.map(o=>o.unresolved?o:x(w({},o),{grantedByPattern:z(o.name,e)}))}toggleAllSubAgents(){this.allSubAgentsSelected.update(t=>!t),this.subAgentRows.update(t=>this.withPatternGrants(t));}buildSubAgentsPayload(){if(this.allSubAgentsSelected())return [D];let t=this.subAgentRows().filter(e=>e.selected()).map(e=>e.selector);return t.length>0?t:void 0}buildIntegrationsPayload(){let t={};for(let o of this.integrationRows().filter(r=>r.enabled())){let r=o.config.name??"",d=o.toolsControl.value.trim();t[r]=d===""?null:d.split(",").map(f=>f.trim()).filter(f=>f.length>0);}for(let o of this.builtInRows()){let r=o.state();r==="on"?t[o.type]=o.restrictedTools??null:r==="off"&&(t[o.type]=[]);}let e=new Set([...this.integrationRows().map(o=>o.config.name??""),...this.builtInRows().map(o=>o.type)]);for(let[o,r]of Object.entries(this.existingConfig?.integrations??{}))e.has(o)||(t[o]=r);return Object.keys(t).length>0?t:void 0}submit(){if(this.form.invalid||this.isSubmitting())return;this.addSubAgent(),this.submitError.set(null),this.isSubmitting.set(true);let t=x(w({},this.existingConfig??{}),{createdOn:this.existingConfig?.createdOn,updatedOn:this.existingConfig?.updatedOn,namespaceId:this.namespaceId,name:this.nameControl.value.trim(),description:this.descriptionControl.value?.trim()||void 0,modelName:this.modelNameControl.value?.trim()||void 0,instructions:this.instructionsControl.value?.trim()||void 0,integrations:this.buildIntegrationsPayload(),executionMode:this.executionModeControl.value,advancedExecution:this.executionModeControl.value==="ADVANCED",enabled:this.enabledControl.value,subAgents:this.buildSubAgentsPayload(),skillSelectors:this.buildSkillSelectorsPayload(),delegationTimeoutSeconds:this.delegationTimeoutControl.value,loopConfig:this.buildLoopConfigPayload()});(this.isEditMode()?this.agentConfigController.updateAgentConfig(this.existingConfig.id??"",t):this.agentConfigController.createAgentConfig(t)).pipe(U$1(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:o=>{this.isSubmitting.set(false),this.submitError.set(n.serverMessage(o));}});}static serverMessage(t){let o=t?.error?.message;if(typeof o=="string"&&o.trim().length>0)return o;let r=t?.status;return r===0?"The server could not be reached. The agent was not saved.":typeof r=="number"&&r>=500?`The server failed to save the agent (HTTP ${r}). Nothing was changed.`:"The server refused the save and gave no reason. Check the values and try again."}exportYaml(){let t=this.existingConfig?.id;!t||this.isExporting()||(this.isExporting.set(true),this.exportService.exportAsYaml(t).pipe(U$1(this.destroyRef)).subscribe({next:e=>{let o=new Blob([e],{type:"application/yaml"}),r=URL.createObjectURL(o),d=document.createElement("a");d.href=r,d.download=`${this.existingConfig?.name??"agent"}.yaml`,d.click(),URL.revokeObjectURL(r),this.isExporting.set(false);},error:()=>this.isExporting.set(false)}));}buildLoopConfigPayload(){let t=this.loopConfigControl.value?.trim();if(!t)return this.existingConfig?.loopConfig!=null?null:void 0;try{return JSON.parse(t)}catch(e){return}}cancel(){this.navigateBack();}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","agent-configs"]):this.router.navigate(["/agentos",this.namespaceId,"agent-configs"]);}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=mw({type:n,selectors:[["agentos-agent-config-form"]],decls:8,vars:4,consts:[[3,"title"],["dsButton","","variant","ghost","type","button","title","Back to agent configs",3,"click"],["headerMeta","",1,"ds-link",3,"routerLink"],["headerMeta","","variant","outline"],[1,"ds-hint"],[1,"ds-form",3,"formGroup"],[1,"ds-form",3,"ngSubmit","formGroup"],["legend","Agent"],["label","Name","controlId","agent-config-name","required",""],["dsControl","","id","agent-config-name","type","text","placeholder","e.g. Support agent","autocomplete","off",3,"formControl"],[1,"ds-stack","ds-stack--sm"],["dsCheck",""],["type","checkbox",3,"formControl"],[1,"ds-hint","ds-indent"],["label","Description","controlId","agent-config-description"],["dsControl","","id","agent-config-description","type","text","placeholder","Optional \u2014 short description of this agent","autocomplete","off",3,"formControl"],["label","Model","controlId","agent-config-model-name","required","","hint","Aliases are matched first, then API model names. Resolved when the agent runs."],["dsControl","","id","agent-config-model-name","type","text","placeholder","Model alias or name to use, e.g. BIG","autocomplete","off",3,"formControl"],["dsControl","","id","agent-config-model-name",3,"formControl"],["label","Instructions","controlId","agent-config-instructions"],["dsControl","","id","agent-config-instructions","rows","6","placeholder","Optional \u2014 system instructions for this agent",3,"formControl"],["legend","Integrations","hint","Select which integrations this agent can use. Leave tool names empty to allow all tools from an integration."],["legend","Skills"],["type","checkbox",3,"change","checked"],[1,"ds-strong"],[1,"ds-code"],["tone","warning"],["label","Execution mode","controlId","agent-config-execution-mode","hint",'SIMPLE runs a single LLM pass. ADVANCED uses an intention loop for complex tasks and requires a model that supports advanced execution, otherwise the agent fails to run. LOOP (experimental) starts one case per result of a tool, without an LLM \u2014 run it with "Launch loop" in the agent list menu.'],["dsControl","","id","agent-config-execution-mode",3,"formControl"],[3,"value"],["label","Loop configuration (JSON)","controlId","agent-config-loop-config",3,"error"],["legend","Sub-agents"],[1,"ds-inline"],["dsControl","","type","text","aria-label","New sub-agent pattern","placeholder","e.g. *Fixer","autocomplete","off",3,"keydown.enter","formControl"],["dsButton","","variant","icon","type","button","title","Add pattern","aria-label","Add pattern",3,"click","disabled"],["label","Delegation timeout (seconds)","controlId","delegation-timeout","hintId","delegation-timeout-hint","errorId","delegation-timeout-error",3,"hint","error"],["dsControl","","id","delegation-timeout","type","number","min","1","max","2147483647","step","1","placeholder","Server default","aria-describedby","delegation-timeout-hint delegation-timeout-error",3,"formControl"],["dsButton","","variant","primary","type","submit",3,"disabled"],["dsButton","","type","button",3,"disabled"],["dsButton","","type","button",3,"click"],["disabled","",3,"ngValue"],[3,"ngValue"],["label","Aliases"],["label","API model names"],[1,"ds-meta"],["dsControl","","type","text","placeholder","Tool names, comma-separated (empty = all tools)","autocomplete","off",1,"ds-indent",3,"formControl"],[1,"ds-micro"],["dsControl","",1,"ds-indent","ds-control--auto",3,"change","id","value"],["value","default"],["value","on"],["value","off"],["type","checkbox",3,"change","checked","disabled"],["dsControl","","mono","","id","agent-config-loop-config","rows","10","spellcheck","false","autocomplete","off",3,"placeholder","formControl"],["dsCheck","",1,"ds-grow"],["dsButton","","variant","icon-danger","type","button","title","Remove"],["dsButton","","variant","icon-danger","type","button","title","Remove",3,"click"],["dsButton","","variant","ghost","type","button",3,"click"],["dsButton","","type","button",3,"click","disabled"]],template:function(e,o){e&1&&(Ds(0,"ds-page")(1,"ds-section-header",0)(2,"button",1),mg("click",function(){return o.cancel()}),MC(3," \u2190 Agent configs "),pl(),Pw(4,nt,2,1,"a",2),Pw(5,ot,2,0,"ds-tag",3),pl(),Pw(6,it,2,0,"p",4)(7,Kt,89,33,"form",5),pl()),e&2&&(jE(),ug("title",o.isEditMode()?"Edit agent config":"New agent config"),jE(3),Lw(o.isEditMode()?4:-1),jE(),Lw(o.isPlatformMode?5:-1),jE(),Lw(o.isLoading()?6:7));},dependencies:[Ut$1,nd,bo,xo,Lt$1,kn,vn,Gt$1,mo,po,$r,qr,Vn,An,$t$1,pn,hn,cn,ln,dn,mn,at$1,an,rn,ko],encapsulation:2})};export{Je as AgentConfigFormComponent};
@@ -1 +1 @@
1
- import {p}from'./chunk-BiMuA5X-.js';import {g,W,t as Xm,u as y,m as mw,h as hl,M as MC,b as gl,j as jE,O as Og}from'./main-HBKYHCPK.js';var A=class r{route=g(W);http=g(Xm);config=g(y);message="Authentication in progress\u2026";ngOnInit(){let e=this.route.snapshot.queryParamMap.get("code"),t=this.route.snapshot.queryParamMap.get("state"),o=this.route.snapshot.queryParamMap.get("error"),i=this.route.snapshot.queryParamMap.get("error_description");if(o){console.warn("[AgentOS OAuth Callback] OAuth error:",o,i),this.notifyParentAndClose({success:false,error:i||o});return}if(!e){console.error("[AgentOS OAuth Callback] Missing authorization code"),this.message="OAuth callback error: missing authorization code.",this.notifyParentAndClose({success:false,error:"Missing authorization code"});return}this.http.post(`${this.config.basePath}/api/oauth/callback`,{code:e,state:t}).subscribe({next:()=>{console.log("[AgentOS OAuth Callback] Backend callback resolved"),this.notifyParentAndClose({success:true});},error:a=>{console.error("[AgentOS OAuth Callback] Backend callback failed:",a),this.notifyParentAndClose({success:false,error:a?.error?.message||a?.message||"Token exchange failed"});}});}notifyParentAndClose(e){if(this.message=e.success?"Authentication complete. You can close this window.":`Authentication failed: ${e.error??"unknown error"}. You can close this window.`,window.opener)try{window.opener.postMessage(e,window.location.origin);}catch(t){console.error("[AgentOS OAuth Callback] postMessage failed:",t),localStorage.setItem(p,JSON.stringify(e));}else console.warn("[AgentOS OAuth Callback] No window.opener \u2014 localStorage fallback"),localStorage.setItem(p,JSON.stringify(e));setTimeout(()=>window.close(),1e3);}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=mw({type:r,selectors:[["agentos-oauth-callback"]],decls:2,vars:1,consts:[[2,"font-family","sans-serif","padding","2rem","text-align","center"]],template:function(t,o){t&1&&(hl(0,"p",0),MC(1),gl()),t&2&&(jE(),Og(o.message));},encapsulation:2,changeDetection:1})};export{A as OAuthCallbackComponent};
1
+ import {p}from'./chunk-DpGfd5zc.js';import {g,W,t as Xm,u as y,m as mw,h as hl,M as MC,b as gl,j as jE,O as Og}from'./main-FNVOUHA6.js';var A=class r{route=g(W);http=g(Xm);config=g(y);message="Authentication in progress\u2026";ngOnInit(){let e=this.route.snapshot.queryParamMap.get("code"),t=this.route.snapshot.queryParamMap.get("state"),o=this.route.snapshot.queryParamMap.get("error"),i=this.route.snapshot.queryParamMap.get("error_description");if(o){console.warn("[AgentOS OAuth Callback] OAuth error:",o,i),this.notifyParentAndClose({success:false,error:i||o});return}if(!e){console.error("[AgentOS OAuth Callback] Missing authorization code"),this.message="OAuth callback error: missing authorization code.",this.notifyParentAndClose({success:false,error:"Missing authorization code"});return}this.http.post(`${this.config.basePath}/api/oauth/callback`,{code:e,state:t}).subscribe({next:()=>{console.log("[AgentOS OAuth Callback] Backend callback resolved"),this.notifyParentAndClose({success:true});},error:a=>{console.error("[AgentOS OAuth Callback] Backend callback failed:",a),this.notifyParentAndClose({success:false,error:a?.error?.message||a?.message||"Token exchange failed"});}});}notifyParentAndClose(e){if(this.message=e.success?"Authentication complete. You can close this window.":`Authentication failed: ${e.error??"unknown error"}. You can close this window.`,window.opener)try{window.opener.postMessage(e,window.location.origin);}catch(t){console.error("[AgentOS OAuth Callback] postMessage failed:",t),localStorage.setItem(p,JSON.stringify(e));}else console.warn("[AgentOS OAuth Callback] No window.opener \u2014 localStorage fallback"),localStorage.setItem(p,JSON.stringify(e));setTimeout(()=>window.close(),1e3);}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=mw({type:r,selectors:[["agentos-oauth-callback"]],decls:2,vars:1,consts:[[2,"font-family","sans-serif","padding","2rem","text-align","center"]],template:function(t,o){t&1&&(hl(0,"p",0),MC(1),gl()),t&2&&(jE(),Og(o.message));},encapsulation:2,changeDetection:1})};export{A as OAuthCallbackComponent};
@@ -1 +1 @@
1
- import {y}from'./chunk-BiMuA5X-.js';import {g,aA as ie,aB as T,aa as Cr,a1 as fa,az as ne,a2 as da,aC as Uy,a6 as x}from'./main-HBKYHCPK.js';var v=class i{userState=g(y);membership=g(ie);currentUser$=T(this.userState.currentUser);cache=new Map;isAdminOfNamespace$(e){if(!e)return Cr(false);let t=this.cache.get(e);if(t)return t;let s=this.currentUser$.pipe(fa(a=>a?a.isAdmin?Cr(true):this.membership.getMembersNamespaceMembership(e).pipe(ne(d=>d.some(n=>n.id===a.id&&n.role==="ADMIN")),da(()=>Cr(false))):Cr(false)),Uy({bufferSize:1,refCount:false}));return this.cache.set(e,s),s}static \u0275fac=function(t){return new(t||i)};static \u0275prov=x({token:i,factory:i.\u0275fac,providedIn:"root"})};export{v};
1
+ import {y}from'./chunk-DpGfd5zc.js';import {g,aA as ie,aB as T,aa as Cr,a1 as fa,az as ne,a2 as da,aC as Uy,a6 as x}from'./main-FNVOUHA6.js';var v=class i{userState=g(y);membership=g(ie);currentUser$=T(this.userState.currentUser);cache=new Map;isAdminOfNamespace$(e){if(!e)return Cr(false);let t=this.cache.get(e);if(t)return t;let s=this.currentUser$.pipe(fa(a=>a?a.isAdmin?Cr(true):this.membership.getMembersNamespaceMembership(e).pipe(ne(d=>d.some(n=>n.id===a.id&&n.role==="ADMIN")),da(()=>Cr(false))):Cr(false)),Uy({bufferSize:1,refCount:false}));return this.cache.set(e,s),s}static \u0275fac=function(t){return new(t||i)};static \u0275prov=x({token:i,factory:i.\u0275fac,providedIn:"root"})};export{v};
@@ -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-VTJT2VI6.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles-VTJT2VI6.css"></noscript></head>
34
34
  <body>
35
35
  <app-root></app-root>
36
- <script src="polyfills-2FSRUXKO.js" type="module"></script><script src="main-HBKYHCPK.js" type="module"></script></body>
36
+ <script src="polyfills-2FSRUXKO.js" type="module"></script><script src="main-FNVOUHA6.js" type="module"></script></body>
37
37
  </html>