@vibecontrols/agent 2026.608.1 → 2026.814.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/dist/{agent-config-pxkfd7ec.js → agent-config-hzzh97dn.js} +1 -1
  2. package/dist/{agent-ready-tracker-pyw7zrp0.js → agent-ready-tracker-gx1yqwjk.js} +1 -1
  3. package/dist/app-k3dex7x4.js +2 -0
  4. package/dist/bootstrap-workspace-dg1e3fp6.js +2 -0
  5. package/dist/bootstrap.service-nbhhd4pa.js +2 -0
  6. package/dist/bridge-client-zye1vz1y.js +2 -0
  7. package/dist/cli.js +1 -1
  8. package/dist/daemon-profile-ryakpcbx.js +2 -0
  9. package/dist/{esm-6f3dfn6v.js → esm-cg5tnbkd.js} +1 -1
  10. package/dist/{finalize-retry-handle-registry-xnm9kxry.js → finalize-retry-handle-registry-kzfqhvwv.js} +1 -1
  11. package/dist/{finalize-retry-worker-vfdskqb5.js → finalize-retry-worker-74wxbdsh.js} +1 -1
  12. package/dist/gateway-client-8y9yd0ch.js +2 -0
  13. package/dist/{getMachineId-bsd-753751sw.js → getMachineId-bsd-65jabrgp.js} +1 -1
  14. package/dist/{getMachineId-darwin-na1pranq.js → getMachineId-darwin-yykv9khr.js} +1 -1
  15. package/dist/{getMachineId-linux-dmn0ncdm.js → getMachineId-linux-w09acg2n.js} +1 -1
  16. package/dist/{getMachineId-unsupported-yv77j894.js → getMachineId-unsupported-dwr7bb60.js} +1 -1
  17. package/dist/{getMachineId-win-9hmyqmm0.js → getMachineId-win-0wkw4jek.js} +1 -1
  18. package/dist/highlights-5wfvq2xq.js +2 -0
  19. package/dist/highlights-fdyzf5xj.js +2 -0
  20. package/dist/highlights-g5bek66n.js +2 -0
  21. package/dist/highlights-scv26t06.js +2 -0
  22. package/dist/highlights-tx5ed845.js +2 -0
  23. package/dist/{index-thammzct.js → index-0s81cfpe.js} +1 -1
  24. package/dist/{index-wetsgcyq.js → index-13xxbf03.js} +1 -1
  25. package/dist/{index-rjhcmnx0.js → index-16czz4df.js} +1 -1
  26. package/dist/{index-kt5zxp42.js → index-1ptfacy9.js} +1 -1
  27. package/dist/{index-xrs52f2c.js → index-2bjqvapr.js} +1 -1
  28. package/dist/{index-68r2ex9d.js → index-2gwc485c.js} +1 -1
  29. package/dist/{index-84hfet2g.js → index-2jxqpj7r.js} +9 -9
  30. package/dist/{index-ebx79cc1.js → index-4gt22c81.js} +1 -1
  31. package/dist/{index-jrtsdm8f.js → index-53qthjhb.js} +1 -1
  32. package/dist/{index-m9dpfyxb.js → index-5s2zc91f.js} +1 -1
  33. package/dist/{index-cv0xhb46.js → index-5wsfsj88.js} +3 -3
  34. package/dist/{index-z73x3sdf.js → index-7vwefvxd.js} +1 -1
  35. package/dist/{index-p9cgvp3x.js → index-8k78bp4w.js} +1 -1
  36. package/dist/{index-bfeekmyh.js → index-9g3vxhby.js} +1 -1
  37. package/dist/{index-z2gbk1pn.js → index-c0fgge10.js} +2 -2
  38. package/dist/{index-xnr6t79p.js → index-c4p1qcnn.js} +6 -6
  39. package/dist/{index-85ke6hng.js → index-c975k3pk.js} +2 -2
  40. package/dist/{index-t8tnkqxh.js → index-e2dqz3tw.js} +1 -1
  41. package/dist/{index-8sdrhr3q.js → index-g9fthh7a.js} +1 -1
  42. package/dist/{index-c7554sg7.js → index-gb5bnx7a.js} +1 -1
  43. package/dist/{index-qwtspxw8.js → index-gx53t38f.js} +1 -1
  44. package/dist/{index-97mq40rr.js → index-jb3v3b39.js} +1 -1
  45. package/dist/{index-zhyxdyk6.js → index-jqfsvf8f.js} +1 -1
  46. package/dist/{index-41vve5br.js → index-jrxbbb7p.js} +49 -49
  47. package/dist/{index-6p3gcnxr.js → index-m2kkd6t6.js} +1 -1
  48. package/dist/{index-08y76yzh.js → index-nj7bvgws.js} +1 -1
  49. package/dist/{index-4qq083yd.js → index-ntj6ymk8.js} +1 -1
  50. package/dist/index-nwh7j7ap.js +2 -0
  51. package/dist/{index-4hn26x1h.js → index-pc05r6fd.js} +1 -1
  52. package/dist/{index-a4854mwz.js → index-q9dp55wv.js} +1 -1
  53. package/dist/{index-ep3zb271.js → index-qzhvhyvq.js} +1 -1
  54. package/dist/{index-bwt6c337.js → index-r49hb09r.js} +2 -2
  55. package/dist/{index-63ba5fb4.js → index-sv4rzv3f.js} +1 -1
  56. package/dist/{index-ghz61a5p.js → index-tcwmw7ed.js} +5 -5
  57. package/dist/{index-eawbdgkb.js → index-wd2ak0q4.js} +1 -1
  58. package/dist/{index-x649afed.js → index-wndzw5pk.js} +2 -2
  59. package/dist/{index-czrb2yd1.js → index-zabjc8f2.js} +1 -1
  60. package/dist/{index-pgew6sge.js → index-zaw78sxw.js} +2 -2
  61. package/dist/{index-yas07mv9.js → index-zb7nfmts.js} +1 -1
  62. package/dist/index.js +2 -2
  63. package/dist/injections-agpjxatz.js +2 -0
  64. package/dist/interactive-ewe5szk5.js +2 -0
  65. package/dist/key.cmd-xefsd8p4.js +2 -0
  66. package/dist/log-shipper-4h1k4kp6.js +2 -0
  67. package/dist/{path-utils-hxdyv2zn.js → path-utils-cg1gsy4m.js} +1 -1
  68. package/dist/{plugin-system-jegwkd9p.js → plugin-system-ksatnqp4.js} +1 -1
  69. package/dist/prereqs-runner-6yf1e5e3.js +2 -0
  70. package/dist/profile-mount-13qvjqbg.js +2 -0
  71. package/dist/prune-stale-shims-t6kdd2an.js +2 -0
  72. package/dist/register-core-9k4zxnsg.js +2 -0
  73. package/dist/secondary-profile-attach-42x68g0c.js +2 -0
  74. package/dist/subprocess-6m8bja6s.js +2 -0
  75. package/dist/telemetry-mq37zapd.js +2 -0
  76. package/dist/tree-sitter-javascript-emqv64wx.js +2 -0
  77. package/dist/tree-sitter-markdown-v98rp3y1.js +2 -0
  78. package/dist/tree-sitter-markdown_inline-5gq03gn2.js +2 -0
  79. package/dist/tree-sitter-typescript-gr7ymg9w.js +2 -0
  80. package/dist/tree-sitter-zig-59q80fch.js +2 -0
  81. package/dist/tunnel-bootstrap-50fm2wt8.js +2 -0
  82. package/package.json +3 -4
  83. package/dist/app-wj8qwk11.js +0 -2
  84. package/dist/bootstrap-workspace-1ff98st2.js +0 -2
  85. package/dist/bootstrap.service-vg72w8pa.js +0 -2
  86. package/dist/bridge-client-73z9c5nm.js +0 -2
  87. package/dist/daemon-profile-696722nr.js +0 -2
  88. package/dist/gateway-client-xdy5g715.js +0 -2
  89. package/dist/highlights-00fcgwwq.js +0 -2
  90. package/dist/highlights-23bc8zge.js +0 -2
  91. package/dist/highlights-4mhb2pb0.js +0 -2
  92. package/dist/highlights-q7w64nwb.js +0 -2
  93. package/dist/highlights-xwdw5xay.js +0 -2
  94. package/dist/index-p23tet7a.js +0 -2
  95. package/dist/injections-x3xya90r.js +0 -2
  96. package/dist/interactive-qc1j66mq.js +0 -2
  97. package/dist/key.cmd-q8c7ywwd.js +0 -2
  98. package/dist/log-shipper-hjnn1d5p.js +0 -2
  99. package/dist/prereqs-runner-t5jhqr7x.js +0 -2
  100. package/dist/profile-mount-m714p85h.js +0 -2
  101. package/dist/prune-stale-shims-23y0stm8.js +0 -2
  102. package/dist/register-core-r7fjpp4w.js +0 -2
  103. package/dist/secondary-profile-attach-kxg4xj2t.js +0 -2
  104. package/dist/subprocess-q2ky0ptw.js +0 -2
  105. package/dist/telemetry-jxfgrm61.js +0 -2
  106. package/dist/tree-sitter-javascript-q22gvtms.js +0 -2
  107. package/dist/tree-sitter-markdown-pntsjzm3.js +0 -2
  108. package/dist/tree-sitter-markdown_inline-g1wzqf7k.js +0 -2
  109. package/dist/tree-sitter-typescript-m9yfes10.js +0 -2
  110. package/dist/tree-sitter-zig-jmh62j90.js +0 -2
  111. package/dist/tunnel-bootstrap-zdczwezc.js +0 -2
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Xa as R}from"./index-0ckffygp.js";import{bb as j}from"./index-jrtsdm8f.js";import{Bd as D,Ed as P,Ld as g,Od as M}from"./index-xnr6t79p.js";import{$d as x,Yd as y,ae as A}from"./index-a4854mwz.js";import{spawn as _}from"child_process";import{createHash as f}from"crypto";import{existsSync as u,promises as V,createWriteStream as h}from"fs";import{homedir as m,tmpdir as p}from"os";import*as q from"path";import{Readable as d}from"stream";import{pipeline as l}from"stream/promises";function n(){let G=process.arch==="x64"?"x64":"arm64";return`${process.platform==="win32"?"win32":process.platform==="darwin"?"darwin":"linux"}-${G}`}function c(){return q.join(m(),".boff","vibecontrols","tools")}function L(G,J){let X=J??G;if(process.platform==="win32"&&!X.toLowerCase().endsWith(".exe"))return`${X}.exe`;return X}function o(G,J,X){return q.join(X??c(),G,L(G,J))}async function E(G,J){if(!J.versionMatcher)return!0;return new Promise((X)=>{let Y=_(G,J.versionArgs??["--version"],{stdio:["ignore","pipe","pipe"]}),K="";Y.stdout.on("data",(H)=>K+=H.toString()),Y.stderr.on("data",(H)=>K+=H.toString()),Y.on("close",()=>{try{X(new RegExp(J.versionMatcher).test(K))}catch{X(!1)}}),Y.on("error",()=>X(!1))})}async function i(G){let J=G.platform??n(),X=L(G.name,G.binaryName),Y=o(G.name,G.binaryName,G.cacheRoot);if(u(Y)&&await E(Y,G))return Y;try{let H=typeof Bun<"u"&&typeof Bun.which==="function"?Bun.which(G.binaryName??G.name,{PATH:process.env.PATH}):null;if(H&&await E(H,G))return G.log?.info?.(`[install] using PATH binary ${G.name} (${H})`),H}catch{}let K=G.downloads[J];if(!K)throw Error(`[install] no download manifest entry for ${G.name} on ${J}`);return G.log?.info?.(`[install] downloading ${G.name} for ${J}`),await V.mkdir(q.dirname(Y),{recursive:!0}),await a(K,Y,X,G.name),G.log?.info?.(`[install] installed ${G.name} \u2192 ${Y}`),Y}async function a(G,J,X,Y){let K=q.dirname(J),H=q.join(p(),`vibe-install-${Y}-${process.pid}`);await V.mkdir(H,{recursive:!0});let $=q.join(H,"artifact");try{let Z=await fetch(G.url,{redirect:"follow"});if(!Z.ok)throw Error(`download failed (${Z.status}) for ${G.url}`);if(!Z.body)throw Error(`empty response body for ${G.url}`);if(await l(d.fromWeb(Z.body),h($)),G.sha256){let I=f("sha256").update(await V.readFile($)).digest("hex");if(I!==G.sha256)throw Error(`sha256 mismatch for ${Y}: expected ${G.sha256}, got ${I}`)}let z=G.archive??(G.url.endsWith(".tar.gz")||G.url.endsWith(".tgz")?"tar.gz":G.url.endsWith(".zip")?"zip":"raw");if(z==="raw")await V.copyFile($,J);else{if(z==="tar.gz")await w("tar",["-xzf",$,"-C",H]);else await s($,H);let I=G.binaryWithinArchive??X;await V.copyFile(q.join(H,I),J)}if(process.platform!=="win32")await V.chmod(J,493)}finally{await V.rm(H,{recursive:!0,force:!0})}}async function s(G,J){try{await w("unzip",["-q","-o",G,"-d",J]);return}catch(X){if(process.platform!=="win32")throw X;await w("tar",["-xf",G,"-C",J])}}async function w(G,J){return new Promise((X,Y)=>{let K=_(G,J,{stdio:["ignore","ignore","pipe"]}),H="";K.stderr.on("data",($)=>H+=$.toString()),K.on("close",($)=>$===0?X():Y(Error(`${G} exit ${$}: ${H}`))),K.on("error",Y)})}var W="https://github.com/cloudflare/cloudflared/releases/latest/download",r={"linux-x64":{url:`${W}/cloudflared-linux-amd64`,archive:"raw"},"linux-arm64":{url:`${W}/cloudflared-linux-arm64`,archive:"raw"},"darwin-x64":{url:`${W}/cloudflared-darwin-amd64.tgz`,archive:"tar.gz",binaryWithinArchive:"cloudflared"},"darwin-arm64":{url:`${W}/cloudflared-darwin-arm64.tgz`,archive:"tar.gz",binaryWithinArchive:"cloudflared"},"win32-x64":{url:`${W}/cloudflared-windows-amd64.exe`,archive:"raw"},"win32-arm64":{url:`${W}/cloudflared-windows-arm64.exe`,archive:"raw"}},t=/(https:\/\/(?!api\.)[a-zA-Z0-9-]+\.trycloudflare\.com)/;async function N(G,J){let X=J?.log??{},Y;try{Y=await i({name:"cloudflared",downloads:r,versionMatcher:"cloudflared version",log:X})}catch($){return X.warn?.(`quick-tunnel: could not obtain cloudflared: ${String($)}`),null}let K;try{K=_(Y,["tunnel","--url",`http://127.0.0.1:${G}`,"--no-autoupdate"],{stdio:["ignore","pipe","pipe"]})}catch($){return X.warn?.(`quick-tunnel: failed to spawn cloudflared: ${String($)}`),null}let H=await new Promise(($)=>{let Z=!1,z=(Q)=>{if(Z)return;Z=!0,$(Q)},I=setTimeout(()=>{X.warn?.("quick-tunnel: cloudflared did not advertise a URL in time"),z(null)},J?.timeoutMs??30000),O=(Q)=>{let B=Q.toString("utf8").match(t);if(B)clearTimeout(I),z(B[0])};K.stdout?.on("data",O),K.stderr?.on("data",O),K.on("error",(Q)=>{clearTimeout(I),X.warn?.(`quick-tunnel: cloudflared failed to spawn: ${String(Q)}`),z(null)}),K.on("exit",(Q)=>{clearTimeout(I),X.warn?.(`quick-tunnel: cloudflared exited (code=${Q})`),z(null)})});if(!H)return null;return{url:H,child:K}}import{existsSync as b,mkdirSync as e,readFileSync as GG,writeFileSync as JG,unlinkSync as XG}from"fs";import{dirname as YG,join as S}from"path";import{readdirSync as $G}from"fs";function T(G){return S(G??x(),"tunnel.state.json")}function v(G,J){let X=T(J);try{e(YG(X),{recursive:!0}),JG(X,JSON.stringify(G,null,2),"utf8")}catch(Y){M().logger.warn("tunnel-state","Failed to persist tunnel state",{error:String(Y)})}}function k(G){let J=T(G);if(!b(J))return null;try{let X=GG(J,"utf8"),Y=JSON.parse(X);if(typeof Y.pid!=="number")return null;return Y}catch(X){return M().logger.warn("tunnel-state","Failed to read tunnel state",{error:String(X)}),null}}function F(G){let J=T(G);if(!b(J))return;try{XG(J)}catch{}}function C(G){return R().isProcessAlive(G)}function xG(G){let J=[];if(G?.allProfiles){let Y;try{Y=A()}catch{return J}let K;try{K=$G(Y)}catch{return J}for(let H of K){let $=S(Y,H),Z=k($);if(Z)J.push({...Z,alive:C(Z.pid),profileDir:$})}return J}let X=k();if(X)J.push({...X,alive:C(X.pid),profileDir:x()});return J}function HG(G){return G.replace(/[^A-Za-z0-9_]/g,"_")}function U(){return(g()??M()).tunnel}async function AG(G,J){let X=U();MG(G),KG();let Y=process.env.AGENT_TUNNEL_URL;if(Y){let $=P(Y);if(!$)return M().logger.warn("tunnel-bootstrap","Ignoring invalid AGENT_TUNNEL_URL"),null;X.url=$,X.externalUrl=!0,M().logger.info("tunnel-bootstrap",`Using AGENT_TUNNEL_URL=${$}`);try{j.emit("tunnel.url_assigned",{provider:"external"})}catch{}return $}let K=J.port,H=await N(K,{log:{info:($)=>M().logger.info("tunnel-bootstrap",$),warn:($)=>M().logger.warn("tunnel-bootstrap",$)}});if(!H)return M().logger.warn("tunnel-bootstrap","No bootstrap tunnel \u2014 the agent will register once the tunnel provider starts post-config"),null;if(X.child=H.child,X.url=H.url,X.url){M().logger.info("tunnel-bootstrap",`Bootstrap tunnel ready: ${X.url}`);try{let z=new URL(X.url).hostname.split(".");if(z.length>=2)D("."+z.slice(-2).join("."))}catch{}try{j.emit("tunnel.url_assigned",{provider:"bootstrap"})}catch{}let $=HG(y());if(process.env[`AGENT_TUNNEL_URL_${$}`]=X.url,X.child?.pid!==void 0)process.env[`AGENT_TUNNEL_PID_${$}`]=String(X.child.pid),v({pid:X.child.pid,url:X.url,startedAt:new Date().toISOString(),provider:"bootstrap",port:K,cmd:`cloudflared tunnel --url http://127.0.0.1:${K}`})}return X.url}function bG(){let G=U();if(G.externalUrl)return!1;if(!G.child||G.child.killed)return!1;let J=G.child.pid;if(J===void 0)return!1;try{process.kill(J,0)}catch{return!1}return G.child=null,F(),M().logger.info("tunnel-bootstrap",`Handed over bootstrap tunnel (PID ${J}) to plugin \u2014 process kept alive`),!0}function SG(){let G=U();if(G.externalUrl){F();return}let J=G.child;if(G.child=null,F(),!J||J.killed)return;try{J.kill("SIGTERM"),M().logger.info("tunnel-bootstrap","Bootstrap tunnel stopped")}catch{}}function vG(){return U().url}function KG(){let G=k();if(!G)return;if(!C(G.pid)){F();return}try{process.kill(G.pid,"SIGTERM"),M().logger.info("tunnel-bootstrap","Reaped orphan tunnel from prior run",{pid:G.pid,provider:G.provider})}catch{}let J=Date.now();while(Date.now()-J<2000&&C(G.pid))Bun.sleepSync(50);if(C(G.pid))try{process.kill(G.pid,"SIGKILL")}catch{}F()}function MG(G){let J={name:"bootstrap",async getActiveTunnelUrl(){return U().url}};G.registerProvider("tunnel",J,"bootstrap")}
2
+ import{Xa as R}from"./index-0ckffygp.js";import{bb as j}from"./index-53qthjhb.js";import{Bd as D,Fd as P,Md as g,Pd as M}from"./index-c4p1qcnn.js";import{Zd as y,ae as x,be as A}from"./index-q9dp55wv.js";import{spawn as _}from"child_process";import{createHash as f}from"crypto";import{existsSync as u,promises as V,createWriteStream as h}from"fs";import{homedir as m,tmpdir as p}from"os";import*as q from"path";import{Readable as d}from"stream";import{pipeline as l}from"stream/promises";function n(){let G=process.arch==="x64"?"x64":"arm64";return`${process.platform==="win32"?"win32":process.platform==="darwin"?"darwin":"linux"}-${G}`}function c(){return q.join(m(),".boff","vibecontrols","tools")}function L(G,J){let X=J??G;if(process.platform==="win32"&&!X.toLowerCase().endsWith(".exe"))return`${X}.exe`;return X}function o(G,J,X){return q.join(X??c(),G,L(G,J))}async function E(G,J){if(!J.versionMatcher)return!0;return new Promise((X)=>{let Y=_(G,J.versionArgs??["--version"],{stdio:["ignore","pipe","pipe"]}),K="";Y.stdout.on("data",(H)=>K+=H.toString()),Y.stderr.on("data",(H)=>K+=H.toString()),Y.on("close",()=>{try{X(new RegExp(J.versionMatcher).test(K))}catch{X(!1)}}),Y.on("error",()=>X(!1))})}async function i(G){let J=G.platform??n(),X=L(G.name,G.binaryName),Y=o(G.name,G.binaryName,G.cacheRoot);if(u(Y)&&await E(Y,G))return Y;try{let H=typeof Bun<"u"&&typeof Bun.which==="function"?Bun.which(G.binaryName??G.name,{PATH:process.env.PATH}):null;if(H&&await E(H,G))return G.log?.info?.(`[install] using PATH binary ${G.name} (${H})`),H}catch{}let K=G.downloads[J];if(!K)throw Error(`[install] no download manifest entry for ${G.name} on ${J}`);return G.log?.info?.(`[install] downloading ${G.name} for ${J}`),await V.mkdir(q.dirname(Y),{recursive:!0}),await a(K,Y,X,G.name),G.log?.info?.(`[install] installed ${G.name} \u2192 ${Y}`),Y}async function a(G,J,X,Y){let K=q.dirname(J),H=q.join(p(),`vibe-install-${Y}-${process.pid}`);await V.mkdir(H,{recursive:!0});let $=q.join(H,"artifact");try{let Z=await fetch(G.url,{redirect:"follow"});if(!Z.ok)throw Error(`download failed (${Z.status}) for ${G.url}`);if(!Z.body)throw Error(`empty response body for ${G.url}`);if(await l(d.fromWeb(Z.body),h($)),G.sha256){let I=f("sha256").update(await V.readFile($)).digest("hex");if(I!==G.sha256)throw Error(`sha256 mismatch for ${Y}: expected ${G.sha256}, got ${I}`)}let z=G.archive??(G.url.endsWith(".tar.gz")||G.url.endsWith(".tgz")?"tar.gz":G.url.endsWith(".zip")?"zip":"raw");if(z==="raw")await V.copyFile($,J);else{if(z==="tar.gz")await w("tar",["-xzf",$,"-C",H]);else await s($,H);let I=G.binaryWithinArchive??X;await V.copyFile(q.join(H,I),J)}if(process.platform!=="win32")await V.chmod(J,493)}finally{await V.rm(H,{recursive:!0,force:!0})}}async function s(G,J){try{await w("unzip",["-q","-o",G,"-d",J]);return}catch(X){if(process.platform!=="win32")throw X;await w("tar",["-xf",G,"-C",J])}}async function w(G,J){return new Promise((X,Y)=>{let K=_(G,J,{stdio:["ignore","ignore","pipe"]}),H="";K.stderr.on("data",($)=>H+=$.toString()),K.on("close",($)=>$===0?X():Y(Error(`${G} exit ${$}: ${H}`))),K.on("error",Y)})}var W="https://github.com/cloudflare/cloudflared/releases/latest/download",r={"linux-x64":{url:`${W}/cloudflared-linux-amd64`,archive:"raw"},"linux-arm64":{url:`${W}/cloudflared-linux-arm64`,archive:"raw"},"darwin-x64":{url:`${W}/cloudflared-darwin-amd64.tgz`,archive:"tar.gz",binaryWithinArchive:"cloudflared"},"darwin-arm64":{url:`${W}/cloudflared-darwin-arm64.tgz`,archive:"tar.gz",binaryWithinArchive:"cloudflared"},"win32-x64":{url:`${W}/cloudflared-windows-amd64.exe`,archive:"raw"},"win32-arm64":{url:`${W}/cloudflared-windows-arm64.exe`,archive:"raw"}},t=/(https:\/\/(?!api\.)[a-zA-Z0-9-]+\.trycloudflare\.com)/;async function N(G,J){let X=J?.log??{},Y;try{Y=await i({name:"cloudflared",downloads:r,versionMatcher:"cloudflared version",log:X})}catch($){return X.warn?.(`quick-tunnel: could not obtain cloudflared: ${String($)}`),null}let K;try{K=_(Y,["tunnel","--url",`http://127.0.0.1:${G}`,"--no-autoupdate"],{stdio:["ignore","pipe","pipe"]})}catch($){return X.warn?.(`quick-tunnel: failed to spawn cloudflared: ${String($)}`),null}let H=await new Promise(($)=>{let Z=!1,z=(Q)=>{if(Z)return;Z=!0,$(Q)},I=setTimeout(()=>{X.warn?.("quick-tunnel: cloudflared did not advertise a URL in time"),z(null)},J?.timeoutMs??30000),O=(Q)=>{let B=Q.toString("utf8").match(t);if(B)clearTimeout(I),z(B[0])};K.stdout?.on("data",O),K.stderr?.on("data",O),K.on("error",(Q)=>{clearTimeout(I),X.warn?.(`quick-tunnel: cloudflared failed to spawn: ${String(Q)}`),z(null)}),K.on("exit",(Q)=>{clearTimeout(I),X.warn?.(`quick-tunnel: cloudflared exited (code=${Q})`),z(null)})});if(!H)return null;return{url:H,child:K}}import{existsSync as b,mkdirSync as e,readFileSync as GG,writeFileSync as JG,unlinkSync as XG}from"fs";import{dirname as YG,join as S}from"path";import{readdirSync as $G}from"fs";function T(G){return S(G??x(),"tunnel.state.json")}function v(G,J){let X=T(J);try{e(YG(X),{recursive:!0}),JG(X,JSON.stringify(G,null,2),"utf8")}catch(Y){M().logger.warn("tunnel-state","Failed to persist tunnel state",{error:String(Y)})}}function k(G){let J=T(G);if(!b(J))return null;try{let X=GG(J,"utf8"),Y=JSON.parse(X);if(typeof Y.pid!=="number")return null;return Y}catch(X){return M().logger.warn("tunnel-state","Failed to read tunnel state",{error:String(X)}),null}}function F(G){let J=T(G);if(!b(J))return;try{XG(J)}catch{}}function C(G){return R().isProcessAlive(G)}function xG(G){let J=[];if(G?.allProfiles){let Y;try{Y=A()}catch{return J}let K;try{K=$G(Y)}catch{return J}for(let H of K){let $=S(Y,H),Z=k($);if(Z)J.push({...Z,alive:C(Z.pid),profileDir:$})}return J}let X=k();if(X)J.push({...X,alive:C(X.pid),profileDir:x()});return J}function HG(G){return G.replace(/[^A-Za-z0-9_]/g,"_")}function U(){return(g()??M()).tunnel}async function AG(G,J){let X=U();MG(G),KG();let Y=process.env.AGENT_TUNNEL_URL;if(Y){let $=P(Y);if(!$)return M().logger.warn("tunnel-bootstrap","Ignoring invalid AGENT_TUNNEL_URL"),null;X.url=$,X.externalUrl=!0,M().logger.info("tunnel-bootstrap",`Using AGENT_TUNNEL_URL=${$}`);try{j.emit("tunnel.url_assigned",{provider:"external"})}catch{}return $}let K=J.port,H=await N(K,{log:{info:($)=>M().logger.info("tunnel-bootstrap",$),warn:($)=>M().logger.warn("tunnel-bootstrap",$)}});if(!H)return M().logger.warn("tunnel-bootstrap","No bootstrap tunnel \u2014 the agent will register once the tunnel provider starts post-config"),null;if(X.child=H.child,X.url=H.url,X.url){M().logger.info("tunnel-bootstrap",`Bootstrap tunnel ready: ${X.url}`);try{let z=new URL(X.url).hostname.split(".");if(z.length>=2)D("."+z.slice(-2).join("."))}catch{}try{j.emit("tunnel.url_assigned",{provider:"bootstrap"})}catch{}let $=HG(y());if(process.env[`AGENT_TUNNEL_URL_${$}`]=X.url,X.child?.pid!==void 0)process.env[`AGENT_TUNNEL_PID_${$}`]=String(X.child.pid),v({pid:X.child.pid,url:X.url,startedAt:new Date().toISOString(),provider:"bootstrap",port:K,cmd:`cloudflared tunnel --url http://127.0.0.1:${K}`})}return X.url}function bG(){let G=U();if(G.externalUrl)return!1;if(!G.child||G.child.killed)return!1;let J=G.child.pid;if(J===void 0)return!1;try{process.kill(J,0)}catch{return!1}return G.child=null,F(),M().logger.info("tunnel-bootstrap",`Handed over bootstrap tunnel (PID ${J}) to plugin \u2014 process kept alive`),!0}function SG(){let G=U();if(G.externalUrl){F();return}let J=G.child;if(G.child=null,F(),!J||J.killed)return;try{J.kill("SIGTERM"),M().logger.info("tunnel-bootstrap","Bootstrap tunnel stopped")}catch{}}function vG(){return U().url}function KG(){let G=k();if(!G)return;if(!C(G.pid)){F();return}try{process.kill(G.pid,"SIGTERM"),M().logger.info("tunnel-bootstrap","Reaped orphan tunnel from prior run",{pid:G.pid,provider:G.provider})}catch{}let J=Date.now();while(Date.now()-J<2000&&C(G.pid))Bun.sleepSync(50);if(C(G.pid))try{process.kill(G.pid,"SIGKILL")}catch{}F()}function MG(G){let J={name:"bootstrap",async getActiveTunnelUrl(){return U().url}};G.registerProvider("tunnel",J,"bootstrap")}
3
3
  export{k as la,F as ma,C as na,xG as oa,HG as pa,AG as qa,bG as ra,SG as sa,vG as ta,KG as ua};
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env bun
2
2
  // @bun
3
- import{j as o,k as r,l as t,m as e,n as XQ}from"./index-84hfet2g.js";import"./index-czrb2yd1.js";import{t as QQ}from"./index-rjhcmnx0.js";import"./index-41vve5br.js";import"./index-6jzsthh9.js";import"./index-ebx79cc1.js";import"./index-yas07mv9.js";import"./index-68r2ex9d.js";import"./index-4hn26x1h.js";import"./index-4wgjx8bf.js";import{Da as a}from"./index-cv0xhb46.js";import"./index-0ckffygp.js";import"./index-rc79x8fw.js";import{bb as W}from"./index-jrtsdm8f.js";import"./index-52cp759f.js";import"./index-6p3gcnxr.js";import{Ib as s,Jb as i}from"./index-bfeekmyh.js";import"./index-5dysvvjv.js";import"./index-pgew6sge.js";import"./index-t8tnkqxh.js";import{Sc as p,Tc as v,od as C,ud as l,vd as n}from"./index-63ba5fb4.js";import{Od as q}from"./index-xnr6t79p.js";import{$d as S,Yd as D,be as g,ce as M}from"./index-a4854mwz.js";import"./index-4qq083yd.js";import{ie as B}from"./index-c7554sg7.js";import{isAbsolute as MQ}from"path";import{existsSync as V,mkdirSync as y,readFileSync as _Q,readdirSync as P,renameSync as BQ,unlinkSync as DQ,writeFileSync as f}from"fs";import{dirname as d,join as F}from"path";var GQ=".secrets-migrated-v1",IQ=["static-api-key","clientId","clientSecret"];function WQ(Q,H){return`${Q}:${H}`}function c(){return F(M(),GQ)}function TQ(){let Q=c();y(d(Q),{recursive:!0}),f(Q,`${new Date().toISOString()}
3
+ import{j as o,k as r,l as t,m as e,n as XQ}from"./index-2jxqpj7r.js";import"./index-zabjc8f2.js";import{t as QQ}from"./index-16czz4df.js";import"./index-jrxbbb7p.js";import"./index-6jzsthh9.js";import"./index-4gt22c81.js";import"./index-zb7nfmts.js";import"./index-2gwc485c.js";import"./index-pc05r6fd.js";import"./index-4wgjx8bf.js";import{Da as a}from"./index-5wsfsj88.js";import"./index-0ckffygp.js";import"./index-rc79x8fw.js";import{bb as W}from"./index-53qthjhb.js";import"./index-52cp759f.js";import"./index-m2kkd6t6.js";import{Ib as s,Jb as i}from"./index-9g3vxhby.js";import"./index-5dysvvjv.js";import"./index-zaw78sxw.js";import"./index-e2dqz3tw.js";import{Sc as p,Tc as v,od as C,ud as l,vd as n}from"./index-sv4rzv3f.js";import{Pd as q}from"./index-c4p1qcnn.js";import{Zd as D,ae as S,ce as g,de as M}from"./index-q9dp55wv.js";import"./index-ntj6ymk8.js";import{je as B}from"./index-gb5bnx7a.js";import{isAbsolute as MQ}from"path";import{existsSync as V,mkdirSync as y,readFileSync as _Q,readdirSync as P,renameSync as BQ,unlinkSync as DQ,writeFileSync as f}from"fs";import{dirname as d,join as F}from"path";var GQ=".secrets-migrated-v1",IQ=["static-api-key","clientId","clientSecret"];function WQ(Q,H){return`${Q}:${H}`}function c(){return F(M(),GQ)}function TQ(){let Q=c();y(d(Q),{recursive:!0}),f(Q,`${new Date().toISOString()}
4
4
  `,{mode:384})}function JQ(Q){if(!V(Q))return null;try{let H=_Q(Q,"utf8"),X=JSON.parse(H);if(X&&typeof X==="object"&&!Array.isArray(X))return X}catch{}return null}function VQ(Q,H){y(d(Q),{recursive:!0});let X=`${Q}.${process.pid}.tmp`;f(X,`${JSON.stringify(H,null,2)}
5
- `,{mode:384}),BQ(X,Q)}function FQ(){let Q=M(),H=F(Q,"agents");if(!V(H))return[];let X=[],L;try{L=P(H)}catch{return[]}for(let Y of L){let z=F(H,Y,"config.json");if(!V(z))continue;X.push({path:z,scope:Y})}return X}function jQ(){let Q=M(),H=F(Q,"profiles");if(!V(H))return[];let X=[],L;try{L=P(H)}catch{return[]}for(let Y of L){if(!Y.endsWith(".json"))continue;X.push({path:F(H,Y),scope:Y.slice(0,-5)})}return X}async function KQ(Q,H){let X=JQ(Q);if(!X)return 0;let L=0;for(let Y of IQ){let z=X[Y];if(typeof z!=="string"||z.length===0)continue;let _=WQ(H,Y);try{await v(_,z),delete X[Y],L++,q().logger.info("secrets-migrator","migrated field",{path:Q,scope:H,key:Y})}catch(G){q().logger.warn("secrets-migrator","failed to migrate field",{path:Q,scope:H,key:Y,error:String(G)})}}if(L>0)VQ(Q,X);return L}async function m(){let Q={alreadyMigrated:!1,fieldsMoved:0,filesUpdated:0};if(V(c()))return Q.alreadyMigrated=!0,Q;let H=[...FQ(),...jQ()];for(let X of H){let L;try{L=await KQ(X.path,X.scope)}catch(Y){q().logger.warn("secrets-migrator","skipping target after error",{path:X.path,error:String(Y)});continue}if(L>0)Q.fieldsMoved+=L,Q.filesUpdated++}try{TQ()}catch(X){q().logger.warn("secrets-migrator","failed to drop migration marker",{error:String(X)})}if(Q.fieldsMoved>0)q().logger.info("secrets-migrator","migration complete",{fieldsMoved:Q.fieldsMoved,filesUpdated:Q.filesUpdated});return Q}{let Q=JSON.parse.bind(JSON);JSON.parse=(L,Y)=>{try{return Q(L,Y)}catch(z){if(typeof L==="string"&&L.endsWith("}}"))try{return Q(L.slice(0,-1),Y)}catch{}throw z}};let X=globalThis.Request?.prototype;if(X&&typeof X.json==="function"){let L=X.json;X.json=async function(){let z=await this.text();if(!z)return;try{return Q(z)}catch{if(z.endsWith("}}"))try{return Q(z.slice(0,-1))}catch{}let _=new Request("http://shim/",{method:"POST",body:z});return L.call(_)}}}}QQ();l();if(!process.env.VIBECONTROLS_DATA_DIR)process.env.VIBECONTROLS_DATA_DIR=S();if(typeof Bun>"u")console.error("ERROR: VibeControls Agent requires Bun runtime."),console.error("Install Bun: https://bun.sh"),process.exit(1);function UQ(Q){if(Q==="default")return 3005;let H=2166136261;for(let X=0;X<Q.length;X++)H=Math.imul(H^Q.charCodeAt(X),16777619);return 3100+Math.abs(H)%300}var E=(()=>{try{return D()}catch{return"default"}})(),A=Number.parseInt(process.env.PORT||String(UQ(E)),10),U=Number.isInteger(A)&&A>0?A:3005,R=process.env.HOST||"0.0.0.0",RQ=(()=>{let Q=process.env.DB_PATH;if(!Q)return;if(MQ(Q))return Q;console.warn(`[boot] Ignoring relative DB_PATH=${Q} (cwd=${process.cwd()}). Use an absolute path or unset to fall back to ${g()}.`);return})(),x=process.env.AGENT_API_KEY||void 0,CQ=process.env.LOG_LEVEL||"info",EQ=process.env.CORS_ORIGIN||void 0;async function wQ(){try{await m()}catch($){q().logger.warn("server","secrets migration encountered an error",{error:String($)})}let Q=C()["static-api-key"],H=(()=>{try{return D()}catch{return"default"}})(),X=Q??await p(`${H}:static-api-key`),L=!x&&!X;await s(),await n();let Y=process.env.VIBE_CLIENT_ID,z=process.env.VIBE_CLIENT_SECRET,_=process.env.VIBE_GLOBAL_GATEWAY_URL,G=process.env.VIBE_WORKSPACE_GATEWAY_URL,b=process.env.VIBE_WORKSPACE_ID,ZQ=!!Y&&!!z&&!!_&&!!G&&!!b;q().logger.info("server","Starting VibeControls Agent...",{runtime:"bun",bunVersion:Bun.version,port:U,host:R,env:"production"});try{let $=C(),Z=$["telemetry.enabled"]===!0||$["telemetry.enabled"]==="true";W.init({persisted:Z});let N=Date.now();W.emit("agent.started",{version:process.env.npm_package_version??"unknown",profile:E,platform:process.platform}),process.__vibe_started_at=N}catch{}let j=Math.max(1,Number.parseInt(process.env.VIBECONTROLS_AGENT_BOOT_RETRIES??"10",10)||10),$Q=($)=>{let Z=String($?.message??$).toLowerCase();return Z.includes("syntax")||Z.includes("cannot find module")||Z.includes("module not found")||Z.includes("typeerror")||Z.includes("config schema")||Z.includes("invalid config")||Z.includes("corrupt")||Z.includes("eaccess")||Z.includes("eperm")},O=null,I=0;while(!O){I++;try{O=await XQ({port:U,host:R,dbPath:RQ,apiKey:x,logLevel:CQ,corsOrigin:EQ}),await O.start();try{let $=await import("fs"),Z=`${S()}/runtime.json`;$.writeFileSync(Z,JSON.stringify({pid:process.pid,port:U,host:R,profile:E,startedAt:new Date().toISOString(),version:a()},null,2));let N=()=>{try{if($.existsSync(Z))$.unlinkSync(Z)}catch{}};process.once("SIGTERM",N),process.once("SIGINT",N),process.once("exit",N)}catch($){q().logger.warn("server","Could not write runtime.json",{error:String($)})}}catch($){let Z=$Q($);if(q().logger.error("server","Failed to start agent server",{attempt:I,maxBootAttempts:j,fatal:Z,error:String($)}),Z||I>=j)console.error(`\u274C Failed to start VibeControls Agent (attempt ${I}/${j}, fatal=${Z}):`,$),process.exit(1);let N=Math.min(30000,1000*2**Math.min(5,I-1)),J=Math.floor(Math.random()*500),K=N+J;console.warn(`\u26A0\uFE0F Agent boot attempt ${I}/${j} failed (transient), retrying in ${Math.round(K/1000)}s...`),await new Promise((k)=>setTimeout(k,K)),O=null}}let h=O.getServiceRegistry().getProvider("tunnel"),T=null;if(h?.getActiveTunnelUrl)for(let $=0;$<30;$++){if(T=await h.getActiveTunnelUrl(),T)break;await new Promise((Z)=>setTimeout(Z,1000))}if(!T){let{sanitizeEnvSuffix:$}=await import("./tunnel-bootstrap-zdczwezc.js"),{getVibecontrolsProfile:Z}=await import("./path-utils-hxdyv2zn.js"),N=$(Z());T=process.env[`AGENT_TUNNEL_URL_${N}`]??process.env.AGENT_TUNNEL_URL??null}let HQ=C(),LQ=x||i()||HQ["static-api-key"]||"",w=q().getBootState(),YQ=w==="ready"?null:o();if(w==="ready")r();kQ({port:U,host:R,tunnelUrl:T,apiKey:LQ,revealApiKey:L||process.env.AGENT_PRINT_API_KEY==="1",state:w,pairingToken:YQ});try{t({profile:E})}catch($){q().logger.warn("server","Could not start autoupdate",{error:String($)})}let{existsSync:NQ,unlinkSync:qQ}=await import("fs"),{tmpdir:zQ}=await import("os"),{join:OQ}=await import("path"),u=async($)=>{q().logger.info("server",`Received ${$}, shutting down...`),e();try{let N=process.__vibe_started_at??Date.now();W.emit("agent.stopped",{uptime_s:Math.round((Date.now()-N)/1000),reason:$}),await W.flush(),W.stop()}catch{}let Z=O.getLifecycle();if($==="SIGTERM"){let N=OQ(zQ(),`.boff-vibecontrols-kill-${process.pid}`);if(NQ(N)){try{qQ(N)}catch{}if(q().logger.info("server","Kill-intent flag detected \u2014 full shutdown"),Z)await Z.kill();else await O.stop({reason:"shutdown"}),process.exit(0)}else if(q().logger.info("server","No kill flag \u2014 treating as hot-reload (soft stop)"),Z)await Z.softStop();else await O.stop({reason:"reload"})}else if(Z)await Z.kill();else await O.stop({reason:"shutdown"}),process.exit(0)};if(process.on("SIGINT",()=>u("SIGINT")),process.on("SIGTERM",()=>u("SIGTERM")),ZQ){let $=(()=>{let Z=process.env.VIBECONTROLS_FINALIZE_TIMEOUT_MS,N=Z?Number.parseInt(Z,10):NaN;return Number.isFinite(N)&&N>0?N:300000})();q().logger.info("server",`VIBE_* env vars detected \u2014 running inline finalize (timeout ${Math.round($/1000)}s)`),(async()=>{let Z={clientId:Y,clientSecret:z,workspaceId:b,globalGatewayUrl:_,workspaceGatewayUrl:G};try{let N=await Promise.race([O.finalize(Z),new Promise((J)=>setTimeout(()=>J({ok:!1,error:`inline finalize timed out after ${Math.round($/1000)}s`}),$))]);if(!N.ok){q().logger.warn("server","Inline finalize failed \u2014 agent stays awaiting-config. Background retry worker will keep trying.",{error:N.error});let{startFinalizeRetryWorker:J}=await import("./finalize-retry-worker-vfdskqb5.js"),{setFinalizeRetryHandle:K}=await import("./finalize-retry-handle-registry-xnm9kxry.js"),k=J({trigger:()=>O.finalize(Z)});K(k)}}catch(N){q().logger.error("server","Inline finalize threw",{error:String(N)})}})()}else q().logger.info("server","Agent is awaiting gateway credentials. Add it on the VibeControls platform using the tunnel URL and API key shown above.")}function kQ(Q){let X=(G)=>("\u2551 "+G).padEnd(65)+"\u2551",L="\u2560"+"\u2550".repeat(64)+"\u2563",Y="\u2554"+"\u2550".repeat(64)+"\u2557",z="\u255A"+"\u2550".repeat(64)+"\u255D",_=Q.revealApiKey?Q.apiKey:Q.apiKey?`${Q.apiKey.substring(0,8)}****${Q.apiKey.substring(Q.apiKey.length-4)}`:"(none)";if(console.log(""),console.log(Y),console.log(X("VibeControls Agent")),console.log(L),console.log(X(`State: ${Q.state}`)),console.log(X(`Agent URL: http://${Q.host}:${Q.port}`)),console.log(X(`API Key: ${_}`)),console.log(X(`Tunnel URL: ${Q.tunnelUrl??"(none)"}`)),Q.pairingToken)console.log(X(`Pairing: ${Q.pairingToken}`)),console.log(X(" (send as x-pairing-token on bootstrap)"));if(console.log(L),console.log(X(`Health: http://localhost:${Q.port}/health`)),console.log(X(`Status: http://localhost:${Q.port}/api/agent/status`)),console.log(z),!Q.revealApiKey)console.log(" (Set AGENT_PRINT_API_KEY=1 to print the API key in full.)");console.log("")}wQ();
5
+ `,{mode:384}),BQ(X,Q)}function FQ(){let Q=M(),H=F(Q,"agents");if(!V(H))return[];let X=[],L;try{L=P(H)}catch{return[]}for(let Y of L){let z=F(H,Y,"config.json");if(!V(z))continue;X.push({path:z,scope:Y})}return X}function jQ(){let Q=M(),H=F(Q,"profiles");if(!V(H))return[];let X=[],L;try{L=P(H)}catch{return[]}for(let Y of L){if(!Y.endsWith(".json"))continue;X.push({path:F(H,Y),scope:Y.slice(0,-5)})}return X}async function KQ(Q,H){let X=JQ(Q);if(!X)return 0;let L=0;for(let Y of IQ){let z=X[Y];if(typeof z!=="string"||z.length===0)continue;let _=WQ(H,Y);try{await v(_,z),delete X[Y],L++,q().logger.info("secrets-migrator","migrated field",{path:Q,scope:H,key:Y})}catch(G){q().logger.warn("secrets-migrator","failed to migrate field",{path:Q,scope:H,key:Y,error:String(G)})}}if(L>0)VQ(Q,X);return L}async function m(){let Q={alreadyMigrated:!1,fieldsMoved:0,filesUpdated:0};if(V(c()))return Q.alreadyMigrated=!0,Q;let H=[...FQ(),...jQ()];for(let X of H){let L;try{L=await KQ(X.path,X.scope)}catch(Y){q().logger.warn("secrets-migrator","skipping target after error",{path:X.path,error:String(Y)});continue}if(L>0)Q.fieldsMoved+=L,Q.filesUpdated++}try{TQ()}catch(X){q().logger.warn("secrets-migrator","failed to drop migration marker",{error:String(X)})}if(Q.fieldsMoved>0)q().logger.info("secrets-migrator","migration complete",{fieldsMoved:Q.fieldsMoved,filesUpdated:Q.filesUpdated});return Q}{let Q=JSON.parse.bind(JSON);JSON.parse=(L,Y)=>{try{return Q(L,Y)}catch(z){if(typeof L==="string"&&L.endsWith("}}"))try{return Q(L.slice(0,-1),Y)}catch{}throw z}};let X=globalThis.Request?.prototype;if(X&&typeof X.json==="function"){let L=X.json;X.json=async function(){let z=await this.text();if(!z)return;try{return Q(z)}catch{if(z.endsWith("}}"))try{return Q(z.slice(0,-1))}catch{}let _=new Request("http://shim/",{method:"POST",body:z});return L.call(_)}}}}QQ();l();if(!process.env.VIBECONTROLS_DATA_DIR)process.env.VIBECONTROLS_DATA_DIR=S();if(typeof Bun>"u")console.error("ERROR: VibeControls Agent requires Bun runtime."),console.error("Install Bun: https://bun.sh"),process.exit(1);function UQ(Q){if(Q==="default")return 3005;let H=2166136261;for(let X=0;X<Q.length;X++)H=Math.imul(H^Q.charCodeAt(X),16777619);return 3100+Math.abs(H)%300}var E=(()=>{try{return D()}catch{return"default"}})(),A=Number.parseInt(process.env.PORT||String(UQ(E)),10),U=Number.isInteger(A)&&A>0?A:3005,R=process.env.HOST||"0.0.0.0",RQ=(()=>{let Q=process.env.DB_PATH;if(!Q)return;if(MQ(Q))return Q;console.warn(`[boot] Ignoring relative DB_PATH=${Q} (cwd=${process.cwd()}). Use an absolute path or unset to fall back to ${g()}.`);return})(),x=process.env.AGENT_API_KEY||void 0,CQ=process.env.LOG_LEVEL||"info",EQ=process.env.CORS_ORIGIN||void 0;async function wQ(){try{await m()}catch($){q().logger.warn("server","secrets migration encountered an error",{error:String($)})}let Q=C()["static-api-key"],H=(()=>{try{return D()}catch{return"default"}})(),X=Q??await p(`${H}:static-api-key`),L=!x&&!X;await s(),await n();let Y=process.env.VIBE_CLIENT_ID,z=process.env.VIBE_CLIENT_SECRET,_=process.env.VIBE_GLOBAL_GATEWAY_URL,G=process.env.VIBE_WORKSPACE_GATEWAY_URL,b=process.env.VIBE_WORKSPACE_ID,ZQ=!!Y&&!!z&&!!_&&!!G&&!!b;q().logger.info("server","Starting VibeControls Agent...",{runtime:"bun",bunVersion:Bun.version,port:U,host:R,env:"production"});try{let $=C(),Z=$["telemetry.enabled"]===!0||$["telemetry.enabled"]==="true";W.init({persisted:Z});let N=Date.now();W.emit("agent.started",{version:process.env.npm_package_version??"unknown",profile:E,platform:process.platform}),process.__vibe_started_at=N}catch{}let j=Math.max(1,Number.parseInt(process.env.VIBECONTROLS_AGENT_BOOT_RETRIES??"10",10)||10),$Q=($)=>{let Z=String($?.message??$).toLowerCase();return Z.includes("syntax")||Z.includes("cannot find module")||Z.includes("module not found")||Z.includes("typeerror")||Z.includes("config schema")||Z.includes("invalid config")||Z.includes("corrupt")||Z.includes("eaccess")||Z.includes("eperm")},O=null,I=0;while(!O){I++;try{O=await XQ({port:U,host:R,dbPath:RQ,apiKey:x,logLevel:CQ,corsOrigin:EQ}),await O.start();try{let $=await import("fs"),Z=`${S()}/runtime.json`;$.writeFileSync(Z,JSON.stringify({pid:process.pid,port:U,host:R,profile:E,startedAt:new Date().toISOString(),version:a()},null,2));let N=()=>{try{if($.existsSync(Z))$.unlinkSync(Z)}catch{}};process.once("SIGTERM",N),process.once("SIGINT",N),process.once("exit",N)}catch($){q().logger.warn("server","Could not write runtime.json",{error:String($)})}}catch($){let Z=$Q($);if(q().logger.error("server","Failed to start agent server",{attempt:I,maxBootAttempts:j,fatal:Z,error:String($)}),Z||I>=j)console.error(`\u274C Failed to start VibeControls Agent (attempt ${I}/${j}, fatal=${Z}):`,$),process.exit(1);let N=Math.min(30000,1000*2**Math.min(5,I-1)),J=Math.floor(Math.random()*500),K=N+J;console.warn(`\u26A0\uFE0F Agent boot attempt ${I}/${j} failed (transient), retrying in ${Math.round(K/1000)}s...`),await new Promise((k)=>setTimeout(k,K)),O=null}}let h=O.getServiceRegistry().getProvider("tunnel"),T=null;if(h?.getActiveTunnelUrl)for(let $=0;$<30;$++){if(T=await h.getActiveTunnelUrl(),T)break;await new Promise((Z)=>setTimeout(Z,1000))}if(!T){let{sanitizeEnvSuffix:$}=await import("./tunnel-bootstrap-50fm2wt8.js"),{getVibecontrolsProfile:Z}=await import("./path-utils-cg1gsy4m.js"),N=$(Z());T=process.env[`AGENT_TUNNEL_URL_${N}`]??process.env.AGENT_TUNNEL_URL??null}let HQ=C(),LQ=x||i()||HQ["static-api-key"]||"",w=q().getBootState(),YQ=w==="ready"?null:o();if(w==="ready")r();kQ({port:U,host:R,tunnelUrl:T,apiKey:LQ,revealApiKey:L||process.env.AGENT_PRINT_API_KEY==="1",state:w,pairingToken:YQ});try{t({profile:E})}catch($){q().logger.warn("server","Could not start autoupdate",{error:String($)})}let{existsSync:NQ,unlinkSync:qQ}=await import("fs"),{tmpdir:zQ}=await import("os"),{join:OQ}=await import("path"),u=async($)=>{q().logger.info("server",`Received ${$}, shutting down...`),e();try{let N=process.__vibe_started_at??Date.now();W.emit("agent.stopped",{uptime_s:Math.round((Date.now()-N)/1000),reason:$}),await W.flush(),W.stop()}catch{}let Z=O.getLifecycle();if($==="SIGTERM"){let N=OQ(zQ(),`.boff-vibecontrols-kill-${process.pid}`);if(NQ(N)){try{qQ(N)}catch{}if(q().logger.info("server","Kill-intent flag detected \u2014 full shutdown"),Z)await Z.kill();else await O.stop({reason:"shutdown"}),process.exit(0)}else if(q().logger.info("server","No kill flag \u2014 treating as hot-reload (soft stop)"),Z)await Z.softStop();else await O.stop({reason:"reload"})}else if(Z)await Z.kill();else await O.stop({reason:"shutdown"}),process.exit(0)};if(process.on("SIGINT",()=>u("SIGINT")),process.on("SIGTERM",()=>u("SIGTERM")),ZQ){let $=(()=>{let Z=process.env.VIBECONTROLS_FINALIZE_TIMEOUT_MS,N=Z?Number.parseInt(Z,10):NaN;return Number.isFinite(N)&&N>0?N:300000})();q().logger.info("server",`VIBE_* env vars detected \u2014 running inline finalize (timeout ${Math.round($/1000)}s)`),(async()=>{let Z={clientId:Y,clientSecret:z,workspaceId:b,globalGatewayUrl:_,workspaceGatewayUrl:G};try{let N=await Promise.race([O.finalize(Z),new Promise((J)=>setTimeout(()=>J({ok:!1,error:`inline finalize timed out after ${Math.round($/1000)}s`}),$))]);if(!N.ok){q().logger.warn("server","Inline finalize failed \u2014 agent stays awaiting-config. Background retry worker will keep trying.",{error:N.error});let{startFinalizeRetryWorker:J}=await import("./finalize-retry-worker-74wxbdsh.js"),{setFinalizeRetryHandle:K}=await import("./finalize-retry-handle-registry-kzfqhvwv.js"),k=J({trigger:()=>O.finalize(Z)});K(k)}}catch(N){q().logger.error("server","Inline finalize threw",{error:String(N)})}})()}else q().logger.info("server","Agent is awaiting gateway credentials. Add it on the VibeControls platform using the tunnel URL and API key shown above.")}function kQ(Q){let X=(G)=>("\u2551 "+G).padEnd(65)+"\u2551",L="\u2560"+"\u2550".repeat(64)+"\u2563",Y="\u2554"+"\u2550".repeat(64)+"\u2557",z="\u255A"+"\u2550".repeat(64)+"\u255D",_=Q.revealApiKey?Q.apiKey:Q.apiKey?`${Q.apiKey.substring(0,8)}****${Q.apiKey.substring(Q.apiKey.length-4)}`:"(none)";if(console.log(""),console.log(Y),console.log(X("VibeControls Agent")),console.log(L),console.log(X(`State: ${Q.state}`)),console.log(X(`Agent URL: http://${Q.host}:${Q.port}`)),console.log(X(`API Key: ${_}`)),console.log(X(`Tunnel URL: ${Q.tunnelUrl??"(none)"}`)),Q.pairingToken)console.log(X(`Pairing: ${Q.pairingToken}`)),console.log(X(" (send as x-pairing-token on bootstrap)"));if(console.log(L),console.log(X(`Health: http://localhost:${Q.port}/health`)),console.log(X(`Status: http://localhost:${Q.port}/api/agent/status`)),console.log(z),!Q.revealApiKey)console.log(" (Set AGENT_PRINT_API_KEY=1 to print the API key in full.)");console.log("")}wQ();
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./index-gb5bnx7a.js";var t="./injections-73j83es3.scm";export{t as default};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Fc as a,Gc as b,Hc as c,Ic as d,Jc as e}from"./index-0s81cfpe.js";import"./index-gb5bnx7a.js";export{a as stripAnsi,b as interactiveTable,d as interactiveSelect,c as interactiveDetail,e as interactiveCheckboxes};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Wb as a,Xb as b}from"./index-jqfsvf8f.js";import"./index-g9fthh7a.js";import"./index-8nqp3a4d.js";import"./index-c975k3pk.js";import"./index-0s81cfpe.js";import"./index-e2dqz3tw.js";import"./index-sv4rzv3f.js";import"./index-c4p1qcnn.js";import"./index-q9dp55wv.js";import"./index-ntj6ymk8.js";import"./index-gb5bnx7a.js";export{a as resolveDefaultApiKey,b as register};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{fe as a}from"./index-ntj6ymk8.js";import"./index-gb5bnx7a.js";export{a as logShipper};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{$d as e,Xd as a,Yd as b,Zd as c,_d as d,ae as f,be as g,ce as h,de as i}from"./index-a4854mwz.js";import"./index-c7554sg7.js";export{c as validateAgentName,d as isPathInside,f as getVibecontrolsProfilesDir,b as getVibecontrolsProfile,h as getVibecontrolsProductDir,e as getVibecontrolsDir,g as getProfileDataDir,i as getPluginRegistry,a as assertValidProfile};
2
+ import{$d as d,Yd as a,Zd as b,_d as c,ae as e,be as f,ce as g,de as h,ee as i}from"./index-q9dp55wv.js";import"./index-gb5bnx7a.js";export{c as validateAgentName,d as isPathInside,f as getVibecontrolsProfilesDir,b as getVibecontrolsProfile,h as getVibecontrolsProductDir,e as getVibecontrolsDir,g as getProfileDataDir,i as getPluginRegistry,a as assertValidProfile};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Ga as a,Ia as b,Qa as c,Ra as d,Sa as e,Ta as f,Ua as g,Va as h,Wa as i}from"./index-cv0xhb46.js";import"./index-0ckffygp.js";import"./index-xnr6t79p.js";import"./index-a4854mwz.js";import"./index-4qq083yd.js";import"./index-c7554sg7.js";export{f as validatePluginPackageName,c as getRegistryAllowlist,e as getPluginPackageRoot,g as getInstallScope,d as assertRegistryAllowed,b as TRUSTED_PACKAGES,i as PluginManager,h as DEFAULT_PLUGINS,a as CORE_PLUGIN_NAMES};
2
+ import{Ga as a,Ia as b,Qa as c,Ra as d,Sa as e,Ta as f,Ua as g,Va as h,Wa as i}from"./index-5wsfsj88.js";import"./index-0ckffygp.js";import"./index-c4p1qcnn.js";import"./index-q9dp55wv.js";import"./index-ntj6ymk8.js";import"./index-gb5bnx7a.js";export{f as validatePluginPackageName,c as getRegistryAllowlist,e as getPluginPackageRoot,g as getInstallScope,d as assertRegistryAllowed,b as TRUSTED_PACKAGES,i as PluginManager,h as DEFAULT_PLUGINS,a as CORE_PLUGIN_NAMES};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{d as a,e as b}from"./index-7vwefvxd.js";import"./index-13xxbf03.js";import"./index-5dysvvjv.js";import"./index-c4p1qcnn.js";import"./index-q9dp55wv.js";import"./index-ntj6ymk8.js";import"./index-gb5bnx7a.js";export{a as runPluginPrereqs,b as readPrereqState};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{nb as a,ob as b,pb as c,qb as d,rb as e,sb as f}from"./index-m2kkd6t6.js";import"./index-9g3vxhby.js";import"./index-5dysvvjv.js";import"./index-zaw78sxw.js";import"./index-sv4rzv3f.js";import"./index-c4p1qcnn.js";import"./index-q9dp55wv.js";import"./index-ntj6ymk8.js";import"./index-gb5bnx7a.js";export{b as unmountProfileRoutes,a as mountProfileRoutes,c as dispatchProfileRequest,f as __setMountForTests,e as __resetProfileMountsForTests,d as __listMountedProfilesForTests};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{H as a}from"./index-mxc61yr1.js";import"./index-gb5bnx7a.js";export{a as pruneStaleBunBinShims};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{J as a}from"./index-tcwmw7ed.js";import"./index-13xxbf03.js";import"./index-b5dhmybd.js";import"./index-e1bw1bwr.js";import"./index-4gt22c81.js";import"./index-zb7nfmts.js";import"./index-2gwc485c.js";import"./index-4wgjx8bf.js";import"./index-5wsfsj88.js";import"./index-0ckffygp.js";import"./index-rc79x8fw.js";import"./index-53qthjhb.js";import"./index-52cp759f.js";import"./index-9g3vxhby.js";import"./index-5dysvvjv.js";import"./index-zaw78sxw.js";import"./index-8nqp3a4d.js";import"./index-c975k3pk.js";import"./index-0s81cfpe.js";import"./index-e2dqz3tw.js";import"./index-sv4rzv3f.js";import"./index-c4p1qcnn.js";import"./index-q9dp55wv.js";import"./index-ntj6ymk8.js";import"./index-gb5bnx7a.js";export{a as registerCoreCommands};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{x as a}from"./index-jrxbbb7p.js";import"./index-pc05r6fd.js";import"./index-4wgjx8bf.js";import"./index-5wsfsj88.js";import"./index-0ckffygp.js";import"./index-m2kkd6t6.js";import"./index-9g3vxhby.js";import"./index-5dysvvjv.js";import"./index-zaw78sxw.js";import"./index-sv4rzv3f.js";import"./index-c4p1qcnn.js";import"./index-q9dp55wv.js";import"./index-ntj6ymk8.js";import"./index-gb5bnx7a.js";export{a as attachSecondaryProfile};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{o as a,p as b,q as c,r as d,s as e}from"./index-zabjc8f2.js";import"./index-0ckffygp.js";import"./index-c4p1qcnn.js";import"./index-q9dp55wv.js";import"./index-ntj6ymk8.js";import"./index-gb5bnx7a.js";export{a as spawnTracked,c as listTrackedByOwner,b as listTracked,d as killTracked,e as killAllTracked};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{bb as a}from"./index-53qthjhb.js";import"./index-52cp759f.js";import"./index-c4p1qcnn.js";import"./index-q9dp55wv.js";import"./index-ntj6ymk8.js";import"./index-gb5bnx7a.js";export{a as telemetryService};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./index-gb5bnx7a.js";var l="./tree-sitter-javascript-nd0q4pe9.wasm";export{l as default};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./index-gb5bnx7a.js";var F="./tree-sitter-markdown-411r6y9b.wasm";export{F as default};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./index-gb5bnx7a.js";var E="./tree-sitter-markdown_inline-j5349f42.wasm";export{E as default};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./index-gb5bnx7a.js";var h="./tree-sitter-typescript-zxjzwt75.wasm";export{h as default};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./index-gb5bnx7a.js";var A="./tree-sitter-zig-e78zbjpm.wasm";export{A as default};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{pa as a,qa as b,ra as c,sa as d,ta as e,ua as f}from"./index-zb7nfmts.js";import"./index-0ckffygp.js";import"./index-53qthjhb.js";import"./index-52cp759f.js";import"./index-c4p1qcnn.js";import"./index-q9dp55wv.js";import"./index-ntj6ymk8.js";import"./index-gb5bnx7a.js";export{c as tryHandoverBootstrapTunnel,d as stopBootstrapTunnel,b as startBootstrapTunnel,a as sanitizeEnvSuffix,f as reapOrphanTunnelsForProfile,e as getBootstrapTunnelUrl};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibecontrols/agent",
3
- "version": "2026.608.1",
3
+ "version": "2026.814.1",
4
4
  "main": "./dist/index.js",
5
5
  "type": "module",
6
6
  "bin": {
@@ -15,7 +15,7 @@
15
15
  "lint:fix": "eslint ./src --fix",
16
16
  "format": "prettier . --write",
17
17
  "format:check": "prettier . --check",
18
- "type:check": "tsc --noEmit",
18
+ "type:check": "bash scripts/build-limits.sh tsc --noEmit",
19
19
  "test": "bun test tests/**/*.test.ts",
20
20
  "test:all": "bun test tests/**/*.test.ts",
21
21
  "test:e2e": "playwright test -c tests/e2e/playwright.config.ts",
@@ -26,8 +26,7 @@
26
26
  "preuninstall": "node -e \"try{require('node:fs').accessSync('./dist/preuninstall.cjs');require('node:child_process').execFileSync(process.execPath,['./dist/preuninstall.cjs'],{stdio:'inherit'})}catch(e){}\"",
27
27
  "knip": "knip --reporter compact",
28
28
  "pack:check": "npm pack --dry-run --json | bun scripts/check-pack.ts",
29
- "sanity": "bun run format:check && bun run lint:sanity && bun run type:check && bun run knip && bun run pack:check && bun run test && bun run build",
30
- "registry:npm": "bun scripts/set-registry.ts npm"
29
+ "sanity": "bash scripts/build-limits.sh --gate bash -c 'bun run format:check && bun run lint:sanity && bun run type:check && bun run knip && bun run pack:check && bun run test && bun run build'"
31
30
  },
32
31
  "keywords": [
33
32
  "vibecontrols",
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{n as a}from"./index-84hfet2g.js";import"./index-czrb2yd1.js";import"./index-41vve5br.js";import"./index-6jzsthh9.js";import"./index-ebx79cc1.js";import"./index-yas07mv9.js";import"./index-68r2ex9d.js";import"./index-4hn26x1h.js";import"./index-4wgjx8bf.js";import"./index-cv0xhb46.js";import"./index-0ckffygp.js";import"./index-rc79x8fw.js";import"./index-jrtsdm8f.js";import"./index-52cp759f.js";import"./index-6p3gcnxr.js";import"./index-bfeekmyh.js";import"./index-5dysvvjv.js";import"./index-pgew6sge.js";import"./index-t8tnkqxh.js";import"./index-63ba5fb4.js";import"./index-xnr6t79p.js";import"./index-a4854mwz.js";import"./index-4qq083yd.js";import"./index-c7554sg7.js";export{a as createApp};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{t as a}from"./index-rjhcmnx0.js";import"./index-xnr6t79p.js";import"./index-a4854mwz.js";import"./index-4qq083yd.js";import"./index-c7554sg7.js";export{a as bootstrapWorkspace};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{O as a,P as b}from"./index-e1bw1bwr.js";import"./index-c7554sg7.js";export{b as installDependencies,a as checkDependencies};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Id as K,Od as D}from"./index-xnr6t79p.js";import"./index-a4854mwz.js";import"./index-4qq083yd.js";import"./index-c7554sg7.js";var b="bridge-client",U=2000,G=30000,N=30000,O=6,z={ws:null,pingTimer:null,reconnectTimer:null,reconnectAttempt:0,connected:!1,stopped:!1,agentId:null,profile:"default",pendingEvents:[]};function Z(J,Q,$){D().logger[J](b,Q,$)}function C(J){try{let Q=new URL(J);Q.protocol=Q.protocol==="https:"?"wss:":"ws:",Q.pathname="/agent-bridge",Q.search="",Q.hash="";let $=process.env.VIBE_BRIDGE_URL;if($)return $;return Q.toString()}catch{return process.env.VIBE_BRIDGE_URL??""}}async function x(){if(z.stopped||z.ws)return;if(!K.isConfigured()){Z("debug","Gateway client not configured yet; deferring bridge connect");return}if(!z.agentId){Z("debug","No agentId set yet; deferring bridge connect");return}let J,Q,$;try{let Y=await K.getAccessToken();J=Y.token,Q=Y.workspaceGatewayUrl,$=Y.workspaceId}catch(Y){Z("warn","Failed to fetch access token for bridge",{error:Y instanceof Error?Y.message:String(Y)}),W();return}if(!J||!Q){W();return}let q=C(Q);if(!q){Z("warn","Cannot resolve bridge URL from workspaceGatewayUrl",{workspaceGatewayUrl:Q}),W();return}Z("info","Connecting to agent-bridge",{url:q,agentId:z.agentId});let H;try{H=new WebSocket(q,{headers:{Authorization:`Bearer ${J}`,...$?{"x-workspace-id":$}:{}}})}catch(Y){Z("warn","Bridge connect threw",{error:Y instanceof Error?Y.message:String(Y)}),W();return}z.ws=H,H.addEventListener("open",()=>{z.reconnectAttempt=0,Z("info","Bridge socket open \u2014 sending hello"),X({type:"hello",agentId:z.agentId,profile:z.profile,version:process.env.npm_package_version??"unknown"})}),H.addEventListener("message",(Y)=>{let B=typeof Y.data==="string"?Y.data:Y.data instanceof Blob?"":new TextDecoder().decode(Y.data);if(!B)return;let V;try{V=JSON.parse(B)}catch{return}if(V.type==="welcome")z.connected=!0,Z("info","Bridge welcome received \u2014 connection ready",{workspaceId:typeof V.workspaceId==="string"?V.workspaceId:void 0}),L(),P();else if(V.type==="error")Z("warn","Bridge error frame",{error:V})}),H.addEventListener("close",(Y)=>{if(Z("info","Bridge socket closed",{code:Y.code,reason:Y.reason}),M(),!z.stopped)W()}),H.addEventListener("error",(Y)=>{Z("warn","Bridge socket error",{message:Y.message})})}function X(J){if(!z.ws||z.ws.readyState!==1)return!1;try{return z.ws.send(JSON.stringify(J)),!0}catch(Q){return Z("debug","safeSend failed",{error:Q instanceof Error?Q.message:String(Q)}),!1}}function L(){F(),z.pingTimer=setInterval(()=>{X({type:"ping"})},N),z.pingTimer.unref?.()}function F(){if(z.pingTimer)clearInterval(z.pingTimer),z.pingTimer=null}function M(){z.connected=!1,F(),z.ws=null}function W(){if(z.stopped||z.reconnectTimer)return;let J=z.reconnectAttempt+1,Q=Math.min(U*2**Math.min(J-1,5),G);if(z.reconnectAttempt=J,J===O)Z("warn",`Bridge unavailable after ${J} attempts \u2014 falling back to existing HTTP polling for heartbeat/tunnel sync. Will keep retrying in the background.`);z.reconnectTimer=setTimeout(()=>{z.reconnectTimer=null,x()},Q),z.reconnectTimer.unref?.()}function P(){if(!z.connected)return;while(z.pendingEvents.length>0){let J=z.pendingEvents.shift();if(!X({type:J.type,...J.payload})){z.pendingEvents.unshift(J);return}}}var R=500;function j(J){if(z.connected&&X({type:J.type,...J.payload}))return;if(z.pendingEvents.length>=R)z.pendingEvents.shift();z.pendingEvents.push(J)}var I={start(J,Q){if(z.stopped=!1,z.agentId===J&&z.connected)return;z.agentId=J,z.profile=Q||"default",x()},stop(){if(z.stopped=!0,z.reconnectTimer)clearTimeout(z.reconnectTimer),z.reconnectTimer=null;let J=z.ws;try{J?.close(1000,"agent shutdown")}catch{}M()},publishEvent(J){j({type:"event",payload:{topic:J.topic,payload:J.payload}})},publishLog(J){j({type:"log",payload:{payload:J}})},isConnected(){return z.connected},isFallbackEngaged(){return z.reconnectAttempt>=O&&!z.connected}};export{I as bridgeClient};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Md as a,Nd as b,Od as c,Pd as d,Qd as e}from"./index-xnr6t79p.js";import"./index-a4854mwz.js";import"./index-4qq083yd.js";import"./index-c7554sg7.js";export{a as profileRegistry,d as getOrCreateProfile,c as getDaemonProfile,b as ensureDaemonProfile,e as __resetDaemonProfileForTests};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Gd as a,Hd as b,Id as c,Jd as d}from"./index-xnr6t79p.js";import"./index-a4854mwz.js";import"./index-4qq083yd.js";import"./index-c7554sg7.js";export{a as normalizeGatewayUrl,c as gatewayClient,d as default,b as GatewayClient};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import"./index-c7554sg7.js";var n="./highlights-hk7bwhj4.scm";export{n as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import"./index-c7554sg7.js";var t="./highlights-ghv9g403.scm";export{t as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import"./index-c7554sg7.js";var r="./highlights-eq9cgrbb.scm";export{r as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import"./index-c7554sg7.js";var t="./highlights-r812a2qc.scm";export{t as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import"./index-c7554sg7.js";var a="./highlights-x6tmsnaa.scm";export{a as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{c as a}from"./index-xrs52f2c.js";import"./index-kt5zxp42.js";import"./index-c7554sg7.js";export default a();
@@ -1,2 +0,0 @@
1
- // @bun
2
- import"./index-c7554sg7.js";var t="./injections-73j83es3.scm";export{t as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Fc as a,Gc as b,Hc as c,Ic as d,Jc as e}from"./index-thammzct.js";import"./index-c7554sg7.js";export{a as stripAnsi,b as interactiveTable,d as interactiveSelect,c as interactiveDetail,e as interactiveCheckboxes};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Wb as a,Xb as b}from"./index-zhyxdyk6.js";import"./index-8sdrhr3q.js";import"./index-8nqp3a4d.js";import"./index-85ke6hng.js";import"./index-thammzct.js";import"./index-t8tnkqxh.js";import"./index-63ba5fb4.js";import"./index-xnr6t79p.js";import"./index-a4854mwz.js";import"./index-4qq083yd.js";import"./index-c7554sg7.js";export{a as resolveDefaultApiKey,b as register};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ee as a}from"./index-4qq083yd.js";import"./index-c7554sg7.js";export{a as logShipper};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{d as a,e as b}from"./index-z73x3sdf.js";import"./index-wetsgcyq.js";import"./index-5dysvvjv.js";import"./index-xnr6t79p.js";import"./index-a4854mwz.js";import"./index-4qq083yd.js";import"./index-c7554sg7.js";export{a as runPluginPrereqs,b as readPrereqState};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{nb as a,ob as b,pb as c,qb as d,rb as e,sb as f}from"./index-6p3gcnxr.js";import"./index-bfeekmyh.js";import"./index-5dysvvjv.js";import"./index-pgew6sge.js";import"./index-63ba5fb4.js";import"./index-xnr6t79p.js";import"./index-a4854mwz.js";import"./index-4qq083yd.js";import"./index-c7554sg7.js";export{b as unmountProfileRoutes,a as mountProfileRoutes,c as dispatchProfileRequest,f as __setMountForTests,e as __resetProfileMountsForTests,d as __listMountedProfilesForTests};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{H as a}from"./index-mxc61yr1.js";import"./index-c7554sg7.js";export{a as pruneStaleBunBinShims};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{J as a}from"./index-ghz61a5p.js";import"./index-wetsgcyq.js";import"./index-b5dhmybd.js";import"./index-e1bw1bwr.js";import"./index-ebx79cc1.js";import"./index-yas07mv9.js";import"./index-68r2ex9d.js";import"./index-4wgjx8bf.js";import"./index-cv0xhb46.js";import"./index-0ckffygp.js";import"./index-rc79x8fw.js";import"./index-jrtsdm8f.js";import"./index-52cp759f.js";import"./index-bfeekmyh.js";import"./index-5dysvvjv.js";import"./index-pgew6sge.js";import"./index-8nqp3a4d.js";import"./index-85ke6hng.js";import"./index-thammzct.js";import"./index-t8tnkqxh.js";import"./index-63ba5fb4.js";import"./index-xnr6t79p.js";import"./index-a4854mwz.js";import"./index-4qq083yd.js";import"./index-c7554sg7.js";export{a as registerCoreCommands};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{x as a}from"./index-41vve5br.js";import"./index-4hn26x1h.js";import"./index-4wgjx8bf.js";import"./index-cv0xhb46.js";import"./index-0ckffygp.js";import"./index-6p3gcnxr.js";import"./index-bfeekmyh.js";import"./index-5dysvvjv.js";import"./index-pgew6sge.js";import"./index-63ba5fb4.js";import"./index-xnr6t79p.js";import"./index-a4854mwz.js";import"./index-4qq083yd.js";import"./index-c7554sg7.js";export{a as attachSecondaryProfile};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{o as a,p as b,q as c,r as d,s as e}from"./index-czrb2yd1.js";import"./index-0ckffygp.js";import"./index-xnr6t79p.js";import"./index-a4854mwz.js";import"./index-4qq083yd.js";import"./index-c7554sg7.js";export{a as spawnTracked,c as listTrackedByOwner,b as listTracked,d as killTracked,e as killAllTracked};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{bb as a}from"./index-jrtsdm8f.js";import"./index-52cp759f.js";import"./index-xnr6t79p.js";import"./index-a4854mwz.js";import"./index-4qq083yd.js";import"./index-c7554sg7.js";export{a as telemetryService};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import"./index-c7554sg7.js";var l="./tree-sitter-javascript-nd0q4pe9.wasm";export{l as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import"./index-c7554sg7.js";var F="./tree-sitter-markdown-411r6y9b.wasm";export{F as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import"./index-c7554sg7.js";var E="./tree-sitter-markdown_inline-j5349f42.wasm";export{E as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import"./index-c7554sg7.js";var h="./tree-sitter-typescript-zxjzwt75.wasm";export{h as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import"./index-c7554sg7.js";var A="./tree-sitter-zig-e78zbjpm.wasm";export{A as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{pa as a,qa as b,ra as c,sa as d,ta as e,ua as f}from"./index-yas07mv9.js";import"./index-0ckffygp.js";import"./index-jrtsdm8f.js";import"./index-52cp759f.js";import"./index-xnr6t79p.js";import"./index-a4854mwz.js";import"./index-4qq083yd.js";import"./index-c7554sg7.js";export{c as tryHandoverBootstrapTunnel,d as stopBootstrapTunnel,b as startBootstrapTunnel,a as sanitizeEnvSuffix,f as reapOrphanTunnelsForProfile,e as getBootstrapTunnelUrl};