@whoz-oss/coday-client 0.0.0-workstream-forge.210 → 0.0.0-workstream-forge.212

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 (59) hide show
  1. package/browser/{chunk-D5NB1BF_.js → chunk-5qL050Ho.js} +1 -1
  2. package/browser/{chunk-DNED6AOD.js → chunk-9Zl9QvzC.js} +1 -1
  3. package/browser/chunk-AnKIcEBN.js +1 -0
  4. package/browser/chunk-BFEhDfVx.js +1 -0
  5. package/browser/{chunk-s_xyr0FP.js → chunk-BH__37CH.js} +1 -1
  6. package/browser/{chunk-D5XtMXVy.js → chunk-Bak9VHah.js} +1 -1
  7. package/browser/chunk-BccNSUmW.js +670 -0
  8. package/browser/{chunk-bqhgjnlz.js → chunk-BpT1O8M6.js} +1 -1
  9. package/browser/{chunk-Oq3ZvW7J.js → chunk-BpgBeyW9.js} +1 -1
  10. package/browser/{chunk-C2gby904.js → chunk-Bu4zvbpm.js} +1 -1
  11. package/browser/{chunk-Cx8YHfi-.js → chunk-BuRCnaZA.js} +1 -1
  12. package/browser/{chunk-CLsQ-Qj2.js → chunk-C-SY3Ro7.js} +1 -1
  13. package/browser/chunk-C0y7XDru.js +1 -0
  14. package/browser/{chunk-DvxsvoBS.js → chunk-CAffA-D6.js} +1 -1
  15. package/browser/{chunk-BjWRad4i.js → chunk-CBqaaBGz.js} +1 -1
  16. package/browser/{chunk-BbxJcgkD.js → chunk-CD3Vm5te.js} +1 -1
  17. package/browser/{chunk-BULaSedZ.js → chunk-CEOSCmN-.js} +1 -1
  18. package/browser/{chunk-DKSd6hBk.js → chunk-CFGszwMS.js} +1 -1
  19. package/browser/{chunk-BJDs9gyo.js → chunk-CTIdnihi.js} +1 -1
  20. package/browser/{chunk-CXONvlNS.js → chunk-CUKpNLw9.js} +1 -1
  21. package/browser/{chunk-4j3XQws2.js → chunk-CVNb6p67.js} +1 -1
  22. package/browser/{chunk-CDvD6jGh.js → chunk-Cbj0V2B1.js} +1 -1
  23. package/browser/{chunk-D4LNa82l.js → chunk-Ce9hfXfk.js} +1 -1
  24. package/browser/chunk-CfMD0s4T.js +1 -0
  25. package/browser/{chunk-C90canit.js → chunk-ChjWUj9t.js} +1 -1
  26. package/browser/{chunk-DBmtA_en.js → chunk-CjNb_wWT.js} +1 -1
  27. package/browser/{chunk-BspzeE1k.js → chunk-D-ael7oB.js} +1 -1
  28. package/browser/chunk-D0OE_PLu.js +1 -0
  29. package/browser/{chunk-DV-Eelxi.js → chunk-DADphpSr.js} +1 -1
  30. package/browser/{chunk-DDmCHZzr.js → chunk-DKhw46F8.js} +1 -1
  31. package/browser/{chunk-06r80pO9.js → chunk-DQNLL8O1.js} +1 -1
  32. package/browser/{chunk-DjYnv-0F.js → chunk-DQm78HQP.js} +1 -1
  33. package/browser/{chunk-lFcHhl6c.js → chunk-DW3xiZN9.js} +1 -1
  34. package/browser/chunk-DWa_DQgR.js +1 -0
  35. package/browser/{chunk-BlT9aAnX.js → chunk-Dn6XURLl.js} +1 -1
  36. package/browser/{chunk-Bo2DjBi6.js → chunk-Duiw2-ff.js} +1 -1
  37. package/browser/{chunk-hWg7zi7S.js → chunk-FLi7fckk.js} +1 -1
  38. package/browser/{chunk-BrPnYn04.js → chunk-J-LjgLCi.js} +1 -1
  39. package/browser/{chunk-CS1D6IqE.js → chunk-MXFO2CUR.js} +1 -1
  40. package/browser/{chunk-CHX9K5YU.js → chunk-Y2mFCBc5.js} +1 -1
  41. package/browser/{chunk-wtijUwLT.js → chunk-_aUfX5al.js} +1 -1
  42. package/browser/chunk-jn4zemij.js +1 -0
  43. package/browser/chunk-nJvzsHku.js +1 -0
  44. package/browser/{chunk-k_VZl2u9.js → chunk-naW0S1QB.js} +1 -1
  45. package/browser/{chunk-DlluG4SU.js → chunk-rAOFDmJ6.js} +1 -1
  46. package/browser/{chunk-C_jGLVKk.js → chunk-xDsKpz8K.js} +1 -1
  47. package/browser/index.html +1 -1
  48. package/browser/main-QSOO7H67.js +1253 -0
  49. package/package.json +1 -1
  50. package/browser/chunk-BLAi8-AH.js +0 -1
  51. package/browser/chunk-Bxu7LsYO.js +0 -1
  52. package/browser/chunk-CA-gmqLK.js +0 -1
  53. package/browser/chunk-CQZDxK4J.js +0 -1
  54. package/browser/chunk-CQkK3pZv.js +0 -1
  55. package/browser/chunk-CU5VTmsN.js +0 -1
  56. package/browser/chunk-Cq4k0Mf8.js +0 -670
  57. package/browser/chunk-UIQNJ87R.js +0 -1
  58. package/browser/chunk-g7uSi0Xp.js +0 -1
  59. package/browser/main-CEEMKDJT.js +0 -1253
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whoz-oss/coday-client",
3
- "version": "0.0.0-workstream-forge.210",
3
+ "version": "0.0.0-workstream-forge.212",
4
4
  "repository": "https://github.com/whoz-oss/coday",
5
5
  "type": "module",
6
6
  "dependencies": {
@@ -1 +0,0 @@
1
- import {f,a4 as id,n as nd,L as Lt,m as mo,b as po,a5 as so,a6 as da,a7 as ra,c as pn,h as hn,d as cn,C as mn,g as at,i as an,I as Io,a8 as f$1}from'./chunk-Cq4k0Mf8.js';import {g,W,aM as Y,U as Ui,ab as ue$1,o as Af,m as mw,aN as pb,D as Ds,l as lg,P as Pw,a as pl,j as jE,L as Lw,ak as md,a1 as fa,a3 as nn,ac as Ty,a2 as da$1,M as MC,q as qw,R as mg,aO as Bg,T as SI,X as Xw,aP as jg,Y as MI,i as Vw,H as Hw,aQ as UC,aR as HC,O as Og,f as cg,av as $C,aw as GC,as as kg,v as vl,aS as WC,r as df,s as ff,aT as kC}from'./main-CEEMKDJT.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&&(Ds(0,"p",2),MC(1,"Loading usage settings\u2026"),pl());}function fe(e,a){if(e&1){let t=qw();Ds(0,"ds-notice"),MC(1,"Could not load usage settings. Please try again."),pl(),Ds(2,"div")(3,"button",3),mg("click",function(){df(t);let s=Xw();return ff(s.configuration.retry())}),MC(4,"Retry usage settings"),pl()();}}function ye(e,a){e&1&&(Ds(0,"p",2),MC(1,"Usage tracking is disabled."),pl());}function be(e,a){e&1&&(Ds(0,"ds-notice"),MC(1),pl()),e&2&&(jE(),Og(a));}function xe(e,a){e&1&&(Ds(0,"p",2),MC(1,"Loading usage\u2026"),pl());}function he(e,a){e&1&&(Ds(0,"p",12),MC(1,"No recorded usage for this period."),pl());}function Se(e,a){if(e&1&&(Ds(0,"p",10),MC(1),pl()),e&2){let t=Xw().$implicit;jE(),vl("",t.aggregate.unknownCostCount," record(s) with unknown cost");}}function we(e,a){if(e&1&&(Ds(0,"tr",16)(1,"td",18),MC(2),pl(),Ds(3,"td",19),MC(4),$C(5,"number"),pl(),Ds(6,"td",20),MC(7),$C(8,"number"),$C(9,"number"),pl(),Ds(10,"td",21),MC(11),$C(12,"number"),$C(13,"number"),pl(),Ds(14,"td",22),MC(15),$C(16,"agentosCost"),Pw(17,Se,2,1,"p",10),pl()()),e&2){let t=a.$implicit;jE(2),Og(t.key),jE(2),Og(GC(5,8,t.aggregate.totalTokens)),jE(3),kg(" ",GC(8,10,t.aggregate.inputTokens)," / ",GC(9,12,t.aggregate.outputTokens)," "),jE(4),kg(" ",GC(12,14,t.aggregate.cacheReadTokens)," / ",GC(13,16,t.aggregate.cacheWriteTokens)," "),jE(4),vl(" ",WC(16,18,t.aggregate.cost,t.aggregate.unknownCostCount)," "),jE(2),Lw(t.aggregate.unknownCostCount>0?17:-1);}}function ve(e,a){if(e&1&&(Ds(0,"div",13)(1,"table",14)(2,"thead",15)(3,"tr",16)(4,"th",17),MC(5,"Name"),pl(),Ds(6,"th",17),MC(7,"Tokens"),pl(),Ds(8,"th",17),MC(9,"Input / output"),pl(),Ds(10,"th",17),MC(11,"Cache read / write"),pl(),Ds(12,"th",17),MC(13,"Estimated cost"),pl()()(),Ds(14,"tbody",15),Vw(15,we,18,21,"tr",16,_e),pl()()()),e&2){let t=Xw().$implicit;jE(),cg("aria-label","Usage "+t.title.toLowerCase()),jE(14),Hw(t.rows);}}function Ne(e,a){if(e&1&&(Ds(0,"h3",11),MC(1),pl(),Pw(2,he,2,0,"p",12)(3,ve,17,1,"div",13)),e&2){let t=a.$implicit;jE(),Og(t.title),jE(),Lw(t.rows.length===0?2:3);}}function Te(e,a){if(e&1&&(Vw(0,Ne,4,2,null,null,ue),Ds(2,"p",10),MC(3," Unpriced usage is kept separate from known costs. Active agent runs appear here after they finish. "),pl()),e&2){let t=Xw(2);Hw(UC(4,ge,HC(0,ce,t.agents()),HC(2,pe,t.models())));}}function Ee(e,a){if(e&1){let t=qw();Ds(0,"form",4),mg("ngSubmit",function(){df(t);let s=Xw();return ff(s.load())}),Ds(1,"ds-form-field",5)(2,"input",6),Bg("ngModelChange",function(s){df(t);let m=Xw();return kC(m.from,s)||(m.from=s),ff(s)}),pl(),SI(),pl(),Ds(3,"ds-form-field",7)(4,"input",8),Bg("ngModelChange",function(s){df(t);let m=Xw();return kC(m.to,s)||(m.to=s),ff(s)}),pl(),SI(),pl(),Ds(5,"button",9),MC(6,"Refresh"),pl()(),Pw(7,be,2,1,"ds-notice"),Pw(8,xe,2,0,"p",2)(9,Te,4,7);}if(e&2){let t,r=Xw();jE(2),jg("ngModel",r.from),MI(),jE(2),jg("ngModel",r.to),MI(),jE(3),Lw((t=r.error())?7:-1,t),jE(),Lw(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=Ui([]);models=Ui([]);error=Ui(null);loading=Ui(false);from=new Date(Date.now()-30*864e5).toISOString().slice(0,10);to=new Date().toISOString().slice(0,10);refresh=new ue$1;constructor(){Af(a=>{if(!this.configuration.enabled())return;let t=this.refresh.pipe(md(void 0),fa(()=>{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),nn):(this.loading.set(true),Ty({agents:this.api.aggregateByAgentUsageRecord(this.namespaceId,r.toISOString(),s.toISOString()),models:this.api.aggregateByModelUsageRecord(this.namespaceId,r.toISOString(),s.toISOString())}).pipe(da$1(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."),nn))))})).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=mw({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&&(Ds(0,"ds-page",0),lg(1,"ds-section-header",1),Pw(2,Ce,2,0,"p",2)(3,fe,5,0)(4,ye,2,0,"p",2)(5,Ee,10,4),pl()),t&2&&(jE(2),Lw(r.configuration.state()==="loading"?2:r.configuration.state()==="error"?3:r.configuration.state()==="disabled"?4:5));},dependencies:[id,nd,Lt,mo,po,so,da,ra,pn,hn,cn,mn,at,an,Io,pb,f$1],encapsulation:2})};export{me as NamespaceUsageComponent};
@@ -1 +0,0 @@
1
- import {f,y,p as pt,T as Te,a as fn,U as Ut,n as nd,L as Lt,k as kn,m as mo,b as po,$ as $r,V as Vn,A as An,c as pn,h as hn,d as cn,e as dn,g as at,i as an}from'./chunk-Cq4k0Mf8.js';import {g,W,F,J,I as Ie,K as KC,U as Ui,o as Af,E as U,G as w,N as x,m as mw,D as Ds,l as lg,P as Pw,a as pl,Q as ug,j as jE,L as Lw,M as MC,q as qw,R as mg,T as SI,X as Xw,Y as MI,f as cg,v as vl,r as df,s as ff}from'./main-CEEMKDJT.js';var ne=/^(\/|[A-Za-z]:[\\/]|\\\\)/;function re(i){return ne.test(i)}function ee(i=()=>true){return t=>{let e=(t.value??"").trim();return !i()||e===""||re(e)?null:{absolutePath:true}}}function ae(i,t){i&1&&(Ds(0,"p",2),MC(1,"Loading\u2026"),pl());}function ie(i,t){if(i&1){let e=qw();Ds(0,"form",4),mg("ngSubmit",function(){df(e);let p=Xw();return ff(p.submit())}),Ds(1,"ds-form-field",5),lg(2,"input",6),SI(),pl(),Ds(3,"ds-form-field",7),lg(4,"textarea",8),SI(),pl(),Ds(5,"ds-form-field",9),lg(6,"input",10),SI(),pl(),Ds(7,"ds-form-field",11),lg(8,"input",12),SI(),pl(),Ds(9,"ds-form-field",13),lg(10,"input",14),SI(),pl(),Ds(11,"ds-form-field",15),lg(12,"input",16),SI(),pl(),Ds(13,"ds-form-field",17),lg(14,"input",18),SI(),pl(),Ds(15,"ds-form-field",19)(16,"input",20),mg("input",function(p){df(e);let oe=Xw();return ff(oe.onMaxToolRoundsInput(p))}),pl(),SI(),pl(),Ds(17,"ds-form-actions")(18,"button",21),MC(19),pl(),Ds(20,"button",22),mg("click",function(){df(e);let p=Xw();return ff(p.cancel())}),MC(21,"Cancel"),pl()()();}if(i&2){let e=Xw();ug("formGroup",e.form),jE(2),ug("formControl",e.nameControl),MI(),jE(2),ug("formControl",e.descriptionControl),MI(),jE(2),ug("formControl",e.externalIdControl),MI(),jE(2),ug("formControl",e.defaultAgentNameControl),MI(),jE(2),ug("formControl",e.configPathControl),MI(),jE(),ug("hint",e.sharedExchangePathHint())("error",e.canEditSharedExchangePath()&&e.sharedExchangePathControl.invalid&&(e.sharedExchangePathControl.dirty||e.sharedExchangePathControl.touched)?"Enter an absolute path (e.g. /home/me/Coday or C:\\Coday), or leave the field empty.":null),jE(),ug("readOnly",!e.canEditSharedExchangePath())("formControl",e.sharedExchangePathControl),cg("aria-invalid",e.canEditSharedExchangePath()&&e.sharedExchangePathControl.invalid),MI(),jE(),ug("hint",e.runCostThresholdHint()),jE(),ug("placeholder",e.runCostThresholdPlaceholder())("formControl",e.runCostThresholdControl),MI(),jE(),ug("error",e.maxToolRoundsUnparsable()||e.maxToolRoundsControl.invalid&&(e.maxToolRoundsControl.dirty||e.maxToolRoundsControl.touched)?"Enter a whole number of at least 1, or leave the field empty.":null),jE(),ug("formControl",e.maxToolRoundsControl),cg("aria-invalid",e.maxToolRoundsControl.invalid||e.maxToolRoundsUnparsable()),MI(),jE(2),ug("disabled",e.form.invalid||e.isSubmitting()),jE(),vl(" ",e.isEditMode()?"Save changes":"Create"," ");}}var le=1,se=2147483647,te=class i{route=g(W);router=g(F);namespaceController=g(J);destroyRef=g(Ie);usageConfiguration=g(f);userState=g(y);canEditSharedExchangePath=KC(()=>this.userState.currentUser()?.isAdmin===true);sharedExchangePathHint=KC(()=>this.canEditSharedExchangePath()?"Absolute path of a folder on the server that holds the files shared by the namespace. Leave empty for the default location.":"Only a super-admin can change this folder.");runCostThresholdPlaceholder=KC(()=>{let t=this.usageConfiguration.runCostThreshold();return this.usageConfiguration.enabled()?t===null?"No platform limit":`Platform default: ${t}`:"Optional maximum cost per run (e.g. 0.50)"});runCostThresholdHint=KC(()=>{let t="Leave empty to inherit the platform default",e=this.usageConfiguration.runCostThreshold();switch(this.usageConfiguration.state()){case "enabled":return e===null?`${t}: no limit.`:`${t} (${e}).`;case "disabled":return `${t}. Cost limits are inactive while usage tracking is disabled.`;default:return `${t}.`}});form=new pt({name:new Te("",{nonNullable:true,validators:[fn.required,fn.minLength(1)]}),description:new Te("",{nonNullable:true}),configPath:new Te("",{nonNullable:true}),sharedExchangePath:new Te("",{nonNullable:true,validators:[ee(()=>this.canEditSharedExchangePath())]}),externalId:new Te("",{nonNullable:true}),defaultAgentName:new Te("",{nonNullable:true}),runCostThreshold:new Te(null),maxToolRounds:new Te(null,{validators:[fn.min(le),fn.max(se),fn.pattern(/^\d+$/)]})});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get configPathControl(){return this.form.controls.configPath}get sharedExchangePathControl(){return this.form.controls.sharedExchangePath}get externalIdControl(){return this.form.controls.externalId}get defaultAgentNameControl(){return this.form.controls.defaultAgentName}get runCostThresholdControl(){return this.form.controls.runCostThreshold}get maxToolRoundsControl(){return this.form.controls.maxToolRounds}maxToolRoundsUnparsable=Ui(false);onMaxToolRoundsInput(t){this.maxToolRoundsUnparsable.set(t.target.validity.badInput);}isEditMode=Ui(false);isSubmitting=Ui(false);isLoading=Ui(false);existingNamespace=null;constructor(){Af(()=>{this.canEditSharedExchangePath(),this.sharedExchangePathControl.updateValueAndValidity();});}ngOnInit(){this.userState.currentUser()||this.userState.loadMe().pipe(U(this.destroyRef)).subscribe({error:()=>{}});let t=this.route.snapshot.paramMap.get("namespaceId")??this.route.parent?.snapshot.paramMap.get("namespaceId");t&&(this.isEditMode.set(true),this.loadNamespace(t));}loadNamespace(t){this.isLoading.set(true),this.namespaceController.getByIdNamespace(t).pipe(U(this.destroyRef)).subscribe({next:e=>{this.existingNamespace=e,this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??""),this.configPathControl.setValue(e.configPath??""),this.sharedExchangePathControl.setValue(e.sharedExchangePath??""),this.externalIdControl.setValue(e.externalId??""),this.defaultAgentNameControl.setValue(e.defaultAgentName??""),this.runCostThresholdControl.setValue(e.runCostThreshold??null),this.maxToolRoundsControl.setValue(e.maxToolRounds??null),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),this.navigateBack();}});}submit(){if(this.form.invalid||this.maxToolRoundsUnparsable()||this.isSubmitting())return;this.isSubmitting.set(true);let t=w(x(w({},this.existingNamespace),{name:this.nameControl.value.trim(),description:this.descriptionControl.value.trim()||void 0,configPath:this.configPathControl.value.trim()||void 0,externalId:this.externalIdControl.value.trim()||void 0,defaultAgentName:this.defaultAgentNameControl.value.trim()||void 0,runCostThreshold:this.runCostThresholdControl.value??void 0,maxToolRounds:this.maxToolRoundsControl.value??void 0}),this.canEditSharedExchangePath()?{sharedExchangePath:this.sharedExchangePathPayload()}:{});(this.isEditMode()?this.namespaceController.updateNamespace(this.existingNamespace.id??"",t):this.namespaceController.createNamespace(t)).pipe(U(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(false)});}sharedExchangePathPayload(){return this.sharedExchangePathControl.value.trim()||(this.existingNamespace?.sharedExchangePath?"":void 0)}cancel(){this.navigateBack();}navigateBack(){this.router.navigate(["/agentos/namespaces"]);}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=mw({type:i,selectors:[["agentos-namespace-form"]],decls:4,vars:3,consts:[[3,"framed"],[3,"title"],[1,"ds-hint"],[1,"ds-form",3,"formGroup"],[1,"ds-form",3,"ngSubmit","formGroup"],["label","Name","controlId","ns-name","required",""],["dsControl","","id","ns-name","type","text","placeholder","Namespace name","autocomplete","off",3,"formControl"],["label","Description","controlId","ns-description"],["dsControl","","id","ns-description","rows","4","placeholder","Optional description",3,"formControl"],["label","External ID","controlId","ns-external-id"],["dsControl","","id","ns-external-id","type","text","placeholder","Optional federation ID from an external system","autocomplete","off",3,"formControl"],["label","Default agent","controlId","ns-default-agent"],["dsControl","","id","ns-default-agent","type","text","placeholder","Logical name of the default agent (e.g. coday)","autocomplete","off",3,"formControl"],["label","Config path","controlId","ns-config-path"],["dsControl","","id","ns-config-path","type","text","placeholder","Optional path to base configuration directory","autocomplete","off",3,"formControl"],["label","Shared files folder","controlId","ns-shared-exchange-path","hintId","ns-shared-exchange-path-hint","errorId","ns-shared-exchange-path-error",3,"hint","error"],["dsControl","","id","ns-shared-exchange-path","type","text","placeholder","Default location managed by AgentOS","aria-describedby","ns-shared-exchange-path-hint","autocomplete","off",3,"readOnly","formControl"],["label","Run cost threshold","controlId","ns-run-cost-threshold","hintId","ns-run-cost-threshold-hint",3,"hint"],["dsControl","","id","ns-run-cost-threshold","type","number","min","0","step","0.01","aria-describedby","ns-run-cost-threshold-hint",3,"placeholder","formControl"],["label","Maximum tool rounds","controlId","ns-max-tool-rounds","hintId","ns-max-tool-rounds-hint","errorId","ns-max-tool-rounds-error","hint","Most tool rounds one agent run may take. Leave empty to inherit the server default. A change applies from the next agent run.",3,"error"],["dsControl","","id","ns-max-tool-rounds","type","number","min","1","step","1","placeholder","Server default","aria-describedby","ns-max-tool-rounds-hint",3,"input","formControl"],["dsButton","","variant","primary","type","submit",3,"disabled"],["dsButton","","type","button",3,"click"]],template:function(e,u){e&1&&(Ds(0,"ds-page",0),lg(1,"ds-section-header",1),Pw(2,ae,2,0,"p",2)(3,ie,22,19,"form",3),pl()),e&2&&(ug("framed",!u.isEditMode()),jE(),ug("title",u.isEditMode()?"Edit namespace":"New namespace"),jE(),Lw(u.isLoading()?2:3));},dependencies:[Ut,nd,Lt,kn,mo,po,$r,Vn,An,pn,hn,cn,dn,at,an],encapsulation:2})};export{te as NamespaceFormComponent};
@@ -1 +0,0 @@
1
- import {e}from'./chunk-C6dIhkYp.js';import {n}from'./chunk-CfgXrte_.js';import {v}from'./chunk-CU5VTmsN.js';import {O}from'./chunk-bqhgjnlz.js';import {g,W as W$1,F,I as Ie,J,U as Ui,E as U$1,ad as ne$1,a1 as fa,aa as Cr,m as mw,D as Ds,R as mg,a as pl,M as MC,P as Pw,Q as ug,j as jE,L as Lw,X as Xw,O as Og,i as Vw,H as Hw,v as vl,q as qw,f as cg,r as df,s as ff}from'./main-CEEMKDJT.js';import {z as k,O as O$1,g as at,h as hn,I as Io,j as ko,P,B as P$1}from'./chunk-Cq4k0Mf8.js';import'./chunk-CQZDxK4J.js';var Q=(n,e)=>e.key;function W(n,e){if(n&1&&(Ds(0,"p",3),MC(1),pl()),n&2){let t=Xw();jE(),Og(t.deletion.error());}}function X(n,e){n&1&&(Ds(0,"p",4),MC(1,"Loading integrations\u2026"),pl());}function Z(n,e){n&1&&(Ds(0,"p",5),MC(1,"No integrations available."),pl());}function ee(n,e){n&1&&(Ds(0,"p",4),MC(1,"No integrations match the current filter."),pl());}function te(n,e){n&1&&(Ds(0,"ds-tag",20),MC(1,"YAML"),pl(),Ds(2,"ds-tag",21),MC(3,"Read-only"),pl());}function ne(n,e){if(n&1){let t=qw();Ds(0,"button",22),mg("click",function(){df(t);let s=Xw().$implicit,c=Xw(2);return ff(c.view(s))}),MC(1,"View"),pl();}if(n&2){let t=Xw().$implicit;cg("aria-label","View "+t.config.name);}}function ie(n,e){if(n&1){let t=qw();Ds(0,"button",22),mg("click",function(){df(t);let s=Xw(3).$implicit,c=Xw(2);return ff(c.edit(s))}),MC(1," Edit "),pl();}if(n&2){let t=Xw(3).$implicit;cg("aria-label","Edit "+t.config.name);}}function oe(n,e){if(n&1){let t=qw();Ds(0,"button",22),mg("click",function(){df(t);let s=Xw(2).$implicit,c=Xw(2);return ff(c.duplicate(s))}),MC(1," Duplicate "),pl(),Pw(2,ie,2,1,"button",19);}if(n&2){let t=Xw(2).$implicit;cg("aria-label","Duplicate "+t.config.name),jE(2),Lw(t.canEdit?2:-1);}}function ae(n,e){if(n&1){let t=qw();Ds(0,"agentos-row-delete-action",25),mg("deleteRequested",function(){df(t);let s=Xw(2).$implicit,c=Xw(2);return ff(c.deletion.request(s.key))})("deleteConfirmed",function(){df(t);let s=Xw(2).$implicit,c=Xw(2);return ff(c.confirmDelete(s))})("deleteCancelled",function(){df(t);let s=Xw(4);return ff(s.deletion.cancel())}),pl();}if(n&2){let t=Xw(2).$implicit,a=Xw(2);ug("rowKey",t.key)("rowLabel",t.config.name)("state",a.deletion);}}function re(n,e){n&1&&(Ds(0,"button",24),MC(1,"Inherited"),pl());}function le(n,e){if(n&1&&(Pw(0,oe,3,2),Pw(1,ae,1,3,"agentos-row-delete-action",23),Pw(2,re,2,0,"button",24)),n&2){let t=Xw().$implicit,a=Xw(2);Lw(a.deletion.confirmingId()!==t.key?0:-1),jE(),Lw(t.canDelete?1:-1),jE(),Lw(!t.canEdit&&!t.canDelete?2:-1);}}function se(n,e){if(n&1&&(Ds(0,"tr",9)(1,"td",12),MC(2),pl(),Ds(3,"td",13),MC(4),pl(),Ds(5,"td",14)(6,"div",15)(7,"ds-tag",16),MC(8),pl(),Pw(9,te,4,0),pl()(),Ds(10,"td",17)(11,"div",18),Pw(12,ne,2,1,"button",19)(13,le,3,3),pl()()()),n&2){let t=e.$implicit;jE(2),Og(t.config.name),jE(2),vl(" ",t.config.integrationType," "),jE(3),ug("variant",t.scopeLabel==="Platform"?"neutral":t.scopeLabel==="Personal"?"outline":"accent"),jE(),vl(" ",t.scopeLabel," "),jE(),Lw(t.source==="FILESYSTEM"?9:-1),jE(3),Lw(t.source==="FILESYSTEM"?12:13);}}function ce(n,e){if(n&1&&(Ds(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),MC(5,"Name"),pl(),Ds(6,"th",10),MC(7,"Type"),pl(),Ds(8,"th",10),MC(9,"Scope"),pl(),Ds(10,"th",10)(11,"span",11),MC(12,"Actions"),pl()()()(),Ds(13,"tbody",8),Vw(14,se,14,6,"tr",9,Q),pl()()()),n&2){let t=Xw();jE(14),Hw(t.rowFilter.filteredRows());}}var U=class n$1{route=g(W$1);router=g(F);destroyRef=g(Ie);state=g(O);namespaceRole=g(v);namespaceApi=g(J);namespaceId=this.route.snapshot.params.namespaceId;namespaceName=Ui("this namespace");isAdmin=Ui(false);isLoading=Ui(true);rows=Ui([]);deletion=k();rowFilter=O$1(this.rows,e=>[e.config.name,e.config.integrationType,e.scopeLabel,e.source].join(" "));ngOnInit(){this.state.setNamespace(this.namespaceId),this.namespaceId&&this.namespaceApi.getByIdNamespace(this.namespaceId).pipe(U$1(this.destroyRef)).subscribe({next:e=>this.namespaceName.set(e.name)}),this.route.paramMap.pipe(ne$1(e=>e.get("namespaceId")??""),fa(e=>e?this.namespaceRole.isAdminOfNamespace$(e):Cr(false)),U$1(this.destroyRef)).subscribe(e=>this.isAdmin.set(e)),this.state.vm$.pipe(U$1(this.destroyRef)).subscribe({next:e=>{this.rows.set(this.toRows(e)),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"integrations","new"],{queryParams:{scope:n(this.isAdmin())}});}view(e){e.config.id&&this.router.navigate(["/agentos",this.namespaceId,"integrations",e.config.id,"view"]);}edit(e){!e.canEdit||!e.config.id||this.router.navigate(["/agentos",this.namespaceId,"integrations",e.config.id,"edit"],{queryParams:{scope:e.scope}});}duplicate(e){if(e.source==="FILESYSTEM"||!e.config.id)return;let a=(e.scope==="platform"||e.scope==="namespace")&&!this.isAdmin()?"userOnNs":e.scope;this.router.navigate(["/agentos",this.namespaceId,"integrations","new"],{queryParams:{scope:a,template:e.config.id,templateScope:e.scope}});}confirmDelete(e){!e.canDelete||!e.config.id||this.deletion.execute(e.key,{request$:this.state.delete(e.config.id,e.scope).pipe(U$1(this.destroyRef)),errorMessage:`Deleting "${e.config.name}" failed. Try again.`});}toRows(e){return [...this.mapScope(e.platform,"platform","Platform",true),...this.mapScope(e.namespace,"namespace","Namespace",!this.isAdmin()),...this.mapScope(e.userOnNs,"userOnNs","Personal",false),...this.mapScope(e.userGlobal,"userGlobal","Personal",false)]}mapScope(e$1,t,a,s){return e$1.map((c,z)=>{let h=e(c),w=h==="NEO4J"&&!s;return {key:`${t}:${c.id??z}`,config:c,scope:t,scopeLabel:a,source:h,canEdit:w,canDelete:w}})}static \u0275fac=function(t){return new(t||n$1)};static \u0275cmp=mw({type:n$1,selectors:[["agentos-integrations-all-scopes"]],decls:9,vars:4,consts:[["title","Integrations",3,"description"],["label","Filter integrations","placeholder","Filter integrations\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","Integrations"],["role","rowgroup"],["role","row"],["role","columnheader"],[1,"sr-only"],["role","cell","data-label","Name","data-title","",1,"settings-table__name"],["role","cell","data-label","Type",1,"settings-table__secondary"],["role","cell","data-label","Scope"],[1,"settings-table__tags"],[3,"variant"],["role","cell","data-label","Actions","data-actions",""],[1,"settings-table__actions"],["type","button"],["variant","neutral"],["variant","outline"],["type","button",3,"click"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"rowKey","rowLabel","state"],["type","button","disabled",""],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"deleteRequested","deleteConfirmed","deleteCancelled","rowKey","rowLabel","state"]],template:function(t,a){t&1&&(Ds(0,"ds-section-header",0)(1,"agentos-table-filter",1),mg("queryChange",function(c){return a.rowFilter.query.set(c)}),pl(),Ds(2,"button",2),mg("click",function(){return a.openCreateForm()}),MC(3,"New integration"),pl()(),Pw(4,W,2,1,"p",3),Pw(5,X,2,0,"p",4)(6,Z,2,0,"p",5)(7,ee,2,0,"p",4)(8,ce,16,0,"div",6)),t&2&&(ug("description","Integrations for "+a.namespaceName()+", including entries inherited from the platform."),jE(),ug("query",a.rowFilter.query()),jE(3),Lw(a.deletion.error()?4:-1),jE(),Lw(a.isLoading()?5:a.rows().length===0?6:a.rowFilter.filteredRows().length===0?7:8));},dependencies:[at,hn,Io,ko,P,P$1],encapsulation:2})};export{U as IntegrationsAllScopesComponent};
@@ -1 +0,0 @@
1
- import {a1 as fa,a2 as da,aa as Cr,aD as Uy}from'./main-CEEMKDJT.js';function i(t,o,p){return t.pipe(fa(()=>o().pipe(da(()=>Cr(p)))),Uy({bufferSize:1,refCount:true}))}export{i};
@@ -1 +0,0 @@
1
- import {c as pn,h as hn,o as on,C as mn,g as at,q as sn,K as Oi,M as On}from'./chunk-Cq4k0Mf8.js';import {g,W as W$1,F,I as Ie,ag as U,U as Ui,K as KC,E as U$1,m as mw,au as $t,D as Ds,R as mg,M as MC,a as pl,P as Pw,j as jE,Q as ug,L as Lw,X as Xw,O as Og,S as Sg,v as vl,i as Vw,H as Hw,q as qw,l as lg,av as $C,aw as GC,r as df,s as ff,ax as ZD}from'./main-CEEMKDJT.js';var j=(t,n)=>n.id,z=(t,n)=>n.name;function q(t,n){t&1&&(Ds(0,"p",3),MC(1,"Loading\u2026"),pl());}function Q(t,n){t&1&&(Ds(0,"ds-notice"),MC(1,"Failed to load agent definition."),pl());}function W(t,n){if(t&1&&(Ds(0,"dt"),MC(1,"User context"),pl(),Ds(2,"dd",6),MC(3),pl()),t&2){let e=Xw();jE(3),Og(e.userId);}}function X(t,n){if(t&1){let e=qw();Ds(0,"ds-card")(1,"ds-disclosure",12),mg("toggled",function(){df(e);let m=Xw(2);return ff(m.toggleSystemPrompt())}),Ds(2,"pre",13),MC(3),pl()()();}if(t&2){let e=Xw(),r=Xw();jE(),ug("open",!r.systemPromptCollapsed()),jE(2),Og(e.systemPrompt);}}function Y(t,n){if(t&1){let e=qw();Ds(0,"ds-card")(1,"ds-disclosure",14),mg("toggled",function(){df(e);let m=Xw(2);return ff(m.toggleInstructions())}),Ds(2,"pre",13),MC(3),pl()()();}if(t&2){let e=Xw(),r=Xw();jE(),ug("open",!r.instructionsCollapsed()),jE(2),Og(e.instructions);}}function Z(t,n){t&1&&(Ds(0,"p",3),MC(1," This agent declares no skill, so it gets no skill tools. Attach skills from the edit form. "),pl());}function ee(t,n){t&1&&(Ds(0,"span",17),MC(1,"platform"),pl());}function te(t,n){t&1&&(Ds(0,"span",17),MC(1,"SKILL.md"),pl());}function ne(t,n){if(t&1&&(Ds(0,"li",15)(1,"span")(2,"span",16),MC(3),pl(),Pw(4,ee,2,0,"span",17),Pw(5,te,2,0,"span",17),pl(),Ds(6,"p",3),MC(7),pl()()),t&2){let e=n.$implicit;jE(3),Og(e.name),jE(),Lw(e.namespaceId?-1:4),jE(),Lw(e.readOnly?5:-1),jE(2),Og(e.description);}}function ie(t,n){if(t&1&&(Ds(0,"ul",11),Vw(1,ne,8,4,"li",15,j),pl()),t&2){let e=Xw(2);jE(),Hw(e.resolvedSkills());}}function oe(t,n){t&1&&(Ds(0,"p",3),MC(1,"No tools available for this agent."),pl());}function ae(t,n){if(t&1&&(lg(0,"div",19),$C(1,"agentosMarkdown")),t&2){let e=Xw().$implicit;ug("innerHTML",GC(1,1,e.description),ZD);}}function de(t,n){if(t&1){let e=qw();Ds(0,"li")(1,"ds-disclosure",18),mg("toggled",function(){let m=df(e).$implicit,U=Xw(3);return ff(U.toggleTool(m))}),Pw(2,ae,2,3,"div",19),Ds(3,"pre",20),MC(4),pl()()();}if(t&2){let e=n.$implicit,r=Xw(3);jE(),ug("heading",e.name)("open",r.isToolExpanded(e)),jE(),Lw(e.description?2:-1),jE(2),Og(r.formatSchema(e.inputSchema));}}function re(t,n){if(t&1&&(Ds(0,"ul",11),Vw(1,de,5,4,"li",null,z),pl()),t&2){let e=Xw();jE(),Hw(e.tools);}}function se(t,n){if(t&1&&(Ds(0,"ds-card",4)(1,"dl",5)(2,"dt"),MC(3,"Name"),pl(),Ds(4,"dd"),MC(5),pl(),Ds(6,"dt"),MC(7,"Resolved model"),pl(),Ds(8,"dd",6),MC(9),pl(),Ds(10,"dt"),MC(11,"Provider"),pl(),Ds(12,"dd"),MC(13),pl(),Ds(14,"dt",7),MC(15,"Execution mode"),pl(),Ds(16,"dd",8)(17,"span",9),MC(18),pl()(),Pw(19,W,4,1),pl()(),Pw(20,X,4,2,"ds-card"),Pw(21,Y,4,2,"ds-card"),Ds(22,"ds-card",10),Pw(23,Z,2,0,"p",3)(24,ie,3,0,"ul",11),pl(),Ds(25,"ds-card",10),Pw(26,oe,2,0,"p",3)(27,re,3,0,"ul",11),pl()),t&2){let e=n,r=Xw();jE(5),Og(e.name),jE(4),Og(e.resolvedModelApiName),jE(4),Og(e.resolvedProviderName),jE(4),Sg("agent-config-inspect__badge--active",e.executionMode!=="SIMPLE"),jE(),vl(" ",e.executionMode," "),jE(),Lw(e.userId?19:-1),jE(),Lw(e.systemPrompt?20:-1),jE(),Lw(e.instructions?21:-1),jE(),ug("heading","Skills ("+r.resolvedSkills().length+")"),jE(),Lw(r.resolvedSkills().length===0?23:24),jE(2),ug("heading","Tools ("+e.tools.length+")"),jE(),Lw(e.tools.length===0?26:27);}}var K=class t{route=g(W$1);router=g(F);destroyRef=g(Ie);agentConfigController=g(U);namespaceId=this.route.snapshot.params.namespaceId;agentConfigId=this.route.snapshot.params.agentConfigId;isPlatformMode=!this.namespaceId;isLoading=Ui(true);hasError=Ui(false);definition=Ui(null);expandedTools=Ui(new Set);resolvedSkills=KC(()=>this.definition()?.skills??[]);systemPromptCollapsed=Ui(true);instructionsCollapsed=Ui(true);ngOnInit(){this.agentConfigController.getDefinitionAgentConfig(this.agentConfigId).pipe(U$1(this.destroyRef)).subscribe({next:n=>{this.definition.set(n),this.isLoading.set(false);},error:()=>{this.hasError.set(true),this.isLoading.set(false);}});}toggleTool(n){this.expandedTools.update(e=>{let r=new Set(e);return r.has(n.name)?r.delete(n.name):r.add(n.name),r});}isToolExpanded(n){return this.expandedTools().has(n.name)}toggleSystemPrompt(){this.systemPromptCollapsed.update(n=>!n);}toggleInstructions(){this.instructionsCollapsed.update(n=>!n);}formatSchema(n){try{return JSON.stringify(JSON.parse(n),null,2)}catch(e){return n}}editRoute(){return this.isPlatformMode?["/agentos","admin","agent-configs",this.agentConfigId,"edit"]:["/agentos",this.namespaceId,"agent-configs",this.agentConfigId,"edit"]}back(){this.isPlatformMode?this.router.navigate(["/agentos","admin","agent-configs"]):this.router.navigate(["/agentos",this.namespaceId,"agent-configs"]);}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=mw({type:t,selectors:[["agentos-agent-config-inspect"]],decls:9,vars:2,consts:[["title","Agent definition"],["dsButton","","variant","ghost","type","button","title","Back to agent configs",3,"click"],["headerMeta","",1,"ds-link",3,"routerLink"],[1,"ds-hint"],["heading","General"],["dsDefinitionList",""],[1,"ds-mono"],[1,"agent-config-inspect__dt"],[1,"agent-config-inspect__dd"],[1,"agent-config-inspect__badge"],[3,"heading"],[1,"ds-list"],["heading","System Prompt",3,"toggled","open"],[1,"ds-pre","ds-pre--prose"],["heading","Instructions",3,"toggled","open"],[1,"ds-stack","ds-stack--sm"],[1,"ds-strong"],[1,"ds-meta"],["bordered","","mono","",3,"toggled","heading","open"],[1,"ds-prose","ds-hint",3,"innerHTML"],[1,"ds-pre"]],template:function(e,r){if(e&1&&(Ds(0,"ds-page")(1,"ds-section-header",0)(2,"button",1),mg("click",function(){return r.back()}),MC(3," \u2190 Agent configs "),pl(),Ds(4,"a",2),MC(5,"Edit config \u2192"),pl()(),Pw(6,q,2,0,"p",3)(7,Q,2,0,"ds-notice")(8,se,28,13),pl()),e&2){let m;jE(4),ug("routerLink",r.editRoute()),jE(2),Lw(r.isLoading()?6:r.hasError()?7:(m=r.definition())?8:-1,m);}},dependencies:[$t,pn,hn,on,mn,at,sn,Oi,On],encapsulation:2})};export{K as AgentConfigInspectComponent};
@@ -1 +0,0 @@
1
- import {y}from'./chunk-Cq4k0Mf8.js';import {g,aB as ie,aC as T,aa as Cr,a1 as fa,ad as ne,a2 as da,aD as Uy,a6 as x}from'./main-CEEMKDJT.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};