Skip to content

Soul-driven AI agent with permission-hardened tools, token budgets, and multi-channel access. Runs 24/7 from CLI, Telegram or More.

12.5 KB
Raw Blame
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([["7496"],{17645(e,t,a){a.d(t,{J_:()=>x,x:()=>i,Gx:()=>N,Ki:()=>k,kJ:()=>j,OU:()=>M,e7:()=>m,in:()=>c});var r=a(74848),n=a(96540),s=a(52260),l=a(78491);function i(){let e=(0,l.A)(),t=e?.data?.blogMetadata;if(!t)throw Error("useBlogMetadata() can't be called on the current route because the blog metadata could not be found in route context");return t}let o=n.createContext(null);function c({children:e,content:t,isBlogPostPage:a=!1}){let s=function({content:e,isBlogPostPage:t}){return(0,n.useMemo)(()=>({metadata:e.metadata,frontMatter:e.frontMatter,assets:e.assets,toc:e.toc,isBlogPostPage:t}),[e,t])}({content:t,isBlogPostPage:a});return(0,r.jsx)(o.Provider,{value:s,children:e})}function m(){let e=(0,n.useContext)(o);if(null===e)throw new s.dV("BlogPostProvider");return e}var d=a(66497),u=a(10898);let h=e=>new Date(e).toISOString();function g(e){let t=e.map(f);return{author:1===t.length?t[0]:t}}function p(e,t,a){return e?{image:function({imageUrl:e,caption:t}){return{"@type":"ImageObject","@id":e,url:e,contentUrl:e,caption:t}}({imageUrl:t(e,{absolute:!0}),caption:`title image for the blog post: ${a}`})}:{}}function j(e){let{siteConfig:t}=(0,u.A)(),{withBaseUrl:a}=(0,d.hH)(),{metadata:{blogDescription:r,blogTitle:n,permalink:s}}=e,l=`${t.url}${s}`;return{"@context":"https://schema.org","@type":"Blog","@id":l,mainEntityOfPage:l,headline:n,description:r,blogPost:e.items.map(e=>(function(e,t,a){let{assets:r,frontMatter:n,metadata:s}=e,{date:l,title:i,description:o,lastUpdatedAt:c}=s,m=r.image??n.image,d=n.keywords??[],u=`${t.url}${s.permalink}`,j=c?h(c):void 0;return{"@type":"BlogPosting","@id":u,mainEntityOfPage:u,url:u,headline:i,name:i,description:o,datePublished:l,...j?{dateModified:j}:{},...g(s.authors),...p(m,a,i),...d?{keywords:d}:{}}})(e.content,t,a))}}function x(){let e=i(),{assets:t,metadata:a}=m(),{siteConfig:r}=(0,u.A)(),{withBaseUrl:n}=(0,d.hH)(),{date:s,title:l,description:o,frontMatter:c,lastUpdatedAt:j}=a,x=t.image??c.image,f=c.keywords??[],y=j?h(j):void 0,b=`${r.url}${a.permalink}`;return{"@context":"https://schema.org","@type":"BlogPosting","@id":b,mainEntityOfPage:b,url:b,headline:l,name:l,description:o,datePublished:s,...y?{dateModified:y}:{},...g(a.authors),...p(x,n,l),...f?{keywords:f}:{},isPartOf:{"@type":"Blog","@id":`${r.url}${e.blogBasePath}`,name:e.blogTitle}}}function f(e){return{"@type":"Person",...e.name?{name:e.name}:{},...e.title?{description:e.title}:{},...e.url?{url:e.url}:{},...e.email?{email:e.email}:{},...e.imageURL?{image:e.imageURL}:{}}}var y=a(56347),b=a(95310),w=a(80618),v=a(19209);function N(e){let{pathname:t}=(0,y.zy)();return(0,n.useMemo)(()=>e.filter(e=>!e.unlisted||!!(0,v.ys)(e.permalink,t)),[e,t])}function k(e){let t=Object.entries((0,w.$z)(e,e=>`${new Date(e.date).getFullYear()}`));return t.reverse(),t}function M({items:e,ulClassName:t,liClassName:a,linkClassName:n,linkActiveClassName:s}){return(0,r.jsx)("ul",{className:t,children:e.map(e=>(0,r.jsx)("li",{className:a,children:(0,r.jsx)(b.A,{isNavLink:!0,to:e.permalink,className:n,activeClassName:s,children:e.title})},e.permalink))})}},31911(e,t,a){a.d(t,{A:()=>d});var r=a(74848),n=a(96540),s=a(95310),l=a(21677);function i(){if("u"<typeof window)return{q:"",c:"",a:"",s:"newest"};let e=new URLSearchParams(window.location.search),t=e.get("sort");return{q:e.get("q")??"",c:e.get("category")??"",a:e.get("author")??"",s:"oldest"===t||"author"===t?t:"newest"}}function o({post:e,showAuthors:t=!0}){return(0,r.jsxs)("div",{className:"mj-meta",children:[e.category&&(0,r.jsx)("span",{className:"mj-meta-cat",children:e.category.label}),(0,r.jsx)("time",{dateTime:e.date,children:e.formattedDate}),(0,r.jsx)("span",{"aria-hidden":"true",children:"\xb7"}),(0,r.jsxs)("span",{children:[e.readingMinutes," min read"]}),t&&e.authors.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{"aria-hidden":"true",children:"\xb7"}),(0,r.jsx)("span",{children:e.authors.map(e=>e.name).join(", ")})]})]})}function c({post:e,eager:t=!1}){return e.image?(0,r.jsx)("img",{className:"mj-cover",src:e.image,alt:"",loading:t?"eager":"lazy",decoding:"async"}):(0,r.jsx)("div",{className:"mj-cover mj-cover-fallback","aria-hidden":"true"})}function m({post:e}){return(0,r.jsx)("article",{className:"mj-card",children:(0,r.jsxs)(s.A,{to:e.permalink,className:"mj-card-link",children:[(0,r.jsx)("div",{className:"mj-card-media",children:(0,r.jsx)(c,{post:e})}),(0,r.jsxs)("div",{className:"mj-card-body",children:[(0,r.jsx)(o,{post:e,showAuthors:!1}),(0,r.jsx)("h3",{className:"mj-card-title",children:e.title}),(0,r.jsx)("p",{className:"mj-card-desc",children:e.description}),e.authors.length>0&&(0,r.jsx)("div",{className:"mj-byline",children:e.authors.map(e=>(0,r.jsxs)("span",{className:"mj-byline-author",children:[e.imageURL&&(0,r.jsx)("img",{src:e.imageURL,alt:"",width:22,height:22,loading:"lazy"}),e.name]},e.key??e.name))})]})]})})}function d({posts:e,eyebrow:t="Mercury Blog",heading:a,intro:u,archive:h=!1}){let g=(0,n.useMemo)(i,[]),[p,j]=(0,n.useState)(g.q),[x,f]=(0,n.useState)(g.c),[y,b]=(0,n.useState)(g.a),[w,v]=(0,n.useState)(g.s);(0,n.useEffect)(()=>(function(e,t,a,r){if("u"<typeof window)return;let n=new URLSearchParams;e&&n.set("q",e),t&&n.set("category",t),a&&n.set("author",a),"newest"!==r&&n.set("sort",r);let s=n.toString();window.history.replaceState(null,"",`${window.location.pathname}${s?`?${s}`:""}`)})(p,x,y,w),[p,x,y,w]);let N=(0,n.useMemo)(()=>{let t=new Map;for(let a of e)a.category&&t.set(a.category.label,(t.get(a.category.label)??0)+1);return[...t.entries()].sort((e,t)=>t[1]-e[1]).map(([e])=>e)},[e]),k=(0,n.useMemo)(()=>{let t=new Map;for(let a of e)for(let e of a.authors){let a=t.get(e.name)??{name:e.name,imageURL:e.imageURL,count:0};a.count++,t.set(e.name,a)}return[...t.values()].sort((e,t)=>t.count-e.count||e.name.localeCompare(t.name))},[e]),M=""!==p.trim()||""!==x||""!==y,$=h||M?void 0:e.find(e=>e.featured)??e[0],A=(0,n.useMemo)(()=>{let t=p.toLowerCase().split(/\s+/).filter(Boolean),a=e.filter(e=>{if($&&e.permalink===$.permalink||x&&e.category?.label!==x||y&&!e.authors.some(e=>e.name===y))return!1;if(0===t.length)return!0;let a=(0,l.wK)(e);return t.every(e=>a.includes(e))}),r=(e,t)=>t.date.localeCompare(e.date);return"oldest"===w?a.sort((e,t)=>e.date.localeCompare(t.date)):"author"===w?a.sort((e,t)=>(e.authors[0]?.name??"").localeCompare(t.authors[0]?.name??"")||r(e,t)):a.sort(r)},[e,$,p,x,y,w]);return(0,r.jsxs)("main",{className:"mj-page",children:[(0,r.jsxs)("header",{className:"mj-hero",children:[(0,r.jsx)("p",{className:"mj-eyebrow",children:t}),(0,r.jsx)("h1",{className:"mj-hero-title",children:a??"News, engineering notes and field reports from the people building Mercury."}),u&&(0,r.jsx)("p",{className:"mj-hero-intro",children:u}),(0,r.jsxs)("div",{className:"mj-search",role:"search",children:[(0,r.jsx)("svg",{viewBox:"0 0 24 24",width:"18",height:"18","aria-hidden":"true",children:(0,r.jsx)("path",{fill:"currentColor",d:"M10 4a6 6 0 1 0 3.87 10.59l4.27 4.27 1.41-1.41-4.27-4.27A6 6 0 0 0 10 4Zm0 2a4 4 0 1 1 0 8 4 4 0 0 1 0-8Z"})}),(0,r.jsx)("input",{type:"search",value:p,onChange:e=>j(e.target.value),placeholder:"Search posts, topics and authors","aria-label":"Search the blog"})]})]}),$&&(0,r.jsx)("section",{className:"mj-featured","aria-label":"Featured",children:(0,r.jsxs)(s.A,{to:$.permalink,className:"mj-featured-link",children:[(0,r.jsx)(c,{post:$,eager:!0}),(0,r.jsxs)("div",{className:"mj-featured-body",children:[(0,r.jsx)(o,{post:$}),(0,r.jsx)("h2",{className:"mj-featured-title",children:$.title}),(0,r.jsx)("p",{className:"mj-featured-desc",children:$.description}),(0,r.jsxs)("span",{className:"mj-readmore",children:["Read the post ",(0,r.jsx)("span",{"aria-hidden":"true",children:"\u2192"})]})]})]})}),(0,r.jsxs)("section",{className:"mj-controls","aria-label":"Filter and sort",children:[!h&&N.length>1&&(0,r.jsxs)("div",{className:"mj-chips",role:"tablist","aria-label":"Category",children:[(0,r.jsx)("button",{type:"button",role:"tab","aria-selected":""===x,className:""===x?"is-on":"",onClick:()=>f(""),children:"All"}),N.map(e=>(0,r.jsx)("button",{type:"button",role:"tab","aria-selected":x===e,className:x===e?"is-on":"",onClick:()=>f(x===e?"":e),children:e},e))]}),(0,r.jsxs)("div",{className:"mj-controls-right",children:[!h&&k.length>1&&(0,r.jsxs)("label",{className:"mj-select",children:[(0,r.jsx)("span",{children:"Author"}),(0,r.jsxs)("select",{value:y,onChange:e=>b(e.target.value),children:[(0,r.jsx)("option",{value:"",children:"Everyone"}),k.map(e=>(0,r.jsxs)("option",{value:e.name,children:[e.name," (",e.count,")"]},e.name))]})]}),(0,r.jsxs)("label",{className:"mj-select",children:[(0,r.jsx)("span",{children:"Sort"}),(0,r.jsxs)("select",{value:w,onChange:e=>v(e.target.value),children:[(0,r.jsx)("option",{value:"newest",children:"Newest"}),(0,r.jsx)("option",{value:"oldest",children:"Oldest"}),(0,r.jsx)("option",{value:"author",children:"By author"})]})]})]})]}),A.length>0?(0,r.jsx)("section",{className:"mj-grid","aria-label":"Posts",children:A.map(e=>(0,r.jsx)(m,{post:e},e.permalink))}):(0,r.jsxs)("p",{className:"mj-empty",children:["Nothing matches ",p?(0,r.jsxs)(r.Fragment,{children:["\u201C",p,"\u201D"]}):"those filters","."," ",(0,r.jsx)("button",{type:"button",onClick:()=>{j(""),f(""),b("")},children:"Clear filters"})]}),(0,r.jsxs)("footer",{className:"mj-index-foot",children:[(0,r.jsx)("a",{href:"/blog/rss.xml",children:"RSS"}),(0,r.jsx)("a",{href:"/blog/atom.xml",children:"Atom"}),(0,r.jsx)("a",{href:"/blog/feed.json",children:"JSON Feed"}),(0,r.jsx)("a",{href:"/llms.txt",children:"llms.txt"})]})]})}},99978(e,t,a){a.d(t,{A:()=>l});var r=a(74848);a(96540);var n=a(53572),s=a(10898);function l({permalink:e,title:t,imageAlt:a,image:i,labels:o=[],creators:c=[],section:m,breadcrumbs:d}){let{siteConfig:u}=(0,s.A)(),h=e=>/^https?:/.test(e)?e:`${u.url}${e}`,g=h(i??`/img/og${e.replace(/\/$/,"")}.jpg?v=2`),p=/\.jpe?g(\?|$)/i.test(g),j=d&&{"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:d.map((e,t)=>({"@type":"ListItem",position:t+1,name:e.name,item:h(e.path)}))};return(0,r.jsxs)(n.A,{children:[(0,r.jsx)("meta",{property:"og:image",content:g}),(0,r.jsx)("meta",{property:"og:image:secure_url",content:g}),!i&&(0,r.jsx)("meta",{property:"og:image:type",content:p?"image/jpeg":"image/png"}),!i&&(0,r.jsx)("meta",{property:"og:image:width",content:"1200"}),!i&&(0,r.jsx)("meta",{property:"og:image:height",content:"630"}),(0,r.jsx)("meta",{property:"og:image:alt",content:a}),(0,r.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,r.jsx)("meta",{name:"twitter:image",content:g}),(0,r.jsx)("meta",{name:"twitter:image:alt",content:a}),(0,r.jsx)("meta",{property:"og:title",content:t}),(0,r.jsx)("meta",{name:"twitter:title",content:t}),c[0]&&(0,r.jsx)("meta",{name:"twitter:creator",content:c[0]}),m&&(0,r.jsx)("meta",{property:"article:section",content:m}),o.slice(0,2).flatMap(([e,t],a)=>[(0,r.jsx)("meta",{name:`twitter:label${a+1}`,content:e},`l${a}`),(0,r.jsx)("meta",{name:`twitter:data${a+1}`,content:t},`d${a}`)]),j&&(0,r.jsx)("script",{type:"application/ld+json",children:JSON.stringify(j)})]})}},21677(e,t,a){function r(e){return new Date(e).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric",timeZone:"UTC"})}function n(e){return e.map(({content:e})=>{let t=e.metadata;return{permalink:t.permalink,title:t.title,description:t.description,date:t.date,formattedDate:r(t.date),readingMinutes:Math.max(1,Math.round(t.readingTime??1)),category:t.tags[0]??null,tags:t.tags,authors:t.authors,image:e.assets?.image??t.frontMatter.image,featured:!0===t.frontMatter.featured}})}function s(e){return[e.title,e.description,e.category?.label,...e.tags.map(e=>e.label),...e.authors.map(e=>e.name)].filter(Boolean).join(" ").toLowerCase()}a.d(t,{Iw:()=>n,Yq:()=>r,wK:()=>s})},39858(e,t,a){a.r(t),a.d(t,{default:()=>p});var r=a(74848);a(96540);var n=a(34164),s=a(60816),l=a(34308),i=a(88287),o=a(54175),c=a(53572),m=a(17645);function d(e){let t=(0,m.kJ)(e);return(0,r.jsx)(c.A,{children:(0,r.jsx)("script",{type:"application/ld+json",children:JSON.stringify(t)})})}var u=a(31911),h=a(99978),g=a(21677);function p(e){let{metadata:t,items:a}=e;return(0,r.jsxs)(l.e3,{className:(0,n.A)(i.G.wrapper.blogPages,i.G.page.blogListPage,"mj-root"),children:[(0,r.jsx)(l.be,{title:t.blogTitle,description:t.blogDescription}),(0,r.jsx)(o.A,{tag:"blog_posts_list"}),(0,r.jsx)(d,{...e}),(0,r.jsx)(h.A,{permalink:t.permalink,title:t.blogTitle,imageAlt:"Mercury Blog: news, engineering notes and field reports from the people building Mercury.",breadcrumbs:[{name:"Mercury",path:"/"},{name:"Blog",path:"/blog"}]}),(0,r.jsx)(s.A,{children:(0,r.jsx)(u.A,{posts:(0,g.Iw)(a)})})]})}}}]);