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.

14.7 KB
Raw Blame
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([["2170"],{45099(e,n,s){s.r(n),s.d(n,{metadata:()=>r,default:()=>x,frontMatter:()=>a,contentTitle:()=>l,toc:()=>o,assets:()=>d});var r=JSON.parse('{"id":"releases/1.1.12","title":"v1.1.12 \u2014 Daemon Hotfix","description":"Hotfix on top of v1.1.11. Standalone binaries can now start in the background, so Telegram works again for users who installed Mercury via the one-line installer.","source":"@site/docs/releases/1.1.12.mdx","sourceDirName":"releases","slug":"/releases/1.1.12","permalink":"/docs/releases/1.1.12","draft":false,"unlisted":false,"editUrl":"https://github.com/cosmicstack-labs/mercury-agent/tree/main/website/docs/releases/1.1.12.mdx","tags":[],"version":"current","frontMatter":{"title":"v1.1.12 \u2014 Daemon Hotfix","sidebar_label":"v1.1.12","description":"Hotfix on top of v1.1.11. Standalone binaries can now start in the background, so Telegram works again for users who installed Mercury via the one-line installer.","image":"/img/og/1.1.11.png","keywords":["mercury","mercury-agent","hotfix","daemon","telegram","standalone-binary","release","1.1.12"]},"sidebar":"docsSidebar","previous":{"title":"v1.1.13","permalink":"/docs/releases/1.1.13"},"next":{"title":"v1.1.11","permalink":"/docs/releases/1.1.11"}}'),i=s(74848),t=s(28453),c=s(53572);let a={title:"v1.1.12 \u2014 Daemon Hotfix",sidebar_label:"v1.1.12",description:"Hotfix on top of v1.1.11. Standalone binaries can now start in the background, so Telegram works again for users who installed Mercury via the one-line installer.",image:"/img/og/1.1.11.png",keywords:["mercury","mercury-agent","hotfix","daemon","telegram","standalone-binary","release","1.1.12"]},l="v1.1.12 \u2014 Daemon Hotfix",d={},o=[{value:"What was broken",id:"what-was-broken",level:2},{value:"Fixed",id:"fixed",level:2},{value:"Who is affected",id:"who-is-affected",level:2},{value:"Upgrade",id:"upgrade",level:2},{value:"Verify",id:"verify",level:2},{value:"Standalone binaries",id:"standalone-binaries",level:2},{value:"Files changed",id:"files-changed",level:2}];function h(e){let n={a:"a",blockquote:"blockquote",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,t.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(c.A,{children:[(0,i.jsx)("meta",{property:"og:title",content:"Mercury Agent v1.1.12 \u2014 Daemon Hotfix"}),(0,i.jsx)("meta",{property:"og:description",content:"Standalone binaries can now start in the background. Telegram works again for users who installed Mercury via the one-line installer."}),(0,i.jsx)("meta",{property:"og:type",content:"article"}),(0,i.jsx)("meta",{property:"og:url",content:"https://mercuryagent.sh/docs/releases/1.1.12"}),(0,i.jsx)("meta",{property:"og:image",content:"https://mercuryagent.sh/img/og/1.1.11.png"}),(0,i.jsx)("meta",{property:"og:site_name",content:"Mercury Agent \u2014 Soul-driven"}),(0,i.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,i.jsx)("meta",{name:"twitter:site",content:"@mercuryagent"}),(0,i.jsx)("meta",{name:"twitter:title",content:"Mercury Agent v1.1.12 \u2014 Daemon Hotfix"}),(0,i.jsx)("meta",{name:"twitter:description",content:"Daemon now starts correctly from standalone binaries. Telegram is live again."}),(0,i.jsx)("meta",{name:"twitter:image",content:"https://mercuryagent.sh/img/og/1.1.11.png"}),(0,i.jsx)("link",{rel:"canonical",href:"https://mercuryagent.sh/docs/releases/1.1.12"})]}),"\n",(0,i.jsx)(n.header,{children:(0,i.jsx)(n.h1,{id:"v1112--daemon-hotfix",children:"v1.1.12 \u2014 Daemon Hotfix"})}),"\n",(0,i.jsxs)(n.blockquote,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsxs)(n.strong,{children:["Hotfix on top of ",(0,i.jsx)(n.a,{href:"/docs/releases/1.1.11",children:"v1.1.11"}),"."]})," If you installed Mercury via the one-line installer (or ",(0,i.jsx)(n.code,{children:"npm i -g"})," on a Bun-compiled binary), this release fixes a critical bug where the background daemon refused to start \u2014 which also meant Telegram never came online."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["If you are running ",(0,i.jsx)(n.code,{children:"1.1.11"})," from a standalone binary on a web server or any always-on box, ",(0,i.jsx)(n.strong,{children:"upgrade now"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"what-was-broken",children:"What was broken"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"mercury start"})," (and ",(0,i.jsx)(n.code,{children:"mercury up"}),", and ",(0,i.jsx)(n.code,{children:"mercury service install"}),") spawned the daemon child with:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-ts",children:"spawn(process.execPath, [process.argv[1], 'start', '--daemon'], ...)\n"})}),"\n",(0,i.jsxs)(n.p,{children:["This worked for npm installs (",(0,i.jsx)(n.code,{children:"node dist/index.js start --daemon"}),") but completely broke standalone Bun-compiled binaries:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"process.execPath"})," was ",(0,i.jsx)(n.code,{children:"/usr/local/bin/mercury"})," \u2014 the binary itself."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"process.argv[1]"})," was a bun-virtual ",(0,i.jsx)(n.code,{children:"/$bunfs/root/.../index.js"})," path that exists only inside the compiled binary's embedded filesystem."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["The spawn became ",(0,i.jsx)(n.code,{children:'mercury "/$bunfs/root/..." start --daemon'}),". Commander treated the bunfs path as an unknown subcommand, the child died instantly, the PID file was written and then immediately reaped \u2014 and ",(0,i.jsx)(n.code,{children:"channels.startAll()"})," (the only place Telegram's ",(0,i.jsx)(n.code,{children:"bot.start()"})," runs in daemon mode) was never reached."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"mercury service install"})," had the same flaw, but worse: it persisted that bad command into the macOS LaunchAgent plist / Linux systemd unit / Windows Task Scheduler entry, so the failure also survived reboots."]}),"\n",(0,i.jsx)(n.h2,{id:"fixed",children:"Fixed"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Daemon spawn now picks the right invocation per install channel"})," \u2014 new ",(0,i.jsx)(n.code,{children:"isStandaloneBinary()"})," detection in ",(0,i.jsx)(n.code,{children:"src/cli/daemon.ts"})," looks at ",(0,i.jsx)(n.code,{children:"process.versions.bun"}),", ",(0,i.jsx)(n.code,{children:"$bunfs"})," / ",(0,i.jsx)(n.code,{children:"~BUN"})," markers in ",(0,i.jsx)(n.code,{children:"argv[1]"}),", and the ",(0,i.jsx)(n.code,{children:"execPath"})," basename. It builds:","\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"[node, dist/index.js, 'start', '--daemon']"})," for npm installs."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"[bun, src/index.ts, 'start', '--daemon']"})," for ",(0,i.jsx)(n.code,{children:"bun <script>"})," dev runs."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"[mercury, 'start', '--daemon']"})," for standalone binaries (no script path)."]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"System-service files are correct on both channels"})," \u2014 ",(0,i.jsx)(n.code,{children:"getServiceLaunchArgs()"})," is now wired into the macOS / Linux / Windows installers in ",(0,i.jsx)(n.code,{children:"src/cli/service.ts"}),", so the persisted LaunchAgent plist ",(0,i.jsx)(n.code,{children:"ProgramArguments"}),", systemd ",(0,i.jsx)(n.code,{children:"ExecStart="}),", and Task Scheduler command all use the binary-only invocation when running standalone. Auto-start on boot works end-to-end again."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Telegram comes back online in background mode"})," \u2014 a direct consequence of the daemon fix. No Telegram-specific code changed."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"who-is-affected",children:"Who is affected"}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Install path"}),(0,i.jsx)(n.th,{children:"1.1.11 background mode"}),(0,i.jsx)(n.th,{children:"1.1.12 background mode"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"npm i -g @cosmicstack/mercury-agent"})}),(0,i.jsx)(n.td,{children:"\u2705 Works"}),(0,i.jsx)(n.td,{children:"\u2705 Works"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsxs)(n.td,{children:[(0,i.jsx)(n.code,{children:"curl \u2026 install.sh | sh"})," (standalone)"]}),(0,i.jsx)(n.td,{children:"\u274C Broken"}),(0,i.jsx)(n.td,{children:"\u2705 Works"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsxs)(n.td,{children:[(0,i.jsx)(n.code,{children:"irm \u2026 install.ps1 | iex"})," (standalone)"]}),(0,i.jsx)(n.td,{children:"\u274C Broken"}),(0,i.jsx)(n.td,{children:"\u2705 Works"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsxs)(n.td,{children:[(0,i.jsx)(n.code,{children:"mercury service install"})," (standalone)"]}),(0,i.jsx)(n.td,{children:"\u274C Broken (also persists across reboots)"}),(0,i.jsx)(n.td,{children:"\u2705 Works"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsxs)(n.td,{children:[(0,i.jsx)(n.code,{children:"mercury"})," from ",(0,i.jsx)(n.code,{children:"bun src/index.ts \u2026"})," (dev)"]}),(0,i.jsx)(n.td,{children:"\u2705 Works"}),(0,i.jsx)(n.td,{children:"\u2705 Works"})]})]})]}),"\n",(0,i.jsx)(n.h2,{id:"upgrade",children:"Upgrade"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"npm:"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"npm install -g @cosmicstack/[email protected]\nmercury restart\n"})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"Standalone (macOS / Linux):"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"curl -fsSL https://mercuryagent.sh/install.sh | bash\nmercury restart\n"})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"Standalone (Windows):"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-powershell",children:"irm https://mercuryagent.sh/install.ps1 | iex\nmercury restart\n"})}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsxs)(n.strong,{children:["If you had ",(0,i.jsx)(n.code,{children:"mercury service install"})," set up under 1.1.11"]})," (broken command was persisted into the service file), reinstall the service after upgrading the binary:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"mercury service uninstall\nmercury service install\n"})}),"\n",(0,i.jsx)(n.h2,{id:"verify",children:"Verify"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:'mercury start\nmercury status   # should show a live PID\nmercury logs     # should show "Mercury is live (daemon mode)" and Telegram polling startup\n'})}),"\n",(0,i.jsx)(n.p,{children:"If you use Telegram, send a message to your bot \u2014 it should respond as before."}),"\n",(0,i.jsx)(n.h2,{id:"standalone-binaries",children:"Standalone binaries"}),"\n",(0,i.jsx)(n.p,{children:"Same five targets as v1.1.11:"}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"OS"}),(0,i.jsx)(n.th,{children:"Architecture"}),(0,i.jsx)(n.th,{children:"Binary"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"macOS"}),(0,i.jsx)(n.td,{children:"Apple Silicon"}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"mercury-macos-arm64"})})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"macOS"}),(0,i.jsx)(n.td,{children:"Intel"}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"mercury-macos-x64"})})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Linux"}),(0,i.jsx)(n.td,{children:"x86-64"}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"mercury-linux-x64"})})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Linux"}),(0,i.jsx)(n.td,{children:"ARM64"}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"mercury-linux-arm64"})})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Windows"}),(0,i.jsx)(n.td,{children:"x86-64"}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"mercury-win-x64.exe"})})]})]})]}),"\n",(0,i.jsx)(n.p,{children:"Direct downloads:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/cosmicstack-labs/mercury-agent/releases/download/v1.1.12/mercury-macos-arm64",children:"mercury-macos-arm64"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/cosmicstack-labs/mercury-agent/releases/download/v1.1.12/mercury-macos-x64",children:"mercury-macos-x64"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/cosmicstack-labs/mercury-agent/releases/download/v1.1.12/mercury-linux-x64",children:"mercury-linux-x64"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/cosmicstack-labs/mercury-agent/releases/download/v1.1.12/mercury-linux-arm64",children:"mercury-linux-arm64"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/cosmicstack-labs/mercury-agent/releases/download/v1.1.12/mercury-win-x64.exe",children:"mercury-win-x64.exe"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://github.com/cosmicstack-labs/mercury-agent/releases/download/v1.1.12/checksums.txt",children:"checksums.txt"})}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"files-changed",children:"Files changed"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"src/cli/daemon.ts"})," \u2014 ",(0,i.jsx)(n.code,{children:"isStandaloneBinary()"})," + ",(0,i.jsx)(n.code,{children:"buildDaemonSpawnArgs()"}),"; ",(0,i.jsx)(n.code,{children:"ensureDaemonRunning()"})," uses them."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"src/cli/service.ts"})," \u2014 ",(0,i.jsx)(n.code,{children:"getServiceLaunchArgs()"})," wired into macOS / Linux / Windows installers."]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"No new dependencies. No breaking changes. No config migrations."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Full changelog:"})," ",(0,i.jsx)(n.a,{href:"https://github.com/cosmicstack-labs/mercury-agent/compare/v1.1.11...v1.1.12",children:"v1.1.11 \u2192 v1.1.12"})]})]})}function x(e={}){let{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},28453(e,n,s){s.d(n,{R:()=>c,x:()=>a});var r=s(96540);let i={},t=r.createContext(i);function c(e){let n=r.useContext(t);return r.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:c(e.components),r.createElement(t.Provider,{value:n},e.children)}}}]);