@whoz-oss/coday-client 0.0.0-workstream-forge.241 → 0.0.0-workstream-forge.244
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-CnPp-vmJ.js → chunk-8SxX32rO.js} +1 -1
- package/browser/{chunk-vrQUVrbj.js → chunk-B6rPUjlK.js} +1 -1
- package/browser/chunk-BH7OLSx0.js +1 -0
- package/browser/{chunk-CouuZLIT.js → chunk-BKnj9uiw.js} +1 -1
- package/browser/chunk-BLR-ZTHh.js +1 -0
- package/browser/{chunk-CxVLCgR7.js → chunk-BMpFwNrL.js} +1 -1
- package/browser/{chunk-DD0B2hZ4.js → chunk-BbYQjxBb.js} +1 -1
- package/browser/{chunk-CWB_UsoN.js → chunk-Bo2-yEbp.js} +1 -1
- package/browser/{chunk-DeDbkfoc.js → chunk-BwqiXXvR.js} +1 -1
- package/browser/{chunk-Bjh4fonr.js → chunk-Bz9_W213.js} +1 -1
- package/browser/{chunk-1a6DcGem.js → chunk-C1CvCiQs.js} +1 -1
- package/browser/chunk-C2LkuBYd.js +1 -0
- package/browser/{chunk-x0ys64HX.js → chunk-C3AaPoyZ.js} +1 -1
- package/browser/{chunk-C3kKO2hv.js → chunk-C4CyLTkA.js} +1 -1
- package/browser/{chunk-Ci_kgYRU.js → chunk-C8Q6ccMm.js} +1 -1
- package/browser/chunk-CBtsWofj.js +1 -0
- package/browser/chunk-CNBrzP9I.js +1 -0
- package/browser/chunk-CTrUVP-N.js +1 -0
- package/browser/{chunk-DXVP5qGT.js → chunk-CX2oEBf9.js} +1 -1
- package/browser/{chunk-BR-v_Yw0.js → chunk-C_TR3rI-.js} +1 -1
- package/browser/chunk-CcI4CWl6.js +1 -0
- package/browser/{chunk-Dtel5s0Y.js → chunk-CfifMtwC.js} +1 -1
- package/browser/{chunk-B3C0-w1H.js → chunk-CoWzfbqL.js} +1 -1
- package/browser/{chunk-Dx2NFZKr.js → chunk-CyIUjRWT.js} +1 -1
- package/browser/{chunk-sh5yfJ5w.js → chunk-D0jMQDes.js} +1 -1
- package/browser/{chunk-CZVszAsn.js → chunk-D8BMEvrt.js} +1 -1
- package/browser/{chunk-D4ZQkLdU.js → chunk-DAiaXy53.js} +1 -1
- package/browser/{chunk-CbreKU78.js → chunk-DNefc5l8.js} +1 -1
- package/browser/{chunk-Cp88MsOx.js → chunk-DV5IlfBq.js} +1 -1
- package/browser/{chunk-CFXn7UF0.js → chunk-DbN0_APN.js} +1 -1
- package/browser/{chunk-Cz8XShgD.js → chunk-DlJR_onX.js} +1 -1
- package/browser/{chunk-C0dETmrU.js → chunk-DtJYpVtU.js} +1 -1
- package/browser/{chunk-U4DrnauI.js → chunk-DwXfEpcA.js} +1 -1
- package/browser/{chunk-DaIiIyVs.js → chunk-E81L_Bla.js} +1 -1
- package/browser/{chunk-CLmmZDuk.js → chunk-GUDFMaEy.js} +1 -1
- package/browser/{chunk-BQP4WQr8.js → chunk-GaJWiH82.js} +1 -1
- package/browser/{chunk-lj1CKuoo.js → chunk-MZXI10vX.js} +1 -1
- package/browser/{chunk-C6iz6wiq.js → chunk-RGb_eFD5.js} +1 -1
- package/browser/{chunk-CSMJ7MDS.js → chunk-Uf57QzfJ.js} +14 -14
- package/browser/{chunk-BBqfFT3U.js → chunk-WwdM1pqC.js} +1 -1
- package/browser/{chunk-ngHfhGm4.js → chunk-cIF5t9Db.js} +1 -1
- package/browser/{chunk-CBcl2plG.js → chunk-dgHw3CIi.js} +1 -1
- package/browser/{chunk-BdMromko.js → chunk-kO5zS3K9.js} +1 -1
- package/browser/{chunk-8bthdK4h.js → chunk-mgh7hiln.js} +1 -1
- package/browser/{chunk-B0qfyg3W.js → chunk-ogAJa2CM.js} +1 -1
- package/browser/{chunk-DPXe72IN.js → chunk-zfSbYfDB.js} +1 -1
- package/browser/index.html +2 -2
- package/browser/{main-2G6YLE3Q.js → main-DYDARBQQ.js} +1 -1
- package/browser/styles-6KD2P5NP.css +1 -0
- package/package.json +1 -1
- package/browser/chunk-CSpJmP5j.js +0 -1
- package/browser/chunk-CWOCuTwP.js +0 -1
- package/browser/chunk-Cds8WZZ9.js +0 -1
- package/browser/chunk-CeB7A5zv.js +0 -1
- package/browser/chunk-D6UEHsUd.js +0 -1
- package/browser/chunk-Duj3iN07.js +0 -1
- package/browser/chunk-yhFoWYCU.js +0 -1
- package/browser/styles-VTJT2VI6.css +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import {f,a6 as
|
|
1
|
+
import {f,a6 as pd,m as md,H as Ht,a as po,h as ho,a7 as lo,a8 as fa,a9 as ua,b as hn,c as fn,u as un,D as pn,e as at,i as sn,k as ko,aa as f$1}from'./chunk-Uf57QzfJ.js';import {g,W,aM as Y,$ as $i,ab as le,O as Of,v as vw,aN as Db,E as Es,f as fg,j as jw,a as hl,b as BE,c as Bw,ak as yd,a1 as ga,a3 as rn,ac as by,a2 as ha,x as xC,Y as Yw,Q as vg,aO as Hg,R as MI,t as eC,aP as Vg,S as xI,U as Uw,k as $w,aQ as zC,aR as $C,F as Fg,l as lg,av as YC,aw as KC,as as Pg,s as Dl,aS as XC,u as pf,w as hf,aT as PC}from'./main-DYDARBQQ.js';var ce=e=>({title:"By agent",rows:e}),pe=e=>({title:"By model",rows:e}),ge=(e,a)=>[e,a],ue=(e,a)=>a.title,_e=(e,a)=>a.key;function Ce(e,a){e&1&&(Es(0,"p",2),xC(1,"Loading usage settings\u2026"),hl());}function fe(e,a){if(e&1){let t=Yw();Es(0,"ds-notice"),xC(1,"Could not load usage settings. Please try again."),hl(),Es(2,"div")(3,"button",3),vg("click",function(){pf(t);let s=eC();return hf(s.configuration.retry())}),xC(4,"Retry usage settings"),hl()();}}function ye(e,a){e&1&&(Es(0,"p",2),xC(1,"Usage tracking is disabled."),hl());}function be(e,a){e&1&&(Es(0,"ds-notice"),xC(1),hl()),e&2&&(BE(),Fg(a));}function xe(e,a){e&1&&(Es(0,"p",2),xC(1,"Loading usage\u2026"),hl());}function he(e,a){e&1&&(Es(0,"p",12),xC(1,"No recorded usage for this period."),hl());}function Se(e,a){if(e&1&&(Es(0,"p",10),xC(1),hl()),e&2){let t=eC().$implicit;BE(),Dl("",t.aggregate.unknownCostCount," record(s) with unknown cost");}}function we(e,a){if(e&1&&(Es(0,"tr",16)(1,"td",18),xC(2),hl(),Es(3,"td",19),xC(4),YC(5,"number"),hl(),Es(6,"td",20),xC(7),YC(8,"number"),YC(9,"number"),hl(),Es(10,"td",21),xC(11),YC(12,"number"),YC(13,"number"),hl(),Es(14,"td",22),xC(15),YC(16,"agentosCost"),jw(17,Se,2,1,"p",10),hl()()),e&2){let t=a.$implicit;BE(2),Fg(t.key),BE(2),Fg(KC(5,8,t.aggregate.totalTokens)),BE(3),Pg(" ",KC(8,10,t.aggregate.inputTokens)," / ",KC(9,12,t.aggregate.outputTokens)," "),BE(4),Pg(" ",KC(12,14,t.aggregate.cacheReadTokens)," / ",KC(13,16,t.aggregate.cacheWriteTokens)," "),BE(4),Dl(" ",XC(16,18,t.aggregate.cost,t.aggregate.unknownCostCount)," "),BE(2),Bw(t.aggregate.unknownCostCount>0?17:-1);}}function ve(e,a){if(e&1&&(Es(0,"div",13)(1,"table",14)(2,"thead",15)(3,"tr",16)(4,"th",17),xC(5,"Name"),hl(),Es(6,"th",17),xC(7,"Tokens"),hl(),Es(8,"th",17),xC(9,"Input / output"),hl(),Es(10,"th",17),xC(11,"Cache read / write"),hl(),Es(12,"th",17),xC(13,"Estimated cost"),hl()()(),Es(14,"tbody",15),Uw(15,we,18,21,"tr",16,_e),hl()()()),e&2){let t=eC().$implicit;BE(),lg("aria-label","Usage "+t.title.toLowerCase()),BE(14),$w(t.rows);}}function Ne(e,a){if(e&1&&(Es(0,"h3",11),xC(1),hl(),jw(2,he,2,0,"p",12)(3,ve,17,1,"div",13)),e&2){let t=a.$implicit;BE(),Fg(t.title),BE(),Bw(t.rows.length===0?2:3);}}function Te(e,a){if(e&1&&(Uw(0,Ne,4,2,null,null,ue),Es(2,"p",10),xC(3," Unpriced usage is kept separate from known costs. Active agent runs appear here after they finish. "),hl()),e&2){let t=eC(2);$w(zC(4,ge,$C(0,ce,t.agents()),$C(2,pe,t.models())));}}function Ee(e,a){if(e&1){let t=Yw();Es(0,"form",4),vg("ngSubmit",function(){pf(t);let s=eC();return hf(s.load())}),Es(1,"ds-form-field",5)(2,"input",6),Hg("ngModelChange",function(s){pf(t);let m=eC();return PC(m.from,s)||(m.from=s),hf(s)}),hl(),MI(),hl(),Es(3,"ds-form-field",7)(4,"input",8),Hg("ngModelChange",function(s){pf(t);let m=eC();return PC(m.to,s)||(m.to=s),hf(s)}),hl(),MI(),hl(),Es(5,"button",9),xC(6,"Refresh"),hl()(),jw(7,be,2,1,"ds-notice"),jw(8,xe,2,0,"p",2)(9,Te,4,7);}if(e&2){let t,r=eC();BE(2),Vg("ngModel",r.from),xI(),BE(2),Vg("ngModel",r.to),xI(),BE(3),Bw((t=r.error())?7:-1,t),BE(),Bw(r.loading()?8:r.error()?-1:9);}}var me=class e{route=g(W);api=g(Y);configuration=g(f);namespaceId=this.route.snapshot.params.namespaceId;agents=$i([]);models=$i([]);error=$i(null);loading=$i(false);from=new Date(Date.now()-30*864e5).toISOString().slice(0,10);to=new Date().toISOString().slice(0,10);refresh=new le;constructor(){Of(a=>{if(!this.configuration.enabled())return;let t=this.refresh.pipe(yd(void 0),ga(()=>{this.error.set(null),this.agents.set([]),this.models.set([]);let r=new Date(`${this.from}T00:00:00.000Z`),s=new Date(`${this.to}T23:59:59.999Z`);return !Number.isFinite(r.getTime())||!Number.isFinite(s.getTime())||r>s?(this.error.set("Select a valid date range."),this.loading.set(false),rn):(this.loading.set(true),by({agents:this.api.aggregateByAgentUsageRecord(this.namespaceId,r.toISOString(),s.toISOString()),models:this.api.aggregateByModelUsageRecord(this.namespaceId,r.toISOString(),s.toISOString())}).pipe(ha(m=>(this.loading.set(false),this.error.set(m.status===403?"Namespace admin permission is required to view this report.":"Could not load usage. Please try again."),rn))))})).subscribe(({agents:r,models:s})=>{this.agents.set(r),this.models.set(s),this.loading.set(false);});a(()=>t.unsubscribe());});}load(){this.configuration.enabled()&&this.refresh.next();}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=vw({type:e,selectors:[["agentos-namespace-usage"]],decls:6,vars:1,consts:[["full",""],["title","Usage and costs","description","Recorded LLM usage across this namespace. Costs are estimates in the platform currency."],["role","status",1,"settings-table__status"],["dsButton","","type","button",3,"click"],[1,"ds-inline","ds-inline--wrap","ds-inline--end",3,"ngSubmit"],["label","From (UTC)","controlId","usage-from"],["dsControl","","id","usage-from","type","date","name","from","required","",3,"ngModelChange","ngModel"],["label","To (UTC)","controlId","usage-to"],["dsControl","","id","usage-to","type","date","name","to","required","",3,"ngModelChange","ngModel"],["dsButton","","variant","primary","type","submit"],[1,"ds-hint"],[1,"ds-micro"],[1,"settings-table__status"],[1,"settings-table__wrap"],["dsTable","","role","table"],["role","rowgroup"],["role","row"],["role","columnheader"],["role","cell","data-label","Name","data-title","",1,"settings-table__name"],["role","cell","data-label","Tokens"],["role","cell","data-label","Input / output"],["role","cell","data-label","Cache read / write"],["role","cell","data-label","Estimated cost"]],template:function(t,r){t&1&&(Es(0,"ds-page",0),fg(1,"ds-section-header",1),jw(2,Ce,2,0,"p",2)(3,fe,5,0)(4,ye,2,0,"p",2)(5,Ee,10,4),hl()),t&2&&(BE(2),Bw(r.configuration.state()==="loading"?2:r.configuration.state()==="error"?3:r.configuration.state()==="disabled"?4:5));},dependencies:[pd,md,Ht,po,ho,lo,fa,ua,hn,fn,un,pn,at,sn,ko,Db,f$1],encapsulation:2})};export{me as NamespaceUsageComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {c}from'./chunk-
|
|
1
|
+
import {c}from'./chunk-WwdM1pqC.js';import {z as k,j as O$1,e as at,c as fn,k as ko,l as Fo,P,B as P$1}from'./chunk-Uf57QzfJ.js';import {g,W,q as F,I as we,$ as $i,ac as by,a2 as ha,aa as br,K as U,N as x,L as w,ai as Ne,al as De,v as vw,E as Es,Q as vg,a as hl,x as xC,j as jw,b as BE,P as dg,c as Bw,t as eC,F as Fg,U as Uw,k as $w,Y as Yw,u as pf,w as hf,l as lg}from'./main-DYDARBQQ.js';var J=(n,t)=>t.key;function O(n,t){if(n&1&&(Es(0,"p",3),xC(1),hl()),n&2){let e=eC();BE(),Fg(e.deletion.error());}}function Y(n,t){n&1&&(Es(0,"p",4),xC(1,"Loading scheduled prompts\u2026"),hl());}function z(n,t){n&1&&(Es(0,"p",5),xC(1,"No scheduled prompts available."),hl());}function G(n,t){n&1&&(Es(0,"p",4),xC(1,"No scheduled prompts match the current filter."),hl());}function Q(n,t){if(n&1&&(Es(0,"span",14),xC(1),hl()),n&2){let e=eC().$implicit;BE(),Fg(e.prompt.description);}}function X(n,t){n&1&&(Es(0,"ds-tag",20),xC(1,"Read-only"),hl());}function Z(n,t){if(n&1){let e=Yw();Es(0,"button",25),vg("click",function(){pf(e);let l=eC(2).$implicit,p=eC(2);return hf(p.toggle(l))}),xC(1),hl(),Es(2,"button",25),vg("click",function(){pf(e);let l=eC(2).$implicit,p=eC(2);return hf(p.edit(l))}),xC(3," Edit "),hl();}if(n&2){let e=eC(2).$implicit;BE(),Fg(e.prompt.enabled?"Disable":"Enable"),BE(),lg("aria-label","Edit "+e.prompt.name);}}function ee(n,t){if(n&1){let e=Yw();jw(0,Z,4,2),Es(1,"agentos-row-delete-action",24),vg("deleteRequested",function(){pf(e);let l=eC().$implicit,p=eC(2);return hf(p.deletion.request(l.key))})("deleteConfirmed",function(){pf(e);let l=eC().$implicit,p=eC(2);return hf(p.confirmDelete(l))})("deleteCancelled",function(){pf(e);let l=eC(3);return hf(l.deletion.cancel())}),hl();}if(n&2){let e=eC().$implicit,i=eC(2);Bw(i.deletion.confirmingId()!==e.key?0:-1),BE(),dg("rowKey",e.key)("rowLabel",e.prompt.name)("state",i.deletion);}}function te(n,t){n&1&&(Es(0,"button",23),xC(1,"Inherited"),hl());}function ne(n,t){if(n&1&&(Es(0,"tr",9)(1,"td",12)(2,"span",13),xC(3),hl(),jw(4,Q,2,1,"span",14),hl(),Es(5,"td",15),xC(6),hl(),Es(7,"td",16)(8,"ds-tag",17),xC(9),hl()(),Es(10,"td",18)(11,"div",19)(12,"ds-tag",17),xC(13),hl(),jw(14,X,2,0,"ds-tag",20),hl()(),Es(15,"td",21)(16,"div",22),jw(17,ee,2,4)(18,te,2,0,"button",23),hl()()()),n&2){let e=t.$implicit,i=eC(2);BE(3),Fg(e.prompt.name),BE(),Bw(e.prompt.description?4:-1),BE(2),Fg(i.scheduleLabel(e.prompt)),BE(2),dg("variant",e.prompt.enabled?"accent":"outline"),BE(),Fg(e.prompt.enabled?"Enabled":"Disabled"),BE(3),dg("variant",e.scope==="platform"?"neutral":"accent"),BE(),Fg(e.scope==="platform"?"Platform":"Namespace"),BE(),Bw(e.scope==="platform"?14:-1),BE(3),Bw(e.scope==="namespace"?17:18);}}function ie(n,t){if(n&1&&(Es(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),xC(5,"Name"),hl(),Es(6,"th",10),xC(7,"Schedule"),hl(),Es(8,"th",10),xC(9,"Status"),hl(),Es(10,"th",10),xC(11,"Scope"),hl(),Es(12,"th",10)(13,"span",11),xC(14,"Actions"),hl()()()(),Es(15,"tbody",8),Uw(16,ne,19,9,"tr",9,J),hl()()()),n&2){let e=eC();BE(16),$w(e.rowFilter.filteredRows());}}var H=class n{route=g(W);router=g(F);destroyRef=g(we);state=g(c);namespaceId=this.route.snapshot.params.namespaceId;rows=$i([]);isLoading=$i(true);deletion=k();rowFilter=O$1(this.rows,t=>[t.prompt.name,t.prompt.description,this.scheduleLabel(t.prompt),t.prompt.enabled?"Enabled":"Disabled",t.scope].filter(Boolean).join(" "));constructor(){by({platform:this.state.listPlatform().pipe(ha(()=>br([]))),namespace:this.state.listByNamespace(this.namespaceId)}).pipe(U(this.destroyRef)).subscribe({next:({platform:t,namespace:e})=>{this.rows.set([...t.map((i,l)=>({key:`platform:${i.id??l}`,prompt:i,scope:"platform"})),...e.map((i,l)=>({key:`namespace:${i.id??l}`,prompt:i,scope:"namespace"}))]),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"scheduled-prompts","new"]);}edit(t){t.scope==="platform"||!t.prompt.id||this.router.navigate(["/agentos",this.namespaceId,"scheduled-prompts",t.prompt.id,"edit"]);}toggle(t){if(t.scope==="platform")return;(t.prompt.enabled?this.state.disable(t.prompt.id??""):this.state.enable(t.prompt.id??"")).pipe(U(this.destroyRef)).subscribe(i=>this.rows.update(l=>l.map(p=>p.key===t.key?x(w({},p),{prompt:i}):p)));}confirmDelete(t){t.scope==="platform"||!t.prompt.id||this.deletion.execute(t.key,{request$:this.state.delete(t.prompt.id).pipe(U(this.destroyRef)),onSuccess:()=>this.rows.update(e=>e.filter(i=>i.key!==t.key)),errorMessage:`Deleting "${t.prompt.name}" failed. Try again.`});}scheduleLabel(t){let e=t.recurrence,i=e.unit===Ne.WEEK?"week":"month",l=e.unit===Ne.WEEK&&e.days?.length?` (${e.days.map(p=>De[p]??p).join(", ")})`:"";return `Every ${i}${l} at ${e.timeUtc} UTC`}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=vw({type:n,selectors:[["agentos-scheduled-prompt-list"]],decls:9,vars:3,consts:[["title","Scheduled prompts","description","Scheduled prompts for this namespace, including schedules inherited from the platform."],["label","Filter scheduled prompts","placeholder","Filter scheduled prompts\u2026",3,"queryChange","query"],["dsButton","","variant","primary","type","button",3,"click"],["role","alert",1,"settings-table__error"],["role","status",1,"settings-table__status"],[1,"settings-table__status"],[1,"settings-table__wrap"],["dsTable","","role","table","aria-label","Scheduled prompts"],["role","rowgroup"],["role","row"],["role","columnheader"],[1,"sr-only"],["role","cell","data-label","Name","data-title",""],[1,"settings-table__name","settings-table__stacked"],[1,"settings-table__secondary","settings-table__stacked"],["role","cell","data-label","Schedule"],["role","cell","data-label","Status"],[3,"variant"],["role","cell","data-label","Scope"],[1,"settings-table__tags"],["variant","outline"],["role","cell","data-label","Actions","data-actions",""],[1,"settings-table__actions"],["type","button","disabled",""],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"deleteRequested","deleteConfirmed","deleteCancelled","rowKey","rowLabel","state"],["type","button",3,"click"]],template:function(e,i){e&1&&(Es(0,"ds-section-header",0)(1,"agentos-table-filter",1),vg("queryChange",function(p){return i.rowFilter.query.set(p)}),hl(),Es(2,"button",2),vg("click",function(){return i.openCreateForm()}),xC(3,"New scheduled prompt"),hl()(),jw(4,O,2,1,"p",3),jw(5,Y,2,0,"p",4)(6,z,2,0,"p",5)(7,G,2,0,"p",4)(8,ie,18,0,"div",6)),e&2&&(BE(),dg("query",i.rowFilter.query()),BE(3),Bw(i.deletion.error()?4:-1),BE(),Bw(i.isLoading()?5:i.rows().length===0?6:i.rowFilter.filteredRows().length===0?7:8));},dependencies:[at,fn,ko,Fo,P,P$1],encapsulation:2})};export{H as ScheduledPromptListComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {z as k$1,
|
|
1
|
+
import {z as k$1,j as O$1,e as at,c as fn,k as ko,P,B as P$1}from'./chunk-Uf57QzfJ.js';import {g,q as F,I as we,aq as k,ap as F$1,Z as Tr,$ as $i,a1 as ga,at as Cy,K as U$1,v as vw,E as Es,Q as vg,a as hl,x as xC,j as jw,b as BE,P as dg,c as Bw,t as eC,F as Fg,U as Uw,k as $w,Y as Yw,u as pf,w as hf,s as Dl,l as lg}from'./main-DYDARBQQ.js';var K=(o,t)=>t.key;function H(o,t){if(o&1&&(Es(0,"p",3),xC(1),hl()),o&2){let e=eC();BE(),Fg(e.deletion.error());}}function U(o,t){o&1&&(Es(0,"p",4),xC(1,"Loading AI models\u2026"),hl());}function z(o,t){o&1&&(Es(0,"p",5),xC(1,"No platform AI models defined yet."),hl());}function G(o,t){o&1&&(Es(0,"p",4),xC(1,"No AI models match the current filter."),hl());}function J(o,t){if(o&1){let e=Yw();Es(0,"button",21),vg("click",function(){pf(e);let r=eC().$implicit,m=eC(2);return hf(m.edit(r))}),xC(1,"Edit"),hl();}if(o&2){let e=eC().$implicit;lg("aria-label","Edit "+e.title);}}function O(o,t){if(o&1){let e=Yw();Es(0,"tr",9)(1,"td",12),xC(2),hl(),Es(3,"td",13),xC(4),hl(),Es(5,"td",14),xC(6),hl(),Es(7,"td",15),xC(8),hl(),Es(9,"td",16),xC(10),hl(),Es(11,"td",17)(12,"div",18),jw(13,J,2,1,"button",19),Es(14,"agentos-row-delete-action",20),vg("deleteRequested",function(){let r=pf(e).$implicit,m=eC(2);return hf(m.deletion.request(r.key))})("deleteConfirmed",function(){let r=pf(e).$implicit,m=eC(2);return hf(m.confirmDelete(r))})("deleteCancelled",function(){pf(e);let r=eC(2);return hf(r.deletion.cancel())}),hl()()()();}if(o&2){let e=t.$implicit,a=eC(2);BE(2),Fg(e.title),BE(2),Fg(e.providerName),BE(2),Dl(" ",e.model.apiModelName," "),BE(2),Fg(e.model.priority),BE(2),Dl(" ",e.model.reasoningEffort?e.model.reasoningEffort.toLowerCase():"\u2014"," "),BE(3),Bw(a.deletion.confirmingId()!==e.key?13:-1),BE(),dg("rowKey",e.key)("rowLabel",e.title)("state",a.deletion);}}function Q(o,t){if(o&1&&(Es(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),xC(5,"Name"),hl(),Es(6,"th",10),xC(7,"Provider"),hl(),Es(8,"th",10),xC(9,"API model name"),hl(),Es(10,"th",10),xC(11,"Priority"),hl(),Es(12,"th",10),xC(13,"Reasoning effort"),hl(),Es(14,"th",10)(15,"span",11),xC(16,"Actions"),hl()()()(),Es(17,"tbody",8),Uw(18,O,15,9,"tr",9,K),hl()()()),o&2){let e=eC();BE(18),$w(e.rowFilter.filteredRows());}}var j=class o{router=g(F);destroyRef=g(we);aiModelController=g(k);aiProviderController=g(F$1);refresh$=new Tr(void 0);isLoading=$i(true);deletion=k$1();rows=$i([]);rowFilter=O$1(this.rows,t=>[t.title,t.model.apiModelName,t.providerName].filter(Boolean).join(" "));constructor(){this.refresh$.pipe(ga(()=>(this.isLoading.set(true),Cy([this.aiModelController.listPlatformLevelAiModel(),this.aiProviderController.listAiProvider("none")]))),U$1(this.destroyRef)).subscribe({next:([t,e])=>{let a=new Map(e.map(r=>[r.id??"",r.name]));this.rows.set(t.map((r,m)=>({key:r.id??`model:${m}`,model:r,title:r.alias??r.apiModelName,providerName:a.get(r.aiProviderId)??r.aiProviderId}))),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}openCreateForm(){this.router.navigate(["/agentos","admin","ai-models","new"]);}edit(t){t.model.id&&this.router.navigate(["/agentos","admin","ai-models",t.model.id,"edit"]);}confirmDelete(t){t.model.id&&this.deletion.execute(t.key,{request$:this.aiModelController.deleteAiModel(t.model.id).pipe(U$1(this.destroyRef)),onSuccess:()=>this.refresh$.next(),errorMessage:`Deleting "${t.title}" failed. Try again.`});}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=vw({type:o,selectors:[["agentos-platform-ai-models"]],decls:9,vars:3,consts:[["title","Platform AI models","description","AI models shared across every namespace."],["label","Filter AI models","placeholder","Filter AI models\u2026",3,"queryChange","query"],["dsButton","","variant","primary","type","button",3,"click"],["role","alert",1,"settings-table__error"],["role","status",1,"settings-table__status"],[1,"settings-table__status"],[1,"settings-table__wrap"],["dsTable","","role","table","aria-label","Platform AI models"],["role","rowgroup"],["role","row"],["role","columnheader"],[1,"sr-only"],["role","cell","data-label","Name","data-title","",1,"settings-table__name"],["role","cell","data-label","Provider"],["role","cell","data-label","API model name",1,"settings-table__secondary"],["role","cell","data-label","Priority"],["role","cell","data-label","Reasoning effort"],["role","cell","data-label","Actions","data-actions",""],[1,"settings-table__actions"],["type","button"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"deleteRequested","deleteConfirmed","deleteCancelled","rowKey","rowLabel","state"],["type","button",3,"click"]],template:function(e,a){e&1&&(Es(0,"ds-section-header",0)(1,"agentos-table-filter",1),vg("queryChange",function(m){return a.rowFilter.query.set(m)}),hl(),Es(2,"button",2),vg("click",function(){return a.openCreateForm()}),xC(3,"New AI model"),hl()(),jw(4,H,2,1,"p",3),jw(5,U,2,0,"p",4)(6,z,2,0,"p",5)(7,G,2,0,"p",4)(8,Q,20,0,"div",6)),e&2&&(BE(),dg("query",a.rowFilter.query()),BE(3),Bw(a.deletion.error()?4:-1),BE(),Bw(a.isLoading()?5:a.rows().length===0?6:a.rowFilter.filteredRows().length===0?7:8));},dependencies:[at,fn,ko,P,P$1],encapsulation:2})};export{j as PlatformAiModelsComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {e}from'./chunk-C6dIhkYp.js';import {O as O$1}from'./chunk-
|
|
1
|
+
import {e}from'./chunk-C6dIhkYp.js';import {O as O$1}from'./chunk-C_TR3rI-.js';import {g,W,I as we,$ as $i,K as U,v as vw,E as Es,f as fg,j as jw,a as hl,b as BE,c as Bw,x as xC,t as eC,F as Fg}from'./main-DYDARBQQ.js';import {b as hn,c as fn,r as rn,D as pn,n as ln,l as Fo}from'./chunk-Uf57QzfJ.js';import'./chunk-CTrUVP-N.js';function O(r,e){r&1&&(Es(0,"p",1),xC(1,"Loading integration\u2026"),hl());}function T(r,e){r&1&&(Es(0,"ds-notice"),xC(1,"Failed to load this integration configuration."),hl());}function L(r,e){r&1&&(Es(0,"div",3)(1,"ds-tag",9),xC(2,"YAML"),hl(),Es(3,"ds-tag",10),xC(4,"Read-only"),hl()());}function k(r,e){if(r&1&&(Es(0,"ds-card",2),jw(1,L,5,0,"div",3),Es(2,"dl",4)(3,"dt"),xC(4,"Name"),hl(),Es(5,"dd"),xC(6),hl(),Es(7,"dt"),xC(8,"Type"),hl(),Es(9,"dd",5),xC(10),hl(),Es(11,"dt"),xC(12,"Description"),hl(),Es(13,"dd"),xC(14),hl(),Es(15,"dt"),xC(16,"Scope"),hl(),Es(17,"dd"),xC(18),hl(),Es(19,"dt"),xC(20,"Source"),hl(),Es(21,"dd"),xC(22),hl(),Es(23,"dt"),xC(24,"Auto grant"),hl(),Es(25,"dd"),xC(26),hl(),Es(27,"dt"),xC(28,"Auth setting"),hl(),Es(29,"dd"),xC(30),hl()()(),Es(31,"ds-card",6)(32,"p",7),xC(33,"Sensitive values are always redacted."),hl(),Es(34,"pre",8),xC(35),hl()()),r&2){let o=e,a=eC();BE(),Bw(a.source()==="FILESYSTEM"?1:-1),BE(5),Fg(o.name),BE(4),Fg(o.integrationType),BE(4),Fg(o.description||"\u2014"),BE(4),Fg(a.scopeOf(o)),BE(4),Fg(a.source()),BE(4),Fg(o.autoGrant?"Enabled":"Disabled"),BE(4),Fg(o.authSettingName||"None"),BE(5),Fg(a.parameters());}}var w="\u2022\u2022\u2022\u2022\u2022\u2022",A=/(?:api[-_]?key|token|secret|password|passphrase|credential|private[-_]?key|client[-_]?secret|authorization|cookie)/i,V=class r{route=g(W);destroyRef=g(we);state=g(O$1);integrationId=this.route.snapshot.params.integrationId;isLoading=$i(true);hasError=$i(false);config=$i(null);source=$i("NEO4J");parameters=$i("{}");ngOnInit(){this.state.getById(this.integrationId).pipe(U(this.destroyRef)).subscribe({next:e$1=>{this.config.set(e$1),this.source.set(e(e$1)),this.parameters.set(JSON.stringify(this.redact(e$1.parameters),null,2)),this.isLoading.set(false);},error:()=>{this.hasError.set(true),this.isLoading.set(false);}});}scopeOf(e){let o=e.userId?e.namespaceId?"userOnNs":"userGlobal":e.namespaceId?"namespace":"platform";return {platform:"Platform",namespace:"Namespace",userOnNs:"Personal on namespace",userGlobal:"Personal global"}[o]}redact(e,o=""){return A.test(o)?w:e===null||typeof e=="boolean"||typeof e=="number"?e:typeof e=="string"?this.containsCredential(e)?w:e:Array.isArray(e)?e.map(a=>this.redact(a,o)):typeof e=="object"?Object.fromEntries(Object.entries(e).map(([a,m])=>[a,this.redact(m,a)])):String(e??"")}containsCredential(e){return /^(?:bearer\s+|basic\s+|sk[-_]|gh[opusr]_|xox[baprs]-|-----begin (?:rsa |ec |openssh )?private key-----)/i.test(e.trim())}static \u0275fac=function(o){return new(o||r)};static \u0275cmp=vw({type:r,selectors:[["agentos-integration-config-view"]],decls:5,vars:1,consts:[["title","Integration configuration"],["role","status",1,"ds-hint"],["heading","General"],[1,"settings-table__tags"],["dsDefinitionList",""],[1,"ds-mono"],["heading","Parameters"],[1,"ds-hint"],[1,"ds-pre"],["variant","neutral"],["variant","outline"]],template:function(o,a){if(o&1&&(Es(0,"ds-page"),fg(1,"ds-section-header",0),jw(2,O,2,0,"p",1)(3,T,2,0,"ds-notice")(4,k,36,9),hl()),o&2){let m;BE(2),Bw(a.isLoading()?2:a.hasError()?3:(m=a.config())?4:-1,m);}},dependencies:[hn,fn,rn,pn,ln,Fo],encapsulation:2})};export{V as IntegrationConfigViewComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {E as m,z as k,j as O$1,e as at,c as fn,k as ko,P,B as P$1}from'./chunk-Uf57QzfJ.js';import {g,q as F,I as we,Z as Tr,$ as $i,a1 as ga,K as U$1,v as vw,E as Es,Q as vg,a as hl,x as xC,j as jw,b as BE,P as dg,c as Bw,t as eC,F as Fg,U as Uw,k as $w,s as Dl,Y as Yw,l as lg,u as pf,w as hf}from'./main-DYDARBQQ.js';var j=(t,e)=>e.id??e.name;function A(t,e){if(t&1&&(Es(0,"p",3),xC(1),hl()),t&2){let n=eC();BE(),Fg(n.deletion.error());}}function K(t,e){t&1&&(Es(0,"p",4),xC(1,"Loading prompts\u2026"),hl());}function H(t,e){t&1&&(Es(0,"p",5),xC(1,"No platform prompts defined yet."),hl());}function U(t,e){t&1&&(Es(0,"p",4),xC(1,"No prompts match the current filter."),hl());}function z(t,e){if(t&1){let n=Yw();Es(0,"button",18),vg("click",function(){pf(n);let m=eC().$implicit,p=eC(2);return hf(p.edit(m))}),xC(1,"Edit"),hl();}if(t&2){let n=eC().$implicit;lg("aria-label","Edit "+n.name);}}function G(t,e){if(t&1){let n=Yw();Es(0,"agentos-row-delete-action",19),vg("deleteRequested",function(){pf(n);let m=eC().$implicit,p=eC(2);return hf(p.deletion.request(m.id))})("deleteConfirmed",function(){pf(n);let m=eC().$implicit,p=eC(2);return hf(p.confirmDelete(m))})("deleteCancelled",function(){pf(n);let m=eC(3);return hf(m.deletion.cancel())}),hl();}if(t&2){let n=eC().$implicit,r=eC(2);dg("rowKey",n.id)("rowLabel",n.name)("state",r.deletion);}}function J(t,e){if(t&1&&(Es(0,"tr",9)(1,"td",12),xC(2),hl(),Es(3,"td",13),xC(4),hl(),Es(5,"td",14)(6,"div",15),jw(7,z,2,1,"button",16),jw(8,G,1,3,"agentos-row-delete-action",17),hl()()()),t&2){let n=e.$implicit,r=eC(2);BE(2),Fg(n.name),BE(2),Dl(" ",n.description||"\u2014"," "),BE(3),Bw(r.deletion.confirmingId()!==n.id?7:-1),BE(),Bw(n.id?8:-1);}}function O(t,e){if(t&1&&(Es(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),xC(5,"Name"),hl(),Es(6,"th",10),xC(7,"Description"),hl(),Es(8,"th",10)(9,"span",11),xC(10,"Actions"),hl()()()(),Es(11,"tbody",8),Uw(12,J,9,4,"tr",9,j),hl()()()),t&2){let n=eC();BE(12),$w(n.rowFilter.filteredRows());}}var B=class t{router=g(F);destroyRef=g(we);promptState=g(m);refresh$=new Tr(void 0);isLoading=$i(true);deletion=k();prompts=$i([]);rowFilter=O$1(this.prompts,e=>[e.name,e.description].filter(Boolean).join(" "));constructor(){this.refresh$.pipe(ga(()=>(this.isLoading.set(true),this.promptState.listPlatform())),U$1(this.destroyRef)).subscribe({next:e=>{this.prompts.set(e),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}openCreateForm(){this.router.navigate(["/agentos","admin","prompts","new"]);}edit(e){e.id&&this.router.navigate(["/agentos","admin","prompts",e.id,"edit"]);}confirmDelete(e){e.id&&this.deletion.execute(e.id,{request$:this.promptState.delete(e.id).pipe(U$1(this.destroyRef)),onSuccess:()=>this.refresh$.next(),errorMessage:`Deleting "${e.name}" failed. Try again.`});}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=vw({type:t,selectors:[["agentos-platform-prompts"]],decls:9,vars:3,consts:[["title","Platform prompts","description","Prompts shared across every namespace."],["label","Filter prompts","placeholder","Filter prompts\u2026",3,"queryChange","query"],["dsButton","","variant","primary","type","button",3,"click"],["role","alert",1,"settings-table__error"],["role","status",1,"settings-table__status"],[1,"settings-table__status"],[1,"settings-table__wrap"],["dsTable","","role","table","aria-label","Platform prompts"],["role","rowgroup"],["role","row"],["role","columnheader"],[1,"sr-only"],["role","cell","data-label","Name","data-title","",1,"settings-table__name"],["role","cell","data-label","Description",1,"settings-table__secondary"],["role","cell","data-label","Actions","data-actions",""],[1,"settings-table__actions"],["type","button"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"rowKey","rowLabel","state"],["type","button",3,"click"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"deleteRequested","deleteConfirmed","deleteCancelled","rowKey","rowLabel","state"]],template:function(n,r){n&1&&(Es(0,"ds-section-header",0)(1,"agentos-table-filter",1),vg("queryChange",function(p){return r.rowFilter.query.set(p)}),hl(),Es(2,"button",2),vg("click",function(){return r.openCreateForm()}),xC(3,"New prompt"),hl()(),jw(4,A,2,1,"p",3),jw(5,K,2,0,"p",4)(6,H,2,0,"p",5)(7,U,2,0,"p",4)(8,O,14,0,"div",6)),n&2&&(BE(),dg("query",r.rowFilter.query()),BE(3),Bw(r.deletion.error()?4:-1),BE(),Bw(r.isLoading()?5:r.prompts().length===0?6:r.rowFilter.filteredRows().length===0?7:8));},dependencies:[at,fn,ko,P,P$1],encapsulation:2})};export{B as PlatformPromptsComponent};
|