openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
134 lines • 14 kB
JavaScript
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./control-ui-boot-chat-B-b-JQel.js","./gateway-runtime-C77LeWZN.js","./session-snapshot-database-BBKeXATO.js","./control-ui-boot-shared-gZIpWrfw.js","./control-ui-boot-shared-CkXlyZBY.js","./control-ui-boot-shared-SQHdJTzb.js","./control-ui-boot-shared-VLPz5vN2.js","./plugin-contracts-runtime-ByiEPbv_.js","./control-ui-boot-shared-Q8KG_noF.js","./config-runtime-BecGLziM.js","./markdown-runtime-ORQpioyT.js","./control-ui-boot-chat-Ye5j4vAg.js","./control-ui-boot-shared-styles-BXPMRytW.js","./sidebar-update-runtime-DQZboSgD.js","./control-ui-boot-chat-XPUNenUd.js","./control-ui-boot-chat-CGYcTLro.js","./control-ui-boot-chat-CmENwCKi.js","./control-ui-boot-chat-k_u3nGjS.js","./chat-transcript-styles-BN-TorbW.js","./control-ui-boot-chat-styles-BcslGtWC.js","./control-ui-boot-chat-BD9CwLj7.js","./control-ui-boot-new-CkyIHJ_L.js","./control-ui-boot-new-styles-cChqenO3.js","./control-ui-core-DI-Q_yCI.css","./control-ui-boot-shared-styles-DUf4zEvn.css","./control-ui-boot-shared-DIWJGbGi.css","./sidebar-update-runtime-Bpn2ByHA.css","./chat-transcript-styles-B0IJwY9P.css","./control-ui-boot-chat-styles-SRk09zDG.css","./control-ui-boot-chat-C2DT0d4M.css","./control-ui-boot-new-styles-BS7lzENV.css","./control-ui-boot-new-D-SpiTTi.css","./control-ui-boot-chat-DhbON6pC.css"])))=>i.map(i=>d[i]);
import{n as e}from"./rolldown-runtime-8BhlS34s.js";import{Ic as t,Lc as n,Nu as r,Pu as i,ju as a,xu as o,yu as ee,zu as s}from"./control-ui-core-CBJ5efDh.js";import{Aa as c,Ai as te,Ba as ne,Bi as re,Ua as ie,Vi as ae,Wa as oe,Ya as se,ca as l,ki as u,or as d,qa as f,sa as p,sr as m,wr as h,yr as ce}from"./control-ui-core-DtLivg_r.js";import{G as g,J as _,W as v,Z as y,at as b,c as x,l as S}from"./lit-runtime-IOnANfcZ.js";import{An as C,At as w,Dn as T,On as E,_a as D,jt as O,kn as k,kt as A,va as j,xa as M}from"./control-ui-boot-shared-UG5ko-VG.js";import{Ur as N,Wr as P,Zr as F,ma as I,pa as L,xa as le}from"./ui-CmSP4d14.js";import{Bn as R,Dr as z,l as B,u as V,zn as H}from"./control-ui-boot-shared-XreXSF7h.js";import{Fc as U,Pc as W}from"./control-ui-boot-shared-dOnP4mAA.js";import{n as ue,t as de}from"./en-apps-CQuXDReT.js";import{t as fe}from"./native-chrome-setup-Ckvigqcf.js";function pe(e,t){let n=URL.parse(typeof t==`string`?t:e);if(!n||(n.protocol===`wss:`&&(n.protocol=`https:`),n.protocol!==`https:`||n.username||n.password||n.href.includes(`?`)||n.href.includes(`#`)))return null;let r=new URL(`openclaw://gateway/add`);return r.searchParams.set(`url`,n.href),r.href}var G;function K(){return(K=e((()=>{v(),G={watch:_`
<svg viewBox="0 0 24 24">
<circle cx="12" cy="12" r="6" />
<polyline points="12 10 12 12 13 13" />
<path d="m16.13 7.66-.81-4.05a2 2 0 0 0-2-1.61h-2.68a2 2 0 0 0-2 1.61l-.78 4.05" />
<path d="m7.88 16.36.8 4a2 2 0 0 0 2 1.61h2.72a2 2 0 0 0 2-1.61l.81-4.05" />
</svg>
`,apple:_`
<svg viewBox="0 0 24 24" class="icon--filled">
<path
d="M17.05 12.54c-.03-2.62 2.14-3.88 2.24-3.94-1.22-1.79-3.12-2.03-3.8-2.06-1.61-.16-3.15.95-3.97.95-.82 0-2.08-.93-3.42-.9-1.76.03-3.38 1.02-4.29 2.6-1.83 3.17-.47 7.87 1.31 10.44.87 1.26 1.91 2.67 3.27 2.62 1.31-.05 1.81-.85 3.4-.85 1.58 0 2.03.85 3.42.82 1.41-.02 2.31-1.28 3.17-2.55.99-1.46 1.4-2.87 1.42-2.94-.03-.02-2.73-1.05-2.75-4.19Zm-2.6-7.68c.72-.88 1.21-2.09 1.08-3.3-1.04.04-2.3.69-3.05 1.56-.67.78-1.26 2.02-1.1 3.2 1.16.09 2.34-.59 3.07-1.46Z"
/>
</svg>
`,android:_`
<svg viewBox="0 0 24 24" class="icon--filled">
<path
d="M17.52 15.05a.98.98 0 1 1 .01-1.96.98.98 0 0 1-.01 1.96m-11.04 0a.98.98 0 1 1 .01-1.96.98.98 0 0 1-.01 1.96m11.39-5.89 1.96-3.39a.4.4 0 0 0-.15-.55.4.4 0 0 0-.55.15l-1.98 3.43A12.03 12.03 0 0 0 12 7.75c-1.85 0-3.6.42-5.15 1.05L4.87 5.37a.4.4 0 0 0-.55-.15.4.4 0 0 0-.15.55l1.96 3.39C2.75 11 .48 14.42.14 18.4h23.72c-.34-3.98-2.61-7.4-5.99-9.24"
/>
</svg>
`,windows:_`
<svg viewBox="0 0 24 24" class="icon--filled">
<path
d="M3 5.55 10.29 4.5v7.02H3V5.55Zm0 12.9 7.29 1.05v-6.93H3v5.88Zm8.09 1.16L21 21v-8.43h-9.91v7.04Zm0-15.22v7.13H21V3l-9.91 1.39Z"
/>
</svg>
`,linux:_`
<svg viewBox="0 0 24 24" class="icon--filled">
<path
fill-rule="evenodd"
d="M12 2c-2.76 0-5 2.24-5 5v3.1c0 1.35-.62 2.5-1.32 3.6C4.6 15.4 4 16.9 4 18.3 4 20.9 7.58 22 12 22s8-1.1 8-3.7c0-1.4-.6-2.9-1.68-4.6-.7-1.1-1.32-2.25-1.32-3.6V7c0-2.76-2.24-5-5-5Zm-2 4.5a1 1 0 1 1 0 2 1 1 0 0 1 0-2Zm4 0a1 1 0 1 1 0 2 1 1 0 0 1 0-2Zm-2 2.7 1.8 1.3c.3.24.3.7-.02.92L12 12.6l-1.78-1.18a.58.58 0 0 1-.02-.93L12 9.2Z"
/>
</svg>
`,chrome:_`
<svg viewBox="0 0 24 24" class="icon--filled">
<path
d="M12 2a10 10 0 0 1 8.66 5H12a5 5 0 0 0-4.79 3.57L4.4 5.72A9.98 9.98 0 0 1 12 2Zm9.54 7A10 10 0 0 1 12 22l-.34-.01 4.36-7.55A4.98 4.98 0 0 0 17 12c0-1.13-.37-2.16-1-3h5.54ZM3.35 7.57l4.36 7.56a5 5 0 0 0 6.16 2.24l-2.81 4.87A10 10 0 0 1 3.35 7.57ZM12 8.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 0 1 0-7Z"
/>
</svg>
`}})))()}function me(e,t,n){let r=t===0?`apps-card__cta apps-card__cta--primary`:`apps-card__cta`;return e.kind===`internal`?_`
<button type="button" class=${r} @click=${()=>n.onNavigate(e.routeId)}>
${s(e.labelKey)}
</button>
`:_`
<a
class=${r}
href=${e.href}
target=${A}
rel=${w()}
>
${s(e.labelKey)}
</a>
`}function he(e,t){let[n,r]=e.gradient,i=e.id===`macos`?t.macGatewayLaunchUrl:null;return _`
<article class="apps-card">
<div class="apps-card__art" style=${`--apps-art-a:${n};--apps-art-b:${r}`}>
${[`light`,`dark`].map(t=>_`<img
class="apps-card__art-img apps-card__art-img--${t}"
src=${ie(`app-art/${e.id}${t===`dark`?`-dark`:``}.webp`)}
alt=""
loading="lazy"
decoding="async"
/>`)}
</div>
<div class="apps-card__body">
<div class="apps-card__title-row">
<span class="apps-card__icon" aria-hidden="true">${e.icon}</span>
<h3 class="apps-card__title">${s(`${e.copyKey}.title`)}</h3>
${e.badge?_`<span class="apps-card__badge">${s(e.badge)}</span>`:g}
</div>
<p class="apps-card__desc">${s(`${e.copyKey}.desc`)}</p>
<div class="apps-card__ctas">
${i?_`<a class="apps-card__cta apps-card__cta--primary" href=${i}>
${s(`appsPage.ctaOpenMac`)}
</a>`:g}
${e.ctas.map((e,n)=>me(e,n+ +!!i,t))}
</div>
${e.id===`chrome-extension`?_`<openclaw-native-chrome-setup></openclaw-native-chrome-setup>`:g}
</div>
</article>
`}function ge(e,t){let n=e.id===`mobile`&&t.onPairDevice?_`
<p class="apps-pair-hint">
${s(`appsPage.havePhone`)}
<button type="button" @click=${t.onPairDevice}>${s(`appsPage.pairDevice`)}</button>
</p>
`:g;return _`
<section class="apps-section" aria-label=${s(e.labelKey)}>
<h2 class="apps-section__heading">${s(e.labelKey)}</h2>
<div class="apps-grid">${e.cards.map(e=>he(e,t))}</div>
${n}
</section>
`}function _e(e){return _`
<div class="apps-page">
<section class="apps-hero">
<h1 class="apps-hero__title">${s(`appsPage.heroTitle`)}</h1>
<p class="apps-hero__tagline">${s(`appsPage.heroTagline`)}</p>
</section>
${Y.map(t=>ge(t,e))}
<section class="apps-section" aria-label=${s(`appsPage.sectionCommunity`)}>
<h2 class="apps-section__heading">${s(`appsPage.sectionCommunity`)}</h2>
<nav class="apps-community" aria-label=${s(`appsPage.sectionCommunity`)}>
${X.map(e=>_`
<a
class="apps-pill"
href=${e.href}
target=${A}
rel=${w()}
>
<span class="apps-pill__icon" aria-hidden="true">${e.icon}</span>
<span>${s(e.labelKey)}</span>
</a>
`)}
</nav>
</section>
</div>
`}var q,J,Y,X;function Z(){return(Z=e((()=>{v(),oe(),R(),l(),i(),de(),O(),fe(),U(),K(),ue(),q=(e,t)=>({kind:`external`,href:e,labelKey:t}),J=e=>q(`https://docs.openclaw.ai${e}`,`appsPage.ctaDocs`),Y=[{id:`mobile`,labelKey:`appsPage.sectionMobile`,cards:[{id:`ios`,gradient:[`#38bdf8`,`#1d4ed8`],icon:G.apple,copyKey:`appsPage.cards.ios`,ctas:[q(`https://apps.apple.com/app/openclaw-ai-that-does-things/id6780396132`,`appsPage.ctaAppStore`),J(`/platforms/ios`)]},{id:`android`,gradient:[`#34d399`,`#047857`],icon:G.android,copyKey:`appsPage.cards.android`,ctas:[q(`https://play.google.com/store/apps/details?id=ai.openclaw.app`,`appsPage.ctaPlayStore`),J(`/platforms/android`)]}]},{id:`watch`,labelKey:`appsPage.sectionWatch`,cards:[{id:`apple-watch`,gradient:[`#f472b6`,`#be185d`],icon:G.watch,copyKey:`appsPage.cards.appleWatch`,badge:`appsPage.badgeBundledIos`,ctas:[J(`/platforms/ios`)]},{id:`wear-os`,gradient:[`#22d3ee`,`#0e7490`],icon:G.watch,copyKey:`appsPage.cards.wearOs`,badge:`appsPage.badgeBundledAndroid`,ctas:[J(`/platforms/android`)]}]},{id:`desktop`,labelKey:`appsPage.sectionDesktop`,cards:[{id:`macos`,gradient:[`#a855f7`,`#6b21a8`],icon:G.apple,copyKey:`appsPage.cards.macos`,ctas:[q(`https://github.com/openclaw/openclaw/releases`,`appsPage.ctaDownload`),J(`/platforms/macos`)]},{id:`windows`,gradient:[`#818cf8`,`#4338ca`],icon:G.windows,copyKey:`appsPage.cards.windows`,ctas:[q(`https://github.com/openclaw/openclaw-windows-node/releases/latest`,`appsPage.ctaDownload`),J(`/platforms/windows`)]},{id:`linux`,gradient:[`#fbbf24`,`#b45309`],icon:G.linux,copyKey:`appsPage.cards.linux`,ctas:[q(`https://github.com/openclaw/openclaw/releases`,`appsPage.ctaDownload`),J(`/platforms/linux`)]}]},{id:`browser`,labelKey:`appsPage.sectionBrowser`,cards:[{id:`chrome-extension`,gradient:[`#f59e0b`,`#ea580c`],icon:G.chrome,copyKey:`appsPage.cards.chrome`,ctas:[q(`https://chromewebstore.google.com/detail/openclaw/kcdjddhmeafeomebliikmbpblkmkfoig`,`appsPage.ctaChromeWebStore`),q(`https://docs.openclaw.ai/tools/chrome-extension`,`appsPage.ctaSetupGuide`)]},{id:`plugins`,gradient:[`#fb7185`,`#9f1239`],icon:p.plug,copyKey:`appsPage.cards.plugins`,ctas:[{kind:`internal`,routeId:`plugins`,labelKey:`appsPage.ctaOpenPlugins`},q(`https://clawhub.ai`,`appsPage.ctaBrowseClawHub`)]}]}],X=[{href:W,icon:H.discord,labelKey:`appsPage.linkDiscord`},{href:`https://docs.openclaw.ai`,icon:p.book,labelKey:`appsPage.linkDocs`}]})))()}var Q;function $(){return($=e((()=>{P(),v(),y(),x(),c(),te(),ae(),f(),h(),d(),B(),i(),k(),o(),E(),D(),r(),n(),z(),Z(),I(),C(),Q=class extends a{constructor(){super(),this.appSearch=``,this.appLaunchKey=``,this.conversationError=null,this.appCatalog=new T(this,()=>this.context,()=>({sessionKey:j(this.appSearch)?this.context?.gateway.snapshot.sessionKey??``:``,agentId:this.context?.agentSelection.state.selectedId??void 0}),()=>!0),new t(this).watchStore(()=>this.context?.gateway)}renderAppConversation(e){let t=this.context.gateway;this.conversationError||re(`openclaw-chat-pane`,()=>L(()=>import(`./control-ui-boot-chat-B-b-JQel.js`).then(e=>(e.a(),e.o)),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32]),import.meta.url)).catch(e=>{this.conversationError=ee(e),this.requestUpdate()});let n=new URLSearchParams(this.appSearch),r=n.get(`settings`)===`1`,i=M(this.appCatalog.servers,e,r),a=i?.entrypoints.find(t=>t.toolName===e.toolName&&(t.entrypoint.type===`global`||r&&t.entrypoint.type===`settings`))??(r&&i&&i.settings&&i.settings.readTool===e.toolName?{toolName:i.settings.readTool,title:i.label,resourceUri:``,entrypoint:{type:`settings`}}:void 0),o=JSON.stringify([this.appSearch,t.snapshot.sessionKey,this.context.agentSelection.state.selectedId,t.connectionRevision]);(o!==this.appLaunchKey||this.appLaunch?.owner!==t.snapshot.client)&&(this.appLaunch=void 0,this.appLaunchKey=o),!this.appLaunch&&i&&a&&(this.appLaunch={sessionKey:t.snapshot.sessionKey,agentId:this.context.agentSelection.state.selectedId??void 0,owner:t.snapshot.client,serverName:i.serverName,entrypoint:a,deepLink:e.deepLink,settings:r,quickAction:n.get(`quickAction`)===`1`});let c=this.appLaunch;return _`<button class="btn" @click=${()=>this.context.navigate(`apps`)}>
${s(`mcpApp.close`)}
</button>
${this.conversationError?_`<p role="alert">${this.conversationError}</p>
<button
class="btn"
@click=${()=>{this.conversationError=null,this.requestUpdate()}}
>
${s(`mcpApp.retry`)}
</button>`:c?S(JSON.stringify([c.sessionKey,t.connectionRevision]),_`<openclaw-chat-pane
class="mcp-app-conversation"
.sessionKey=${c.sessionKey}
.agentId=${c.agentId}
.paneId=${`plugin-app`}
.presentationId=${`plugin-app:${c.sessionKey}`}
.mcpAppLaunch=${c}
></openclaw-chat-pane>`):this.appCatalog.loading?_`<p role="status">${s(`mcpApp.loading`)}</p>`:_`<p role="alert">${this.appCatalog.error??s(`mcpApp.invalidLink`)}</p>`}`}render(){let e=this.context.gateway.snapshot,t=e.phase===`connected`&&ce(e.hello?.auth??null),n=j(this.appSearch),r=n?g:_e({onNavigate:e=>this.context.navigate(e),macGatewayLaunchUrl:e.phase===`connected`&&!se()?pe(this.context.gateway.connection.gatewayUrl,le(e.hello?.snapshot)?.controlUiIdentityUrl):null,onPairDevice:t?()=>void this.context.overlays.openDevicePairSetup():void 0});return _`<section class="content-header" ${m({toolbarHeader:!0})}>
<div><div class="page-title">${ne(`apps`)}</div></div>
</section>
${n?this.renderAppConversation(n):V(_`<openclaw-mcp-app-catalog surface="global"></openclaw-mcp-app-catalog>${r}`)}`}},F([N({context:u,subscribe:!0})],Q.prototype,`context`,void 0),F([b({attribute:!1})],Q.prototype,`appSearch`,void 0),customElements.get(`openclaw-apps-page`)||customElements.define(`openclaw-apps-page`,Q)})))()}$();