@whoz-oss/coday-client 0.0.0-workstream-forge.168 → 0.0.0-workstream-forge.169
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.
- package/browser/{chunk-C1sK2c-Q.js → chunk-9BCVk9NQ.js} +1 -1
- package/browser/chunk-9MylQlFX.js +1 -0
- package/browser/{chunk-B9iTyIjx.js → chunk-B6iOc9hF.js} +1 -1
- package/browser/{chunk-CvsXT-vJ.js → chunk-B8I4f-Tr.js} +1 -1
- package/browser/chunk-BAVg53Gi.js +1 -0
- package/browser/{chunk-lSvIXQf2.js → chunk-BB_dA66R.js} +1 -1
- package/browser/{chunk-D2EoaVUV.js → chunk-BDyOxfSx.js} +1 -1
- package/browser/{chunk-_0Pt2eIk.js → chunk-BGhzqfFE.js} +1 -1
- package/browser/{chunk-BPgCdzI3.js → chunk-BMwQO1aF.js} +1 -1
- package/browser/{chunk-BouM_fsr.js → chunk-BSyalGSH.js} +1 -1
- package/browser/{chunk-DHiW57yq.js → chunk-Bfn_agkT.js} +1 -1
- package/browser/{chunk-DF8a0VbT.js → chunk-BksPDz1g.js} +1 -1
- package/browser/{chunk-BiDY3hdR.js → chunk-CCbfhj2G.js} +1 -1
- package/browser/{chunk-Q51xQuHN.js → chunk-CGCJZ64O.js} +1 -1
- package/browser/{chunk-BBo-UAVT.js → chunk-CJHYrcx3.js} +1 -1
- package/browser/{chunk-O3IYxaT5.js → chunk-CXDCRruq.js} +1 -1
- package/browser/{chunk-RK1KcbBd.js → chunk-CgAHFQGb.js} +1 -1
- package/browser/{chunk-CqEBZwT6.js → chunk-CwkXYTZA.js} +1 -1
- package/browser/{chunk-CCxZ6Nxa.js → chunk-CxFvnhVl.js} +1 -1
- package/browser/{chunk-B70nIVb1.js → chunk-D0KyNALN.js} +1 -1
- package/browser/{chunk-Hwtp_Aw7.js → chunk-D1sMiX8H.js} +1 -1
- package/browser/{chunk-DTrqVGw2.js → chunk-D2AQLKBp.js} +1 -1
- package/browser/{chunk-oWHujcVm.js → chunk-D8BdDsLf.js} +1 -1
- package/browser/{chunk-CSZZ0tqo.js → chunk-DB2QUY1u.js} +1 -1
- package/browser/{chunk-DujHz1il.js → chunk-DGErIFJc.js} +3 -3
- package/browser/{chunk-CZr1WGW3.js → chunk-DJo3_Udm.js} +1 -1
- package/browser/{chunk-nvOVuNZe.js → chunk-DJxwfugY.js} +1 -1
- package/browser/{chunk-FFU5aEfv.js → chunk-DOdWgrVq.js} +1 -1
- package/browser/{chunk-CNxoohfy.js → chunk-DT9JiqnH.js} +1 -1
- package/browser/{chunk-DBFd_NaC.js → chunk-DTD__Dn_.js} +1 -1
- package/browser/{chunk-BPpVWGci.js → chunk-DUCp8ptZ.js} +1 -1
- package/browser/{chunk-BPSV4Kat.js → chunk-DglVEB0S.js} +1 -1
- package/browser/{chunk-DUstOozy.js → chunk-DjhKeD1b.js} +1 -1
- package/browser/{chunk-C5Gy8xEx.js → chunk-DpihPg3o.js} +1 -1
- package/browser/{chunk-CkDhB9Hm.js → chunk-DsFj5ou4.js} +1 -1
- package/browser/{chunk-CKYvRgmp.js → chunk-DuNCuAwy.js} +1 -1
- package/browser/{chunk-aP78qE5j.js → chunk-Dvoa2pcH.js} +1 -1
- package/browser/{chunk-Cvo-bXQF.js → chunk-Dz6l4scy.js} +1 -1
- package/browser/{chunk-CeDW92nU.js → chunk-QAL0dGUf.js} +1 -1
- package/browser/{chunk-6XX5oOge.js → chunk-QJCDzExw.js} +1 -1
- package/browser/{chunk-BIbYIDKA.js → chunk-T-MyQ60v.js} +1 -1
- package/browser/{chunk-DjSeJqw5.js → chunk-YAdCsA0W.js} +1 -1
- package/browser/{chunk-BoH6yA2O.js → chunk-iSSo0lPZ.js} +1 -1
- package/browser/{chunk-DLo7hcw9.js → chunk-q29IcxwC.js} +1 -1
- package/browser/{chunk-RUwaaNcd.js → chunk-t7hrk6-r.js} +1 -1
- package/browser/index.html +1 -1
- package/browser/{main-CY35P7WX.js → main-UDKVTVAZ.js} +1 -1
- package/package.json +1 -1
- package/browser/chunk-CG_9b-Ij.js +0 -1
- package/browser/chunk-aPozG7uX.js +0 -1
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {o as o$1,r,i,l}from'./chunk-1nyEsjkY.js';import {o}from'./chunk-FFU5aEfv.js';import {O}from'./chunk-CvsXT-vJ.js';import {g,W as W$1,F,I as Ie$1,a9 as $,as as U,U as Ui,at as Y$1,a1 as W$2,K as KC,a2 as F$1,au as we,x as U$1,af as da,a3 as Cr,ae as Ty,av as ne,C as x,z as w,m as mw,ao as $t,D as Ds,N as mg,M as MC,a as pl,P as Pw,j as jE,O as Og,L as Lw,X as Xw,J as ug,q as qw,l as lg,Q as SI,T as MI,e as cg,v as vl,V as Vw,H as Hw,k as df,n as ff,am as kg}from'./main-CY35P7WX.js';import {$ as $$1,v as vt,a as ve,K as Kn,z as zn,Z as Zn,X as Xn,Y as Ye$1,d as dn,F as Ft,h as bt$1,L as Ln,W as Wn,q as qt,H as Lt,b as pn,V as Vn}from'./chunk-DujHz1il.js';import'./chunk-aPozG7uX.js';var R="*";function ke(i){return (i??[]).some(t=>t.trim()===R)}function Te(i){let t=(i??[]).map(e=>e.trim()).filter(e=>e.length>0&&e!==R).map(e=>e.toLowerCase());return new Set(t)}function W(i){return i.includes(R)}function Me(i){let t=i.replace(/[\\.[\]{}()^$|]/g,"\\$&").replace(/\*/g,".*");try{return new RegExp(`^${t}$`,"i")}catch(e){return null}}function Y(i,t){return (t??[]).map(e=>e.trim()).filter(e=>e.length>0&&e!==R&&W(e)).some(e=>Me(e)?.test(i)??false)}var Ie="AGENTOS_CONFIG",Ne=new Set(["HTTP_API","MCP_HTTP","MCP_STDIO","BASH","TMUX","GIT"]);function Re(i){return i.configEnabled&&(i.hasSubAgents||i.integrationTypes.some(t=>Ne.has(t)))}var Le=(i,t)=>t.config.id,Ve=(i,t)=>t.type,De=(i,t)=>t.selector;function Pe(i,t){if(i&1&&(Ds(0,"a",5),MC(1,"View resolved definition \u2192"),pl()),i&2){let e=Xw();ug("routerLink",e.inspectRoute());}}function Oe(i,t){i&1&&(Ds(0,"span",6),MC(1,"Platform level"),pl());}function Be(i,t){i&1&&(Ds(0,"p",7),MC(1,"Loading\u2026"),pl());}function $e(i,t){if(i&1&&(Ds(0,"span",57),MC(1),pl()),i&2){let e=Xw().$implicit;jE(),Og(e.config.integrationType);}}function Ge(i,t){if(i&1&&(lg(0,"input",58),SI()),i&2){let e=Xw().$implicit;ug("formControl",e.toolsControl),MI();}}function Ue(i,t){if(i&1){let e=qw();Ds(0,"div",52)(1,"label",54)(2,"input",55),mg("change",function(){let r=df(e).$implicit,c=Xw(3);return ff(c.toggleIntegration(r))}),pl(),Ds(3,"span",56),MC(4),pl(),Pw(5,$e,2,1,"span",57),pl(),Pw(6,Ge,1,1,"input",58),pl();}if(i&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 Ke(i,t){if(i&1&&(Ds(0,"p",64),MC(1),pl()),i&2){let e=Xw().$implicit;jE(),vl(" Restricted to: ",e.restrictedTools.join(", ")," (set outside this form, preserved on save) ");}}function We(i,t){if(i&1){let e=qw();Ds(0,"div",52)(1,"label",54)(2,"span",56),MC(3),pl(),Ds(4,"span",57),MC(5,"built-in"),pl()(),Ds(6,"select",60),mg("change",function(r){let c=df(e).$implicit,_=Xw(4);return ff(_.setBuiltInState(c,r.target.value))}),Ds(7,"option",61),MC(8),pl(),Ds(9,"option",62),MC(10,"Enabled"),pl(),Ds(11,"option",63),MC(12,"Disabled"),pl()(),Pw(13,Ke,2,1,"p",64),Ds(14,"p",65),MC(15),pl()();}if(i&2){let e=t.$implicit,n=Xw(4);jE(),cg("for","built-in-"+e.type),jE(2),Og(e.displayName),jE(3),ug("id","built-in-"+e.type)("value",e.state()),jE(2),Og(n.builtInDefaultLabel(e)),jE(5),Lw(e.state()==="on"&&e.restrictedTools?13:-1),jE(2),Og(e.description);}}function je(i,t){if(i&1&&(Ds(0,"p",59),MC(1,"Built-in integrations"),pl(),Vw(2,We,16,7,"div",52,Ve)),i&2){let e=Xw(3);jE(2),Hw(e.builtInRows());}}function He(i,t){i&1&&(Ds(0,"p",53),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 Je(i,t){if(i&1&&(Ds(0,"fieldset",20)(1,"legend",22),MC(2,"Integrations"),pl(),Ds(3,"p",51),MC(4," Select which integrations this agent can use. Leave tool names empty to allow all tools from an integration. "),pl(),Vw(5,Ue,7,4,"div",52,Le),Pw(7,je,4,0),Pw(8,He,2,0,"p",53),pl()),i&2){let e=Xw(2);jE(5),Hw(e.integrationRows()),jE(2),Lw(e.builtInRows().length>0?7:-1),jE(),Lw(e.configAgentExposureWarning()?8:-1);}}function Ye(i,t){i&1&&MC(0," A platform config can only list platform skills here: namespace skills are resolved per namespace when the agent runs. ");}function qe(i,t){i&1&&(Ds(0,"p",29),MC(1," Saving with this on replaces the selection below with "),Ds(2,"code",24),MC(3,"*"),pl(),MC(4,". "),pl());}function ze(i,t){i&1&&(Ds(0,"p",29),MC(1," The skill catalogue could not be loaded. What this agent already declares is listed below and preserved on save. "),pl());}function Xe(i,t){i&1&&(Ds(0,"p",30),MC(1,"No skill available in this scope yet."),pl());}function Qe(i,t){i&1&&(Ds(0,"span",69),MC(1,"platform"),pl());}function Ze(i,t){if(i&1&&(Ds(0,"span",70),MC(1),pl()),i&2){let e=Xw(4);jE(),vl(" ",e.skillCatalogueUnavailable()?"not verified":"no matching skill"," ");}}function et(i,t){if(i&1&&(Ds(0,"p",71),MC(1),pl()),i&2){let e=Xw().$implicit;jE(),Og(e.description);}}function tt(i,t){if(i&1){let e=qw();Ds(0,"div",66)(1,"label",67)(2,"input",68),mg("change",function(){let r=df(e).$implicit,c=Xw(3);return ff(c.toggleSkill(r))}),pl(),Ds(3,"span",27),MC(4),pl(),Pw(5,Qe,2,0,"span",69),Pw(6,Ze,2,1,"span",70),pl(),Pw(7,et,2,1,"p",71),pl();}if(i&2){let e=t.$implicit,n=Xw(3);jE(2),ug("checked",e.selected())("disabled",n.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 nt(i,t){if(i&1&&Vw(0,tt,8,6,"div",66,De),i&2){let e=Xw(2);Hw(e.skillRows());}}function it(i,t){i&1&&(Ds(0,"p",74),MC(1,"Invalid JSON \u2014 please fix the syntax."),pl());}function ot(i,t){if(i&1&&(Ds(0,"div",10)(1,"label",72),MC(2,"Loop configuration (JSON)"),pl(),lg(3,"textarea",73),SI(),Pw(4,it,2,0,"p",74),Ds(5,"p",28),MC(6," Default payload for this loop agent. Overridden at launch time if the first message contains a valid "),Ds(7,"code",24),MC(8,"AgentLoopPayload"),pl(),MC(9,". Leave empty if you always provide the payload at launch. "),pl()()),i&2){let e=Xw(2);jE(3),ug("placeholder",e.loopConfigPlaceholder)("formControl",e.loopConfigControl),MI(),jE(),Lw(e.loopConfigControl.invalid&&e.loopConfigControl.touched?4:-1);}}function at(i,t){i&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 lt(i,t){i&1&&(Ds(0,"p",29),MC(1," Saving with this on replaces the selection below with "),Ds(2,"code",24),MC(3,"*"),pl(),MC(4,". "),pl());}function rt(i,t){i&1&&(Ds(0,"p",29),MC(1," The list of agents could not be loaded. What this agent already declares is listed below and preserved on save. "),pl());}function st(i,t){i&1&&(Ds(0,"p",30),MC(1,"No other agent is available in this scope yet."),pl());}function dt(i,t){i&1&&(Ds(0,"span",69),MC(1,"pattern"),pl());}function ct(i,t){i&1&&(Ds(0,"span",69),MC(1,"via pattern"),pl());}function gt(i,t){if(i&1&&(Ds(0,"span",70),MC(1),pl()),i&2){let e=Xw(4);jE(),vl(" ",e.subAgentCandidatesUnavailable()?"not verified":"no matching agent"," ");}}function mt(i,t){if(i&1){let e=qw();Ds(0,"button",76),mg("click",function(){df(e);let r=Xw().$implicit,c=Xw(3);return ff(c.removeSubAgent(r))}),MC(1," \u{1F5D1} "),pl();}if(i&2){let e=Xw().$implicit;cg("aria-label","Remove "+e.selector);}}function ut(i,t){if(i&1){let e=qw();Ds(0,"div",66)(1,"label",67)(2,"input",68),mg("change",function(){let r=df(e).$implicit,c=Xw(3);return ff(c.toggleSubAgent(r))}),pl(),Ds(3,"span",27),MC(4),pl(),Pw(5,dt,2,0,"span",69)(6,ct,2,0,"span",69)(7,gt,2,1,"span",70),pl(),Pw(8,mt,2,1,"button",75),pl();}if(i&2){let e=t.$implicit,n=Xw(3);jE(2),ug("checked",e.selected())("disabled",n.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 pt(i,t){if(i&1&&Vw(0,ut,9,5,"div",66,De),i&2){let e=Xw(2);Hw(e.subAgentRows());}}function ft(i,t){if(i&1&&MC(0),i&2){let e=Xw(2);kg(" : ",e.defaultDelegationTimeoutSeconds()," s (",e.defaultDelegationTimeoutSeconds()/60," min) ");}}function _t(i,t){i&1&&(Ds(0,"p",44),MC(1," Enter a valid positive whole number of seconds, or leave empty to inherit the server default. "),pl());}function Ct(i,t){if(i&1){let e=qw();Ds(0,"button",77),mg("click",function(){df(e);let r=Xw(2);return ff(r.useDefaultDelegationTimeout())}),MC(1," Use server default "),pl();}}function bt(i,t){i&1&&(Ds(0,"p",46),MC(1),pl()),i&2&&(jE(),Og(t));}function ht(i,t){if(i&1){let e=qw();Ds(0,"button",78),mg("click",function(){df(e);let r=Xw(2);return ff(r.exportYaml())}),MC(1),pl();}if(i&2){let e=Xw(2);ug("disabled",e.isExporting()),jE(),vl(" ",e.isExporting()?"Exporting\u2026":"Export as YAML"," ");}}function yt(i,t){if(i&1){let e=qw();Ds(0,"form",9),mg("ngSubmit",function(){df(e);let r=Xw();return ff(r.submit())}),Ds(1,"div",10)(2,"label",11),MC(3,"Name "),Ds(4,"span",12),MC(5,"*"),pl()(),lg(6,"input",13),SI(),pl(),Ds(7,"div",10)(8,"label",14),MC(9,"Description"),pl(),lg(10,"input",15),SI(),pl(),Ds(11,"div",10)(12,"label",16),MC(13,"Model name"),pl(),lg(14,"input",17),SI(),pl(),Ds(15,"div",10)(16,"label",18),MC(17,"Instructions"),pl(),lg(18,"textarea",19),SI(),pl(),Pw(19,Je,9,2,"fieldset",20),Ds(20,"fieldset",21)(21,"legend",22),MC(22,"Skills"),pl(),Ds(23,"p",23),MC(24," Instruction bundles this agent can read on demand. Selecting at least one grants it the "),Ds(25,"code",24),MC(26,"readSkill"),pl(),MC(27," and "),Ds(28,"code",24),MC(29,"readSkillResource"),pl(),MC(30," tools; selecting none grants neither. "),Pw(31,Ye,1,0),pl(),Ds(32,"label",25)(33,"input",26),mg("change",function(){df(e);let r=Xw();return ff(r.toggleAllSkills())}),pl(),Ds(34,"span",27),MC(35," Every skill in the catalogue ("),Ds(36,"code",24),MC(37,"*"),pl(),MC(38,") "),pl()(),Ds(39,"p",28),MC(40," Resolved at run time, so skills added later are granted too, without editing this agent. "),pl(),Pw(41,qe,5,0,"p",29),Pw(42,ze,2,0,"p",29),Pw(43,Xe,2,0,"p",30)(44,nt,2,0),pl(),Ds(45,"div",10)(46,"label",31),MC(47,"Execution mode"),pl(),Ds(48,"select",32)(49,"option",33),MC(50,"SIMPLE \u2014 Standard agent (single LLM call)"),pl(),Ds(51,"option",33),MC(52,"ADVANCED \u2014 Multi-step reasoning loop"),pl(),Ds(53,"option",33),MC(54,"LOOP \u2014 Bulk loop agent (no LLM, experimental)"),pl()(),SI(),Ds(55,"p",28),MC(56,' 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. '),pl()(),Pw(57,ot,10,3,"div",10),Ds(58,"div",10)(59,"label",34),lg(60,"input",35),SI(),Ds(61,"span",36),MC(62,"Enabled"),pl()(),Ds(63,"p",37),MC(64,"Disabled agents are excluded from namespace resolution."),pl()(),Ds(65,"fieldset",21)(66,"legend",22),MC(67,"Sub-agents"),pl(),Ds(68,"p",23),MC(69," The agents this one may delegate to. Selecting at least one grants it the "),Ds(70,"code",24),MC(71,"DELEGATE__delegate"),pl(),MC(72," tool; selecting none grants it no way to delegate. Entries are matched against agent names, never ids. "),Pw(73,at,1,0),pl(),Ds(74,"label",25)(75,"input",26),mg("change",function(){df(e);let r=Xw();return ff(r.toggleAllSubAgents())}),pl(),Ds(76,"span",27),MC(77," Every agent it can reach ("),Ds(78,"code",24),MC(79,"*"),pl(),MC(80,") "),pl()(),Ds(81,"p",28),MC(82," Resolved at run time, so agents added later can be delegated to as well, without editing this agent. "),pl(),Pw(83,lt,5,0,"p",29),Pw(84,rt,2,0,"p",29),Pw(85,st,2,0,"p",30)(86,pt,2,0),Ds(87,"p",28),MC(88," Advanced \u2014 add a glob instead of picking a name, for example "),Ds(89,"code",24),MC(90,"*Fixer"),pl(),MC(91," to cover BugFixer and StoryFixer. "),pl(),Ds(92,"div",38)(93,"input",39),mg("keydown.enter",function(){df(e);let r=Xw();return ff(r.addSubAgent())}),pl(),SI(),Ds(94,"button",40),mg("click",function(){df(e);let r=Xw();return ff(r.addSubAgent())}),MC(95," + "),pl()()(),Ds(96,"div",10)(97,"label",41),MC(98,"Delegation timeout (seconds)"),pl(),Ds(99,"p",42),MC(100," 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 "),Pw(101,ft,1,2),MC(102," . "),pl(),lg(103,"input",43),SI(),Pw(104,_t,2,0,"p",44),Pw(105,Ct,2,0,"button",45),pl(),Pw(106,bt,2,1,"p",46),Ds(107,"div",47)(108,"button",48),MC(109),pl(),Pw(110,ht,2,2,"button",49),Ds(111,"button",50),mg("click",function(){df(e);let r=Xw();return ff(r.cancel())}),MC(112,"Cancel"),pl()()();}if(i&2){let e,n=Xw();ug("formGroup",n.form),jE(6),ug("formControl",n.nameControl),MI(),jE(4),ug("formControl",n.descriptionControl),MI(),jE(4),ug("formControl",n.modelNameControl),MI(),jE(4),ug("formControl",n.instructionsControl),MI(),jE(),Lw(n.integrationRows().length>0||n.builtInRows().length>0?19:-1),jE(12),Lw(n.isPlatformMode?31:-1),jE(2),ug("checked",n.allSkillsSelected()),jE(8),Lw(n.namedSkillSelectionDropped()?41:-1),jE(),Lw(n.skillCatalogueUnavailable()?42:-1),jE(),Lw(n.skillRows().length===0?43:44),jE(5),ug("formControl",n.executionModeControl),MI(),jE(),ug("value",n.ExecutionMode.SIMPLE),jE(2),ug("value",n.ExecutionMode.ADVANCED),jE(2),ug("value",n.ExecutionMode.LOOP),jE(4),Lw(n.isLoopMode()?57:-1),jE(3),ug("formControl",n.enabledControl),MI(),jE(13),Lw(n.isPlatformMode?73:-1),jE(2),ug("checked",n.allSubAgentsSelected()),jE(8),Lw(n.namedSubAgentSelectionDropped()?83:-1),jE(),Lw(n.subAgentCandidatesUnavailable()?84:-1),jE(),Lw(n.subAgentRows().length===0?85:86),jE(8),ug("formControl",n.newSubAgentControl),MI(),jE(),ug("disabled",!n.newSubAgentControl.value.trim()),jE(7),Lw(n.defaultDelegationTimeoutSeconds()!==null?101:-1),jE(2),ug("formControl",n.delegationTimeoutControl),cg("aria-invalid",n.delegationTimeoutControl.invalid),MI(),jE(),Lw(n.delegationTimeoutControl.invalid?104:-1),jE(),Lw(n.delegationTimeoutControl.value!==null?105:-1),jE(),Lw((e=n.submitError())?106:-1,e),jE(2),ug("disabled",n.form.invalid||n.isSubmitting()),jE(),vl(" ",n.isEditMode()?"Save changes":"Create"," "),jE(),Lw(n.isEditMode()?110:-1);}}var Fe=class i$1{route=g(W$1);router=g(F);destroyRef=g(Ie$1);agentConfigController=g($);defaultsController=g(U);defaultDelegationTimeoutSeconds=Ui(null);exportService=g(Y$1);integrationConfigState=g(O);integrationTypeController=g(W$2);skillState=g(o);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=!this.namespaceId;form=new $$1({name:new vt("",{nonNullable:true,validators:[ve.required,ve.minLength(1)]}),description:new vt(null),modelName:new vt(null),instructions:new vt(null),executionMode:new vt("SIMPLE",{nonNullable:true}),delegationTimeoutSeconds:new vt(null,{validators:[ve.min(1),ve.max(2147483647),ve.pattern(/^\d+$/)]}),enabled:new vt(false,{nonNullable:true}),loopConfig:new vt(null,{validators:[i$1.jsonValidator]})});static jsonValidator(t){let e=t.value?.trim();if(!e)return null;try{return JSON.parse(e),null}catch(n){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()));hasAnySubAgent=KC(()=>this.allSubAgentsSelected()||this.subAgentRows().some(t=>t.selected()));newSubAgentControl=new vt("",{nonNullable:true});isEditMode=Ui(false);isSubmitting=Ui(false);isLoading=Ui(false);isExporting=Ui(false);submitError=Ui(null);ExecutionMode=we;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(()=>Re({configEnabled:this.builtInRows().some(t=>t.type===Ie&&t.state()==="on"),integrationTypes:this.integrationRows().filter(t=>t.enabled()).map(t=>t.config.integrationType),hasSubAgents:this.hasAnySubAgent()}));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()}).pipe(U$1(this.destroyRef)).subscribe({next:({config:e,namespaceIntegrations:n,platformIntegrations:r,builtInTypes:c,skillCatalogue:_,delegationCandidates:w})=>{this.existingConfig=e,this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??null),this.modelNameControl.setValue(e.modelName??null),this.instructionsControl.setValue(e.instructions??null);let F=e.executionMode??(e.advancedExecution?"ADVANCED":"SIMPLE");this.executionModeControl.setValue(F),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 p=[...r,...n];this.integrationRows.set(this.buildIntegrationRows(p,e.integrations??void 0)),this.builtInRows.set(this.buildBuiltInRows(c,e.integrations??void 0)),this.allSubAgentsSelected.set(ke(e.subAgents)),this.subAgentRows.set(this.buildSubAgentRows(w,e.subAgents,e.name)),this.allSkillsSelected.set(o$1(e.skillSelectors)),this.skillRows.set(this.buildSkillRows(_,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()}).pipe(U$1(this.destroyRef)).subscribe({next:({namespaceIntegrations:e,platformIntegrations:n,builtInTypes:r,skillCatalogue:c,delegationCandidates:_})=>{let w=[...n,...e];this.integrationRows.set(this.buildIntegrationRows(w,t??void 0)),this.builtInRows.set(this.buildBuiltInRows(r,t??void 0)),this.allSubAgentsSelected.set(false),this.subAgentRows.set(this.buildSubAgentRows(_,void 0,null)),this.allSkillsSelected.set(false),this.skillRows.set(this.buildSkillRows(c,void 0));}});}loadSkillCatalogue(){return (this.namespaceId?this.skillState.listEffective(this.namespaceId):this.skillState.listPlatform().pipe(ne(e=>e.map(n=>({id:n.id??"",name:n.name,description:n.description,namespaceId:n.namespaceId??null,readOnly:n.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(p=>p.trim()).filter(p=>p.length>0).filter(p=>p!==r),c=i(r$1),_=new Set(t.map(p=>p.name.toLowerCase())),w=t.map(p=>({selector:p.name,name:p.name,description:p.description,platform:p.namespaceId==null,unresolved:false,selected:Ui(c.has(p.name.toLowerCase()))})),F=new Set;for(let p of r$1){let O=l(p).toLowerCase();_.has(O)||F.has(O)||(F.add(O),w.push({selector:p,name:p,description:"",platform:false,unresolved:true,selected:Ui(true)}));}return w}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:n,namespace:r})=>[...n,...r]),ne(n=>n.map(r=>r.name).filter(r=>r.length>0)),ne(n=>i$1.dedupeByKey(n)))}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(n=>{let r=n.toLowerCase();return e.has(r)?false:(e.add(r),true)})}buildSubAgentRows(t,e,n){let r=Te(e),c=n?.toLowerCase()??null,_=t.filter(C=>{let M=C.toLowerCase();return M!==c||r.has(M)}),w=new Set(_.map(C=>C.toLowerCase())),F=_.map(C=>({selector:C,name:C,unresolved:false,pattern:false,grantedByPattern:Y(C,e),selected:Ui(r.has(C.toLowerCase()))})),p=new Set,O=(e??[]).map(C=>C.trim()).filter(C=>C.length>0&&C!==R);for(let C of O){let M=C.toLowerCase();w.has(M)||p.has(M)||(p.add(M),F.push({selector:C,name:C,unresolved:true,pattern:W(C),grantedByPattern:false,selected:Ui(true)}));}return F}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(n=>{let r=n.name??"",c=e?.[r],_=e!=null&&r in e,w=Array.isArray(c)?c.join(", "):"";return {config:n,enabled:Ui(_),toolsControl:new vt(w,{nonNullable:true})}})}buildBuiltInRows(t,e){return t.map(n=>{let r=e!=null&&n.type in e,c=e?.[n.type],_=r?Array.isArray(c)&&c.length===0?"off":"on":"default";return {type:n.type,displayName:n.displayName,description:n.description,enabledByDefault:n.enabledByDefault===true,state:Ui(_),restrictedTools:Array.isArray(c)&&c.length>0?c: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(n=>n.selector.toLowerCase()===t.toLowerCase());e?e.selected.set(true):t===R?this.allSubAgentsSelected.set(true):this.subAgentRows.update(n=>this.withPatternGrants([...n,{selector:t,name:t,unresolved:true,pattern:W(t),grantedByPattern:false,selected:Ui(true)}])),this.newSubAgentControl.reset("");}removeSubAgent(t){let e=t.selector.toLowerCase();this.subAgentRows.update(n=>this.withPatternGrants(n.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(n=>n.selected()).map(n=>n.selector);return t.map(n=>n.unresolved?n:x(w({},n),{grantedByPattern:Y(n.name,e)}))}toggleAllSubAgents(){this.allSubAgentsSelected.update(t=>!t),this.subAgentRows.update(t=>this.withPatternGrants(t));}buildSubAgentsPayload(){if(this.allSubAgentsSelected())return [R];let t=this.subAgentRows().filter(e=>e.selected()).map(e=>e.selector);return t.length>0?t:void 0}buildIntegrationsPayload(){let t={};for(let n of this.integrationRows().filter(r=>r.enabled())){let r=n.config.name??"",c=n.toolsControl.value.trim();t[r]=c===""?null:c.split(",").map(_=>_.trim()).filter(_=>_.length>0);}for(let n of this.builtInRows()){let r=n.state();r==="on"?t[n.type]=n.restrictedTools??null:r==="off"&&(t[n.type]=[]);}let e=new Set([...this.integrationRows().map(n=>n.config.name??""),...this.builtInRows().map(n=>n.type)]);for(let[n,r]of Object.entries(this.existingConfig?.integrations??{}))e.has(n)||(t[n]=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:n=>{this.isSubmitting.set(false),this.submitError.set(i$1.serverMessage(n));}});}static serverMessage(t){let n=t?.error?.message;if(typeof n=="string"&&n.trim().length>0)return n;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 n=new Blob([e],{type:"application/yaml"}),r=URL.createObjectURL(n),c=document.createElement("a");c.href=r,c.download=`${this.existingConfig?.name??"agent"}.yaml`,c.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||i$1)};static \u0275cmp=mw({type:i$1,selectors:[["agentos-agent-config-form"]],decls:12,vars:4,consts:[[1,"agent-config-form"],[1,"agent-config-form__header"],["type","button","title","Back to agent configs",1,"agent-config-form__back",3,"click"],[1,"agent-config-form__back-icon"],[1,"agent-config-form__title"],[1,"agent-config-form__sibling-link",3,"routerLink"],[1,"agent-config-form__platform-badge"],[1,"agent-config-form__loading"],[1,"agent-config-form__form",3,"formGroup"],[1,"agent-config-form__form",3,"ngSubmit","formGroup"],[1,"agent-config-form__field"],["for","agent-config-name",1,"agent-config-form__label"],["aria-hidden","true"],["id","agent-config-name","type","text","placeholder","e.g. Support agent","autocomplete","off",1,"agent-config-form__input",3,"formControl"],["for","agent-config-description",1,"agent-config-form__label"],["id","agent-config-description","type","text","placeholder","Optional \u2014 short description of this agent","autocomplete","off",1,"agent-config-form__input",3,"formControl"],["for","agent-config-model-name",1,"agent-config-form__label"],["id","agent-config-model-name","type","text","placeholder","Optional \u2014 model alias or name to use","autocomplete","off",1,"agent-config-form__input",3,"formControl"],["for","agent-config-instructions",1,"agent-config-form__label"],["id","agent-config-instructions","rows","6","placeholder","Optional \u2014 system instructions for this agent",1,"agent-config-form__textarea",3,"formControl"],[1,"agent-config-form__integrations"],[1,"agent-config-form__skills"],[1,"agent-config-form__label"],[1,"agent-config-form__skills-hint"],[1,"agent-config-form__code"],[1,"agent-config-form__skill-all"],["type","checkbox",1,"agent-config-form__skill-checkbox",3,"change","checked"],[1,"agent-config-form__skill-name"],[1,"agent-config-form__field-hint"],["role","alert",1,"agent-config-form__skills-warning"],[1,"agent-config-form__skills-empty"],["for","agent-config-execution-mode",1,"agent-config-form__label"],["id","agent-config-execution-mode",1,"agent-config-form__select",3,"formControl"],[3,"value"],[1,"agent-config-form__toggle-label"],["type","checkbox",1,"agent-config-form__toggle-checkbox",3,"formControl"],[1,"agent-config-form__toggle-text"],[1,"agent-config-form__toggle-hint"],[1,"agent-config-form__sub-agent-add"],["type","text","placeholder","e.g. *Fixer","autocomplete","off",1,"agent-config-form__input","agent-config-form__sub-agent-input",3,"keydown.enter","formControl"],["type","button","title","Add pattern",1,"agent-config-form__sub-agent-btn","agent-config-form__sub-agent-btn--add",3,"click","disabled"],["for","delegation-timeout",1,"agent-config-form__label"],["id","delegation-timeout-hint",1,"agent-config-form__field-hint"],["id","delegation-timeout","type","number","min","1","max","2147483647","step","1","placeholder","Server default","aria-describedby","delegation-timeout-hint delegation-timeout-error",1,"agent-config-form__input",3,"formControl"],["id","delegation-timeout-error","role","alert",1,"agent-config-form__field-hint"],["type","button",1,"agent-config-form__sub-agent-btn"],["role","alert",1,"agent-config-form__submit-error"],[1,"agent-config-form__actions"],["type","submit",1,"agent-config-form__btn","agent-config-form__btn--primary",3,"disabled"],["type","button",1,"agent-config-form__btn","agent-config-form__btn--export",3,"disabled"],["type","button",1,"agent-config-form__btn",3,"click"],[1,"agent-config-form__integrations-hint"],[1,"agent-config-form__integration-row"],["role","note",1,"agent-config-form__integration-warning"],[1,"agent-config-form__integration-toggle"],["type","checkbox",1,"agent-config-form__integration-checkbox",3,"change","checked"],[1,"agent-config-form__integration-name"],[1,"agent-config-form__integration-type"],["type","text","placeholder","Tool names, comma-separated (empty = all tools)","autocomplete","off",1,"agent-config-form__input","agent-config-form__integration-tools",3,"formControl"],[1,"agent-config-form__integrations-separator"],[1,"agent-config-form__integration-state",3,"change","id","value"],["value","default"],["value","on"],["value","off"],[1,"agent-config-form__integration-restriction"],[1,"agent-config-form__integration-builtin-desc"],[1,"agent-config-form__skill-row"],[1,"agent-config-form__skill-toggle"],["type","checkbox",1,"agent-config-form__skill-checkbox",3,"change","checked","disabled"],[1,"agent-config-form__skill-badge"],[1,"agent-config-form__skill-badge","agent-config-form__skill-badge--unresolved"],[1,"agent-config-form__skill-desc"],["for","agent-config-loop-config",1,"agent-config-form__label"],["id","agent-config-loop-config","rows","10","spellcheck","false","autocomplete","off",1,"agent-config-form__textarea","agent-config-form__textarea--mono",3,"placeholder","formControl"],["role","alert",1,"agent-config-form__field-error"],["type","button","title","Remove",1,"agent-config-form__sub-agent-btn","agent-config-form__sub-agent-btn--danger"],["type","button","title","Remove",1,"agent-config-form__sub-agent-btn","agent-config-form__sub-agent-btn--danger",3,"click"],["type","button",1,"agent-config-form__sub-agent-btn",3,"click"],["type","button",1,"agent-config-form__btn","agent-config-form__btn--export",3,"click","disabled"]],template:function(e,n){e&1&&(Ds(0,"div",0)(1,"header",1)(2,"button",2),mg("click",function(){return n.cancel()}),Ds(3,"span",3),MC(4,"\u2190"),pl(),MC(5," Agent Configs "),pl(),Ds(6,"h1",4),MC(7),pl(),Pw(8,Pe,2,1,"a",5),Pw(9,Oe,2,0,"span",6),pl(),Pw(10,Be,2,0,"p",7)(11,yt,113,33,"form",8),pl()),e&2&&(jE(7),Og(n.isEditMode()?"Edit agent config":"New agent config"),jE(),Lw(n.isEditMode()?8:-1),jE(),Lw(n.isPlatformMode?9:-1),jE(),Lw(n.isLoading()?10:11));},dependencies:[Kn,zn,Zn,Xn,Ye$1,dn,Ft,bt$1,Ln,Wn,qt,Lt,pn,Vn,$t],encapsulation:2})};export{Fe as AgentConfigFormComponent};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a8 as fa,af as da,a3 as Cr,ay as Uy}from'./main-CY35P7WX.js';function i(t,o,p){return t.pipe(fa(()=>o().pipe(da(()=>Cr(p)))),Uy({bufferSize:1,refCount:true}))}export{i};
|