local-operator-ui 0.48.9 → 0.48.11
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/out/main/index.js +380 -10
- package/out/preload/index.js +27 -1
- package/out/renderer/assets/{_basePickBy-BrJLYb4T.js → _basePickBy-DFl9DUra.js} +1 -1
- package/out/renderer/assets/{_baseUniq-D4mSwrlQ.js → _baseUniq-BFXgChF-.js} +1 -1
- package/out/renderer/assets/{agent-details-page-CbjF1p-x.js → agent-details-page-06GRVXIX.js} +1 -1
- package/out/renderer/assets/agent-hub-page-BhNxrhRu.js +7 -0
- package/out/renderer/assets/{agents-page-C8DF6WEB.js → agents-page-CP7SXJ9K.js} +3 -3
- package/out/renderer/assets/{approvalsOverlay-NqmT7Gy7.js → approvalsOverlay-uvA-Vt5X.js} +1 -1
- package/out/renderer/assets/{arc-BT5GABpA.js → arc-DWqWEzi9.js} +1 -1
- package/out/renderer/assets/{architectureDiagram-IEHRJDOE-DRMI1Kxa.js → architectureDiagram-IEHRJDOE-DJogjK0_.js} +1 -1
- package/out/renderer/assets/{avatar-cropper-DP28zLSa.js → avatar-cropper-SiLxEcIt.js} +1 -1
- package/out/renderer/assets/{blockDiagram-JOT3LUYC-f1phpXYY.js → blockDiagram-JOT3LUYC-BjxLHnNm.js} +1 -1
- package/out/renderer/assets/{book-open-C6N2c20S.js → book-open-BastYhxp.js} +1 -1
- package/out/renderer/assets/browser-page-DW2cfBgD.js +1 -0
- package/out/renderer/assets/{browser-webauthn-prompt-CukTyqMG.js → browser-webauthn-prompt-C6vFP_2I.js} +1 -1
- package/out/renderer/assets/{building-2-DF06I7ZK.js → building-2-Dx-eOoNu.js} +1 -1
- package/out/renderer/assets/{c4Diagram-VJAJSXHY-D7MnkQ0Z.js → c4Diagram-VJAJSXHY-441IwSem.js} +1 -1
- package/out/renderer/assets/channel-BdCrQtc5.js +1 -0
- package/out/renderer/assets/{chunk-4BMEZGHF-BtSV2a-3.js → chunk-4BMEZGHF-DE74Ocw-.js} +1 -1
- package/out/renderer/assets/{chunk-A2AXSNBT-dKmHq0fi.js → chunk-A2AXSNBT-CvfIskY0.js} +1 -1
- package/out/renderer/assets/{chunk-AEK57VVT-B_szap42.js → chunk-AEK57VVT-Dg9iMQSH.js} +1 -1
- package/out/renderer/assets/{chunk-D6G4REZN-NJY3151z.js → chunk-D6G4REZN-B_1yVGsA.js} +1 -1
- package/out/renderer/assets/{chunk-RZ5BOZE2-0yNCkUsG.js → chunk-RZ5BOZE2-zoNgiWzT.js} +1 -1
- package/out/renderer/assets/{chunk-XZIHB7SX-DvHVXmQ6.js → chunk-XZIHB7SX-D9i0ySOq.js} +1 -1
- package/out/renderer/assets/classDiagram-GIVACNV2-CCQ8PKyo.js +1 -0
- package/out/renderer/assets/classDiagram-v2-COTLJTTW-CCQ8PKyo.js +1 -0
- package/out/renderer/assets/clone-f_ugKI_v.js +1 -0
- package/out/renderer/assets/{console-mirror-Bav1-Thd.js → console-mirror-Bd9dWCOG.js} +1 -1
- package/out/renderer/assets/{consoleCapture-CuO2rVRs.js → consoleCapture-DcDxwgX5.js} +1 -1
- package/out/renderer/assets/{conversation-input-sync-BEAazUG8.js → conversation-input-sync-CE4opxo_.js} +60 -60
- package/out/renderer/assets/{dagre-OKDRZEBW-CcxdCaAH.js → dagre-OKDRZEBW-7-fIaqjt.js} +1 -1
- package/out/renderer/assets/{diagram-SSKATNLV-BfogV9uv.js → diagram-SSKATNLV-Bu5ERF6Y.js} +1 -1
- package/out/renderer/assets/{diagram-VNBRO52H-B75pNRm0.js → diagram-VNBRO52H-B-e-zp3r.js} +1 -1
- package/out/renderer/assets/{erDiagram-Q7BY3M3F-1SnY73tT.js → erDiagram-Q7BY3M3F-BjrAWWSl.js} +1 -1
- package/out/renderer/assets/{error-boundary-U4l7SQDe.js → error-boundary-tDOEWhiX.js} +1 -1
- package/out/renderer/assets/{flowDiagram-4HSFHLVR-BHHIi0W_.js → flowDiagram-4HSFHLVR-D2brvAPw.js} +1 -1
- package/out/renderer/assets/{ganttDiagram-APWFNJXF-DPXXR3cx.js → ganttDiagram-APWFNJXF-DxYUXrbN.js} +1 -1
- package/out/renderer/assets/{gitGraphDiagram-7IBYFJ6S-BPmn7RVy.js → gitGraphDiagram-7IBYFJ6S-CjAVMnY8.js} +1 -1
- package/out/renderer/assets/{graph-CJ1LxxKv.js → graph-BdY3-j0d.js} +1 -1
- package/out/renderer/assets/{hash-BFK9ukMz.js → hash-B9N1GlDG.js} +1 -1
- package/out/renderer/assets/{heart-BjPt7o_G.js → heart-i5FtUp5a.js} +1 -1
- package/out/renderer/assets/{image-plus-CUBNruLy.js → image-plus-BirRYtMz.js} +1 -1
- package/out/renderer/assets/{index-rd0Eebgk.js → index-BJiRq-wv.js} +1 -1
- package/out/renderer/assets/{index-BZAvUyjF.js → index-BuL7blPm.js} +92 -92
- package/out/renderer/assets/{index-ChVea9Ww.js → index-CtJjbyMh.js} +1 -1
- package/out/renderer/assets/{index-B8IMuQlY.js → index-kR82CvO6.js} +1 -1
- package/out/renderer/assets/infoDiagram-PH2N3AL5-DznqNbQh.js +2 -0
- package/out/renderer/assets/{installer-jkueFnu7.js → installer-D9ByBu_L.js} +1 -1
- package/out/renderer/assets/{journeyDiagram-U35MCT3I-Bss1ikTs.js → journeyDiagram-U35MCT3I-QMTzkgUq.js} +1 -1
- package/out/renderer/assets/{kanban-definition-NDS4AKOZ-Bm6c0ooC.js → kanban-definition-NDS4AKOZ-BZCdzOwT.js} +1 -1
- package/out/renderer/assets/{layout-B5masxZD.js → layout-DWrxkrqR.js} +1 -1
- package/out/renderer/assets/{legacy-agents-page-Br0jJ_s5.js → legacy-agents-page-DS_1qW0s.js} +1 -1
- package/out/renderer/assets/{library-page-B89BTeCN.js → library-page-DHdIJjSi.js} +3 -3
- package/out/renderer/assets/{mermaid.core-zfWZbfQ4.js → mermaid.core-Ddb6Ozxy.js} +5 -5
- package/out/renderer/assets/{mesh-page-D22GYqwj.js → mesh-page-CcCqLeLA.js} +1 -1
- package/out/renderer/assets/{messages-CJNV_HV3.js → messages-aMLMjoGD.js} +10 -10
- package/out/renderer/assets/{mindmap-definition-ALO5MXBD-COYBT7eY.js → mindmap-definition-ALO5MXBD-BAFH5vG2.js} +1 -1
- package/out/renderer/assets/{mini-BQshvcaz.js → mini-CMXTYZwX.js} +1 -1
- package/out/renderer/assets/{notebook-pen-BybZxEA1.js → notebook-pen-QStzGWXW.js} +1 -1
- package/out/renderer/assets/{notifications-page-CFz-id6w.js → notifications-page-DBnBg_1b.js} +1 -1
- package/out/renderer/assets/org-access-udExX9j1.js +1 -0
- package/out/renderer/assets/{org-surface-gate-DpHxALJ4.js → org-surface-gate-CFYdT64x.js} +1 -1
- package/out/renderer/assets/{page-header-DkesqHl0.js → page-header--Egdzoex.js} +1 -1
- package/out/renderer/assets/{path-utils-DGCOWnfc.js → path-utils-Bblb7gI2.js} +2 -2
- package/out/renderer/assets/{pieDiagram-IB7DONF6-XK3d1OA2.js → pieDiagram-IB7DONF6-CEnUlb7r.js} +1 -1
- package/out/renderer/assets/{project-markdown-zjpMO3Gg.js → project-markdown-BeCCWkWe.js} +1 -1
- package/out/renderer/assets/{projects-page-YT6OQVqc.js → projects-page-CMs95LiG.js} +1 -1
- package/out/renderer/assets/{publication-validation-BRwWedrQ.js → publication-validation-CNvZfxkg.js} +1 -1
- package/out/renderer/assets/{quadrantDiagram-7GDLP6J5-B2PwWnaP.js → quadrantDiagram-7GDLP6J5-CLx--S0a.js} +1 -1
- package/out/renderer/assets/{radar-MK3ICKWK-nn27xy2f.js → radar-MK3ICKWK-C8jcJ5ii.js} +1 -1
- package/out/renderer/assets/{radient-auth-buttons-DHKxs1d1.js → radient-auth-buttons-BI81mlJp.js} +1 -1
- package/out/renderer/assets/{requirementDiagram-KVF5MWMF-CozxDAEw.js → requirementDiagram-KVF5MWMF-2LA0Av1t.js} +1 -1
- package/out/renderer/assets/{sankeyDiagram-QLVOVGJD-WhAEFEQI.js → sankeyDiagram-QLVOVGJD-Bwmm_Kef.js} +1 -1
- package/out/renderer/assets/{schedules-page-DCZEM9eG.js → schedules-page-B7_dMaKI.js} +1 -1
- package/out/renderer/assets/{sequenceDiagram-X6HHIX6F-BuWDmszd.js → sequenceDiagram-X6HHIX6F-BnAqkczN.js} +1 -1
- package/out/renderer/assets/{settings-page-CJfg-KSC.js → settings-page-BeBT1IGZ.js} +1 -1
- package/out/renderer/assets/{smartart-D3P9bzk8.js → smartart-DWRhh-lL.js} +1 -1
- package/out/renderer/assets/{stateDiagram-DGXRK772-gmhylj0S.js → stateDiagram-DGXRK772-zu2cJm7e.js} +1 -1
- package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-DqDAuirF.js +1 -0
- package/out/renderer/assets/{team-bridge-page-CcC0oOZR.js → team-bridge-page-qwUYdzut.js} +22 -17
- package/out/renderer/assets/{team-bridge-scope-preference-Bt4n7SfB.js → team-bridge-scope-preference-DlgQcIzl.js} +1 -1
- package/out/renderer/assets/{timeline-definition-BDJGKUSR-CQlct0d5.js → timeline-definition-BDJGKUSR-B3CNpgws.js} +1 -1
- package/out/renderer/assets/{use-download-agent-mutation-B-0ZBmeP.js → use-download-agent-mutation-BtMBnbn8.js} +1 -1
- package/out/renderer/assets/{use-session-snapshot-CPqiydG3.js → use-session-snapshot-B1ZwqarE.js} +1 -1
- package/out/renderer/assets/{xychartDiagram-VJFVF3MP-BMqlBKVU.js → xychartDiagram-VJFVF3MP-C22FKAwz.js} +1 -1
- package/out/renderer/browser-approvals-overlay.html +2 -2
- package/out/renderer/console-capture.html +5 -5
- package/out/renderer/index.html +7 -7
- package/out/renderer/installer.html +4 -4
- package/out/renderer/mini.html +7 -7
- package/package.json +1 -1
- package/out/renderer/assets/agent-hub-page-BBlSLUl0.js +0 -6
- package/out/renderer/assets/browser-page-CnZmQT4v.js +0 -1
- package/out/renderer/assets/channel-BDcjJsnd.js +0 -1
- package/out/renderer/assets/classDiagram-GIVACNV2-OaYGoZlH.js +0 -1
- package/out/renderer/assets/classDiagram-v2-COTLJTTW-OaYGoZlH.js +0 -1
- package/out/renderer/assets/clone-Dza364EK.js +0 -1
- package/out/renderer/assets/infoDiagram-PH2N3AL5-DPKODfdJ.js +0 -2
- package/out/renderer/assets/org-access-C2FrjDL5.js +0 -1
- package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-BmRAaDMA.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,j as t,c as h}from"./index-
|
|
1
|
+
import{r as o,j as t,c as h}from"./index-kR82CvO6.js";import{N as w,u as N,d as I}from"./index-BuL7blPm.js";import{u as S,A as E,q as A,B as y,X as k}from"./error-boundary-tDOEWhiX.js";import{t as i}from"./messages-aMLMjoGD.js";import{s as B}from"./path-utils-Bblb7gI2.js";import{aT as m,aU as j,aV as D}from"./conversation-input-sync-CE4opxo_.js";let _;function J(e){_=e}function K(e){const n=_===e;return _=void 0,n}const V=({consentText:e,pending:n,failure:s,onTurnOff:a,onDismiss:r,defaultExpanded:d=!1})=>{S();const[c,b]=o.useState(d),u=o.useId(),g=o.useId(),f=n!==null,l=n==="turn_off";return t.jsx("section",{"data-agent-messages-banner":"default-on","aria-label":i("ui.agentMessages.banner.title"),children:t.jsx(E,{variant:"info",className:h(w,"items-start border-transparent"),children:t.jsxs("div",{className:"flex w-full min-w-0 flex-col gap-2",children:[t.jsxs("div",{className:"flex w-full min-w-0 items-start gap-3",children:[t.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[t.jsx(A,{children:i("ui.agentMessages.banner.title")}),t.jsx("p",{className:"text-body-sm text-ink-muted",children:i("ui.agentMessages.banner.body")})]}),t.jsx(y,{variant:"ghost",size:"icon-sm",className:"shrink-0 text-ink-muted","aria-label":i("ui.agentMessages.banner.dismiss"),disabled:f,onClick:r,"data-agent-messages-banner-action":"dismiss",children:t.jsx(k,{"aria-hidden":"true"})})]}),t.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[t.jsx(y,{variant:"secondary",size:"sm",disabled:f,onClick:a,"aria-describedby":g,"data-agent-messages-banner-action":"turn_off",children:t.jsxs("span",{className:"grid",children:[t.jsx("span",{className:h("col-start-1 row-start-1",l&&"invisible"),"aria-hidden":l,children:i("ui.agentMessages.banner.turn_off")}),t.jsx("span",{className:h("col-start-1 row-start-1",!l&&"invisible"),"aria-hidden":!l,children:i("ui.agentMessages.banner.turning_off")})]})}),t.jsx(y,{variant:"ghost",size:"sm",className:"text-ink","aria-expanded":c,"aria-controls":c?u:void 0,onClick:()=>b(x=>!x),"data-agent-messages-banner-action":"read",children:c?i("ui.agentMessages.banner.hide"):i("ui.agentMessages.banner.read")}),t.jsx("span",{id:g,className:"text-pretty text-meta text-ink-muted",children:i("ui.agentMessages.banner.turn_off_hint")})]}),c&&t.jsx("section",{id:u,className:"rounded-md bg-sunken p-3 @max-[1024px]/bridge:max-h-[35dvh] @max-[1024px]/bridge:overflow-y-auto focus-visible:outline-2 focus-visible:outline-accent focus-visible:outline-offset-2","aria-label":i("ui.agentMessages.banner.read"),"data-agent-messages-banner-consent":"",children:e?t.jsx("p",{className:"max-w-prose whitespace-pre-wrap text-body-sm text-ink-muted",children:e}):t.jsx("p",{className:"text-body-sm text-ink-muted",children:i("ui.agentMessages.banner.consent_unavailable")})}),s&&t.jsx("p",{role:"alert",className:"text-body-sm text-ink",children:s==="turn_off"?i("ui.agentMessages.banner.turn_off_failed"):i("ui.agentMessages.banner.dismiss_failed")})]})})})};function X(e,n,s){const a=e?.tenant_id??null;return!N(d=>s&&a?d.defaultOnDismissed[I(s,a)]===!0:!1)&&B(e,n)}function q(e){const{api:n,accountId:s,tenantId:a,markerTenantId:r,onSettings:d,onChanged:c}=e,[b,u]=o.useState(null),[g,f]=o.useState(null),l=o.useRef(!1);async function x(p,O){if(!(l.current||!s)){l.current=!0,u(p),f(null);try{await O()}catch{f(p);return}finally{l.current=!1,u(null)}try{await c?.()}catch{}}}return{pending:b,failure:g,turnOff:()=>x("turn_off",async()=>{const p=await n.updateSettings({expected_account_id:s,...a?{tenant_id:a}:{},state:"disabled"});d?.(p)}),dismiss:()=>x("dismiss",async()=>{await n.dismissOnboarding(),s&&r&&N.getState().markDefaultOnDismissed(s,r)})}}const v="lo.teamBridge.scope.v1",P=128;function C(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function M(e){try{const n=JSON.parse(e.getItem(v)??"{}");return C(n)?n:{}}catch{return{}}}function U(e,n){const s=M(e)[n];if(typeof s!="string")return;if(s===m)return m;const a=s.trim();if(!(!a||a.length>P))return j(a)}function Y(e,n,s){try{const a=M(e);e.setItem(v,JSON.stringify({...a,[n]:s}))}catch{}}function Q(e,n){return n===m?[...e]:e.filter(s=>s.tenant_id===n)}function W({organizations:e,stored:n,requestedTenant:s,chosen:a,current:r,snapshotRows:d}){return s?j(s):a?r:e.length===1?e[0].tenantId:n!==void 0&&(n===m||e.some(c=>c.tenantId===n))?n:e.length>1?m:D(e,r,a,d)}export{V as D,v as S,q as a,U as b,W as c,K as d,J as r,Q as s,X as u,Y as w};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as s,c as xt,l as E,d as j,V as kt,W as vt,X as _t,Y as bt,D as wt,$ as St,z as Et}from"./mermaid.core-
|
|
1
|
+
import{_ as s,c as xt,l as E,d as j,V as kt,W as vt,X as _t,Y as bt,D as wt,$ as St,z as Et}from"./mermaid.core-Ddb6Ozxy.js";import{d as nt}from"./arc-DWqWEzi9.js";import"./conversation-input-sync-CE4opxo_.js";import"./index-kR82CvO6.js";import"./messages-aMLMjoGD.js";import"./path-utils-Bblb7gI2.js";import"./error-boundary-tDOEWhiX.js";var Q=function(){var n=s(function(x,i,a,c){for(a=a||{},c=x.length;c--;a[x[c]]=i);return a},"o"),t=[6,8,10,11,12,14,16,17,20,21],e=[1,9],l=[1,10],r=[1,11],d=[1,12],h=[1,13],f=[1,16],m=[1,17],u={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:s(function(i,a,c,p,y,o,w){var v=o.length-1;switch(y){case 1:return o[v-1];case 2:this.$=[];break;case 3:o[v-1].push(o[v]),this.$=o[v-1];break;case 4:case 5:this.$=o[v];break;case 6:case 7:this.$=[];break;case 8:p.getCommonDb().setDiagramTitle(o[v].substr(6)),this.$=o[v].substr(6);break;case 9:this.$=o[v].trim(),p.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=o[v].trim(),p.getCommonDb().setAccDescription(this.$);break;case 12:p.addSection(o[v].substr(8)),this.$=o[v].substr(8);break;case 15:p.addTask(o[v],0,""),this.$=o[v];break;case 16:p.addEvent(o[v].substr(2)),this.$=o[v];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},n(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:e,12:l,14:r,16:d,17:h,18:14,19:15,20:f,21:m},n(t,[2,7],{1:[2,1]}),n(t,[2,3]),{9:18,11:e,12:l,14:r,16:d,17:h,18:14,19:15,20:f,21:m},n(t,[2,5]),n(t,[2,6]),n(t,[2,8]),{13:[1,19]},{15:[1,20]},n(t,[2,11]),n(t,[2,12]),n(t,[2,13]),n(t,[2,14]),n(t,[2,15]),n(t,[2,16]),n(t,[2,4]),n(t,[2,9]),n(t,[2,10])],defaultActions:{},parseError:s(function(i,a){if(a.recoverable)this.trace(i);else{var c=new Error(i);throw c.hash=a,c}},"parseError"),parse:s(function(i){var a=this,c=[0],p=[],y=[null],o=[],w=this.table,v="",N=0,A=0,V=2,U=1,M=o.slice.call(arguments,1),g=Object.create(this.lexer),b={yy:{}};for(var L in this.yy)Object.prototype.hasOwnProperty.call(this.yy,L)&&(b.yy[L]=this.yy[L]);g.setInput(i,b.yy),b.yy.lexer=g,b.yy.parser=this,typeof g.yylloc>"u"&&(g.yylloc={});var P=g.yylloc;o.push(P);var W=g.options&&g.options.ranges;typeof b.yy.parseError=="function"?this.parseError=b.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Z(T){c.length=c.length-2*T,y.length=y.length-T,o.length=o.length-T}s(Z,"popStack");function tt(){var T;return T=p.pop()||g.lex()||U,typeof T!="number"&&(T instanceof Array&&(p=T,T=p.pop()),T=a.symbols_[T]||T),T}s(tt,"lex");for(var S,C,I,J,R={},B,$,et,O;;){if(C=c[c.length-1],this.defaultActions[C]?I=this.defaultActions[C]:((S===null||typeof S>"u")&&(S=tt()),I=w[C]&&w[C][S]),typeof I>"u"||!I.length||!I[0]){var K="";O=[];for(B in w[C])this.terminals_[B]&&B>V&&O.push("'"+this.terminals_[B]+"'");g.showPosition?K="Parse error on line "+(N+1)+`:
|
|
2
2
|
`+g.showPosition()+`
|
|
3
3
|
Expecting `+O.join(", ")+", got '"+(this.terminals_[S]||S)+"'":K="Parse error on line "+(N+1)+": Unexpected "+(S==U?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError(K,{text:g.match,token:this.terminals_[S]||S,line:g.yylineno,loc:P,expected:O})}if(I[0]instanceof Array&&I.length>1)throw new Error("Parse Error: multiple actions possible at state: "+C+", token: "+S);switch(I[0]){case 1:c.push(S),y.push(g.yytext),o.push(g.yylloc),c.push(I[1]),S=null,A=g.yyleng,v=g.yytext,N=g.yylineno,P=g.yylloc;break;case 2:if($=this.productions_[I[1]][1],R.$=y[y.length-$],R._$={first_line:o[o.length-($||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-($||1)].first_column,last_column:o[o.length-1].last_column},W&&(R._$.range=[o[o.length-($||1)].range[0],o[o.length-1].range[1]]),J=this.performAction.apply(R,[v,A,N,b.yy,I[1],y,o].concat(M)),typeof J<"u")return J;$&&(c=c.slice(0,-1*$*2),y=y.slice(0,-1*$),o=o.slice(0,-1*$)),c.push(this.productions_[I[1]][0]),y.push(R.$),o.push(R._$),et=w[c[c.length-2]][c[c.length-1]],c.push(et);break;case 3:return!0}}return!0},"parse")},k=function(){var x={EOF:1,parseError:s(function(a,c){if(this.yy.parser)this.yy.parser.parseError(a,c);else throw new Error(a)},"parseError"),setInput:s(function(i,a){return this.yy=a||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var a=i.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:s(function(i){var a=i.length,c=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var p=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var y=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===p.length?this.yylloc.first_column:0)+p[p.length-c.length].length-c[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(i){this.unput(this.match.slice(i))},"less"),pastInput:s(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var i=this.pastInput(),a=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as c,c as p,r as $}from"./index-
|
|
1
|
+
import{j as c,c as p,r as $}from"./index-kR82CvO6.js";import{c as d,u as T,i as Q}from"./error-boundary-tDOEWhiX.js";import{t as i}from"./messages-aMLMjoGD.js";import{c9 as E,ca as H,cb as V,bt as M,bu as A,aA as S,c3 as B,b7 as N,c4 as P}from"./conversation-input-sync-CE4opxo_.js";import{b4 as Y,b5 as Z,b6 as G,b7 as W,b8 as X,b9 as J,ba as ee,bb as K}from"./index-BuL7blPm.js";import{B as te}from"./book-open-BastYhxp.js";import{t as C,n as ae,a as D,g as ne,e as w,h as v,i as I,j as q,f as L}from"./en-US-CW_dDnkH.js";import{h as se,u as _,o as oe,w as ie}from"./path-utils-Bblb7gI2.js";import{b as re,l as ce}from"./publication-validation-CNvZfxkg.js";/**
|
|
2
2
|
* @license lucide-react v0.507.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
package/out/renderer/assets/{use-session-snapshot-CPqiydG3.js → use-session-snapshot-B1ZwqarE.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as c}from"./path-utils-
|
|
1
|
+
import{d as c}from"./path-utils-Bblb7gI2.js";import{r as n}from"./index-kR82CvO6.js";function s(){const[f,a]=n.useState(null),[l,o]=n.useState(null),r=n.useRef(null),u=n.useCallback(async e=>{r.current=e,a(t=>t&&t.id!==e?null:t),o(t=>t&&t.id!==e?null:t);try{const t=await c({op:"sessions.get",sessionId:e});if(r.current!==e)return;a({id:e,frontend:t.payload.frontend.snapshot})}catch{}try{const t=await c({op:"commands.entities",sessionId:e,command:"effort"});if(r.current!==e)return;o({id:e,entities:t.entities})}catch{}},[]);return{frontend:f?.frontend??null,effortEntities:l?.entities,refresh:u}}export{s as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as n,s as ii,g as ei,t as vt,q as si,a as ni,b as ai,l as Lt,K as oi,e as hi,z as ri,G as lt,F as Et,H as li,M as ci,i as ui,N as gi}from"./mermaid.core-
|
|
1
|
+
import{_ as n,s as ii,g as ei,t as vt,q as si,a as ni,b as ai,l as Lt,K as oi,e as hi,z as ri,G as lt,F as Et,H as li,M as ci,i as ui,N as gi}from"./mermaid.core-Ddb6Ozxy.js";import{o as kt,n as Tt,q as Rt}from"./conversation-input-sync-CE4opxo_.js";import"./index-kR82CvO6.js";import"./messages-aMLMjoGD.js";import"./path-utils-Bblb7gI2.js";import"./error-boundary-tDOEWhiX.js";var at=function(){var t=n(function(B,h,l,c){for(l=l||{},c=B.length;c--;l[B[c]]=h);return l},"o"),i=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],o=[1,5],p=[1,6],g=[1,7],m=[1,5,10,12,14,16,18,19,21,23,34,35,36],T=[1,25],E=[1,26],S=[1,28],R=[1,29],I=[1,30],V=[1,31],_=[1,32],L=[1,33],f=[1,34],C=[1,35],r=[1,36],D=[1,37],N=[1,43],yt=[1,42],bt=[1,47],$=[1,50],b=[1,10,12,14,16,18,19,21,23,34,35,36],J=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],P=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],At=[1,64],tt={trace:n(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:n(function(h,l,c,u,y,a,X){var x=a.length-1;switch(y){case 5:u.setOrientation(a[x]);break;case 9:u.setDiagramTitle(a[x].text.trim());break;case 12:u.setLineData({text:"",type:"text"},a[x]);break;case 13:u.setLineData(a[x-1],a[x]);break;case 14:u.setBarData({text:"",type:"text"},a[x]);break;case 15:u.setBarData(a[x-1],a[x]);break;case 16:this.$=a[x].trim(),u.setAccTitle(this.$);break;case 17:case 18:this.$=a[x].trim(),u.setAccDescription(this.$);break;case 19:this.$=a[x-1];break;case 20:this.$=[Number(a[x-2]),...a[x]];break;case 21:this.$=[Number(a[x])];break;case 22:u.setXAxisTitle(a[x]);break;case 23:u.setXAxisTitle(a[x-1]);break;case 24:u.setXAxisTitle({type:"text",text:""});break;case 25:u.setXAxisBand(a[x]);break;case 26:u.setXAxisRangeData(Number(a[x-2]),Number(a[x]));break;case 27:this.$=a[x-1];break;case 28:this.$=[a[x-2],...a[x]];break;case 29:this.$=[a[x]];break;case 30:u.setYAxisTitle(a[x]);break;case 31:u.setYAxisTitle(a[x-1]);break;case 32:u.setYAxisTitle({type:"text",text:""});break;case 33:u.setYAxisRangeData(Number(a[x-2]),Number(a[x]));break;case 37:this.$={text:a[x],type:"text"};break;case 38:this.$={text:a[x],type:"text"};break;case 39:this.$={text:a[x],type:"markdown"};break;case 40:this.$=a[x];break;case 41:this.$=a[x-1]+""+a[x];break}},"anonymous"),table:[t(i,e,{3:1,4:2,7:4,5:s,34:o,35:p,36:g}),{1:[3]},t(i,e,{4:2,7:4,3:8,5:s,34:o,35:p,36:g}),t(i,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:o,35:p,36:g}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(m,[2,34]),t(m,[2,35]),t(m,[2,36]),{1:[2,1]},t(i,e,{4:2,7:4,3:21,5:s,34:o,35:p,36:g}),{1:[2,3]},t(m,[2,5]),t(i,[2,7],{4:22,34:o,35:p,36:g}),{11:23,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{11:39,13:38,24:N,27:yt,29:40,30:41,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{11:45,15:44,27:bt,33:46,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{11:49,17:48,24:$,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{11:52,17:51,24:$,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},{20:[1,53]},{22:[1,54]},t(b,[2,18]),{1:[2,2]},t(b,[2,8]),t(b,[2,9]),t(J,[2,37],{40:55,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D}),t(J,[2,38]),t(J,[2,39]),t(P,[2,40]),t(P,[2,42]),t(P,[2,43]),t(P,[2,44]),t(P,[2,45]),t(P,[2,46]),t(P,[2,47]),t(P,[2,48]),t(P,[2,49]),t(P,[2,50]),t(P,[2,51]),t(b,[2,10]),t(b,[2,22],{30:41,29:56,24:N,27:yt}),t(b,[2,24]),t(b,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},t(b,[2,11]),t(b,[2,30],{33:60,27:bt}),t(b,[2,32]),{31:[1,61]},t(b,[2,12]),{17:62,24:$},{25:63,27:At},t(b,[2,14]),{17:65,24:$},t(b,[2,16]),t(b,[2,17]),t(P,[2,41]),t(b,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(b,[2,31]),{27:[1,69]},t(b,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(b,[2,15]),t(b,[2,26]),t(b,[2,27]),{11:59,32:72,37:24,38:T,39:E,40:27,41:S,42:R,43:I,44:V,45:_,46:L,47:f,48:C,49:r,50:D},t(b,[2,33]),t(b,[2,19]),{25:73,27:At},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:n(function(h,l){if(l.recoverable)this.trace(h);else{var c=new Error(h);throw c.hash=l,c}},"parseError"),parse:n(function(h){var l=this,c=[0],u=[],y=[null],a=[],X=this.table,x="",G=0,Ct=0,Kt=2,wt=1,Zt=a.slice.call(arguments,1),A=Object.create(this.lexer),W={yy:{}};for(var it in this.yy)Object.prototype.hasOwnProperty.call(this.yy,it)&&(W.yy[it]=this.yy[it]);A.setInput(h,W.yy),W.yy.lexer=A,W.yy.parser=this,typeof A.yylloc>"u"&&(A.yylloc={});var et=A.yylloc;a.push(et);var Jt=A.options&&A.options.ranges;typeof W.yy.parseError=="function"?this.parseError=W.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ti(k){c.length=c.length-2*k,y.length=y.length-k,a.length=a.length-k}n(ti,"popStack");function St(){var k;return k=u.pop()||A.lex()||wt,typeof k!="number"&&(k instanceof Array&&(u=k,k=u.pop()),k=l.symbols_[k]||k),k}n(St,"lex");for(var w,O,v,st,z={},j,M,_t,Q;;){if(O=c[c.length-1],this.defaultActions[O]?v=this.defaultActions[O]:((w===null||typeof w>"u")&&(w=St()),v=X[O]&&X[O][w]),typeof v>"u"||!v.length||!v[0]){var nt="";Q=[];for(j in X[O])this.terminals_[j]&&j>Kt&&Q.push("'"+this.terminals_[j]+"'");A.showPosition?nt="Parse error on line "+(G+1)+`:
|
|
2
2
|
`+A.showPosition()+`
|
|
3
3
|
Expecting `+Q.join(", ")+", got '"+(this.terminals_[w]||w)+"'":nt="Parse error on line "+(G+1)+": Unexpected "+(w==wt?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(nt,{text:A.match,token:this.terminals_[w]||w,line:A.yylineno,loc:et,expected:Q})}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+O+", token: "+w);switch(v[0]){case 1:c.push(w),y.push(A.yytext),a.push(A.yylloc),c.push(v[1]),w=null,Ct=A.yyleng,x=A.yytext,G=A.yylineno,et=A.yylloc;break;case 2:if(M=this.productions_[v[1]][1],z.$=y[y.length-M],z._$={first_line:a[a.length-(M||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(M||1)].first_column,last_column:a[a.length-1].last_column},Jt&&(z._$.range=[a[a.length-(M||1)].range[0],a[a.length-1].range[1]]),st=this.performAction.apply(z,[x,Ct,G,W.yy,v[1],y,a].concat(Zt)),typeof st<"u")return st;M&&(c=c.slice(0,-1*M*2),y=y.slice(0,-1*M),a=a.slice(0,-1*M)),c.push(this.productions_[v[1]][0]),y.push(z.$),a.push(z._$),_t=X[c[c.length-2]][c[c.length-1]],c.push(_t);break;case 3:return!0}}return!0},"parse")},Qt=function(){var B={EOF:1,parseError:n(function(l,c){if(this.yy.parser)this.yy.parser.parseError(l,c);else throw new Error(l)},"parseError"),setInput:n(function(h,l){return this.yy=l||this.yy||{},this._input=h,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:n(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var l=h.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),h},"input"),unput:n(function(h){var l=h.length,c=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var y=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===u.length?this.yylloc.first_column:0)+u[u.length-c.length].length-c[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:n(function(){return this._more=!0,this},"more"),reject:n(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:n(function(h){this.unput(this.match.slice(h))},"less"),pastInput:n(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n(function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n(function(){var h=this.pastInput(),l=new Array(h.length+1).join("-");return h+this.upcomingInput()+`
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
http-equiv="Content-Security-Policy"
|
|
22
22
|
content="default-src 'none'; script-src 'self'; style-src 'self'; img-src 'none'; font-src 'none'; connect-src 'none'; object-src 'none'; base-uri 'none'; form-action 'none'"
|
|
23
23
|
/>
|
|
24
|
-
<script type="module" crossorigin src="./assets/approvalsOverlay-
|
|
25
|
-
<link rel="modulepreload" crossorigin href="./assets/messages-
|
|
24
|
+
<script type="module" crossorigin src="./assets/approvalsOverlay-uvA-Vt5X.js"></script>
|
|
25
|
+
<link rel="modulepreload" crossorigin href="./assets/messages-aMLMjoGD.js">
|
|
26
26
|
<link rel="stylesheet" crossorigin href="./assets/approvalsOverlay-BgfK3IlB.css">
|
|
27
27
|
</head>
|
|
28
28
|
<body>
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
<title>Local Operator Console Capture</title>
|
|
7
7
|
<meta http-equiv="Content-Security-Policy"
|
|
8
8
|
content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:" />
|
|
9
|
-
<script type="module" crossorigin src="./assets/consoleCapture-
|
|
10
|
-
<link rel="modulepreload" crossorigin href="./assets/messages-
|
|
11
|
-
<link rel="modulepreload" crossorigin href="./assets/index-
|
|
12
|
-
<link rel="modulepreload" crossorigin href="./assets/path-utils-
|
|
13
|
-
<link rel="modulepreload" crossorigin href="./assets/console-mirror-
|
|
9
|
+
<script type="module" crossorigin src="./assets/consoleCapture-DcDxwgX5.js"></script>
|
|
10
|
+
<link rel="modulepreload" crossorigin href="./assets/messages-aMLMjoGD.js">
|
|
11
|
+
<link rel="modulepreload" crossorigin href="./assets/index-kR82CvO6.js">
|
|
12
|
+
<link rel="modulepreload" crossorigin href="./assets/path-utils-Bblb7gI2.js">
|
|
13
|
+
<link rel="modulepreload" crossorigin href="./assets/console-mirror-Bd9dWCOG.js">
|
|
14
14
|
<link rel="stylesheet" crossorigin href="./assets/index-D2enLV5g.css">
|
|
15
15
|
<link rel="stylesheet" crossorigin href="./assets/console-mirror-DOrYoP_4.css">
|
|
16
16
|
</head>
|
package/out/renderer/index.html
CHANGED
|
@@ -41,13 +41,13 @@
|
|
|
41
41
|
<meta http-equiv="Content-Security-Policy"
|
|
42
42
|
content="default-src 'self'; connect-src 'self' http://localhost:1111 http://127.0.0.1:1111 http://localhost:8080 http://127.0.0.1:8080 https://api.radienthq.com https://us.i.posthog.com https://login.microsoftonline.com https://accounts.google.com; script-src 'self' https://us-assets.i.posthog.com https://accounts.google.com https://login.microsoftonline.com; style-src 'self' 'unsafe-inline' data:; img-src 'self' data: blob: http://localhost:1111 http://127.0.0.1:1111; media-src 'self' blob: http://localhost:1111 http://127.0.0.1:1111; font-src 'self' data:; frame-src 'self' data: blob: lo-supplement: http://localhost:1111 http://127.0.0.1:1111 https://accounts.google.com https://login.microsoftonline.com" />
|
|
43
43
|
<meta http-equiv="Cross-Origin-Opener-Policy" content="same-origin-allow-popups" />
|
|
44
|
-
<script type="module" crossorigin src="./assets/index-
|
|
45
|
-
<link rel="modulepreload" crossorigin href="./assets/messages-
|
|
46
|
-
<link rel="modulepreload" crossorigin href="./assets/index-
|
|
47
|
-
<link rel="modulepreload" crossorigin href="./assets/path-utils-
|
|
48
|
-
<link rel="modulepreload" crossorigin href="./assets/error-boundary-
|
|
49
|
-
<link rel="modulepreload" crossorigin href="./assets/conversation-input-sync-
|
|
50
|
-
<link rel="modulepreload" crossorigin href="./assets/console-mirror-
|
|
44
|
+
<script type="module" crossorigin src="./assets/index-BuL7blPm.js"></script>
|
|
45
|
+
<link rel="modulepreload" crossorigin href="./assets/messages-aMLMjoGD.js">
|
|
46
|
+
<link rel="modulepreload" crossorigin href="./assets/index-kR82CvO6.js">
|
|
47
|
+
<link rel="modulepreload" crossorigin href="./assets/path-utils-Bblb7gI2.js">
|
|
48
|
+
<link rel="modulepreload" crossorigin href="./assets/error-boundary-tDOEWhiX.js">
|
|
49
|
+
<link rel="modulepreload" crossorigin href="./assets/conversation-input-sync-CE4opxo_.js">
|
|
50
|
+
<link rel="modulepreload" crossorigin href="./assets/console-mirror-Bd9dWCOG.js">
|
|
51
51
|
<link rel="stylesheet" crossorigin href="./assets/index-D2enLV5g.css">
|
|
52
52
|
<link rel="stylesheet" crossorigin href="./assets/conversation-input-sync-Dp97JwKx.css">
|
|
53
53
|
<link rel="stylesheet" crossorigin href="./assets/console-mirror-DOrYoP_4.css">
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
|
|
9
9
|
<meta http-equiv="Content-Security-Policy"
|
|
10
10
|
content="default-src 'self'; connect-src 'self' http://localhost:1111 http://127.0.0.1:1111; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: http://localhost:1111 http://127.0.0.1:1111; media-src 'self' http://localhost:1111 http://127.0.0.1:1111; font-src 'self' data:" />
|
|
11
|
-
<script type="module" crossorigin src="./assets/installer-
|
|
12
|
-
<link rel="modulepreload" crossorigin href="./assets/messages-
|
|
13
|
-
<link rel="modulepreload" crossorigin href="./assets/index-
|
|
14
|
-
<link rel="modulepreload" crossorigin href="./assets/error-boundary-
|
|
11
|
+
<script type="module" crossorigin src="./assets/installer-D9ByBu_L.js"></script>
|
|
12
|
+
<link rel="modulepreload" crossorigin href="./assets/messages-aMLMjoGD.js">
|
|
13
|
+
<link rel="modulepreload" crossorigin href="./assets/index-kR82CvO6.js">
|
|
14
|
+
<link rel="modulepreload" crossorigin href="./assets/error-boundary-tDOEWhiX.js">
|
|
15
15
|
<link rel="stylesheet" crossorigin href="./assets/index-D2enLV5g.css">
|
|
16
16
|
</head>
|
|
17
17
|
|
package/out/renderer/mini.html
CHANGED
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
<title>Local Operator Quick Send</title>
|
|
7
7
|
<meta http-equiv="Content-Security-Policy"
|
|
8
8
|
content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:" />
|
|
9
|
-
<script type="module" crossorigin src="./assets/mini-
|
|
10
|
-
<link rel="modulepreload" crossorigin href="./assets/messages-
|
|
11
|
-
<link rel="modulepreload" crossorigin href="./assets/index-
|
|
12
|
-
<link rel="modulepreload" crossorigin href="./assets/error-boundary-
|
|
13
|
-
<link rel="modulepreload" crossorigin href="./assets/path-utils-
|
|
14
|
-
<link rel="modulepreload" crossorigin href="./assets/conversation-input-sync-
|
|
15
|
-
<link rel="modulepreload" crossorigin href="./assets/use-session-snapshot-
|
|
9
|
+
<script type="module" crossorigin src="./assets/mini-CMXTYZwX.js"></script>
|
|
10
|
+
<link rel="modulepreload" crossorigin href="./assets/messages-aMLMjoGD.js">
|
|
11
|
+
<link rel="modulepreload" crossorigin href="./assets/index-kR82CvO6.js">
|
|
12
|
+
<link rel="modulepreload" crossorigin href="./assets/error-boundary-tDOEWhiX.js">
|
|
13
|
+
<link rel="modulepreload" crossorigin href="./assets/path-utils-Bblb7gI2.js">
|
|
14
|
+
<link rel="modulepreload" crossorigin href="./assets/conversation-input-sync-CE4opxo_.js">
|
|
15
|
+
<link rel="modulepreload" crossorigin href="./assets/use-session-snapshot-B1ZwqarE.js">
|
|
16
16
|
<link rel="stylesheet" crossorigin href="./assets/index-D2enLV5g.css">
|
|
17
17
|
<link rel="stylesheet" crossorigin href="./assets/conversation-input-sync-Dp97JwKx.css">
|
|
18
18
|
</head>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "local-operator-ui",
|
|
3
|
-
"version": "0.48.
|
|
3
|
+
"version": "0.48.11",
|
|
4
4
|
"productName": "Local Operator",
|
|
5
5
|
"description": "User interface for AI agent assistants that run Python code safely on your device through an intuitive chat interface. Supports local and cloud LLM models with built-in security features.",
|
|
6
6
|
"main": "./out/main/index.js",
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{r as l,j as e,c as V}from"./index-B8IMuQlY.js";import{o as ys,G as nt,h as ws,d as lt,a as _s,c as qe,r as rt,u as ct,f as Ve,a2 as ut,q as ot}from"./path-utils-DGCOWnfc.js";import{P as dt}from"./page-header-DkesqHl0.js";import{c as mt,u as H,w as ne,B as C,f as T,J as ht,K as ye,T as Ss,n as Ae,o as Ee,y as Oe,p as Le,z as Fe,F as ze,A as me,q as he,x as xe,N as xt,O as bt,P as pt,Q as gt,R as ss,U as ts,V as as,W as is,Y as ns}from"./error-boundary-U4l7SQDe.js";import{bt as Qe,bw as ls,c1 as ft,c2 as Cs,b7 as He,bu as jt,c3 as kt,aA as vt,c4 as Nt,c5 as yt,T as Ps,bB as Ts,c6 as ke,c7 as wt,c8 as _t}from"./conversation-input-sync-BEAazUG8.js";import{t as s}from"./messages-CJNV_HV3.js";import{a as St,p as Rs,P as le,u as Ct}from"./publication-validation-BRwWedrQ.js";import{h as ae,O as Pt,A as Tt,c as Is,a as Rt,b as It,d as At,e as As,C as Et,n as Ot,u as Lt,i as Ft}from"./use-download-agent-mutation-B-0ZBmeP.js";import{H as zt}from"./heart-BjPt7o_G.js";import{x as Dt,aX as Mt,aY as $t,aZ as qt,a_ as Es,a$ as Ht,b0 as Ut,y as Bt,D as Vt,E as rs,T as cs,b1 as Qt,b2 as Wt,L as Kt,t as Yt,b3 as Gt}from"./index-BZAvUyjF.js";import{n as Jt,u as Xt,i as Zt,H as ea,p as us,a as Os,h as os,b as sa,c as ta,d as aa,e as ia,f as na,g as la,s as ra,j as ds,k as ms,l as hs,m as xs,S as bs,o as ca,q as ua,r as oa,t as Ls,v as Fs,P as zs,w as da,x as ma}from"./org-access-C2FrjDL5.js";import{R as Ds}from"./radient-auth-buttons-DHKxs1d1.js";import{o as ha,a as De}from"./org-surface-gate-DpHxALJ4.js";import{B as xa}from"./building-2-DF06I7ZK.js";import"./book-open-C6N2c20S.js";import"./en-US-CW_dDnkH.js";import"./console-mirror-Bav1-Thd.js";/**
|
|
2
|
-
* @license lucide-react v0.507.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const ba=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M17 12h.01",key:"1m0b6t"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M7 12h.01",key:"eqddd0"}]],pa=mt("circle-ellipsis",ba),ga=({agent:t,isLiked:a,isFavourited:i,onLikeToggle:n,onFavouriteToggle:c,onDownload:d,isLikeActionLoading:m=!1,isFavouriteActionLoading:O=!1,isDownloading:p=!1,actionError:N=null,onRetryAction:L,showActions:S=!0,viewerStateKnown:b=!0,orgName:h=null})=>{H();const E=ys(),{isAuthenticated:f}=Qe();H();const w=t.description??"",[R,F]=l.useState(!1),P=l.useRef(null),g=l.useCallback(A=>{if(P.current?.disconnect(),P.current=null,!A)return;const D=()=>F(A.scrollHeight-A.clientHeight>1);D();const Q=new ResizeObserver(D);Q.observe(A),P.current=Q},[]),I=f?b?a?s("ui.hub.viewer.unlike"):s("ui.hub.viewer.like"):s("ui.hub.viewer.like_unknown"):s("ui.hub.viewer.like_signed_out"),j=f?b?i?s("ui.hub.viewer.unfavourite"):s("ui.hub.viewer.favourite"):s("ui.hub.viewer.favourite_unknown"):s("ui.hub.viewer.favourite_signed_out"),k=b?a?s("ui.hub.viewer.unlike"):s("ui.hub.viewer.like"):s("ui.hub.viewer.like_unavailable"),v=b?i?s("ui.hub.viewer.unfavourite"):s("ui.hub.viewer.favourite"):s("ui.hub.viewer.favourite_unavailable"),u=t.visibility==="org",x=ae(t.name);return e.jsxs("div",{"data-glass-block":"",className:"flex h-full flex-col overflow-hidden rounded-md bg-surface transition-colors duration-fast ease-out-quart hover:bg-elevated",children:[e.jsxs("button",{type:"button",onClick:()=>E(`/agent-hub/${t.id}`),className:"flex min-h-0 flex-1 cursor-pointer flex-col gap-2 p-4 text-left","aria-label":s("ui.hub.card.view_details",{name:x}),children:[e.jsx("h3",{className:"truncate font-medium text-heading text-ink",children:x}),u&&e.jsx(Pt,{orgName:h}),e.jsx(ne,{content:R?w:"",children:e.jsx("span",{ref:g,className:"line-clamp-3 min-h-0 text-body-sm text-ink-muted",children:w})}),e.jsxs("div",{className:"mt-auto flex flex-col gap-2 pt-2",children:[e.jsx(Tt,{tags:t.tags,categories:t.categories}),e.jsxs("p",{className:"truncate text-ink-dim text-meta",children:[t.account_metadata?.name??s("ui.hub.card.unknown_author"),e.jsx("span",{"aria-hidden":"true",className:"mx-1.5",children:"·"}),s("ui.hub.pages.card.updated",{when:Is(new Date(t.updated_at))})]})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1 border-t border-hairline px-3 py-2",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-0.5","data-viewer-state":u?"org":f?b?"known":"unknown":"signed-out",children:[!u&&e.jsxs(e.Fragment,{children:[e.jsx(ne,{content:I,children:e.jsx("span",{children:e.jsxs(C,{variant:"ghost",size:"sm",onClick:f&&b?()=>n(t.id):void 0,disabled:m||!f||!b,"aria-label":k,className:V(a&&"text-danger"),children:[e.jsx(zt,{fill:a?"currentColor":"none","data-testid":"agent-like-heart"}),e.jsx("span",{"data-testid":"agent-like-count",className:"inline-flex h-4 min-w-4 items-center font-mono text-mono-sm text-ink-muted",children:t.like_count??0})]})})}),e.jsx(ne,{content:j,children:e.jsx("span",{children:e.jsxs(C,{variant:"ghost",size:"sm",onClick:f?()=>c(t.id):void 0,disabled:O||!f||!b,"aria-label":v,className:V(i&&"text-warning"),children:[e.jsx(Dt,{fill:i?"currentColor":"none","data-testid":"agent-favourite-star"}),e.jsx("span",{"data-testid":"agent-favourite-count",className:"inline-flex h-4 min-w-4 items-center font-mono text-mono-sm text-ink-muted",children:t.favourite_count??0})]})})})]}),e.jsx(ne,{content:s("ui.hub.card.downloads_tooltip"),children:e.jsxs("span",{className:"ml-1 inline-flex items-center gap-1 pr-1 text-ink-dim",children:[e.jsx(ls,{"aria-hidden":"true",className:"size-3.5"}),e.jsx("span",{className:"inline-flex h-4 min-w-6 items-center font-mono text-mono-sm",children:p?e.jsx(T,{className:"h-3 w-6"}):(t.download_count??0).toLocaleString()})]})})]}),S&&d&&e.jsx("div",{className:"ml-auto flex shrink-0 items-center",children:e.jsxs(C,{variant:"secondary",size:"sm",onClick:()=>d(t),disabled:p,"aria-label":s("ui.hub.card.download_named",{name:x}),"data-tour-tag":"agent-hub-download-button",children:[e.jsx(ls,{"data-testid":"agent-download"}),s("ui.hub.pages.card.get")]})})]}),N&&e.jsxs("output",{"data-testid":"agent-card-error",className:"flex flex-wrap items-center gap-x-2 gap-y-1 border-t border-hairline px-3 py-2 text-body-sm text-danger",children:[e.jsx("span",{className:"min-w-0 flex-1",children:N}),L&&e.jsx(C,{variant:"ghost",size:"sm",onClick:L,children:s("ui.common.actions.retry_again")})]})]})},fa=({agent:t,status:a,viewerStateKnown:i=!0,orgName:n=null})=>{const{isAuthenticated:c}=Qe(),[d,m]=l.useState(null),O=a?.liked??!1,p=a?.favourited??!1,N=Rt(),L=It(),S=At(),b=()=>{!c||N.isPending||(m(null),N.mutate({agentId:t.id,isCurrentlyLiked:O},{onError:()=>m("like")}))},h=()=>{!c||L.isPending||(m(null),L.mutate({agentId:t.id,isCurrentlyFavourited:p},{onError:()=>m("favourite")}))},E=()=>{S.isPending||(m(null),S.mutate({agentId:t.id,agentName:t.name},{onError:()=>m("download")}))},f=d?d==="like"?{action:"like",error:N.error,retry:b}:d==="favourite"?{action:"favourite",error:L.error,retry:h}:{action:"download",error:S.error,retry:E}:null;return e.jsx(ga,{agent:t,isLiked:c&&O,isFavourited:c&&p,onLikeToggle:b,onFavouriteToggle:h,onDownload:E,isLikeActionLoading:N.isPending,isFavouriteActionLoading:L.isPending,isDownloading:S.isPending,viewerStateKnown:i,orgName:n,actionError:f?St(f.action,f.error,ae(t.name)):null,onRetryAction:f?.retry})},ps=({selected:t,onClick:a,children:i,...n})=>e.jsx("button",{type:"button",onClick:a,"aria-pressed":t,className:V("flex w-full cursor-pointer items-center gap-2.5 rounded-sm px-3 py-1.5 text-left","text-body-sm transition-colors duration-fast ease-out-quart",t?$t:"text-ink hover:bg-row-hover"),...n,children:i}),gs=Object.keys(Et),ja=t=>[...t].sort((a,i)=>{const n=gs.indexOf(a),c=gs.indexOf(i);return n!==-1&&c!==-1?n-c:n!==-1?-1:c!==-1?1:a.localeCompare(i)}),ka=({selectedCategory:t,onSelectCategory:a,categories:i})=>{H();const n=ja(t&&!i.includes(t)?[...i,t]:i);return e.jsxs("div",{className:"flex h-full flex-col overflow-y-auto",children:[e.jsx("h2",{className:"mb-2 px-3 font-medium text-ink-dim text-meta",children:s("ui.hub.taxonomy.heading")}),e.jsxs("div",{className:"flex flex-col gap-0.5",children:[e.jsxs(ps,{selected:t===null,onClick:()=>a(null),"data-testid":"category-all",children:[e.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center",children:e.jsx(Mt,{size:16,"aria-hidden":"true"})}),s("ui.hub.taxonomy.all")]}),n.map(c=>{const d=As(c),m=c==="other"?e.jsx(pa,{size:16}):d.icon;return e.jsxs(ps,{selected:t===c,onClick:()=>a(c),"data-testid":`category-${c}`,children:[e.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center",children:m}),d.label]},c)})]})]})},We=({page:t,count:a,onChange:i,ariaLabel:n})=>{H();const c=l.useRef(null),d=l.useRef(null),m=l.useRef(null);return l.useEffect(()=>{const O=m.current;m.current=null,O==="previous"&&c.current?.focus(),O==="next"&&d.current?.focus()},[t]),a<=1?null:e.jsxs("nav",{"aria-label":n??s("ui.hub.pages.pager.nav_aria"),className:"mt-6 flex min-h-13 items-center justify-between gap-3 border-t border-hairline","data-testid":"agent-hub-pager",children:[e.jsx("span",{className:"select-none text-meta text-ink-dim",children:s("ui.common.forms.pagination.position",{page:String(t),count:String(a)})}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(C,{variant:"secondary",size:"sm",ref:c,onClick:()=>{t-1<=1&&(m.current="next"),i(t-1)},disabled:t<=1,"aria-label":s("ui.common.forms.compact_pagination.previous_page"),children:[e.jsx(ft,{"aria-hidden":"true"}),s("ui.hub.pages.pager.previous")]}),e.jsxs(C,{variant:"secondary",size:"sm",ref:d,onClick:()=>{t+1>=a&&(m.current="previous"),i(t+1)},disabled:t>=a,"aria-label":s("ui.common.forms.compact_pagination.next_page"),children:[s("ui.hub.pages.pager.next"),e.jsx(ht,{"aria-hidden":"true"})]})]})]})},va=/alias/i;function fs(t){return t instanceof nt?t.code==="alias-occupied"?!0:t.code==="origin-conflict"&&va.test(t.message):!1}function Na({scope:t,source:a,verifiedCas:i,enabled:n=!0,heading:c=!0}){H();const d=l.useId(),[m,O]=l.useState(""),[p,N]=l.useState(""),[L,S]=l.useState(Jt),[b,h]=l.useState(null),[E,f]=l.useState(!1),w=Xt(),R=l.useRef(null),F=ws({queryKey:["desktop","skills","hub-publication"],queryFn:()=>lt({op:"skills.list"}),staleTime:3e4,retry:!1}),P=`${t.visibility}:${t.tenantId??""}`,g=l.useRef(P);l.useEffect(()=>{g.current!==P&&(g.current=P,S(v=>({...v,autoPush:!1,confirmPublicEgress:!1})),h(null),f(!0))},[P]);const I={sourceSkill:m,localAlias:p,visibility:t.visibility,tenantId:t.tenantId,...L},j=b?Zt(b,I):!1;l.useEffect(()=>{if(!b)return;const v=setTimeout(()=>{h(null),f(!0)},Math.max(0,Math.min(Date.parse(b.expires_at)-Date.now(),2147483647)));return()=>clearTimeout(v)},[b]);const k=v=>{if(!n||w.isPending||!m||!p||v&&!j)return;const u=JSON.stringify({draft:I,receipt:v?b?.preview_receipt:null}),x=R.current&&R.current.tuple===u&&(v||w.error)?R.current:{tuple:u,id:crypto.randomUUID()};R.current=x,v||(h(null),f(!1)),w.mutate({requestId:x.id,draft:I,...v&&b?{previewReceipt:b.preview_receipt}:{}},{onSuccess:A=>{A.preview?(h(A.preview),f(!1)):us(A)&&h(null)}})};return e.jsxs("section",{className:"flex min-w-0 flex-col gap-4","data-hub-skill-publication":!0,children:[c&&e.jsx("h3",{className:"text-heading text-ink",children:s("ui.hub.skills.publish_title")}),e.jsx("label",{htmlFor:`${d}-source`,className:"text-body-sm text-ink",children:s("ui.hub.skills.select_authored")}),e.jsxs("select",{id:`${d}-source`,"data-testid":"hub-skill-publish-source",value:m,disabled:w.isPending||!n,className:"rounded-md border border-control bg-surface px-3 py-2 text-body-sm text-ink",onChange:v=>{O(v.target.value),N(v.target.value),h(null),S(u=>({...u,autoPush:!1,confirmPublicEgress:!1}))},children:[e.jsx("option",{value:"",children:s("ui.hub.skills.select_authored")}),F.data?.data.skills.map(v=>e.jsx("option",{value:v.name,children:v.name},v.name))]}),e.jsx("label",{htmlFor:`${d}-alias`,className:"text-body-sm text-ink",children:s("ui.hub.subscriptions.alias")}),e.jsx(ye,{id:`${d}-alias`,"data-testid":"hub-skill-publish-alias",value:p,disabled:w.isPending||!n,onChange:v=>{N(v.target.value),S(u=>({...u,autoPush:!1,confirmPublicEgress:!1}))}}),e.jsx("p",{className:"text-meta text-ink-muted",children:s("ui.hub.skills.text_limits")}),e.jsx(ea,{value:L,onChange:S,source:a,item:m||p,visibility:t.visibility,organization:t.organization,destinationKey:`${P}:${m}`,canEnableAutoPush:i,disabled:w.isPending||!n}),F.isLoading&&e.jsx("output",{className:"text-meta text-ink-muted",children:s("ui.hub.skills.loading")}),F.error&&e.jsx("p",{role:"alert",className:"text-body-sm text-danger",children:s("ui.hub.status.other_error")}),w.error&&e.jsx("p",{role:"alert",className:"text-body-sm text-danger",children:s("ui.hub.links.action_failed",{direction:s("ui.hub.links.direction_push"),item:m||p,source:a})}),(E||b&&!j&&b.can_confirm)&&e.jsx("p",{role:"alert",className:"text-body-sm text-warning",children:s("ui.hub.links.preview_changed")}),b&&b.visibility===t.visibility&&b.tenant_id===t.tenantId&&e.jsxs("div",{className:"flex min-w-0 flex-col gap-3",children:[e.jsx("h4",{className:"text-body-sm text-ink",children:s("ui.hub.links.preview_payload",{source:a})}),e.jsx(Ss,{readOnly:!0,rows:12,"aria-label":s("ui.hub.links.preview_payload",{source:a}),value:JSON.stringify(b.proposal.fields,null,2),className:"max-h-96 bg-sunken text-mono-sm"}),b.warnings.map((v,u)=>e.jsx("p",{className:"break-words text-body-sm text-warning",children:v},`${u}-${v}`)),b.reason&&e.jsx("p",{className:"text-body-sm text-warning",children:qt(b.reason)})]}),w.data?.publication===null&&w.data.local_link_receipt?.state==="pending-reconciliation"&&e.jsx("output",{className:"text-body-sm text-warning","data-testid":"hub-skill-pending-reconcile",children:s("ui.hub.links.publication_pending")}),w.data?.publication&&e.jsx("output",{className:"text-body-sm text-ink","data-testid":"hub-skill-published",children:us(w.data)?s("ui.hub.links.published",{item:w.data.link?.name??p,source:w.data.link?Es(w.data.link):a}):s("ui.hub.skills.policy_pending")}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(C,{variant:"outline","data-testid":"hub-skill-publish-preview",disabled:!n||w.isPending||!m||!p,onClick:()=>k(!1),children:s("ui.hub.subscriptions.preview_publish")}),e.jsx(C,{"data-testid":"hub-skill-publish-confirm",disabled:!n||w.isPending||!j,onClick:()=>k(!0),children:s("ui.hub.links.confirm_publish")})]})]})}function js(t,a){const i=t.publisher?.trim();return i?s("ui.hub.skills.published_by",{publisher:i}):t.visibility==="org"?a??s("ui.hub.links.source_unavailable"):s("ui.hub.skills.public_hub")}function ya({scope:t,signedIn:a,accessible:i=!0}){H();const n=l.useId(),[c,d]=l.useState(1),[m,O]=l.useState(""),[p,N]=l.useState(null),[L,S]=l.useState(!1),[b,h]=l.useState("unsubscribe"),[E,f]=l.useState(!1),w=l.useRef(null),R=t.visibility==="public"?s("ui.hub.links.source_public"):t.organization?s("ui.hub.links.source_private",{organization:t.organization}):s("ui.hub.links.source_unavailable"),F=_s(),P=i&&qe(F.data,"hub_updates"),g=Os(t,c,i&&(t.visibility==="public"||a)),I=os(g.data?.contract),j=sa(t,p,I&&i),k=ta(),v=aa(),u=ia(),x=Ht(),A=Ut(i&&qe(F.data,"hub_links")),D=Bt(P),Q=l.useMemo(()=>na(A.data?.links,la(He.radientBaseUrl)),[A.data]),M=l.useMemo(()=>Vt(D.data),[D.data]),q=k.data?.link?.link_id,y=!A.isLoading&&!A.error,$=A.error?s("ui.hub.skills.inventory_unknown"):s("ui.hub.links.loading"),se=j.data?.visibility===t.visibility&&(t.visibility==="public"?!j.data.tenant_id:j.data.tenant_id===t.tenantId),te=i&&!j.error&&!g.error&&se&&os(j.data?.sync_contract)&&!!j.data?.revision,re=(g.data?.rows??[]).filter(o=>ra(o,t)),be=re.filter(o=>`${o.name} ${o.description}`.toLocaleLowerCase().includes(m.toLocaleLowerCase())),W=re.find(o=>o.id===p),_=W?Q.get(ds({id:W.id,visibility:W.visibility,tenantId:W.tenant_id??null})):void 0,pe=_?M.get(rs("skill",_.name)):void 0,ce=ms(_,pe,y),ee=_?cs(_)==="present":!1,we=o=>{const z=Q.get(ds({id:o.id,visibility:o.visibility,tenantId:o.tenant_id??null})),X=z?M.get(rs("skill",z.name)):void 0;return{link:z,update:X,state:ms(z,X,y)}},ue=o=>(w.current?.tuple!==o&&(w.current={tuple:o,id:crypto.randomUUID()}),w.current.id),ie=o=>{if(!p||!te||!a)return;const z=o?.name??W?.name??"";if(!z)return;const X=o?o.policy.subscribe:!1,de=o?.policy.auto_push??!1,ge=!1;k.mutate({requestId:ue(ua({selected:p,scope:t,localAlias:z,subscribe:X,autoPush:de,consent:ge})),remoteId:p,scope:t,alias:z,subscribe:X,autoPush:de,consent:ge})},_e=()=>{if(!p||!te||!a)return;if(oa(_)==="policy"&&_){if(_.policy.subscribe||x.isPending)return;h("subscribe"),x.mutate({link:_,patch:{subscribe:!0}});return}const o=W?.name??"";o&&v.mutate({requestId:ue(JSON.stringify({op:"subscribe",selected:p,scope:t,localAlias:o})),remoteId:p,scope:t,alias:o})},Se=()=>{_&&u.mutate({requestId:ue(JSON.stringify({op:"unpull",link:_.link_id})),linkId:_.link_id},{onSuccess:()=>{k.reset(),v.reset()}})},K=()=>{!_||_.policy.subscribe===!1||x.isPending||!x.canWrite||(h("unsubscribe"),x.mutate({link:_,patch:{subscribe:!1}}))},J=a&&I&&i&&!g.error,oe=g.data?.total??re.length,U=g.error?null:g.isLoading?s("ui.hub.skills.loading"):t.organization?s("ui.hub.skills.count_shared",{count:oe,organization:t.organization}):s("ui.hub.skills.count",{count:oe});return e.jsxs("section",{className:"flex min-w-0 flex-col gap-4","data-hub-skills-library":!0,children:[t.visibility==="org"&&!a?e.jsx("p",{role:"alert",className:"text-body-sm text-warning",children:s("ui.hub.status.no_credential")}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs("div",{className:V("flex min-w-56 max-w-md flex-1 items-center rounded-sm border border-control bg-surface","transition-colors duration-fast ease-out-quart","has-[:focus-visible]:outline-solid has-[:focus-visible]:outline-2","has-[:focus-visible]:outline-accent has-[:focus-visible]:outline-offset-2"),children:[e.jsx(Cs,{"aria-hidden":"true",className:"ml-2 shrink-0 text-ink-dim"}),e.jsx(ye,{id:`${n}-search`,type:"search","data-testid":"hub-skill-search",value:m,placeholder:s("ui.hub.skills.search"),"aria-label":s("ui.hub.skills.search"),onChange:o=>O(o.target.value),className:"h-8 min-w-0 flex-1 border-0 bg-transparent outline-none"})]}),J&&e.jsx(C,{variant:"secondary","data-testid":"hub-skill-publish-open",onClick:()=>f(!0),children:s("ui.hub.skills.publish_title")})]}),U!==null&&e.jsx("p",{"aria-live":"polite",className:"text-meta text-ink-dim","data-testid":"hub-skill-status",children:t.organization||g.isLoading?e.jsx("span",{"data-testid":"hub-skill-source",children:U}):e.jsxs(e.Fragment,{children:[e.jsx("span",{children:U})," · ",e.jsx("span",{"data-testid":"hub-skill-source",children:s("ui.hub.skills.public_hub")})]})}),g.error&&e.jsxs("div",{role:"alert",className:"flex flex-col items-start gap-2 text-body-sm text-warning",children:[e.jsx("p",{children:s("ui.hub.skills.catalogue_failed",{source:R})}),e.jsx(C,{variant:"outline",className:"self-start",disabled:g.isFetching,onClick:()=>void g.refetch(),children:s("ui.hub.links.retry")})]}),g.isSuccess&&!I&&e.jsx("p",{className:"text-body-sm text-warning",children:s("ui.hub.skills.unavailable")}),I&&e.jsxs(e.Fragment,{children:[be.length===0&&e.jsx("p",{className:"text-body-sm text-ink-muted",children:s(m?"ui.hub.skills.search_empty":"ui.hub.skills.remote_empty")}),e.jsx("ul",{className:"grid list-none grid-cols-[repeat(auto-fill,minmax(17.5rem,1fr))] gap-6 p-0",children:be.map(o=>{const z=we(o),X=hs(z.state,z.update,z.link?cs(z.link)==="present":!1);return e.jsx("li",{className:"min-w-0",children:e.jsxs("button",{type:"button","aria-haspopup":"dialog","aria-expanded":p===o.id,"aria-label":s("ui.hub.skills.open_detail",{item:o.name}),"data-testid":"hub-skill-open","data-skill-id":o.id,"data-skill-state":z.state.kind,onClick:()=>{N(o.id),k.reset(),v.reset(),u.reset(),x.reset()},className:V("flex h-full w-full flex-col overflow-hidden rounded-md bg-surface text-left","transition-colors duration-fast ease-out-quart hover:bg-elevated","focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent focus-visible:outline-offset-1"),children:[e.jsxs("span",{className:"flex min-h-0 flex-1 flex-col gap-2 p-4",children:[e.jsx("span",{className:"truncate font-medium text-heading text-ink",children:o.name}),o.description?e.jsx("span",{className:"line-clamp-3 text-body-sm text-ink-muted",children:o.description}):null,e.jsx("span",{className:"mt-auto truncate text-ink-dim text-meta",children:js(o,t.organization)})]}),e.jsxs("span",{className:"flex items-center justify-between gap-2 border-t border-hairline px-4 py-2 text-meta",children:[e.jsx("span",{className:"truncate text-ink-muted",children:xs(z.state,$)}),e.jsx(bs,{mark:X})]})]})},o.id)})}),e.jsx(We,{page:c,count:g.data?.pages??1,onChange:d,ariaLabel:s("ui.hub.skills.title")})]})]}),!i&&e.jsx("p",{role:"alert",className:"text-body-sm text-warning",children:s("ui.hub.status.access_lost")}),e.jsx(Ae,{open:!!p&&I,onOpenChange:o=>{o||N(null)},children:e.jsxs(Ee,{"data-hub-skill-detail":"",className:"max-h-[85vh] overflow-y-auto sm:max-w-2xl",children:[e.jsxs(Oe,{children:[e.jsx(Le,{"data-testid":"hub-skill-detail-name",children:j.data?.name??W?.name??s("ui.hub.skills.title")}),e.jsx(Fe,{children:j.data&&se?js(j.data,t.organization):R})]}),j.isLoading&&e.jsx("output",{className:"text-meta text-ink-muted",children:s("ui.hub.skills.loading")}),j.error&&e.jsx("p",{role:"alert",className:"text-body-sm text-warning",children:s("ui.hub.status.other_error")}),j.data&&se&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs("p",{className:"text-body-sm text-ink-muted",children:[xs(ce,$),e.jsx("span",{"aria-hidden":"true",className:"mx-1.5",children:"·"}),s("ui.hub.skills.revision",{revision:String(j.data.content_revision)})]}),e.jsx(bs,{mark:hs(ce,pe,ee)})]}),e.jsx("p",{"data-testid":"hub-skill-description",className:"max-w-3xl select-text whitespace-pre-wrap break-words text-body-sm text-ink-muted",children:j.data.description}),_&&ee&&_.local_path&&e.jsx("p",{"data-testid":"hub-skill-local-path",className:"break-words font-mono text-meta text-ink-dim",children:s("ui.hub.skills.local_path",{path:`${_.local_path}`})}),e.jsx("h4",{className:"text-body-sm text-ink",children:s("ui.hub.skills.files")}),e.jsx("p",{className:"text-meta text-ink-muted",children:s("ui.hub.skills.file_count",{count:j.data.files.length})}),j.data.files.map(o=>e.jsxs("details",{className:"min-w-0",children:[e.jsx("summary",{className:"break-words text-mono-sm text-ink",children:o.path}),e.jsx(Ss,{readOnly:!0,rows:12,"aria-label":o.path,value:o.content,className:"max-h-96 bg-sunken text-mono-sm"})]},o.path)),_&&e.jsxs("div",{className:"flex flex-col gap-2 border-t border-hairline pt-3",children:[e.jsx(Qt,{link:_}),_.policy.subscribe&&e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx(C,{variant:"outline",size:"sm","data-testid":"hub-skill-unsubscribe",disabled:x.isPending||!x.canWrite,onClick:K,children:s("ui.hub.skills.unsubscribe")}),e.jsx("span",{className:"text-meta text-ink-muted",children:s("ui.hub.skills.unsubscribe_help")})]}),x.error&&e.jsx("p",{role:"alert",className:"text-meta text-danger",children:s("ui.hub.subscriptions.save_failed",{setting:b==="subscribe"?s("ui.hub.subscriptions.subscribe"):s("ui.hub.skills.unsubscribe"),source:R})})]}),_&&ee&&e.jsx(ca,{kind:"skill",name:_.name,enabled:P}),k.error&&e.jsx("p",{role:"alert",className:"text-body-sm text-danger","data-testid":"hub-skill-pull-failed",children:s(fs(k.error)?"ui.hub.skills.local_exists":"ui.hub.skills.pull_failed")}),k.data&&!k.data.reports?.some(o=>o.applied||o.outcome==="unchanged")&&e.jsx("p",{role:"alert",className:"text-body-sm text-danger","data-testid":"hub-skill-pull-failed",children:s("ui.hub.skills.pull_failed")}),k.data?.link&&k.data.reports?.some(o=>o.link_id===q&&o.direction==="pull"&&o.applied)&&e.jsx("output",{"data-testid":"hub-skill-installed",className:"text-body-sm text-ink",children:s("ui.hub.skills.installed_alias",{item:k.data.link.name,source:Es(k.data.link)})}),u.error&&e.jsx("p",{role:"alert",className:"text-body-sm text-danger","data-testid":"hub-skill-unpull-failed",children:s("ui.hub.skills.unpull_failed")}),v.error&&e.jsx("p",{role:"alert",className:"text-body-sm text-danger","data-testid":"hub-skill-subscribe-failed",children:s(fs(v.error)?"ui.hub.skills.local_exists":"ui.hub.skills.subscribe_failed")}),!a&&e.jsx("p",{className:"text-meta text-ink-muted",children:s("ui.hub.status.no_credential")}),(!_||!ee)&&e.jsxs(ze,{className:"flex-row flex-wrap justify-start gap-2",children:[e.jsx(C,{"data-testid":"hub-skill-download",disabled:!a||!te||k.isPending||!y,"aria-label":s("ui.hub.skills.pull_title",{item:j.data.name,source:R}),onClick:()=>ie(_),children:s("ui.hub.skills.download")}),!_?.policy.subscribe&&e.jsx(C,{variant:"outline","data-testid":"hub-skill-subscribe",disabled:!a||!te||!y||v.isPending||x.isPending||(_?!x.canWrite:!1),onClick:_e,children:s("ui.hub.subscriptions.subscribe")})]}),_&&ee&&e.jsx(ze,{className:"flex-row flex-wrap justify-start gap-2",children:e.jsx(C,{variant:"outline","data-testid":"hub-skill-unpull",disabled:u.isPending,onClick:()=>{u.reset(),S(!0)},children:s("ui.hub.skills.unpull")})}),(!_||!ee)&&e.jsx("p",{className:"text-meta text-ink-muted",children:_?.policy.subscribe?s("ui.hub.skills.download_help"):s("ui.hub.skills.subscribe_help")})]})]})}),e.jsx(Ae,{open:L,onOpenChange:o=>{o||S(!1)},children:e.jsxs(Ee,{className:"sm:max-w-md",children:[e.jsxs(Oe,{children:[e.jsx(Le,{children:s("ui.hub.skills.unpull_title",{item:j.data?.name??_?.name??""})}),e.jsx(Fe,{children:s("ui.hub.skills.unpull_body")})]}),e.jsxs(ze,{children:[e.jsx(C,{variant:"outline",onClick:()=>S(!1),children:s("ui.hub.subscriptions.cancel")}),e.jsx(C,{"data-testid":"hub-skill-unpull-confirm",disabled:u.isPending,onClick:()=>{Se(),S(!1)},children:s("ui.hub.skills.unpull")})]})]})}),e.jsx(Ae,{open:E,onOpenChange:f,children:e.jsxs(Ee,{className:"max-h-[85vh] overflow-y-auto sm:max-w-2xl",children:[e.jsxs(Oe,{children:[e.jsx(Le,{children:s("ui.hub.skills.publish_title")}),e.jsx(Fe,{children:R})]}),e.jsx(Na,{scope:t,source:R,verifiedCas:I&&i&&a,enabled:I&&i&&a,heading:!1})]})})]})}const Ms={all:["org-teams"],list:t=>[...Ms.all,"list",t]},$s=({tenantId:t,enabled:a=!0})=>{const i=ws({queryKey:Ms.list(t??""),queryFn:async()=>(await Wt(t)).result??{teams:[]},enabled:a&&!!t,staleTime:3e5,gcTime:6e5,refetchOnWindowFocus:!1,retryOnMount:!1,retry:rt});return{...i,teams:i.data?.teams??[]}},wa=(t,a)=>{const i=t?.name?.trim()||a?.trim()||"Team",n=t?.renamed_from?.trim()||null;return t?.invalid_name===!0&&n?{level:"warning",message:s("ui.notices.hub.team_pulled_renamed",{stored:i,published:n})}:n?{level:"success",message:s("ui.notices.hub.team_pulled_collision",{stored:i,published:n})}:{level:"success",message:s("ui.notices.hub.team_pulled",{name:i})}},qs=()=>{const t=ct();return jt({mutationFn:async({teamId:a,tenantId:i})=>{if(!He.baseUrl)throw new Error("Local Operator API URL is not configured.");return Nt.pullOrgTeamFromRadient(He.baseUrl,a,i)},onSuccess:(a,i)=>{const n=wa(a.result,i.name);n.level==="warning"?kt(n.message):vt(n.message),t.invalidateQueries({queryKey:["desktop","teams"]})},onError:a=>{console.error("Pulling an organization team failed:",a)}})},_a=/^v/i,Hs=t=>t.members.reduce((a,i)=>a+i.count,0),Sa=t=>t.count>1?`${t.role} ×${t.count}`:t.role,Ue=t=>t.members.map(Sa).join(", "),Us=t=>{const a=(t.version??"").trim().replace(_a,"").trim();return a===""?null:a},Bs=t=>{const a=t.account_metadata?.name?.trim();return a||null},Ca=t=>{const a=(t.description??"").trim();return a===""?null:a},Be=240,Pa=Be/2,Ta=(t,a)=>{if(a||t.length<=Be)return t;const i=t.slice(0,Be),n=i.lastIndexOf(" ");return`${(n>=Pa?i.slice(0,n):i).trimEnd()}…`},ve=t=>yt(t,{day:"numeric",month:"short",year:"numeric"}),Ne=t=>{if(!t)return null;const a=new Date(t);return Number.isNaN(a.getTime())?null:a},ks=(t,a,i)=>{const n=i-a.getTime();let c;return n<0?c=ve(a):n<6e4?c=s("ui.hub.updates.ago.now"):c=Is(a,i),{label:t,when:c,iso:a.toISOString(),exact:ve(a)}},Ra=(t,a=Date.now())=>{const i=Ne(t.updated_at);if(i)return ks("updated",i,a);const n=Ne(t.created_date);return n?ks("created",n,a):null},Ia=t=>{const a=Ne(t.created_date),i=Ne(t.updated_at);return{created:a?ve(a):null,updated:i?ve(i):null}},Aa=t=>t==="role"?s("ui.hub.teams.kind.role"):t==="specialist"?s("ui.hub.teams.kind.specialist"):t,Ea=["refresh-hub","retry","sign-in"],Oa=({tenantId:t,orgName:a})=>{const{teams:i,isLoading:n,isFetching:c,isError:d,error:m,refetch:O}=$s({tenantId:t}),p=Ls(m),N=qs(),[L,S]=l.useState(null),[b,h]=l.useState(null),E=l.useRef(new Map),f=l.useRef(null);l.useEffect(()=>{N.isPending||f.current===null||(E.current.get(f.current)?.focus(),f.current=null)},[N.isPending]);const[w,R]=l.useState(!1),[F,P]=l.useState(()=>new Set),g=(u,x)=>P(A=>{const D=new Set(A);return x?D.add(u):D.delete(u),D}),I=(u,x)=>{u.key!=="Escape"||!F.has(x)||(u.target instanceof Element?u.target:null)?.closest('[data-testid="org-team-pull-error"]')||(g(x,!1),u.currentTarget.querySelector("button[aria-expanded]")?.focus(),u.preventDefault())},j=l.useMemo(()=>{if(!Ps(N.error))return null;const u=i.find(x=>x.id===L);return Rs({code:N.error.code,message:N.error.message,details:N.error.details},{name:u?.name??"this team",hubAgentId:null,surface:"pull"})},[N.error,L,i]),k=(u,x)=>{switch(u){case"refresh-hub":O();break;case"retry":v(x);break;case"sign-in":R(!0);break}},v=u=>{N.isPending||(f.current=u.id,S(null),h(u.id),N.mutate({teamId:u.id,tenantId:t,name:u.name},{onSettled:()=>h(null),onError:()=>S(u.id)}))};return e.jsxs("section",{className:"mb-6 max-w-4xl rounded-md bg-surface","aria-label":s("ui.hub.teams.org.aria",{org:a??s("ui.hub.pages.scope.org_unnamed")}),"data-testid":"org-teams",children:[n&&e.jsxs("div",{"aria-hidden":"true",className:"flex flex-col divide-y divide-hairline","data-testid":"org-teams-loading",children:[e.jsx(Me,{}),e.jsx(Me,{}),e.jsx(Me,{})]}),!n&&d&&e.jsxs(me,{variant:p?"warning":"danger",className:"m-4 w-auto","data-testid":"org-teams-error",children:[e.jsx(he,{children:p==="plan"?s("ui.hub.teams.org.plan_headline"):p==="no_access"?s("ui.hub.teams.org.no_access_headline"):s("ui.hub.teams.org.load_headline")}),e.jsx(xe,{children:p==="plan"?s("ui.hub.teams.org.plan_body",{org:a??s("ui.hub.pages.scope.org_unnamed")}):p==="no_access"?s("ui.hub.teams.org.no_access_body",{org:a??s("ui.hub.teams.org.that_organization")}):Ve(s("ui.hub.teams.org.unreadable"),m)}),p!=="no_access"&&e.jsx("div",{className:"mt-2",children:e.jsx(C,{variant:"primary",size:"sm",onClick:()=>void O(),disabled:c,"aria-busy":c,children:c?s("ui.hub.teams.public.trying"):le.retry})})]}),!n&&!d&&i.length===0&&e.jsx("p",{className:"p-4 text-body-sm text-ink-muted","data-testid":"org-teams-empty",children:s("ui.hub.teams.org.empty",{org:a??s("ui.hub.pages.scope.org_unnamed")})}),!n&&!d&&i.length>0&&e.jsx("ul",{className:"flex flex-col divide-y divide-hairline",children:i.map(u=>e.jsxs("li",{className:V(Vs,"transition-colors duration-fast ease-out-quart hover:bg-elevated first:rounded-t-md last:rounded-b-md"),onKeyDown:x=>I(x,u.id),children:[e.jsx(Ts,{className:"min-w-0",open:F.has(u.id),onOpenChange:x=>g(u.id,x),summaryAlign:"firstLine",triggerClassName:"min-w-0",chevronClassName:"text-ink-dim mt-1",rowClassName:"py-0",summary:e.jsx(za,{team:u,expanded:F.has(u.id)}),trailing:e.jsx("div",{className:"-mt-1 ml-3 shrink-0 self-start",children:e.jsx(C,{ref:x=>{x?E.current.set(u.id,x):E.current.delete(u.id)},variant:"secondary",size:"sm",onClick:()=>v(u),disabled:N.isPending,"aria-label":s("ui.hub.teams.pull_target",{name:ae(u.name)}),children:b===u.id?s("ui.hub.teams.pulling"):s("ui.hub.teams.pull")})}),children:e.jsx(Da,{team:u})}),L===u.id&&e.jsxs("div",{className:"mt-1 flex flex-col items-start gap-1 pl-5","data-testid":"org-team-pull-error",children:[e.jsx("output",{className:"text-meta text-danger",children:j?.body??N.error?.message??s("ui.hub.teams.pull_failed",{name:ae(u.name)})}),j?.actions.filter(x=>Ea.includes(x)).map(x=>e.jsx(C,{variant:"primary",size:"sm",onClick:()=>k(x,u),children:le[x]},x)),w&&e.jsx("div",{className:"mt-1","data-testid":"org-team-pull-reauth",children:e.jsx(Ds,{titleText:le["sign-in"],descriptionText:"",onSignInSuccess:()=>{R(!1),S(null),O()}})})]})]},u.id))})]})},Vs="px-4 py-3",Qs=()=>e.jsxs(e.Fragment,{children:[e.jsx("span",{"aria-hidden":"true",className:"mx-1.5",children:"·"}),e.jsx("span",{className:"sr-only",children:", "})]}),La=({team:t})=>{H();const a=t.manager?.trim(),i=Hs(t);return e.jsxs("span",{className:"block truncate text-meta",children:[a?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-ink-dim",children:s("ui.hub.teams.manager_label")})," ",e.jsx("span",{className:"text-ink-muted",children:a})]}):null,a?e.jsx(Qs,{}):null,t.members.length===0?e.jsx("span",{className:"text-ink-dim",children:s("ui.hub.teams.no_members")}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-ink-dim",children:s("ui.hub.teams.member_count",{count:i})})," ",e.jsx("span",{className:"text-ink-muted",children:Ue(t)})]})]})},Fa=({team:t})=>{H();const a=t.project?.trim(),i=Bs(t),n=Ra(t),c=[];return a&&c.push({key:"project",node:a}),i&&c.push({key:"author",node:i}),n&&c.push({key:"recency",node:e.jsx(ne,{content:n.exact,children:e.jsx("time",{dateTime:n.iso,children:n.label==="updated"?s("ui.hub.teams.recency.updated",{when:n.when}):s("ui.hub.teams.recency.created",{when:n.when})})})}),c.length===0?null:e.jsx("span",{className:"block truncate text-ink-dim text-meta",children:c.map((d,m)=>e.jsxs("span",{children:[m>0?e.jsx(Qs,{}):null,d.node]},d.key))})},za=({team:t,expanded:a})=>{H();const i=Ca(t),n=Us(t);return e.jsxs("span",{className:"flex min-w-0 flex-col",children:[e.jsxs("span",{className:"flex min-w-0 items-baseline",children:[e.jsx("span",{className:"truncate font-medium text-body text-ink",children:ae(t.name)}),n?e.jsxs("span",{className:"ml-2 shrink-0 text-ink-dim text-meta",children:["v",n]}):null]}),i?e.jsxs(e.Fragment,{children:[e.jsx("span",{...ke,"aria-hidden":"true",className:V("mt-1 select-text break-words text-body-sm text-ink-muted",a?"line-clamp-[12] whitespace-pre-line":"line-clamp-2"),children:i}),e.jsx("span",{className:"sr-only",children:Ta(i,a)})]}):e.jsx("span",{className:"mt-1 text-body-sm text-ink-dim",children:s("ui.hub.teams.no_description")}),e.jsxs("span",{className:"mt-1 flex min-w-0 flex-col",children:[e.jsx(La,{team:t}),e.jsx(Fa,{team:t})]})]})},Da=({team:t})=>{H();const a=t.manager?.trim(),i=Ia(t),n=[i.created?s("ui.hub.teams.detail.created",{date:i.created}):null,i.updated?s("ui.hub.teams.detail.updated",{date:i.updated}):null].filter(d=>d!==null),c=!!a||t.members.length>0;return e.jsxs("div",{className:"mt-1 flex flex-col gap-2",children:[c||n.length===0?e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("p",{className:"text-ink-dim text-meta",children:s("ui.hub.teams.members")}),e.jsxs("ul",{className:"flex flex-col gap-0.5",children:[a?e.jsxs("li",{className:"flex items-baseline gap-1.5",children:[e.jsx("span",{className:"text-body-sm text-ink-muted",children:a}),e.jsx("span",{className:"text-ink-dim text-meta",children:s("ui.hub.teams.manager")})]}):null,t.members.map(d=>e.jsxs("li",{className:"flex items-baseline gap-1.5",children:[e.jsx("span",{className:"text-body-sm text-ink-muted",children:d.role}),e.jsx("span",{className:"text-ink-dim text-meta",children:Aa(d.kind)}),d.count>1?e.jsxs("span",{className:"text-ink-dim text-meta tabular-nums",children:["×",d.count]}):null]},`${d.kind}:${d.role}`)),c?null:e.jsx("li",{className:"text-ink-dim text-meta",children:s("ui.hub.teams.no_members")})]})]}):null,n.length>0?e.jsx("p",{className:"text-ink-dim text-meta",children:n.join(" · ")}):null]})},Me=()=>e.jsxs("div",{className:V(Vs,"pl-9"),"data-testid":"org-team-skeleton-row",children:[e.jsx("div",{className:"flex h-[1lh] items-center text-body",children:e.jsx(T,{className:"h-4.5 w-40"})}),e.jsxs("div",{className:"mt-1 flex h-[2lh] flex-col justify-evenly text-body-sm",children:[e.jsx(T,{className:"h-3.5 w-full"}),e.jsx(T,{className:"h-3.5 w-2/3"})]}),e.jsx("div",{className:"mt-1 flex h-[1lh] items-center text-meta",children:e.jsx(T,{className:"h-3 w-64"})}),e.jsx("div",{className:"flex h-[1lh] items-center text-meta",children:e.jsx(T,{className:"h-3 w-48"})})]}),Ws=(t,a)=>a instanceof Kt?a.message:Ve(t,a),Ma=["refresh-hub","retry","sign-in"],$a=({signedIn:t,onOpenSettings:a})=>{H();const[i,n]=l.useState(1),[c,d]=l.useState(""),{teams:m,isLoading:O,isFetching:p,isError:N,error:L,refetch:S,pagination:b}=Fs({page:i,perPage:zs}),h=qs(),[E,f]=l.useState(null),[w,R]=l.useState(null),F=l.useRef(new Map),P=l.useRef(null);l.useEffect(()=>{h.isPending||P.current===null||(F.current.get(P.current)?.focus(),P.current=null)},[h.isPending]);const g=Ot(c.trim()),I=l.useMemo(()=>g?m.filter(y=>ae(y.name).toLowerCase().includes(g)||(y.description??"").toLowerCase().includes(g)):m,[m,g]),j=y=>{h.isPending||(f(null),R(y.id),P.current=y.id,h.mutate({teamId:y.id,name:y.name},{onSettled:()=>R(null),onError:()=>f(y.id)}))},k=l.useMemo(()=>{if(!Ps(h.error))return null;const y=m.find($=>$.id===E);return Rs({code:h.error.code,message:h.error.message,details:h.error.details},{name:y?.name??"this team",hubAgentId:null,surface:"pull"})},[h.error,E,m]),v=k?.body??(ut(h.error)==="unauthorized"?s("ui.hub.teams.public.pull_no_signin"):s("ui.hub.teams.public.pull_failed")),[u,x]=l.useState(!1),A=(y,$)=>{switch(y){case"refresh-hub":S();break;case"retry":j($);break;case"sign-in":x(!0);break}},D=O&&m.length===0,Q=b?.totalRecords??m.length,M=l.useRef(null),q=y=>{const $=c!=="";d(y),$&&y===""&&M.current?.focus()};return e.jsxs("section",{"aria-label":s("ui.hub.teams.public.aria"),className:"flex flex-col","data-testid":"agent-hub-public-teams",children:[e.jsx("h2",{className:"sr-only",children:s("ui.hub.teams.public.aria")}),e.jsx("p",{className:"mb-3 max-w-3xl text-body-sm text-ink-muted",children:s("ui.hub.teams.public.intro")}),t?null:e.jsxs("div",{className:"mb-3 flex flex-wrap items-center gap-2","data-testid":"agent-hub-public-teams-signed-out",children:[e.jsx("span",{className:"text-meta text-ink-dim",children:s("ui.hub.teams.public.sign_in_hint")}),e.jsx(C,{variant:"secondary",size:"sm",onClick:a,children:s("ui.hub.teams.public.open_settings")})]}),e.jsx("div",{className:"mb-4 flex flex-wrap items-center gap-2",children:e.jsxs("div",{className:V("flex min-w-56 max-w-md flex-1 items-center rounded-sm border border-control bg-surface","transition-colors duration-fast ease-out-quart","has-[:focus-visible]:outline-solid has-[:focus-visible]:outline-2","has-[:focus-visible]:outline-accent has-[:focus-visible]:outline-offset-2"),children:[e.jsx(Cs,{"aria-hidden":"true",className:"ml-2 shrink-0 text-ink-dim"}),e.jsx(ye,{ref:M,type:"search",value:c,onChange:y=>q(y.target.value),placeholder:s("ui.hub.teams.public.search_placeholder"),"aria-label":s("ui.hub.teams.public.search_aria"),className:"h-8 min-w-0 flex-1 border-0 bg-transparent outline-none","data-testid":"agent-hub-public-teams-search"})]})}),D&&e.jsxs("div",{"aria-hidden":"true",className:"flex max-w-4xl flex-col gap-3","data-testid":"agent-hub-public-teams-loading",children:[e.jsx($e,{}),e.jsx($e,{}),e.jsx($e,{})]}),!D&&N&&e.jsxs(me,{variant:"danger",className:"w-auto max-w-2xl","data-testid":"agent-hub-public-teams-error",children:[e.jsx(he,{children:s("ui.hub.teams.public.load_failed")}),e.jsx(xe,{children:Ws(s("ui.hub.teams.public.catalogue_unreadable"),L)}),e.jsx("div",{className:"mt-2",children:e.jsx(C,{variant:"primary",size:"sm",onClick:()=>void S(),disabled:p,"aria-busy":p,children:p?s("ui.hub.teams.public.trying"):s("ui.common.actions.retry_again")})})]}),!D&&!N&&m.length===0&&e.jsx("p",{className:"max-w-2xl text-body-sm text-ink-muted","data-testid":"agent-hub-public-teams-empty",children:s("ui.hub.teams.public.empty")}),!D&&!N&&m.length>0&&e.jsxs(e.Fragment,{children:[!g||I.length>0?e.jsxs("p",{className:"mb-3 text-meta text-ink-dim","data-testid":"agent-hub-public-teams-status",children:[g?s("ui.hub.teams.public.match_line",{visible:String(I.length),total:m.length,query:c.trim()}):s("ui.hub.pages.status.count.teams",{count:Q,scope:s("ui.hub.pages.status.scope.public")}),g?e.jsxs("span",{className:"text-ink-dim",children:[" ",s("ui.hub.teams.public.search_scope")]}):null]}):null,I.length===0?e.jsx("p",{className:"max-w-2xl text-body-sm text-ink-muted","data-testid":"agent-hub-public-teams-search-miss",children:s("ui.hub.teams.public.search_miss",{query:c.trim()})}):e.jsx("ul",{className:"flex max-w-4xl flex-col gap-3",children:I.map(y=>e.jsx(qa,{team:y,pulling:w===y.id,pullPending:h.isPending,onPull:j,pullButtonRef:$=>{$?F.current.set(y.id,$):F.current.delete(y.id)},failed:E===y.id,failureBody:v,treatment:k,onTreatmentAction:A,reauthenticating:u,onReauthenticated:()=>{x(!1),f(null),S()}},y.id))}),!g&&b&&b.totalPages>1&&e.jsx(We,{count:b.totalPages,page:b.page,onChange:y=>{n(y),M.current?.scrollIntoView({block:"nearest"})}})]})]})},qa=({team:t,pulling:a,pullPending:i,onPull:n,failed:c,failureBody:d,treatment:m,onTreatmentAction:O,reauthenticating:p,onReauthenticated:N,pullButtonRef:L})=>{H();const[S,b]=l.useState(!1),h=da({teamId:S?t.id:void 0}),E=ae(t.name),f=Us(t),w=Bs(t),R=t.manager?.trim(),F=Hs(t),P=(t.description??"").trim();return e.jsxs("li",{className:"rounded-md bg-surface p-4","data-testid":"agent-hub-public-team","data-team-name":t.name,children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-baseline",children:[e.jsx("h3",{className:"truncate font-medium text-heading text-ink",children:E}),f?e.jsxs("span",{className:"ml-2 shrink-0 text-ink-dim text-meta",children:["v",f]}):null]}),P?e.jsx("p",{...ke,className:"mt-1 line-clamp-3 max-w-3xl select-text text-body-sm text-ink-muted",children:P}):e.jsx("p",{className:"mt-1 text-body-sm text-ink-dim",children:s("ui.hub.teams.no_description")}),e.jsxs("p",{className:"mt-2 flex flex-wrap items-baseline gap-x-2 text-meta",children:[R?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-ink-dim",children:s("ui.hub.teams.manager_label")}),e.jsx("span",{className:"text-ink-muted",children:R})]}):null,t.members.length===0?e.jsx("span",{className:"text-ink-dim",children:s("ui.hub.teams.no_members")}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-ink-dim",children:s("ui.hub.teams.member_count",{count:F})}),e.jsx(ne,{content:Ue(t),children:e.jsx("span",{className:"truncate text-ink-muted",children:Ue(t)})})]})]}),w?e.jsxs("p",{className:"mt-1 text-ink-dim text-meta",children:[s("ui.hub.teams.public.published_by")," ",e.jsx("span",{className:"text-ink-muted",children:w})]}):null]}),e.jsxs("div",{className:"flex shrink-0 flex-col items-end gap-2",children:[e.jsx(C,{ref:L,variant:"secondary",size:"sm",onClick:()=>n(t),disabled:i,"aria-label":s("ui.hub.teams.pull_target",{name:E}),children:a?s("ui.hub.teams.pulling"):s("ui.hub.teams.pull")}),c&&e.jsxs("div",{className:"flex max-w-56 flex-col items-end gap-1","data-testid":"agent-hub-public-team-pull-error",children:[e.jsx("output",{className:"text-right text-meta text-danger",children:d}),m?.actions.filter(g=>Ma.includes(g)).map(g=>e.jsx(C,{variant:"primary",size:"sm",onClick:()=>O(g,t),children:le[g]},g)),p&&e.jsx("div",{"data-testid":"agent-hub-public-team-pull-reauth",children:e.jsx(Ds,{titleText:le["sign-in"],descriptionText:"",onSignInSuccess:N})})]})]})]}),e.jsx("div",{className:"mt-2",children:e.jsx(Ts,{summary:s("ui.hub.teams.brief.trigger"),open:S,onOpenChange:b,className:"w-full",triggerClassName:"w-full",triggerLabel:s("ui.hub.teams.brief.trigger_aria",{name:E}),chevronClassName:"text-ink-dim",children:e.jsx(Ha,{detail:h})})})]})},Ha=({detail:t})=>{if(H(),t.isLoading)return e.jsxs("div",{className:"flex flex-col gap-1","data-testid":"agent-hub-public-team-brief-loading",children:[e.jsx(T,{className:"h-[1lh] w-2/3"}),e.jsx(T,{className:"h-[2lh] w-full"})]});if(t.isError)return e.jsxs("div",{className:"flex flex-col items-start gap-1",children:[e.jsx("output",{className:"text-meta text-danger",children:Ws(s("ui.hub.teams.brief.unreadable"),t.error)}),e.jsx(C,{variant:"primary",size:"sm",onClick:()=>void t.refetch(),disabled:t.isFetching,"aria-busy":t.isFetching,children:t.isFetching?s("ui.hub.teams.public.trying"):le.retry})]});const a=t.team;if(!a)return null;const i=(a.instructions??"").trim(),n=(a.project??"").trim();return e.jsxs("div",{className:"flex max-w-3xl flex-col gap-3 text-body-sm","data-testid":"agent-hub-public-team-brief",children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("p",{className:"text-ink-dim text-meta",children:s("ui.hub.teams.brief.collaboration")}),i?e.jsx("p",{...ke,className:"whitespace-pre-line select-text text-ink-muted",children:i}):e.jsx("p",{className:"text-ink-dim",children:s("ui.hub.teams.brief.collaboration_empty")})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("p",{className:"text-ink-dim text-meta",children:s("ui.hub.teams.brief.project")}),n?e.jsx("p",{...ke,className:"whitespace-pre-line select-text text-ink-muted",children:n}):e.jsx("p",{className:"text-ink-dim",children:s("ui.hub.teams.brief.project_empty")})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("p",{className:"text-ink-dim text-meta",children:s("ui.hub.teams.brief.roster")}),e.jsxs("ul",{className:"flex flex-col gap-0.5",children:[a.manager?.trim()?e.jsxs("li",{className:"flex items-baseline gap-1.5",children:[e.jsx("span",{className:"text-body-sm text-ink-muted",children:a.manager.trim()}),e.jsx("span",{className:"text-ink-dim text-meta",children:s("ui.hub.teams.manager")})]}):null,a.members.length===0?e.jsx("li",{className:"text-ink-dim",children:s("ui.hub.teams.no_members")}):a.members.map(c=>e.jsxs("li",{className:"flex items-baseline gap-1.5",children:[e.jsx("span",{className:"text-body-sm text-ink-muted",children:c.count>1?`${c.role} ×${c.count}`:c.role}),e.jsx("span",{className:"text-ink-dim text-meta",children:c.kind})]},`${c.kind}:${c.role}`))]})]})]})},$e=()=>e.jsxs("div",{className:"rounded-md bg-surface p-4",children:[e.jsx(T,{className:"h-[1lh] w-1/3"}),e.jsx(T,{className:"mt-1 flex h-[3lh] w-full"}),e.jsx(T,{className:"mt-2 h-[1lh] w-2/3"})]}),Ua=(t,a)=>{const[i,n]=l.useState(t);return l.useEffect(()=>{const c=setTimeout(()=>n(t),a);return()=>clearTimeout(c)},[t,a]),i},je=[{value:"download_count:desc",label:"ui.hub.pages.sort.most_downloaded",sort:"download_count",order:"desc"},{value:"like_count:desc",label:"ui.hub.pages.sort.most_liked",sort:"like_count",order:"desc"},{value:"favourite_count:desc",label:"ui.hub.pages.sort.most_favourited",sort:"favourite_count",order:"desc"},{value:"created_at:desc",label:"ui.hub.pages.sort.newest",sort:"created_at",order:"desc"},{value:"updated_at:desc",label:"ui.hub.pages.sort.recently_updated",sort:"updated_at",order:"desc"},{value:"name:asc",label:"ui.hub.pages.sort.name_asc",sort:"name",order:"asc"}],Ba=[{value:"name",label:"ui.hub.pages.search_field.name"},{value:"description",label:"ui.hub.pages.search_field.description"}],Va=300,B="public",vs={agents:"agent-hub-view-agents",teams:"agent-hub-view-teams",skills:"agent-hub-view-skills"},Ns="agent-hub-view-panel",Qa=()=>e.jsxs("div",{className:"flex h-full flex-col overflow-hidden rounded-md bg-surface",children:[e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-2 p-4",children:[e.jsx(T,{className:"h-5.5 w-2/3"}),e.jsx(T,{className:"h-3.5 w-full"}),e.jsx(T,{className:"h-3.5 w-full"}),e.jsx(T,{className:"h-3.5 w-1/2"}),e.jsxs("div",{className:"mt-auto flex flex-col gap-2 pt-2",children:[e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(T,{className:"h-5.5 w-24"}),e.jsx(T,{className:"h-5.5 w-20"})]}),e.jsx("div",{className:"flex items-center gap-1.5",children:e.jsx(T,{className:"h-5.5 w-24"})})]}),e.jsx(T,{className:"h-4.5 w-32"})]})]}),e.jsxs("div",{className:"flex items-center gap-2 border-t border-hairline px-3 py-2",children:[e.jsx(T,{className:"size-4"}),e.jsx(T,{className:"h-4 w-6"}),e.jsx(T,{className:"size-4"}),e.jsx(T,{className:"h-4 w-6"}),e.jsx(T,{className:"ml-auto h-7 w-16"})]})]}),oi=()=>{const t=ys(),{isAuthenticated:a}=Qe(),[i,n]=l.useState(1),[c]=l.useState(12),[d,m]=l.useState(null),[O,p]=l.useState(""),[N,L]=l.useState("name"),[S,b]=l.useState(je[0].value),[h,E]=l.useState(B),[f,w]=l.useState("agents");H();const[R,F]=l.useState([]),P=Ua(O,Va),g=je.find(r=>r.value===S)??je[0],I=_s(),j=!I.isError&&qe(I.data,"hub_skills"),k=f==="skills"&&!j?"agents":f;l.useEffect(()=>{f==="skills"&&!j&&w("agents")},[f,j]);const v=wt(),u=ot(I.data,"radient_org"),x=a?ha(u,v??null):null,{memberships:A}=Yt({enabled:De(u)}),D=l.useMemo(()=>ma(A),[A]),Q=h===B||D.some(r=>r.tenant_id===h);l.useEffect(()=>{!Q&&k!=="skills"&&E(B)},[Q,k]);const M=h===B?null:D.find(r=>r.tenant_id===h)??null,q=M?.tenant_id,y=M?.tenant_name||null,$=d!==null||P!=="",se=$s({tenantId:q}),te=Fs({page:1,perPage:zs,enabled:h===B}),re=q&&se.isSuccess?se.teams.length:null,be=te.isSuccess?te.pagination?.totalRecords??null:null,W=$?null:h===B?be:re,_=h===B?{visibility:"public",tenantId:null}:{visibility:"org",tenantId:h},pe=Q&&(h===B||De(u)),ce=Os(_,1,j&&pe&&(h===B||a)),ee=ce.isSuccess?ce.data.total:null,we=M?.role==="owner"||M?.role==="admin",ue=l.useMemo(()=>new Map(A.map(r=>[r.tenant_id,r.tenant_name])),[A]),{data:ie,agents:_e,isLoading:Se,isFetching:K,error:J,refetch:oe,pagination:U}=Ct({page:i,perPage:c,categories:d?[d]:void 0,name:N==="name"&&P||void 0,description:N==="description"&&P||void 0,sort:g.sort,order:g.order,tenantId:q}),o=M?Ls(J):null,z=_e??[],X=K&&ie!==void 0,{statuses:de,isKnown:ge,isError:Ks,isFetching:Ce,refetch:Ys}=Lt({agentIds:q?[]:z.map(r=>r.id)}),Pe=l.useRef(null),Te=l.useRef(null),[Ke,Gs]=l.useState(0);l.useEffect(()=>{Ke!==0&&(Pe.current??Te.current)?.focus()},[Ke]);const Ye=l.useRef(null),Re=l.useRef(!1),Ie=l.useMemo(()=>[...new Set((ie?.records??[]).flatMap(r=>r.categories??[]))],[ie]);l.useEffect(()=>{F(r=>Ie.every(G=>r.includes(G))?r:[...new Set([...r,...Ie])])},[Ie]);const Js=()=>{m(null),p(""),n(1),Gs(r=>r+1)},Y=(Se||K)&&ie===void 0,Ge=!Y&&!$&&(J!==null||z.length===0);l.useEffect(()=>{!Re.current||Y||(Re.current=!1,J?Ye.current?.focus():(Pe.current??Te.current)?.focus())},[Y,J]);const Je=l.useRef(null),Xs=r=>{n(r),Je.current?.scrollIntoView({block:"nearest"})},Zs=r=>{m(r),n(1)},et=r=>{p(r),n(1)},st=r=>{E(r),n(1)},Xe=l.useRef(new Map),tt=r=>{L(r),n(1)},at=U&&!$?U.totalRecords:null,fe=q?s("ui.hub.pages.status.scope.shared_with",{org:y??s("ui.hub.pages.scope.org_unnamed")}):s("ui.hub.pages.status.scope.public"),Ze=(r,G)=>G==="team"?s("ui.hub.pages.status.count.teams",{count:r,scope:fe}):s("ui.hub.pages.status.count.agents",{count:r,scope:fe});let Z;return k==="skills"?Z=" ":k==="teams"?q?se.isLoading?Z=s("ui.hub.pages.status.loading_teams"):W!==null?Z=Ze(W,"team"):Z=s("ui.hub.pages.status.teams_scope",{scope:fe}):Z=" ":Y?Z=s("ui.hub.pages.status.loading_agents"):U?Z=Ze(U.totalRecords,"agent"):Z=s("ui.hub.pages.status.agents_scope",{scope:fe}),e.jsxs("div",{className:"flex h-full flex-col gap-8 p-6",children:[e.jsx(dt,{title:s("ui.hub.pages.header.title"),subtitle:s("ui.hub.pages.header.subtitle"),icon:Gt}),e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-4",children:[x&&e.jsxs(me,{variant:"warning",className:"max-w-2xl","data-testid":"agent-hub-org-unavailable",children:[e.jsx(he,{children:s("ui.hub.pages.orgs_unavailable")}),e.jsx(xe,{children:x})]}),e.jsxs("div",{className:"flex shrink-0 flex-wrap items-center gap-x-4 gap-y-2","data-testid":"agent-hub-browse-bar",children:[e.jsx(xt,{value:k,onValueChange:r=>w(r),children:e.jsx(bt,{"aria-label":s("ui.hub.pages.browse_aria"),children:["agents","teams",...j?["skills"]:[]].map(r=>{const G=r==="agents"?at:r==="teams"?W:ee;return e.jsxs(pt,{value:r,id:vs[r],"aria-controls":k===r?Ns:void 0,"data-testid":`agent-hub-view-${r}`,children:[r==="agents"?s("ui.hub.pages.tab.agents"):r==="teams"?s("ui.hub.pages.tab.teams"):s("ui.hub.skills.title"),G!==null&&e.jsx("span",{className:"min-w-[2ch] font-normal text-ink-dim tabular-nums",children:G})]},r)})})}),D.length>0&&e.jsxs("div",{className:"ml-auto flex min-w-0 items-center gap-2",children:[e.jsx("span",{"aria-hidden":"true",className:"text-meta text-ink-muted",children:s("ui.hub.pages.scope_label")}),e.jsxs("fieldset",{className:"m-0 min-w-0 border-0 p-0","data-testid":"agent-hub-scope",children:[e.jsx("legend",{className:"sr-only",children:s("ui.hub.pages.scope_legend")}),e.jsx("div",{className:"flex flex-wrap gap-0.5 rounded-md bg-sunken p-0.5",children:[{value:B,label:s("ui.hub.pages.scope.public"),Icon:_t},...D.map(r=>({value:r.tenant_id,label:r.tenant_name||s("ui.hub.pages.scope.org_label"),Icon:xa}))].map(({value:r,label:G,Icon:it})=>e.jsxs(C,{ref:es=>{es?Xe.current.set(r,es):Xe.current.delete(r)},variant:"ghost",size:"sm","aria-pressed":h===r,onClick:()=>st(r),title:G,"data-testid":`agent-hub-scope-${r===B?"public":`org-${r}`}`,className:V("max-w-48",h===r&&"bg-surface text-ink hover:bg-surface"),children:[e.jsx(it,{"aria-hidden":"true"}),e.jsx("span",{className:"truncate",children:G})]},r))})]})]})]}),e.jsx(gt,{id:Ns,labelledBy:vs[k],children:e.jsxs("div",{className:"flex min-h-0 flex-1 flex-row overflow-hidden",children:[k==="agents"&&e.jsx(e.Fragment,{children:e.jsx("div",{className:"mr-6 hidden w-60 shrink-0 rounded-md bg-surface p-2 md:block","data-glass-region":"panel","data-tour-tag":"agent-hub-sidebar-container",children:!Ge&&e.jsx(ka,{selectedCategory:d,onSelectCategory:Zs,categories:R})})}),e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col overflow-y-auto",children:[k==="agents"&&!Ge&&e.jsxs("div",{className:"mb-4 flex flex-wrap items-center gap-2",children:[e.jsxs("div",{className:V("flex min-w-56 flex-1 items-center rounded-sm border border-control bg-surface","transition-colors duration-fast ease-out-quart","has-[:focus-visible]:outline-solid has-[:focus-visible]:outline-2","has-[:focus-visible]:outline-accent has-[:focus-visible]:outline-offset-2"),children:[e.jsx(ye,{ref:Pe,type:"search",value:O,onChange:r=>et(r.target.value),placeholder:s("ui.hub.pages.search.placeholder"),"aria-label":s("ui.hub.pages.search.aria"),className:"h-8 min-w-0 flex-1 border-0 bg-transparent outline-none","data-testid":"agent-hub-search"}),e.jsxs(ss,{value:N,onValueChange:tt,children:[e.jsx(ts,{className:"w-auto shrink-0 border-y-0 border-l border-hairline border-r-0 bg-transparent pl-2 outline-none","aria-label":s("ui.hub.pages.search.scope_aria"),"data-testid":"agent-hub-search-scope",children:e.jsx(as,{})}),e.jsx(is,{children:Ba.map(r=>e.jsx(ns,{value:r.value,children:s(r.label)},r.value))})]})]}),e.jsxs(ss,{value:S,onValueChange:b,children:[e.jsx(ts,{className:"w-48","aria-label":s("ui.hub.pages.sort.aria"),"data-testid":"agent-hub-sort",children:e.jsx(as,{})}),e.jsx(is,{children:je.map(r=>e.jsx(ns,{value:r.value,children:s(r.label)},r.value))})]})]}),e.jsxs("p",{ref:Je,"aria-live":"polite",className:"mb-3 text-meta text-ink-dim","data-testid":"agent-hub-status",children:[Z,k==="agents"&&X?e.jsxs(e.Fragment,{children:[" ",e.jsx("span",{"data-testid":"agent-hub-updating",children:s("ui.hub.pages.updating")})]}):null]}),k==="agents"&&e.jsxs(e.Fragment,{children:[a&&Ks&&e.jsxs("output",{className:"mb-3 flex flex-wrap items-center gap-2 text-meta text-warning","data-testid":"agent-hub-status-unknown",children:[e.jsx("span",{children:s("ui.hub.pages.viewer_unknown")}),e.jsx(C,{variant:"ghost",size:"sm",onClick:()=>void Ys(),disabled:Ce,"aria-busy":Ce,children:Ce?s("ui.common.actions.retrying"):s("ui.common.actions.retry_again")})]}),Y&&e.jsx("div",{"data-testid":"agent-hub-loading",className:"grid grid-cols-[repeat(auto-fill,minmax(17.5rem,1fr))] gap-6",children:Array.from({length:6},(r,G)=>e.jsx(Qa,{},G))}),Y&&U===void 0&&e.jsx("div",{"aria-hidden":"true",className:"mt-6 flex min-h-13 items-center justify-center","data-testid":"agent-hub-pager-placeholder",children:e.jsx(T,{className:"h-4 w-24"})}),e.jsx("output",{"aria-live":"polite","data-testid":"agent-hub-outage",className:V(!Y&&J&&!o?"block":"sr-only"),children:!Y&&J&&!o&&e.jsxs(me,{variant:"danger",className:"max-w-2xl","aria-busy":K,"data-testid":"agent-hub-error",children:[e.jsx(he,{children:a?"The hub could not be loaded":"Sign in to use the hub"}),e.jsx(xe,{children:a?Ve("The agent list could not be loaded.",J):"You are not signed in to Radient, so the hub has no credential to read the agent list with. Sign in on the settings page, then try again."}),e.jsx("div",{className:"mt-2",children:e.jsx(C,{ref:Ye,variant:"outline",size:"sm",onClick:()=>{Re.current=!0,oe()},disabled:K,"aria-busy":K,children:K?"Trying…":"Try again"})})]})}),!Y&&o&&M&&e.jsxs(me,{variant:"warning",className:"max-w-2xl","data-testid":"agent-hub-org-no-access",children:[e.jsx(he,{children:o==="plan"?"That organization needs an active Team plan":"You do not have access to that organization"}),e.jsx(xe,{children:o==="plan"?`Sharing agents inside an organization is part of the Team plan. An owner of ${M.tenant_name||"this organization"} can activate it in the Radient console, and then its agents will be listed here.`:`You are not a member of ${M.tenant_name||"that organization"}, so its agents are not listed here. An owner can invite you again.`}),o==="plan"&&e.jsx("div",{className:"mt-2",children:e.jsx(C,{variant:"primary",size:"sm",onClick:()=>void oe(),disabled:K,"aria-busy":K,children:K?"Trying…":"Try again"})})]}),!Y&&!J&&e.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(17.5rem,1fr))] gap-6","aria-busy":X,children:z.length===0?e.jsxs("div",{"data-testid":"agent-hub-empty",className:V("col-span-full w-full flex flex-col items-center gap-2 rounded-md bg-surface px-6 py-10 text-center",!q&&"max-w-2xl justify-self-center"),children:[e.jsx("p",{className:"text-heading text-ink",children:q?"This organization has no shared agents yet.":d?`No agents in ${As(d).label}.`:$?"No agents match that search.":"The hub is empty."}),e.jsx("p",{className:"max-w-md text-body-sm text-ink-muted",children:q?`Agents published into ${M?.tenant_name||"this organization"} appear here for its members.`:d?"Nothing in this category yet. Clear the filter to see the whole hub.":$?"No agent's name or description carries that. Clear it to see the whole hub.":"Nobody has published an agent yet. Yours could be the first."}),e.jsx("div",{className:"mt-2 flex flex-wrap items-center justify-center gap-2",children:$?e.jsx(C,{variant:"secondary",onClick:Js,children:d?"Clear filter":"Clear search"}):q&&!we?null:e.jsx(C,{ref:Te,variant:"secondary",onClick:()=>t("/agents"),children:s("ui.hub.pages.publish")})})]}):z.map(r=>e.jsx(fa,{agent:r,status:a?de[r.id]:void 0,viewerStateKnown:a&&Ft(ge,de,r.id),orgName:r.visibility==="org"?ue.get(r.tenant_id)??null:null},r.id))}),!Y&&U&&U.totalPages>1&&e.jsx(We,{count:U.totalPages,page:U.page,onChange:Xs})]}),k==="skills"&&(j?e.jsx(ya,{scope:h===B?{visibility:"public",tenantId:null,organization:null}:{visibility:"org",tenantId:h,organization:y},signedIn:a,accessible:Q&&(h===B||De(u))},`skills:${h}`):e.jsx("p",{className:"text-body-sm text-warning",children:s("ui.hub.skills.unavailable")})),k==="teams"&&(M?e.jsx(Oa,{tenantId:M.tenant_id,orgName:y}):e.jsx($a,{signedIn:a,onOpenSettings:()=>t("/settings")}))]})]})})]})]})};export{oi as AgentHubPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./index-B8IMuQlY.js";import{B as o}from"./index-BZAvUyjF.js";import"./messages-CJNV_HV3.js";import"./path-utils-DGCOWnfc.js";import"./error-boundary-U4l7SQDe.js";import"./conversation-input-sync-BEAazUG8.js";import"./console-mirror-Bav1-Thd.js";const u=()=>r.jsx(o,{tabScope:"all",requestScope:"all",hostSessionId:null,isRoutePage:!0,surfaceTag:"browser-route",dockSurfaceTag:"browser-approvals-dock"});export{u as BrowserPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{U as a,C as n}from"./mermaid.core-zfWZbfQ4.js";const t=(r,o)=>a.lang.round(n.parse(r)[o]);export{t as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as a,c as s,a as e,C as t}from"./chunk-A2AXSNBT-dKmHq0fi.js";import{_ as i}from"./mermaid.core-zfWZbfQ4.js";import"./chunk-RZ5BOZE2-0yNCkUsG.js";import"./conversation-input-sync-BEAazUG8.js";import"./index-B8IMuQlY.js";import"./messages-CJNV_HV3.js";import"./path-utils-DGCOWnfc.js";import"./error-boundary-U4l7SQDe.js";var f={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{f as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as a,c as s,a as e,C as t}from"./chunk-A2AXSNBT-dKmHq0fi.js";import{_ as i}from"./mermaid.core-zfWZbfQ4.js";import"./chunk-RZ5BOZE2-0yNCkUsG.js";import"./conversation-input-sync-BEAazUG8.js";import"./index-B8IMuQlY.js";import"./messages-CJNV_HV3.js";import"./path-utils-DGCOWnfc.js";import"./error-boundary-U4l7SQDe.js";var f={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{f as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as r}from"./_baseUniq-D4mSwrlQ.js";var e=4;function a(o){return r(o,e)}export{a as c};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{_ as e,l as o,K as i,e as n,L as p}from"./mermaid.core-zfWZbfQ4.js";import{p as m}from"./radar-MK3ICKWK-nn27xy2f.js";import"./conversation-input-sync-BEAazUG8.js";import"./index-B8IMuQlY.js";import"./messages-CJNV_HV3.js";import"./path-utils-DGCOWnfc.js";import"./error-boundary-U4l7SQDe.js";import"./_baseUniq-D4mSwrlQ.js";import"./_basePickBy-BrJLYb4T.js";import"./clone-Dza364EK.js";var g={parse:e(async r=>{const a=await m("info",r);o.debug(a)},"parse")},v={version:p.version},d=e(()=>v.version,"getVersion"),c={getVersion:d},l=e((r,a,s)=>{o.debug(`rendering info diagram
|
|
2
|
-
`+r);const t=i(a);n(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${s}`)},"draw"),f={draw:l},L={parser:g,db:c,renderer:f};export{L as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as v,j as s,c as R}from"./index-B8IMuQlY.js";import{y as z,z as G,D as J,E as Y,G as C,H as K,I as V,J as O,K as U,L as X,M as Z,O as ee,Q as E,T as ie}from"./index-BZAvUyjF.js";import{u as j,B as g,h as te,n as se,o as ae,y as ne,p as le,z as re,F as ue}from"./error-boundary-U4l7SQDe.js";import{t as l}from"./messages-CJNV_HV3.js";import{h as w,u as y,a as M,c as F,r as B,d as I,F as D,G as oe}from"./path-utils-DGCOWnfc.js";import{bA as Q,b7 as m,bu as P}from"./conversation-input-sync-BEAazUG8.js";const _=e=>e==null?"":typeof e=="string"?e:JSON.stringify(e,null,2),ce={available:"border-hairline",updating:"border-hairline",applied:"border-hairline",review:"border-warning-border",failed:"border-danger-border"};function de(e){const i=[];for(const t of e??[])for(const n of t.fields??[])for(const a of n.regions??[])(a.provenance==="unresolved"||_(a.local)!==_(a.remote))&&i.push({field:n.field,region:a});return i}function be({regions:e}){return j(),e.length?s.jsx("ul",{className:"space-y-3","data-testid":"hub-update-preview",children:e.map(({field:i,region:t},n)=>s.jsxs("li",{className:"space-y-1 text-meta",children:[s.jsx("p",{className:"font-medium text-ink",children:t.heading||t.name||i}),s.jsxs("div",{className:"grid gap-2 sm:grid-cols-2",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-ink-muted",children:l("ui.agents.navigation.updates.preview.local")}),s.jsx("pre",{className:"max-h-40 overflow-auto whitespace-pre-wrap rounded-sm border border-hairline p-2 text-ink",children:_(t.local)||l("ui.agents.navigation.updates.preview.nothing")})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-ink-muted",children:l("ui.agents.navigation.updates.preview.remote")}),s.jsx("pre",{className:"max-h-40 overflow-auto whitespace-pre-wrap rounded-sm border border-hairline p-2 text-ink",children:_(t.remote)||l("ui.agents.navigation.updates.preview.nothing")})]})]})]},`${i}:${t.id??n}`))}):s.jsx("p",{className:"text-meta text-ink-muted",children:l("ui.agents.navigation.updates.preview.empty")})}function Ee({kind:e,name:i,enabled:t}){j();const n=z(t),a=G(),[d,b]=v.useState(null),h=Y(e,i),k=J(n.data).get(h),o=C(k),c=a.notes[h],r=a.pending.has(h);if(!k||!o)return c?s.jsx("section",{"data-testid":"hub-update-panel","aria-label":l("ui.agents.navigation.updates.accessible"),className:"mb-8 rounded-md border border-hairline p-3 text-body-sm",children:s.jsx("p",{role:c.tone==="error"?"alert":"status",className:c.tone==="error"?"text-danger":"text-ink",children:c.message})}):null;const p=o.kind==="review",u=k.classification==="baseline-unknown",f=q=>({prefer:q,acknowledgeUnknownBaseline:u}),$=async()=>{const q=await a.applyItem(e,i,{...f(),dryRun:!0});b(q??[])};return s.jsxs("section",{"data-testid":"hub-update-panel","aria-label":l("ui.agents.navigation.updates.accessible"),className:R("mb-8 space-y-2 rounded-md border p-3 text-body-sm",ce[o.kind]),children:[s.jsxs("p",{className:"flex items-start gap-2 text-ink",children:[s.jsx(K,{mark:o,className:"mt-0.5"}),s.jsx("span",{className:R(o.kind==="failed"&&"text-danger"),children:V(k,o)})]}),a.upgradeMessage&&s.jsx("output",{className:"block text-meta text-warning","data-hub-core-upgrade":!0,children:a.upgradeMessage}),p&&u&&s.jsx("p",{className:"text-meta text-ink-muted",children:l("ui.agents.navigation.updates.baseline_unknown")}),p&&!u&&s.jsx("p",{className:"text-meta text-ink-muted",children:l("ui.agents.navigation.updates.merge_guidance")}),s.jsxs("div",{className:"flex flex-wrap gap-2",children:[o.kind==="available"&&s.jsx(g,{size:"sm",variant:"outline","aria-disabled":r||!a.canWrite||void 0,onClick:()=>!r&&a.canWrite&&void a.applyItem(e,i),children:r?l("ui.agents.navigation.updates.action.updating"):l("ui.agents.navigation.updates.action.update")}),o.kind==="failed"&&o.retryable&&s.jsx(g,{size:"sm",variant:"outline","aria-disabled":r||!a.canWrite||void 0,onClick:()=>!r&&a.canWrite&&void a.retryItem(e,i),children:r?l("ui.agents.navigation.updates.action.retrying"):l("ui.agents.navigation.updates.action.retry")}),p&&s.jsxs(s.Fragment,{children:[s.jsx(g,{size:"sm",variant:"outline","aria-disabled":r||!a.canWrite||void 0,onClick:()=>!r&&a.canWrite&&void $(),children:r&&!d?l("ui.agents.navigation.updates.action.loading"):l("ui.agents.navigation.updates.action.preview")}),s.jsx(g,{size:"sm",variant:"ghost","aria-disabled":r||!a.canWrite||void 0,onClick:()=>!r&&a.canWrite&&void a.applyItem(e,i,f("local")),children:l("ui.agents.navigation.updates.action.keep_local")}),s.jsx(g,{size:"sm",variant:"ghost","aria-disabled":r||!a.canWrite||void 0,onClick:()=>!r&&a.canWrite&&void a.applyItem(e,i,f("remote")),children:l("ui.agents.navigation.updates.action.use_remote")})]})]}),d&&p&&s.jsx(be,{regions:de(d)}),c&&s.jsx("p",{role:c.tone==="error"?"alert":"status",className:c.tone==="error"?"text-meta text-danger":"text-meta text-ink-muted",children:c.message})]})}const pe=/\/+$/;function W(e){const i=e.replace(pe,"");try{const{pathname:t}=new URL(i);return t===""||t==="/"?`${i}/v1`:i}catch{return`${i}/v1`}}const Fe=e=>e?.skills===1&&e.revision_cas===1;function he(e,i=1,t=20){const n=new URL(O(e,"skills"));return n.searchParams.set("page",String(i)),n.searchParams.set("per_page",String(t)),U(n.toString())}function me(e,i){return U(O(e,"skills",i))}function ke(e){return Q({operation:"org_skills.list",tenantId:e})}function ge(e,i){return Q({operation:"org_skill.get",tenantId:e,skillId:i})}const fe=12,S={all:["public-teams"],list:(e,i)=>[...S.all,"list",{page:e,perPage:i}],detail:e=>[...S.all,"detail",e]},N=(e,i)=>i instanceof X?i.status===null?!1:i.status>=500&&e<1:e<1,Te=({page:e=1,perPage:i=fe,enabled:t=!0}={})=>{const n=w({queryKey:S.list(e,i),queryFn:()=>Z(m.radientBaseUrl,e,i),select:a=>a.result,enabled:t,retry:N,staleTime:3e5,gcTime:6e5,refetchOnWindowFocus:!1,placeholderData:a=>a});return{...n,teams:n.data?.records??[],isRefreshing:n.isFetching&&n.data!==void 0,pagination:n.data?{page:n.data.page,perPage:n.data.per_page,totalPages:n.data.total_pages,totalRecords:n.data.total_records}:void 0}},Ae=({teamId:e,enabled:i=!0})=>{const t=w({queryKey:S.detail(e??""),queryFn:()=>ee(m.radientBaseUrl,e),select:n=>n.result,enabled:i&&!!e,retry:N,staleTime:3e5,gcTime:6e5,refetchOnWindowFocus:!1,retryOnMount:!1});return{...t,team:t.data}};function x(e){if(e.getQueryState(D.capabilities)?.status!=="success"||!F(e.getQueryData(D.capabilities),"hub_skills"))throw new Error("This backend does not support the complete Hub Skills adapter.")}function De(e,i,t){const n=y(),a=M();return w({queryKey:["hub-skills",m.radientBaseUrl,e.visibility,e.tenantId,i],enabled:t&&!a.isError&&F(a.data,"hub_skills"),queryFn:async()=>{if(x(n),e.visibility==="org"){const b=(await ke(e.tenantId)).result;return{rows:b.skills,pages:1,total:b.skills.length,contract:b.sync_contract}}const d=(await he(m.radientBaseUrl,i,20)).result;return{rows:d.records,pages:d.total_pages,total:d.total_records,contract:d.sync_contract}},staleTime:3e4,retry:e.visibility==="org"?B:N,retryOnMount:!1,refetchOnWindowFocus:!1})}function He(e,i,t){const n=y(),a=M();return w({queryKey:["hub-skill",m.radientBaseUrl,e.visibility,e.tenantId,i],enabled:t&&i!==null&&!a.isError&&F(a.data,"hub_skills"),queryFn:async()=>(x(n),(e.visibility==="org"?await ge(e.tenantId,i):await me(m.radientBaseUrl,i)).result),staleTime:3e4,retry:e.visibility==="org"?B:N,retryOnMount:!1})}function T(e,i){e.setQueryData(E,i.links)}function A(e){e.invalidateQueries({queryKey:E}),e.invalidateQueries({queryKey:["desktop","skills"]})}function Ce(e={}){const i=y();return P({...e.retry===void 0?{}:{retry:e.retry},mutationFn:t=>(x(i),I({op:"hub.skillPull",requestId:t.requestId,hubId:t.remoteId,hubSource:W(m.radientBaseUrl),visibility:t.scope.visibility,tenantId:t.scope.tenantId,localAlias:t.alias,subscribe:t.subscribe,autoPush:t.autoPush,confirmPublicEgress:t.consent})),onSuccess:t=>{T(i,t)},onSettled:()=>{A(i)}})}function Ke(){const e=y();return P({mutationFn:i=>(x(e),I({op:"hub.skillSubscribe",requestId:i.requestId,hubId:i.remoteId,hubSource:W(m.radientBaseUrl),visibility:i.scope.visibility,tenantId:i.scope.tenantId,localAlias:i.alias})),onSuccess:i=>{T(e,i)},onSettled:()=>{A(e)}})}function Oe(){const e=y();return P({mutationFn:i=>(x(e),I({op:"hub.skillUnpull",requestId:i.requestId,linkId:i.linkId})),onSuccess:i=>{T(e,i)},onSettled:()=>{A(e)}})}function Ue(){const e=y();return P({mutationFn:i=>(x(e),I({op:"hub.skillPublish",requestId:i.requestId,...i.draft,dryRun:i.previewReceipt===void 0,...i.previewReceipt?{previewReceipt:i.previewReceipt,confirmPublish:!0}:{}})),onSuccess:i=>{i.local_link_receipt?.state==="complete"&&(e.invalidateQueries({queryKey:E}),e.invalidateQueries({queryKey:["desktop","skills"]}),e.invalidateQueries({queryKey:["hub-skills"]}))}})}const ye=/\/+$/;function H(e){return e.replace(ye,"")}function Me(e,i){return i.visibility==="public"?e.visibility==="public"&&!e.tenant_id:e.visibility==="org"&&e.tenant_id===i.tenantId}function xe(e){const i=e.id??e.hub_id??"",t=e.tenantId??e.tenant_id??"";return`${i}\0${e.visibility}\0${t}`}function Be(e,i){const t=H(i),n=new Map;for(const a of e??[])a.kind==="skill"&&H(a.hub_source)===t&&n.set(xe({hub_id:a.hub_id,visibility:a.visibility,tenantId:a.tenant_id}),a);return n}function Qe(e,i,t=!0){if(!t)return{kind:"unknown"};if(!e)return{kind:"not-present"};const n=ie(e);return n==="present"&&(e.pull.state==="available"||i?.state==="available"&&!i.error_class)?{kind:"update",link:e,automatic:i?.auto_will_apply===!0||e.auto_will_apply}:n==="absent"?e.policy.subscribe?{kind:"subscribed",link:e}:{kind:"detached",link:e}:e.policy.subscribe?{kind:"pulled",link:e}:{kind:"manual",link:e}}function We(e){return e?"policy":"create"}function Le(e){return JSON.stringify({op:"pull",selected:e.selected,scope:e.scope,localAlias:e.localAlias,subscribe:e.subscribe,autoPush:e.autoPush,consent:e.consent})}const ve={available:"text-accent",applied:"text-success",failed:"text-danger",review:"text-warning",updating:"text-ink-muted"},_e={available:"ui.hub.skills.update_available",applied:"ui.hub.skills.update_applied",failed:"ui.hub.skills.update_failed",review:"ui.hub.links.mark_review",updating:"ui.hub.links.mark_busy"},Se={"not-present":"ui.hub.skills.not_downloaded",subscribed:"ui.hub.skills.subscribed_absent",pulled:"ui.hub.skills.pulled",manual:"ui.hub.skills.manual",detached:"ui.hub.skills.detached"};function $e(e,i,t){const n=i?C(i):null;return n&&(e.kind==="update"||t&&(i?.state==="applied"||i?.state==="failed"||i?.error_class))?n:e.kind==="update"?{kind:"available",auto:e.automatic}:null}function ze(e,i){return e.kind==="unknown"?i:e.kind!=="update"?l(Se[e.kind]):l(e.link.policy.subscribe?"ui.hub.skills.pulled":"ui.hub.skills.manual")}function Ge({mark:e,className:i,labels:t}){return j(),e?s.jsxs("span",{"data-hub-mark-state":e.kind,className:R("flex shrink-0 items-center gap-1 text-meta",ve[e.kind],i),children:[s.jsx(K,{mark:e}),s.jsx("span",{children:l(t?.[e.kind]??_e[e.kind])})]}):null}const Je=()=>({subscribe:!0,autoPush:!1,confirmPublicEgress:!1});function Ye({value:e,onChange:i,source:t,item:n,visibility:a,organization:d,destinationKey:b,canEnableAutoPush:h,disabled:k=!1}){j();const o=v.useId(),c=v.useRef(null),[r,p]=v.useState(null);return v.useEffect(()=>{r!==null&&r!==b&&p(null)},[r,b]),s.jsxs("div",{className:"flex flex-col gap-3","data-initial-hub-policy":!0,children:[s.jsx("p",{className:"text-meta text-ink-muted",children:l("ui.hub.skills.initial_policy_description")}),["subscribe","autoPush"].map(u=>s.jsxs("label",{htmlFor:`${o}-${u}`,className:"flex items-start gap-3 text-body-sm text-ink",children:[s.jsx(te,{id:`${o}-${u}`,checked:e[u],disabled:k||u==="autoPush"&&!h&&!e.autoPush,onCheckedChange:f=>{u==="subscribe"?i({...e,subscribe:f===!0}):f!==!0?i({...e,autoPush:!1,confirmPublicEgress:!1}):h&&p(b)}}),s.jsxs("span",{children:[s.jsx("span",{className:"block",children:l(u==="subscribe"?"ui.hub.subscriptions.subscribe":"ui.hub.subscriptions.auto_push")}),s.jsx("span",{className:"block text-meta text-ink-muted",children:l(u==="subscribe"?"ui.hub.subscriptions.subscribe_description":"ui.hub.subscriptions.auto_push_description",{source:t})})]})]},u)),!h&&s.jsx("p",{className:"text-meta text-ink-muted",children:l("ui.hub.subscriptions.unsupported")}),s.jsx(se,{open:r!==null,onOpenChange:u=>{u||p(null)},children:s.jsxs(ae,{onOpenAutoFocus:u=>{u.preventDefault(),c.current?.focus()},children:[s.jsxs(ne,{children:[s.jsx(le,{children:l("ui.hub.subscriptions.enable_title",{source:t})}),s.jsx(re,{children:a==="public"?l("ui.hub.subscriptions.enable_public",{item:n}):l("ui.hub.subscriptions.enable_private",{item:n,organization:d??t})})]}),s.jsx("p",{className:"text-body-sm text-ink-muted",children:l("ui.hub.subscriptions.enable_safety")}),s.jsxs(ue,{children:[s.jsx(g,{ref:c,"data-testid":"hub-policy-cancel",variant:"outline",onClick:()=>p(null),children:l("ui.hub.subscriptions.cancel")}),s.jsx(g,{"data-testid":"hub-policy-enable",disabled:k||!h||r!==b,onClick:()=>{i({...e,autoPush:!0,confirmPublicEgress:a==="public"}),p(null)},children:l("ui.hub.subscriptions.enable")})]})]})})]})}function Ve(e,i,t=Date.now()){return e.can_confirm===!0&&e.kind==="skill"&&e.direction==="push"&&e.publication==="create"&&e.proposal?.kind==="skill"&&e.proposal.fields?.document_version===1&&e.preview_receipt.length>0&&e.local_fingerprint.length>0&&e.draft_fingerprint.length>0&&e.proposal_fingerprint.length>0&&e.source_skill===i.sourceSkill&&e.local_alias===i.localAlias&&e.visibility===i.visibility&&e.tenant_id===i.tenantId&&e.policy?.subscribe===i.subscribe&&e.policy?.auto_push===i.autoPush&&e.policy?.confirm_public_egress===i.confirmPublicEgress&&Number.isFinite(Date.parse(e.expires_at))&&Date.parse(e.expires_at)>t}function Xe(e){return e.local_link_receipt?.state==="complete"&&!!e.link&&e.local_link_receipt.link_id===e.link.link_id&&typeof e.link.policy?.subscribe=="boolean"&&typeof e.link.policy.auto_push=="boolean"&&typeof e.link.policy.revision=="string"&&e.link.policy.revision.length>0}const je=e=>e==="active"||e==="past_due",L=e=>e.status!=="active"?"no_access":je(e.plan.status)?"available":"plan_inactive",Ze=e=>e.filter(i=>L(i)==="available"),ei=e=>e.filter(i=>L(i)==="plan_inactive"),ii=e=>{if(!(e instanceof oe))return null;switch(e.code){case"team_plan_required":return"plan";case"not_a_member":case"insufficient_role":return"no_access";default:return null}};export{Ye as H,fe as P,Ge as S,De as a,He as b,Ce as c,Ke as d,Oe as e,Be as f,W as g,Fe as h,Ve as i,xe as j,Qe as k,$e as l,ze as m,Je as n,Ee as o,Xe as p,Le as q,We as r,Me as s,ii as t,Ue as u,Te as v,Ae as w,Ze as x,ei as y};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as r,b as e,a,S as s}from"./chunk-AEK57VVT-B_szap42.js";import{_ as i}from"./mermaid.core-zfWZbfQ4.js";import"./chunk-RZ5BOZE2-0yNCkUsG.js";import"./conversation-input-sync-BEAazUG8.js";import"./index-B8IMuQlY.js";import"./messages-CJNV_HV3.js";import"./path-utils-DGCOWnfc.js";import"./error-boundary-U4l7SQDe.js";var b={parser:a,get db(){return new s(2)},renderer:e,styles:r,init:i(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{b as diagram};
|