@vibecontrols/agent 2026.902.1 → 2026.1125.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 (183) hide show
  1. package/dist/agent-config-v9d7gcz0.js +2 -0
  2. package/dist/agent-ready-tracker-mewxehg9.js +2 -0
  3. package/dist/app-a95wetk5.js +2 -0
  4. package/dist/autostart.cmd-ahet7b1t.js +2 -0
  5. package/dist/bootstrap-workspace-3pb8qjsh.js +2 -0
  6. package/dist/bootstrap.service-9m7m1ksa.js +2 -0
  7. package/dist/bridge-client-xvqy3n15.js +2 -0
  8. package/dist/cli.js +2 -2
  9. package/dist/daemon-profile-sg8fp50z.js +2 -0
  10. package/dist/finalize-retry-handle-registry-z9mbbjmj.js +2 -0
  11. package/dist/finalize-retry-worker-az74f2qv.js +2 -0
  12. package/dist/gateway-client-ermpz52n.js +2 -0
  13. package/dist/getMachineId-bsd-4w1wmcjv.js +2 -0
  14. package/dist/getMachineId-darwin-kejwz8w5.js +3 -0
  15. package/dist/getMachineId-linux-mpm53wat.js +2 -0
  16. package/dist/getMachineId-unsupported-54seyw5v.js +2 -0
  17. package/dist/getMachineId-win-cva7ghz9.js +2 -0
  18. package/dist/highlights-3nz7pbkh.js +2 -0
  19. package/dist/highlights-6dgztt5d.js +2 -0
  20. package/dist/highlights-jq0g1547.js +2 -0
  21. package/dist/highlights-yc7cwzcr.js +2 -0
  22. package/dist/highlights-z2sw1kpq.js +2 -0
  23. package/dist/index-01fp85ft.js +171 -0
  24. package/dist/index-0gmhd3hs.js +4 -0
  25. package/dist/index-0qjbnyg4.js +21 -0
  26. package/dist/index-2r6cmxxz.js +9 -0
  27. package/dist/index-2vcxt38h.js +3 -0
  28. package/dist/index-4527yp1c.js +178 -0
  29. package/dist/index-4z1y39jt.js +3 -0
  30. package/dist/index-5021rk8n.js +3 -0
  31. package/dist/index-652f9scs.js +4 -0
  32. package/dist/index-75hk5q9s.js +13 -0
  33. package/dist/index-76m37yd8.js +22 -0
  34. package/dist/index-7f2k4g6q.js +8 -0
  35. package/dist/index-7gk1x74m.js +15 -0
  36. package/dist/index-7wben1jx.js +3 -0
  37. package/dist/index-8rbhm4g8.js +7 -0
  38. package/dist/index-9xrhb68w.js +14 -0
  39. package/dist/index-a0vx2zyx.js +3 -0
  40. package/dist/index-akk3rxnn.js +4 -0
  41. package/dist/index-b3v08awy.js +3 -0
  42. package/dist/index-byerrz46.js +3 -0
  43. package/dist/index-c4whjk5r.js +3 -0
  44. package/dist/index-cy97asyh.js +133 -0
  45. package/dist/index-d59kp6zr.js +3 -0
  46. package/dist/index-ec08v08h.js +116 -0
  47. package/dist/index-g08z6z5v.js +5 -0
  48. package/dist/index-gaztfvyz.js +158 -0
  49. package/dist/index-gnb8xw13.js +83 -0
  50. package/dist/index-haww9jpq.js +27 -0
  51. package/dist/index-hsrt2v87.js +2 -0
  52. package/dist/index-jmx5awkj.js +3 -0
  53. package/dist/index-jnxjjx2y.js +3 -0
  54. package/dist/index-kwhx023z.js +11 -0
  55. package/dist/index-mmx2kp76.js +16 -0
  56. package/dist/index-ne8q0a64.js +26 -0
  57. package/dist/index-nzfqdhsx.js +11 -0
  58. package/dist/index-qe3xpt41.js +3 -0
  59. package/dist/index-qfxwk38p.js +82 -0
  60. package/dist/index-ss5gez2p.js +2 -0
  61. package/dist/index-t5cfkz1e.js +4 -0
  62. package/dist/index-t6p4szqx.js +5 -0
  63. package/dist/index-tahaxp6n.js +3 -0
  64. package/dist/index-v16qz1fa.js +3 -0
  65. package/dist/index-v35k2y31.js +17 -0
  66. package/dist/index-vtsd74g0.js +9 -0
  67. package/dist/index-w0m3jm0s.js +408 -0
  68. package/dist/index-w4jqdhc2.js +5 -0
  69. package/dist/index-xtd0j8ve.js +3 -0
  70. package/dist/index-ywnfz6nm.js +3 -0
  71. package/dist/index.js +3 -3
  72. package/dist/injections-h25c1fmk.js +2 -0
  73. package/dist/interactive-vbz68zh5.js +2 -0
  74. package/dist/key.cmd-f6rjvjy8.js +2 -0
  75. package/dist/log-shipper-0erbwn0q.js +2 -0
  76. package/dist/path-utils-r4df8d3w.js +2 -0
  77. package/dist/plugin-system-zj50tg4k.js +2 -0
  78. package/dist/prereqs-runner-gca0bytz.js +2 -0
  79. package/dist/profile-mount-s4mc1x18.js +2 -0
  80. package/dist/prune-stale-shims-4nqtv0xt.js +2 -0
  81. package/dist/register-core-vng5hdga.js +2 -0
  82. package/dist/secondary-profile-attach-pyqqf4ny.js +2 -0
  83. package/dist/subprocess-4gg77skg.js +2 -0
  84. package/dist/telemetry-nmtywcba.js +2 -0
  85. package/dist/tree-sitter-javascript-rfadfcwb.js +2 -0
  86. package/dist/tree-sitter-markdown-gkyb2qez.js +2 -0
  87. package/dist/tree-sitter-markdown_inline-xzttqkvb.js +2 -0
  88. package/dist/tree-sitter-typescript-4z897028.js +2 -0
  89. package/dist/tree-sitter-zig-y6n7djp6.js +2 -0
  90. package/dist/tunnel-bootstrap-zwyzxrkt.js +2 -0
  91. package/package.json +10 -9
  92. package/dist/agent-config-5b0avmy6.js +0 -2
  93. package/dist/agent-ready-tracker-ez6r9djg.js +0 -2
  94. package/dist/app-mhms2gs0.js +0 -2
  95. package/dist/autostart.cmd-4zb9xhj0.js +0 -2
  96. package/dist/bootstrap-workspace-t5fyq07m.js +0 -2
  97. package/dist/bootstrap.service-nxhkrsf1.js +0 -2
  98. package/dist/bridge-client-bgkr7bcn.js +0 -2
  99. package/dist/daemon-profile-j2wt35x8.js +0 -2
  100. package/dist/esm-n9r8p5n2.js +0 -2
  101. package/dist/finalize-retry-handle-registry-fvm4gm8s.js +0 -2
  102. package/dist/finalize-retry-worker-wb8wj1yw.js +0 -2
  103. package/dist/gateway-client-6dqagbg4.js +0 -2
  104. package/dist/getMachineId-bsd-fgatzdd7.js +0 -2
  105. package/dist/getMachineId-darwin-gt8j2jw2.js +0 -3
  106. package/dist/getMachineId-linux-bcz4rr1x.js +0 -2
  107. package/dist/getMachineId-unsupported-079qwwb4.js +0 -2
  108. package/dist/getMachineId-win-2hk4e8bg.js +0 -2
  109. package/dist/highlights-0gfz787m.js +0 -2
  110. package/dist/highlights-86sbx76f.js +0 -2
  111. package/dist/highlights-n55f5jnk.js +0 -2
  112. package/dist/highlights-tbmszdr7.js +0 -2
  113. package/dist/highlights-wm2cs773.js +0 -2
  114. package/dist/index-06es0fmw.js +0 -10
  115. package/dist/index-0d4wfjbt.js +0 -171
  116. package/dist/index-29fmptfn.js +0 -13
  117. package/dist/index-2q2jadag.js +0 -11
  118. package/dist/index-2sn36kaj.js +0 -7
  119. package/dist/index-3p4n7nwg.js +0 -83
  120. package/dist/index-3tf12pw3.js +0 -3
  121. package/dist/index-54mmh1eb.js +0 -4
  122. package/dist/index-6jzsthh9.js +0 -3
  123. package/dist/index-7wejfjj9.js +0 -5
  124. package/dist/index-8q19ryt2.js +0 -28
  125. package/dist/index-8xh8m2z7.js +0 -8
  126. package/dist/index-98gr644s.js +0 -116
  127. package/dist/index-a8n6s2ae.js +0 -2
  128. package/dist/index-b16y8wyz.js +0 -15
  129. package/dist/index-bv1z3fxw.js +0 -3
  130. package/dist/index-cs78wq6y.js +0 -3
  131. package/dist/index-df19rrbe.js +0 -5
  132. package/dist/index-dx9hjdp4.js +0 -178
  133. package/dist/index-ea42kfvk.js +0 -5
  134. package/dist/index-ekr40gvh.js +0 -3
  135. package/dist/index-evnbrmdf.js +0 -4
  136. package/dist/index-f2asckf0.js +0 -26
  137. package/dist/index-ggxs7nwz.js +0 -3
  138. package/dist/index-gz5t0vvc.js +0 -4
  139. package/dist/index-hey6w5m0.js +0 -3
  140. package/dist/index-hp8jrj6j.js +0 -3
  141. package/dist/index-hrfkzecw.js +0 -3
  142. package/dist/index-hwpmdq5z.js +0 -4
  143. package/dist/index-hz5cy6vz.js +0 -11
  144. package/dist/index-jbxh0ffn.js +0 -407
  145. package/dist/index-js2r0men.js +0 -9
  146. package/dist/index-k3jkzj3k.js +0 -9
  147. package/dist/index-kteawn2b.js +0 -3
  148. package/dist/index-mbhq916m.js +0 -3
  149. package/dist/index-mxc61yr1.js +0 -3
  150. package/dist/index-qdbxvcwr.js +0 -17
  151. package/dist/index-qqq9qyy6.js +0 -21
  152. package/dist/index-rmh8pff5.js +0 -3
  153. package/dist/index-sspydg85.js +0 -15
  154. package/dist/index-tk81f249.js +0 -3
  155. package/dist/index-vjdg5qb2.js +0 -2
  156. package/dist/index-vkrf8kzp.js +0 -158
  157. package/dist/index-vnxqna70.js +0 -16
  158. package/dist/index-w7gctzhm.js +0 -83
  159. package/dist/index-wj5hx7gq.js +0 -4
  160. package/dist/index-x4eaagvr.js +0 -3
  161. package/dist/index-xjr60th0.js +0 -3
  162. package/dist/index-xtbppqnv.js +0 -3
  163. package/dist/index-y42xsgr6.js +0 -133
  164. package/dist/index-zr9rmjyp.js +0 -3
  165. package/dist/injections-2g0zh0bq.js +0 -2
  166. package/dist/interactive-08vyaapn.js +0 -2
  167. package/dist/key.cmd-642xcxb4.js +0 -2
  168. package/dist/log-shipper-9xfnjwr6.js +0 -2
  169. package/dist/path-utils-g449hqvm.js +0 -2
  170. package/dist/plugin-system-gpzcch00.js +0 -2
  171. package/dist/prereqs-runner-re9f51fp.js +0 -2
  172. package/dist/profile-mount-txvgkaz8.js +0 -2
  173. package/dist/prune-stale-shims-vs6a07tb.js +0 -2
  174. package/dist/register-core-ma4kse87.js +0 -2
  175. package/dist/secondary-profile-attach-m9x9e7py.js +0 -2
  176. package/dist/subprocess-zcgpccp1.js +0 -2
  177. package/dist/telemetry-k6em3vy2.js +0 -2
  178. package/dist/tree-sitter-javascript-qh90w7td.js +0 -2
  179. package/dist/tree-sitter-markdown-favzteb6.js +0 -2
  180. package/dist/tree-sitter-markdown_inline-x2726t9j.js +0 -2
  181. package/dist/tree-sitter-typescript-m7ep8z1h.js +0 -2
  182. package/dist/tree-sitter-zig-3vsxg5wh.js +0 -2
  183. package/dist/tunnel-bootstrap-y8dczezc.js +0 -2
@@ -0,0 +1,5 @@
1
+ // @bun
2
+ import{homedir as s,platform as u,tmpdir as a}from"os";import{delimiter as c}from"path";import{existsSync as d,readFileSync as m}from"fs";function g(){if(u()!=="linux")return!1;try{if(process.env.WSL_DISTRO_NAME)return!0;let r="/proc/version";if(!d(r))return!1;let e=m(r,"utf8").toLowerCase();return e.includes("microsoft")||e.includes("wsl")}catch{return!1}}function t(r){try{let e=Bun.spawnSync(r,{stdout:"pipe",stderr:"pipe"});return{code:e.exitCode??1,out:e.stdout.toString().trim(),err:e.stderr.toString().trim()}}catch(e){return{code:127,out:"",err:e instanceof Error?e.message:String(e)}}}class l{platform;isWSL;homeDir=s();tmpDir=a();pathSep=c;eol=`
3
+ `;executableSuffix="";constructor(r){this.platform=r,this.isWSL=g()}which(r,e){return Bun.which(r,{PATH:process.env.PATH})??null}isProcessAlive(r){if(!Number.isInteger(r)||r<=0)return!1;try{return process.kill(r,0),!0}catch(e){return e.code==="EPERM"}}platformLabel(){if(this.platform==="darwin")return"macOS";return this.isWSL?"WSL":"Linux"}killProcessTree(r,e){try{return process.kill(-r,e),!0}catch{try{return process.kill(r,e),!0}catch{return!1}}}listChildPids(r){let e=t(["pgrep","-P",String(r)]);if(e.code!==0)return[];return e.out.split(/\s+/).map((n)=>Number(n)).filter((n)=>Number.isInteger(n)&&n>0)}npmGlobalBin(){let r=t(["npm","bin","-g"]);if(r.code===0&&r.out)return r.out;let e=t(["npm","root","-g"]);if(e.code===0&&e.out)return`${e.out}/.bin`;return null}npmGlobalRoot(){let r=t(["npm","root","-g"]);return r.code===0&&r.out?r.out:null}bunGlobalBin(){let r=t(["bun","pm","-g","bin"]);if(r.code===0&&r.out)return r.out;return`${s()}/.bun/bin`}shellQuote(r){if(/^[A-Za-z0-9._\-/=:]+$/.test(r))return r;return`'${r.replace(/'/g,"'\\''")}'`}shellInvocation(){return{cmd:"/bin/sh",flag:"-c"}}shellArgv(r){let{cmd:e,flag:n}=this.shellInvocation();return[e,n,r]}processGroupSpawnOpts(){return{processGroupId:0}}}class p{platform="win32";isWSL=!1;homeDir=s();tmpDir=a();pathSep=c;eol=`\r
4
+ `;executableSuffix=".exe";which(r,e){return Bun.which(r,{PATH:process.env.PATH})??null}platformLabel(){return"Windows"}isProcessAlive(r){if(!Number.isInteger(r)||r<=0)return!1;try{return process.kill(r,0),!0}catch(e){return e.code==="EPERM"}}killProcessTree(r,e){let n=e==="SIGKILL"||e==="SIGTERM",i=["taskkill.exe","/T","/PID",String(r)];if(n)i.push("/F");return t(i).code===0}listChildPids(r){let e=t(["wmic.exe","process","where",`(ParentProcessId=${r})`,"get","ProcessId"]);if(e.code!==0)return[];return e.out.split(/\r?\n/).map((n)=>Number(n.trim())).filter((n)=>Number.isInteger(n)&&n>0&&n!==r)}npmGlobalBin(){let r=t(["npm.cmd","bin","-g"]);if(r.code===0&&r.out)return r.out;return null}npmGlobalRoot(){let r=t(["npm.cmd","root","-g"]);return r.code===0&&r.out?r.out:null}bunGlobalBin(){let r=t(["bun.exe","pm","-g","bin"]);if(r.code===0&&r.out)return r.out;return null}shellQuote(r){return`'${r.replace(/'/g,"''")}'`}shellInvocation(){return{cmd:"cmd.exe",flag:"/c"}}shellArgv(r){let{cmd:e,flag:n}=this.shellInvocation();return[e,n,r]}processGroupSpawnOpts(){return{}}}var o=null;function b(){if(o)return o;let r=u();if(r==="win32")o=new p;else if(r==="darwin"||r==="linux")o=new l(r);else o=new l("linux");return o}
5
+ export{b};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{r,E}from"./index-w0m3jm0s.js";import{oe,wt}from"./index-jnxjjx2y.js";import"./index-0qjbnyg4.js";import"./index-kwhx023z.js";import{s,A,l,o,g,n,F,v,H}from"./index-7f2k4g6q.js";import{Q}from"./index-vtsd74g0.js";import{_,y,u}from"./index-t5cfkz1e.js";import{f,m,S,q,Ce,Ae}from"./index-byerrz46.js";import{promises as b}from"fs";import P from"path";async function I(d){try{let i=await b.readdir(d);if(i.includes("package.json")){try{let t=JSON.parse(await b.readFile(P.join(d,"package.json"),"utf8")),e={...t.dependencies,...t.devDependencies};if(e.react||e["@types/react"])return"react";if(e.vue||e["@vue/cli"])return"vue";if(e.angular||e["@angular/core"])return"angular";if(e.next||e["@types/next"])return"nextjs";if(e.nuxt||e["@nuxt/core"])return"nuxtjs";if(e.svelte||e["@sveltejs/kit"])return"svelte";if(e.express||e.fastify||e.koa)return"nodejs-backend";if(e.electron)return"electron";if(e.vite)return"vite"}catch{}return"nodejs"}if(i.includes("setup.py")||i.includes("requirements.txt")||i.includes("pyproject.toml")||i.includes("Pipfile")){if(i.includes("manage.py"))return"django";if(i.includes("app.py"))return"flask";return"python"}if(i.includes("go.mod"))return"go";if(i.includes("Cargo.toml"))return"rust";if(i.includes("pom.xml"))return"maven";if(i.includes("build.gradle")||i.includes("build.gradle.kts"))return"gradle";if(i.includes("Gemfile"))return"ruby";if(i.includes("composer.json"))return"php";if(i.some((t)=>t.endsWith(".csproj")||t.endsWith(".sln")))return"dotnet";if(i.includes("CMakeLists.txt")||i.includes("Makefile"))return"cpp";if(i.includes("Package.swift"))return"swift";if(i.includes("pubspec.yaml"))return"flutter";if(i.some((t)=>t.endsWith(".tf")))return"terraform";if(i.includes("Dockerfile"))return"docker"}catch{}return}async function G(d){try{let i=["vite.config.ts","vite.config.js"];for(let t of i)try{let a=(await b.readFile(P.join(d,t),"utf-8")).match(/port:\s*(\d+)/);if(a)return parseInt(a[1],10)}catch{}}catch{}return}var O=new Set([".git","node_modules","__pycache__",".venv","venv","dist","build"]),N=parseInt(process.env.VIBECONTROLS_GIT_SCAN_MAX_DEPTH??"8",10),J=parseInt(process.env.VIBECONTROLS_GIT_SCAN_MAX_DIRECTORIES??"5000",10);async function C(d,i,t,e={visited:0},a=0){let R=[];if(a>N||e.visited>=J)return R;e.visited+=1;try{let c=await wt(d);if(c.some((p)=>p.name===".git"&&p.isDirectory())){if(R.push({path:d,name:P.basename(d),parentPath:t,isSubmodule:!!t,projectType:await I(d),vitePort:await G(d)}),!i)return R;t=d}for(let p of c)if(p.isDirectory()&&!p.isSymbolicLink()&&!O.has(p.name)&&!p.name.startsWith(".")){let j=P.join(d,p.name),x=await C(j,i,t,e,a+1);R.push(...x)}}catch{}return R}function T(d){let{db:i}=d;return new E().get("/",async()=>({repositories:await i.getAllGitRepositories()})).get("/:id",async({params:t,set:e})=>{let a=await i.getGitRepository(t.id);if(!a)return e.status=404,{error:"Repository not found"};return{repository:a}}).post("/scan",async({body:t,set:e})=>{try{let a=(await oe(t.directory,{mustExist:!0})).path;if(!(await b.stat(a)).isDirectory())return e.status=400,{error:"Path is not a directory"};let c=await C(a,t.includeSubmodules??!0),h=[];for(let p of c){let j=await i.getGitRepositoryByPath(p.path);if(j)await i.updateGitRepository(j.id,p),h.push({...j,...p});else{let x=await i.createGitRepository({id:globalThis.crypto.randomUUID(),...p});h.push(x)}}return{repositories:h,scannedPath:a,totalFound:h.length}}catch(a){return e.status=500,{error:"Failed to scan directory",details:String(a)}}},{body:r.Object({directory:r.String(),includeSubmodules:r.Optional(r.Boolean())})}).put("/:id",async({params:t,body:e,set:a})=>{if(!await i.getGitRepository(t.id))return a.status=404,{error:"Repository not found"};try{return await i.updateGitRepository(t.id,e),{success:!0}}catch(c){return a.status=500,{error:"Failed to update repository",details:String(c)}}},{body:r.Object({name:r.Optional(r.String()),projectType:r.Optional(r.String()),vitePort:r.Optional(r.Number())})}).delete("/:id",async({params:t,set:e})=>{if(!await i.getGitRepository(t.id))return e.status=404,{error:"Repository not found"};try{return await i.deleteGitRepository(t.id),{success:!0}}catch(R){return e.status=500,{error:"Failed to delete repository",details:String(R)}}}).post("/fix-hierarchy",async({set:t})=>{try{let e=await i.fixGitHierarchy(),a=await i.getAllGitRepositories();return{success:!0,fixed:e.fixed,total:a.length}}catch(e){return t.status=500,{error:"Failed to fix hierarchy",details:String(e)}}})}var w="http://localhost:3005";function k(d){let i=d.command("git").description("Manage git repositories");i.command("list").description("List discovered git repositories").option("--agent-url <url>","Agent URL",w).option("--json","Emit JSON").option("--plain","Force plain text output").action(async function(t){let e={...d.opts(),...t};try{let a=f(t),R=encodeURIComponent(m(e));await y({mode:_(e),fetchData:async()=>(await S(a,`/api/profiles/${R}/git`)).repositories||[],plain:(c)=>{if(!c||c.length===0){o("No git repositories found.");return}g("Git Repositories"),F(c.map((h)=>({ID:H(h.id),Name:h.name||"-",Path:h.path||"-",Type:h.type||h.projectType||"-",Submodule:h.isSubmodule?"Yes":"No",Scanned:h.scannedAt?v(h.scannedAt):"-"})))},interactive:async(c)=>{if(!c||c.length===0){g("Git Repositories"),o("No git repositories found.");return}let h=c.map((p)=>({id:String(p.id),label:p.name||H(p.id),hint:p.type||p.projectType||"",detail:[`ID: ${p.id}`,`Name: ${p.name??"-"}`,`Path: ${p.path??"-"}`,`Type: ${p.type??p.projectType??"-"}`,`Submodule: ${p.isSubmodule?"Yes":"No"}`,`Scanned: ${p.scannedAt?v(p.scannedAt):"-"}`].join(`
3
+ `)}));await Q({title:`vibe git list \u2014 ${c.length} repo(s)`,rows:h})},json:(c)=>c.map((h)=>({id:h.id,name:h.name??null,path:h.path??null,type:h.type??h.projectType??null,isSubmodule:!!h.isSubmodule,scannedAt:h.scannedAt??null}))})}catch(a){s(A(a))}}),i.command("scan").description("Scan a directory for git repositories").requiredOption("--dir <directory>","Directory to scan").option("--depth <depth>","Scan depth","3").option("--agent-url <url>","Agent URL",w).option("--json","Emit JSON").action(async function(t){let e={...d.opts(),...t};try{let a=f(t),R=encodeURIComponent(m(e)),c=await q(a,`/api/profiles/${R}/git/scan`,{directory:t.dir,depth:parseInt(t.depth,10)});if(u(e,{ok:!0,found:c?.found??c?.repositories?.length??0}))return;if(l("Git scan completed."),c?.found!==void 0)n("Repositories found",c.found);if(c?.repositories)n("Repositories found",c.repositories.length)}catch(a){if(e.json){u(e,{ok:!1,error:A(a)});return}s(A(a))}}),i.command("update").description("Update a git repository entry").requiredOption("-i, --id <id>","Repository ID").option("--vite-port <port>","Vite dev server port").option("--project-type <type>","Project type").option("--agent-url <url>","Agent URL",w).option("--json","Emit JSON").action(async function(t){let e={...d.opts(),...t};try{let a=f(t),R=encodeURIComponent(m(e)),c={};if(t.vitePort)c.vitePort=parseInt(t.vitePort,10);if(t.projectType)c.projectType=t.projectType;if(await Ce(a,`/api/profiles/${R}/git/${t.id}`,c),u(e,{ok:!0,id:t.id}))return;l(`Repository ${H(t.id)} updated.`)}catch(a){if(e.json){u(e,{ok:!1,error:A(a)});return}s(A(a))}}),i.command("delete").description("Delete a git repository entry").requiredOption("-i, --id <id>","Repository ID").option("--agent-url <url>","Agent URL",w).option("--json","Emit JSON").action(async function(t){let e={...d.opts(),...t};try{let a=f(t),R=encodeURIComponent(m(e));if(await Ae(a,`/api/profiles/${R}/git/${t.id}`),u(e,{ok:!0,id:t.id}))return;l(`Repository ${H(t.id)} deleted.`)}catch(a){if(e.json){u(e,{ok:!1,error:A(a)});return}s(A(a))}}),i.command("fix-hierarchy").description("Fix repository parent-child hierarchy").option("--agent-url <url>","Agent URL",w).option("--json","Emit JSON").action(async function(t){let e={...d.opts(),...t};try{let a=f(t),R=encodeURIComponent(m(e)),c=await q(a,`/api/profiles/${R}/git/fix-hierarchy`,{});if(u(e,{ok:!0,fixed:c?.fixed??null}))return;if(l("Hierarchy fix completed."),c?.fixed!==void 0)n("Fixed",c.fixed)}catch(a){if(e.json){u(e,{ok:!1,error:A(a)});return}s(A(a))}})}function D(d,i){k(d)}function te(d){return{name:"git",version:"2.2.0",description:"Git repository scanning, tracking, and hierarchy management",capabilities:{storage:"rw",subprocess:!0,audit:!0,telemetry:!0},tags:["backend","cli"],cliCommand:"git",apiPrefix:"/api/git",createRoutes:(i)=>T(i),onCliSetup:async(i,t)=>{D(i,t)}}}export{te as createPlugin};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{C,e}from"./index-0qjbnyg4.js";import{Dr,ve}from"./index-4z1y39jt.js";import{createHash as p,randomUUID as m}from"crypto";import{existsSync as l,mkdirSync as v,readFileSync as g,writeFileSync as b}from"fs";import{join as d}from"path";import*as o from"os";var y="https://analytics.burdenoff.com/api/track",T="cd7d5ccc3667",f=200,I=10,_=30000,E=5000;function u(t){if(process.env.DO_NOT_TRACK==="1")return!1;let i=process.env.VIBECONTROLS_TELEMETRY?.toLowerCase();if(i==="on"||i==="true"||i==="1")return!0;if(i==="off"||i==="false"||i==="0")return!1;return t}class h{enabled=!1;persisted=!1;buffer=[];flushTimer=null;cachedAnonymousId=null;overflowWarned=!1;postFailureWarned=!1;initialized=!1;init(t){if(t?.persisted!==void 0)this.persisted=t.persisted;if(this.enabled=u(this.persisted),!this.initialized)this.initialized=!0,this.startFlushTimer()}setEnabled(t){let i=this.enabled;if(this.persisted=t,this.enabled=u(this.persisted),i&&!this.enabled)this.buffer=[],this.enqueueRaw("telemetry.disabled",{reason:"user_opt_out"}),this.flush()}emit(t,i={}){if(!this.enabled)return;let r={},s=!1;for(let[a,c]of Object.entries(i)){if(Dr(a)){s=!0;continue}r[a]=c}let n=ve(t,r);if(!n.ok||!n.sanitized){e().logger.warn("telemetry",`dropping event '${t}': ${n.reason??"invalid"}`);return}this.enqueue(t,n.sanitized)}enqueueRaw(t,i){this.enqueue(t,i)}enqueue(t,i){let r={site_id:T,event_name:t,properties:i,anonymous_id:this.getAnonymousId(),timestamp:new Date().toISOString()};if(this.buffer.length>=f){if(this.buffer.shift(),!this.overflowWarned)this.overflowWarned=!0,e().logger.warn("telemetry",`buffer overflow (cap=${f}) \u2014 dropping oldest events`)}if(this.buffer.push(r),this.buffer.length>=I)this.flush()}async flush(){if(this.buffer.length===0)return;let t=this.buffer.splice(0,this.buffer.length),i=new AbortController,r=setTimeout(()=>i.abort(),E);try{await fetch(y,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({events:t}),signal:i.signal})}catch(s){if(!this.postFailureWarned)this.postFailureWarned=!0,e().logger.warn("telemetry","shipper POST failed; dropping batch",{error:String(s)})}finally{clearTimeout(r)}}stop(){if(this.flushTimer)clearInterval(this.flushTimer),this.flushTimer=null;this.initialized=!1}_resetForTest(){this.stop(),this.enabled=!1,this.persisted=!1,this.buffer=[],this.cachedAnonymousId=null,this.overflowWarned=!1,this.postFailureWarned=!1}_bufferLength(){return this.buffer.length}_isEnabled(){return this.enabled}startFlushTimer(){if(this.flushTimer)return;if(this.flushTimer=setInterval(()=>{this.flush()},_),typeof this.flushTimer.unref==="function")this.flushTimer.unref()}getAnonymousId(){if(this.cachedAnonymousId)return this.cachedAnonymousId;let t=`${o.hostname()}${o.platform()}`,i=this.readOrCreateInstallId(),r=p("sha256").update(t+i).digest("hex");return this.cachedAnonymousId=r.slice(0,16),this.cachedAnonymousId}readOrCreateInstallId(){let t;try{t=C()}catch{t=d(process.cwd(),".boff","vibecontrols")}if(!l(t))try{v(t,{recursive:!0,mode:448})}catch{}let i=d(t,".install-id");if(l(i))try{let s=g(i,"utf-8").trim();if(s)return s}catch{}let r=m();try{b(i,r,{mode:384})}catch{}return r}}var Z=new h;
3
+ export{Z};
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env bun
2
2
  // @bun
3
- import{j as e,k as QQ,l as XQ,m as ZQ,n as HQ}from"./index-f2asckf0.js";import"./index-hrfkzecw.js";import{t as $Q}from"./index-2sn36kaj.js";import"./index-dx9hjdp4.js";import"./index-6jzsthh9.js";import"./index-qdbxvcwr.js";import"./index-xtbppqnv.js";import"./index-29fmptfn.js";import"./index-w7gctzhm.js";import"./index-hey6w5m0.js";import{Ha as t}from"./index-7wejfjj9.js";import"./index-ea42kfvk.js";import"./index-rmh8pff5.js";import{fb as T}from"./index-x4eaagvr.js";import"./index-ekr40gvh.js";import"./index-3p4n7nwg.js";import{Mb as o,Nb as r}from"./index-vnxqna70.js";import"./index-bv1z3fxw.js";import"./index-jbxh0ffn.js";import"./index-kteawn2b.js";import{Hd as s,Id as a,Wc as i,Xc as m,td as E,xd as y}from"./index-2q2jadag.js";import{ae as q}from"./index-qqq9qyy6.js";import{ke as k,ne as S,pe as n,qe as U}from"./index-gz5t0vvc.js";import"./index-mbhq916m.js";import{we as B}from"./index-xjr60th0.js";async function P(Q,H={}){let X=H.readConfig??(async()=>{let Z=await y();return{clientId:Z.clientId,clientSecret:Z.clientSecret,workspaceId:Z.workspaceId,organizationId:Z.organizationId,globalGatewayUrl:Z.globalGatewayUrl,workspaceGatewayUrl:Z.workspaceGatewayUrl}});try{let Z=H.pinned?.clientId&&H.pinned?.clientSecret?{clientId:H.pinned.clientId,clientSecret:H.pinned.clientSecret}:null,Y=await X();if(!Y.clientId||!Y.clientSecret)return Q;return{clientId:Z?.clientId??Y.clientId,clientSecret:Z?.clientSecret??Y.clientSecret,workspaceId:Y.workspaceId??Q.workspaceId,organizationId:Y.organizationId??Q.organizationId,globalGatewayUrl:Y.globalGatewayUrl??Q.globalGatewayUrl,workspaceGatewayUrl:Y.workspaceGatewayUrl??Q.workspaceGatewayUrl}}catch(Z){let Y=Z instanceof Error?Z.message:String(Z);if(H.onReadError)H.onReadError(Y);else q().logger.warn("finalize-retry","Could not re-read stored credentials; retrying with the boot-time pair",{error:Y});return Q}}import{isAbsolute as EQ}from"path";import{existsSync as V,mkdirSync as d,readFileSync as IQ,readdirSync as f,renameSync as TQ,unlinkSync as yQ,writeFileSync as g}from"fs";import{dirname as c,join as F}from"path";var WQ=".secrets-migrated-v1",JQ=["static-api-key","clientId","clientSecret"];function VQ(Q,H){return`${Q}:${H}`}function p(){return F(U(),WQ)}function FQ(){let Q=p();d(c(Q),{recursive:!0}),g(Q,`${new Date().toISOString()}
4
- `,{mode:384})}function KQ(Q){if(!V(Q))return null;try{let H=IQ(Q,"utf8"),X=JSON.parse(H);if(X&&typeof X==="object"&&!Array.isArray(X))return X}catch{}return null}function MQ(Q,H){d(c(Q),{recursive:!0});let X=`${Q}.${process.pid}.tmp`;g(X,`${JSON.stringify(H,null,2)}
5
- `,{mode:384}),TQ(X,Q)}function UQ(){let Q=U(),H=F(Q,"agents");if(!V(H))return[];let X=[],Z;try{Z=f(H)}catch{return[]}for(let Y of Z){let z=F(H,Y,"config.json");if(!V(z))continue;X.push({path:z,scope:Y})}return X}function RQ(){let Q=U(),H=F(Q,"profiles");if(!V(H))return[];let X=[],Z;try{Z=f(H)}catch{return[]}for(let Y of Z){if(!Y.endsWith(".json"))continue;X.push({path:F(H,Y),scope:Y.slice(0,-5)})}return X}async function jQ(Q,H){let X=KQ(Q);if(!X)return 0;let Z=0;for(let Y of JQ){let z=X[Y];if(typeof z!=="string"||z.length===0)continue;let _=VQ(H,Y);try{await m(_,z),delete X[Y],Z++,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(Z>0)MQ(Q,X);return Z}async function l(){let Q={alreadyMigrated:!1,fieldsMoved:0,filesUpdated:0};if(V(p()))return Q.alreadyMigrated=!0,Q;let H=[...UQ(),...RQ()];for(let X of H){let Z;try{Z=await jQ(X.path,X.scope)}catch(Y){q().logger.warn("secrets-migrator","skipping target after error",{path:X.path,error:String(Y)});continue}if(Z>0)Q.fieldsMoved+=Z,Q.filesUpdated++}try{FQ()}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=(Z,Y)=>{try{return Q(Z,Y)}catch(z){if(typeof Z==="string"&&Z.endsWith("}}"))try{return Q(Z.slice(0,-1),Y)}catch{}throw z}};let X=globalThis.Request?.prototype;if(X&&typeof X.json==="function"){let Z=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 Z.call(_)}}}}$Q();s();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 wQ(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 w=(()=>{try{return k()}catch{return"default"}})(),x=Number.parseInt(process.env.PORT||String(wQ(w)),10),R=Number.isInteger(x)&&x>0?x:3005,j=process.env.HOST||"0.0.0.0",CQ=(()=>{let Q=process.env.DB_PATH;if(!Q)return;if(EQ(Q))return Q;console.warn(`[boot] Ignoring relative DB_PATH=${Q} (cwd=${process.cwd()}). Use an absolute path or unset to fall back to ${n()}.`);return})(),D=process.env.AGENT_API_KEY||void 0,AQ=process.env.LOG_LEVEL||"info",xQ=process.env.CORS_ORIGIN||void 0;async function DQ(){try{await l()}catch(L){q().logger.warn("server","secrets migration encountered an error",{error:String(L)})}let Q=E()["static-api-key"],H=(()=>{try{return k()}catch{return"default"}})(),X=Q??await i(`${H}:static-api-key`),Z=!D&&!X;await o();let Y={clientId:process.env.VIBE_CLIENT_ID,clientSecret:process.env.VIBE_CLIENT_SECRET};await a();let z=process.env.VIBE_CLIENT_ID,_=process.env.VIBE_CLIENT_SECRET,G=process.env.VIBE_GLOBAL_GATEWAY_URL,u=process.env.VIBE_WORKSPACE_GATEWAY_URL,h=process.env.VIBE_WORKSPACE_ID,YQ=!!z&&!!_&&!!G&&!!u&&!!h;q().logger.info("server","Starting VibeControls Agent...",{runtime:"bun",bunVersion:Bun.version,port:R,host:j,env:"production"});try{let L=E(),$=L["telemetry.enabled"]===!0||L["telemetry.enabled"]==="true";T.init({persisted:$});let N=Date.now();T.emit("agent.started",{version:process.env.npm_package_version??"unknown",profile:w,platform:process.platform}),process.__vibe_started_at=N}catch{}let K=Math.max(1,Number.parseInt(process.env.VIBECONTROLS_AGENT_BOOT_RETRIES??"10",10)||10),LQ=(L)=>{let $=String(L?.message??L).toLowerCase();return $.includes("syntax")||$.includes("cannot find module")||$.includes("module not found")||$.includes("typeerror")||$.includes("config schema")||$.includes("invalid config")||$.includes("corrupt")||$.includes("eaccess")||$.includes("eperm")},O=null,I=0;while(!O){I++;try{O=await HQ({port:R,host:j,dbPath:CQ,apiKey:D,logLevel:AQ,corsOrigin:xQ}),await O.start();try{let L=await import("fs"),$=`${S()}/runtime.json`;L.writeFileSync($,JSON.stringify({pid:process.pid,port:R,host:j,profile:w,startedAt:new Date().toISOString(),version:t()},null,2));let N=()=>{try{if(L.existsSync($))L.unlinkSync($)}catch{}};process.once("SIGTERM",N),process.once("SIGINT",N),process.once("exit",N)}catch(L){q().logger.warn("server","Could not write runtime.json",{error:String(L)})}}catch(L){let $=LQ(L);if(q().logger.error("server","Failed to start agent server",{attempt:I,maxBootAttempts:K,fatal:$,error:String(L)}),$||I>=K)console.error(`\u274C Failed to start VibeControls Agent (attempt ${I}/${K}, fatal=${$}):`,L),process.exit(1);let N=Math.min(30000,1000*2**Math.min(5,I-1)),J=Math.floor(Math.random()*500),M=N+J;console.warn(`\u26A0\uFE0F Agent boot attempt ${I}/${K} failed (transient), retrying in ${Math.round(M/1000)}s...`),await new Promise((A)=>setTimeout(A,M)),O=null}}let b=O.getServiceRegistry().getProvider("tunnel"),W=null;if(b?.getActiveTunnelUrl)for(let L=0;L<30;L++){if(W=await b.getActiveTunnelUrl(),W)break;await new Promise(($)=>setTimeout($,1000))}if(!W){let{sanitizeEnvSuffix:L}=await import("./tunnel-bootstrap-y8dczezc.js"),{getVibecontrolsProfile:$}=await import("./path-utils-g449hqvm.js"),N=L($());W=process.env[`AGENT_TUNNEL_URL_${N}`]??process.env.AGENT_TUNNEL_URL??null}let NQ=E(),qQ=D||r()||NQ["static-api-key"]||"",C=q().getBootState(),zQ=C==="ready"?null:e();if(C==="ready")QQ();kQ({port:R,host:j,tunnelUrl:W,apiKey:qQ,revealApiKey:Z||process.env.AGENT_PRINT_API_KEY==="1",state:C,pairingToken:zQ});try{XQ({profile:w})}catch(L){q().logger.warn("server","Could not start autoupdate",{error:String(L)})}let{existsSync:OQ,unlinkSync:_Q}=await import("fs"),{tmpdir:BQ}=await import("os"),{join:GQ}=await import("path"),v=async(L)=>{q().logger.info("server",`Received ${L}, shutting down...`),ZQ();try{let N=process.__vibe_started_at??Date.now();T.emit("agent.stopped",{uptime_s:Math.round((Date.now()-N)/1000),reason:L}),await T.flush(),T.stop()}catch{}let $=O.getLifecycle();if(L==="SIGTERM"){let N=GQ(BQ(),`.boff-vibecontrols-kill-${process.pid}`);if(OQ(N)){try{_Q(N)}catch{}if(q().logger.info("server","Kill-intent flag detected \u2014 full shutdown"),$)await $.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)"),$)await $.softStop();else await O.stop({reason:"reload"})}else if($)await $.kill();else await O.stop({reason:"shutdown"}),process.exit(0)};if(process.on("SIGINT",()=>v("SIGINT")),process.on("SIGTERM",()=>v("SIGTERM")),YQ){let L=(()=>{let $=process.env.VIBECONTROLS_FINALIZE_TIMEOUT_MS,N=$?Number.parseInt($,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(L/1000)}s)`),(async()=>{let $={clientId:z,clientSecret:_,workspaceId:h,globalGatewayUrl:G,workspaceGatewayUrl:u};try{let N=await Promise.race([O.finalize($),new Promise((J)=>setTimeout(()=>J({ok:!1,error:`inline finalize timed out after ${Math.round(L/1000)}s`}),L))]);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-wb8wj1yw.js"),{setFinalizeRetryHandle:M}=await import("./finalize-retry-handle-registry-fvm4gm8s.js"),A=J({trigger:async()=>O.finalize(await P($,{pinned:Y}))});M(A)}}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",Z="\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(Z),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(Z),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("")}DQ();
3
+ import"./index-w0m3jm0s.js";import{oi,Zt,mr,ai,Er}from"./index-ne8q0a64.js";import"./index-4527yp1c.js";import{R,I,ee,C,e}from"./index-0qjbnyg4.js";import{_e}from"./index-g08z6z5v.js";import{qe,K}from"./index-mmx2kp76.js";import{J,ce,w,X,yt,ti}from"./index-kwhx023z.js";import"./index-5021rk8n.js";import"./index-qfxwk38p.js";import"./index-v35k2y31.js";import{Z}from"./index-ywnfz6nm.js";import"./index-tahaxp6n.js";import"./index-jnxjjx2y.js";import{Sr}from"./index-8rbhm4g8.js";import"./index-75hk5q9s.js";import"./index-gnb8xw13.js";import"./index-4z1y39jt.js";import"./index-byerrz46.js";async function G(t,i={}){let r=i.readConfig??(async()=>{let n=await X();return{clientId:n.clientId,clientSecret:n.clientSecret,workspaceId:n.workspaceId,organizationId:n.organizationId,globalGatewayUrl:n.globalGatewayUrl,workspaceGatewayUrl:n.workspaceGatewayUrl}});try{let n=i.pinned?.clientId&&i.pinned?.clientSecret?{clientId:i.pinned.clientId,clientSecret:i.pinned.clientSecret}:null,a=await r();if(!a.clientId||!a.clientSecret)return t;return{clientId:n?.clientId??a.clientId,clientSecret:n?.clientSecret??a.clientSecret,workspaceId:a.workspaceId??t.workspaceId,organizationId:a.organizationId??t.organizationId,globalGatewayUrl:a.globalGatewayUrl??t.globalGatewayUrl,workspaceGatewayUrl:a.workspaceGatewayUrl??t.workspaceGatewayUrl}}catch(n){let a=n instanceof Error?n.message:String(n);if(i.onReadError)i.onReadError(a);else e().logger.warn("finalize-retry","Could not re-read stored credentials; retrying with the boot-time pair",{error:a});return t}}import{isAbsolute as me}from"path";import{existsSync as y,mkdirSync as L,readFileSync as ne,readdirSync as B,renameSync as oe,unlinkSync as Re,writeFileSync as D}from"fs";import{dirname as V,join as v}from"path";var ie=".secrets-migrated-v1",se=["static-api-key","clientId","clientSecret"];function ae(t,i){return`${t}:${i}`}function z(){return v(C(),ie)}function le(){let t=z();L(V(t),{recursive:!0}),D(t,`${new Date().toISOString()}
4
+ `,{mode:384})}function ge(t){if(!y(t))return null;try{let i=ne(t,"utf8"),r=JSON.parse(i);if(r&&typeof r==="object"&&!Array.isArray(r))return r}catch{}return null}function pe(t,i){L(V(t),{recursive:!0});let r=`${t}.${process.pid}.tmp`;D(r,`${JSON.stringify(i,null,2)}
5
+ `,{mode:384}),oe(r,t)}function de(){let t=C(),i=v(t,"agents");if(!y(i))return[];let r=[],n;try{n=B(i)}catch{return[]}for(let a of n){let l=v(i,a,"config.json");if(!y(l))continue;r.push({path:l,scope:a})}return r}function ue(){let t=C(),i=v(t,"profiles");if(!y(i))return[];let r=[],n;try{n=B(i)}catch{return[]}for(let a of n){if(!a.endsWith(".json"))continue;r.push({path:v(i,a),scope:a.slice(0,-5)})}return r}async function fe(t,i){let r=ge(t);if(!r)return 0;let n=0;for(let a of se){let l=r[a];if(typeof l!=="string"||l.length===0)continue;let p=ae(i,a);try{await ce(p,l),delete r[a],n++,e().logger.info("secrets-migrator","migrated field",{path:t,scope:i,key:a})}catch(d){e().logger.warn("secrets-migrator","failed to migrate field",{path:t,scope:i,key:a,error:String(d)})}}if(n>0)pe(t,r);return n}async function F(){let t={alreadyMigrated:!1,fieldsMoved:0,filesUpdated:0};if(y(z()))return t.alreadyMigrated=!0,t;let i=[...de(),...ue()];for(let r of i){let n;try{n=await fe(r.path,r.scope)}catch(a){e().logger.warn("secrets-migrator","skipping target after error",{path:r.path,error:String(a)});continue}if(n>0)t.fieldsMoved+=n,t.filesUpdated++}try{le()}catch(r){e().logger.warn("secrets-migrator","failed to drop migration marker",{error:String(r)})}if(t.fieldsMoved>0)e().logger.info("secrets-migrator","migration complete",{fieldsMoved:t.fieldsMoved,filesUpdated:t.filesUpdated});return t}{let t=JSON.parse.bind(JSON);JSON.parse=(n,a)=>{try{return t(n,a)}catch(l){if(typeof n==="string"&&n.endsWith("}}"))try{return t(n.slice(0,-1),a)}catch{}throw l}};let r=globalThis.Request?.prototype;if(r&&typeof r.json==="function"){let n=r.json;r.json=async function(){let l=await this.text();if(!l)return;try{return t(l)}catch{if(l.endsWith("}}"))try{return t(l.slice(0,-1))}catch{}let p=new Request("http://shim/",{method:"POST",body:l});return n.call(p)}}}}Sr();yt();if(!process.env.VIBECONTROLS_DATA_DIR)process.env.VIBECONTROLS_DATA_DIR=I();if(typeof Bun>"u")console.error("ERROR: VibeControls Agent requires Bun runtime."),console.error("Install Bun: https://bun.sh"),process.exit(1);function ye(t){if(t==="default")return 3005;let i=2166136261;for(let r=0;r<t.length;r++)i=Math.imul(i^t.charCodeAt(r),16777619);return 3100+Math.abs(i)%300}var b=(()=>{try{return R()}catch{return"default"}})(),T=Number.parseInt(process.env.PORT||String(ye(b)),10),_=Number.isInteger(T)&&T>0?T:3005,A=process.env.HOST||"0.0.0.0",we=(()=>{let t=process.env.DB_PATH;if(!t)return;if(me(t))return t;console.warn(`[boot] Ignoring relative DB_PATH=${t} (cwd=${process.cwd()}). Use an absolute path or unset to fall back to ${ee()}.`);return})(),P=process.env.AGENT_API_KEY||void 0,ve=process.env.LOG_LEVEL||"info",he=process.env.CORS_ORIGIN||void 0;async function Se(){try{await F()}catch(s){e().logger.warn("server","secrets migration encountered an error",{error:String(s)})}let t=w()["static-api-key"],i=(()=>{try{return R()}catch{return"default"}})(),r=t??await J(`${i}:static-api-key`),n=!P&&!r;await qe();let a={clientId:process.env.VIBE_CLIENT_ID,clientSecret:process.env.VIBE_CLIENT_SECRET};await ti();let l=process.env.VIBE_CLIENT_ID,p=process.env.VIBE_CLIENT_SECRET,d=process.env.VIBE_GLOBAL_GATEWAY_URL,N=process.env.VIBE_WORKSPACE_GATEWAY_URL,M=process.env.VIBE_WORKSPACE_ID,x=!!l&&!!p&&!!d&&!!N&&!!M;e().logger.info("server","Starting VibeControls Agent...",{runtime:"bun",bunVersion:Bun.version,port:_,host:A,env:"production"});try{let s=w(),o=s["telemetry.enabled"]===!0||s["telemetry.enabled"]==="true";Z.init({persisted:o});let c=Date.now();Z.emit("agent.started",{version:process.env.npm_package_version??"unknown",profile:b,platform:process.platform}),process.__vibe_started_at=c}catch{}let h=Math.max(1,Number.parseInt(process.env.VIBECONTROLS_AGENT_BOOT_RETRIES??"10",10)||10),W=(s)=>{let o=String(s?.message??s).toLowerCase();return o.includes("syntax")||o.includes("cannot find module")||o.includes("module not found")||o.includes("typeerror")||o.includes("config schema")||o.includes("invalid config")||o.includes("corrupt")||o.includes("eaccess")||o.includes("eperm")},g=null,u=0;while(!g){u++;try{g=await Er({port:_,host:A,dbPath:we,apiKey:P,logLevel:ve,corsOrigin:he}),await g.start();try{let s=await import("fs"),o=`${I()}/runtime.json`;s.writeFileSync(o,JSON.stringify({pid:process.pid,port:_,host:A,profile:b,startedAt:new Date().toISOString(),version:_e()},null,2));let c=()=>{try{if(s.existsSync(o))s.unlinkSync(o)}catch{}};process.once("SIGTERM",c),process.once("SIGINT",c),process.once("exit",c)}catch(s){e().logger.warn("server","Could not write runtime.json",{error:String(s)})}}catch(s){let o=W(s);if(e().logger.error("server","Failed to start agent server",{attempt:u,maxBootAttempts:h,fatal:o,error:String(s)}),o||u>=h)console.error(`\u274C Failed to start VibeControls Agent (attempt ${u}/${h}, fatal=${o}):`,s),process.exit(1);let c=Math.min(30000,1000*2**Math.min(5,u-1)),m=Math.floor(Math.random()*500),S=c+m;console.warn(`\u26A0\uFE0F Agent boot attempt ${u}/${h} failed (transient), retrying in ${Math.round(S/1000)}s...`),await new Promise((k)=>setTimeout(k,S)),g=null}}let O=g.getServiceRegistry().getProvider("tunnel"),f=null;if(O?.getActiveTunnelUrl)for(let s=0;s<30;s++){if(f=await O.getActiveTunnelUrl(),f)break;await new Promise((o)=>setTimeout(o,1000))}if(!f){let{sanitizeEnvSuffix:s}=await import("./tunnel-bootstrap-zwyzxrkt.js"),{getVibecontrolsProfile:o}=await import("./path-utils-r4df8d3w.js"),c=s(o());f=process.env[`AGENT_TUNNEL_URL_${c}`]??process.env.AGENT_TUNNEL_URL??null}let j=w(),q=P||K()||j["static-api-key"]||"",E=e().getBootState(),Y=E==="ready"?null:oi();if(E==="ready")Zt();Ie({port:_,host:A,tunnelUrl:f,apiKey:q,revealApiKey:n||process.env.AGENT_PRINT_API_KEY==="1",state:E,pairingToken:Y});try{mr({profile:b})}catch(s){e().logger.warn("server","Could not start autoupdate",{error:String(s)})}let{existsSync:H,unlinkSync:Q}=await import("fs"),{tmpdir:te}=await import("os"),{join:re}=await import("path"),U=async(s)=>{e().logger.info("server",`Received ${s}, shutting down...`),ai();try{let c=process.__vibe_started_at??Date.now();Z.emit("agent.stopped",{uptime_s:Math.round((Date.now()-c)/1000),reason:s}),await Z.flush(),Z.stop()}catch{}let o=g.getLifecycle();if(s==="SIGTERM"){let c=re(te(),`.boff-vibecontrols-kill-${process.pid}`);if(H(c)){try{Q(c)}catch{}if(e().logger.info("server","Kill-intent flag detected \u2014 full shutdown"),o)await o.kill();else await g.stop({reason:"shutdown"}),process.exit(0)}else if(e().logger.info("server","No kill flag \u2014 treating as hot-reload (soft stop)"),o)await o.softStop();else await g.stop({reason:"reload"})}else if(o)await o.kill();else await g.stop({reason:"shutdown"}),process.exit(0)};if(process.on("SIGINT",()=>U("SIGINT")),process.on("SIGTERM",()=>U("SIGTERM")),x){let s=(()=>{let o=process.env.VIBECONTROLS_FINALIZE_TIMEOUT_MS,c=o?Number.parseInt(o,10):NaN;return Number.isFinite(c)&&c>0?c:300000})();e().logger.info("server",`VIBE_* env vars detected \u2014 running inline finalize (timeout ${Math.round(s/1000)}s)`),(async()=>{let o={clientId:l,clientSecret:p,workspaceId:M,globalGatewayUrl:d,workspaceGatewayUrl:N};try{let c=await Promise.race([g.finalize(o),new Promise((m)=>setTimeout(()=>m({ok:!1,error:`inline finalize timed out after ${Math.round(s/1000)}s`}),s))]);if(!c.ok){e().logger.warn("server","Inline finalize failed \u2014 agent stays awaiting-config. Background retry worker will keep trying.",{error:c.error});let{startFinalizeRetryWorker:m}=await import("./finalize-retry-worker-az74f2qv.js"),{setFinalizeRetryHandle:S}=await import("./finalize-retry-handle-registry-z9mbbjmj.js"),k=m({trigger:async()=>g.finalize(await G(o,{pinned:a}))});S(k)}}catch(c){e().logger.error("server","Inline finalize threw",{error:String(c)})}})()}else e().logger.info("server","Agent is awaiting gateway credentials. Add it on the VibeControls platform using the tunnel URL and API key shown above.")}function Ie(t){let r=(d)=>("\u2551 "+d).padEnd(65)+"\u2551",n="\u2560"+"\u2550".repeat(64)+"\u2563",a="\u2554"+"\u2550".repeat(64)+"\u2557",l="\u255A"+"\u2550".repeat(64)+"\u255D",p=t.revealApiKey?t.apiKey:t.apiKey?`${t.apiKey.substring(0,8)}****${t.apiKey.substring(t.apiKey.length-4)}`:"(none)";if(console.log(""),console.log(a),console.log(r("VibeControls Agent")),console.log(n),console.log(r(`State: ${t.state}`)),console.log(r(`Agent URL: http://${t.host}:${t.port}`)),console.log(r(`API Key: ${p}`)),console.log(r(`Tunnel URL: ${t.tunnelUrl??"(none)"}`)),t.pairingToken)console.log(r(`Pairing: ${t.pairingToken}`)),console.log(r(" (send as x-pairing-token on bootstrap)"));if(console.log(n),console.log(r(`Health: http://localhost:${t.port}/health`)),console.log(r(`Status: http://localhost:${t.port}/api/agent/status`)),console.log(l),!t.revealApiKey)console.log(" (Set AGENT_PRINT_API_KEY=1 to print the API key in full.)");console.log("")}Se();
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ var t="./injections-73j83es3.scm";export{t as default};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{he,Q,U,Xi,zi}from"./index-vtsd74g0.js";export{zi as interactiveCheckboxes,U as interactiveDetail,Xi as interactiveSelect,Q as interactiveTable,he as stripAnsi};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Vi,jr}from"./index-d59kp6zr.js";import"./index-t5cfkz1e.js";import"./index-7f2k4g6q.js";import"./index-vtsd74g0.js";import"./index-byerrz46.js";import"./index-kwhx023z.js";import"./index-0qjbnyg4.js";export{jr as register,Vi as resolveDefaultApiKey};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{ji}from"./index-0qjbnyg4.js";export{ji as logShipper};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{R,O,si,I,ne,ee,C,se}from"./index-0qjbnyg4.js";export{se as getPluginRegistry,ee as getProfileDataDir,I as getVibecontrolsDir,C as getVibecontrolsProductDir,R as getVibecontrolsProfile,ne as getVibecontrolsProfilesDir,si as isPathInside,O as validateAgentName};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Mr,le,W}from"./index-g08z6z5v.js";import"./index-0qjbnyg4.js";export{W as PluginManager,Mr as getPluginPackageRoot,le as validatePluginPackageName};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{xt,pr}from"./index-v16qz1fa.js";import"./index-0gmhd3hs.js";import"./index-5021rk8n.js";import"./index-0qjbnyg4.js";export{pr as readPrereqState,xt as runPluginPrereqs};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{pt,Wi,vr}from"./index-qfxwk38p.js";import"./index-mmx2kp76.js";import"./index-5021rk8n.js";import"./index-w0m3jm0s.js";import"./index-kwhx023z.js";import"./index-0qjbnyg4.js";export{vr as dispatchProfileRequest,pt as mountProfileRoutes,Wi as unmountProfileRoutes};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{xr}from"./index-jmx5awkj.js";export{xr as pruneStaleBunBinShims};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{wr}from"./index-ec08v08h.js";import"./index-cy97asyh.js";import"./index-0gmhd3hs.js";import"./index-652f9scs.js";import"./index-v35k2y31.js";import"./index-75hk5q9s.js";import"./index-g08z6z5v.js";import"./index-ywnfz6nm.js";import"./index-4z1y39jt.js";import"./index-mmx2kp76.js";import"./index-5021rk8n.js";import"./index-w0m3jm0s.js";import"./index-t5cfkz1e.js";import"./index-7f2k4g6q.js";import"./index-vtsd74g0.js";import"./index-byerrz46.js";import"./index-kwhx023z.js";import"./index-0qjbnyg4.js";export{wr as registerCoreCommands};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ai}from"./index-4527yp1c.js";import"./index-gnb8xw13.js";import"./index-g08z6z5v.js";import"./index-qfxwk38p.js";import"./index-mmx2kp76.js";import"./index-5021rk8n.js";import"./index-w0m3jm0s.js";import"./index-kwhx023z.js";import"./index-0qjbnyg4.js";export{Ai as attachSecondaryProfile};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{_r,yr,Yi}from"./index-tahaxp6n.js";import"./index-0qjbnyg4.js";export{Yi as killAllTracked,yr as listTrackedByOwner,_r as spawnTracked};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Z}from"./index-ywnfz6nm.js";import"./index-4z1y39jt.js";import"./index-0qjbnyg4.js";export{Z as telemetryService};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ var l="./tree-sitter-javascript-nd0q4pe9.wasm";export{l as default};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ var F="./tree-sitter-markdown-411r6y9b.wasm";export{F as default};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ var E="./tree-sitter-markdown_inline-j5349f42.wasm";export{E as default};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ var h="./tree-sitter-typescript-zxjzwt75.wasm";export{h as default};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ var A="./tree-sitter-zig-e78zbjpm.wasm";export{A as default};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{rr,Rr,Ji,ir,at}from"./index-v35k2y31.js";import"./index-ywnfz6nm.js";import"./index-4z1y39jt.js";import"./index-0qjbnyg4.js";export{at as getBootstrapTunnelUrl,rr as sanitizeEnvSuffix,Rr as startBootstrapTunnel,ir as stopBootstrapTunnel,Ji as tryHandoverBootstrapTunnel};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibecontrols/agent",
3
- "version": "2026.902.1",
3
+ "version": "2026.1125.1",
4
4
  "main": "./dist/index.js",
5
5
  "type": "module",
6
6
  "bin": {
@@ -50,39 +50,40 @@
50
50
  },
51
51
  "license": "SEE LICENSE IN LICENSE",
52
52
  "description": "VibeControls Agent CLI - Remote development environment management with terminal multiplexing, tunnels, and extensible plugins. Powered by Bun + Elysia.",
53
+ "packageManager": "bun@1.4.4",
53
54
  "dependencies": {
54
55
  "@elysiajs/cors": "^1.3.1",
55
56
  "@opentelemetry/api": "^1.9.0",
56
57
  "@opentelemetry/exporter-prometheus": "^0.217.0",
57
- "@opentelemetry/sdk-metrics": "^2.7.0",
58
+ "@opentelemetry/sdk-metrics": "^3.0.0",
58
59
  "@opentui/core": "0.2.8",
59
- "@vibecontrols/plugin-sdk": "2026.601.1",
60
+ "@vibecontrols/plugin-sdk": "2026.1124.1",
60
61
  "@vibecontrols/vibe-plugin-storage": "2026.601.1",
61
- "commander": "^14.0.3",
62
+ "commander": "^15.0.0",
62
63
  "elysia": "^1.3.2"
63
64
  },
64
65
  "devDependencies": {
65
- "@eslint/js": "^10.0.1",
66
+ "@eslint/js": "^9.39.5",
66
67
  "@playwright/test": "1.59.1",
67
68
  "@types/bun": "^1.3.9",
68
69
  "@vibecontrols/vibe-plugin-ai": "2026.601.1",
69
70
  "@vibecontrols/vibe-plugin-session-manager": "2026.608.1",
70
71
  "@vibecontrols/vibe-plugin-tunnel": "2026.601.1",
71
- "eslint": "^10.0.1",
72
+ "eslint": "^9.39.5",
72
73
  "globals": "^17.3.0",
73
74
  "knip": "6.12.0",
74
75
  "lefthook": "2.1.4",
75
76
  "prettier": "^3.8.1",
76
77
  "rimraf": "^6.1.3",
77
- "typescript": "^5.9.3",
78
+ "typescript": "6.0.3",
78
79
  "typescript-eslint": "^8.56.0"
79
80
  },
80
81
  "repository": {
81
82
  "type": "git",
82
- "url": "git+https://github.com/algoshred/vibecontrols-agent.git"
83
+ "url": "git+https://github.com/Algoshred/vibecontrols-agent.git"
83
84
  },
84
85
  "bugs": {
85
- "url": "https://github.com/algoshred/vibecontrols-agent/issues"
86
+ "url": "https://github.com/Algoshred/vibecontrols-agent/issues"
86
87
  },
87
88
  "homepage": "https://vibecontrols.com",
88
89
  "publishConfig": {
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{$c as b,Ad as C,Bd as D,Cd as E,Dd as F,Ed as G,Fd as H,Gd as I,Hd as J,Id as K,_c as a,ad as c,bd as d,cd as e,dd as f,ed as g,fd as h,gd as i,hd as j,id as k,jd as l,kd as m,ld as n,md as o,nd as p,od as q,pd as r,qd as s,rd as t,sd as u,td as v,ud as w,vd as x,wd as y,xd as z,yd as A,zd as B}from"./index-2q2jadag.js";import"./index-qqq9qyy6.js";import"./index-gz5t0vvc.js";import"./index-mbhq916m.js";import"./index-xjr60th0.js";export{n as writeProfile,y as writeAgentConfigAwaitSecrets,x as writeAgentConfig,j as writeActiveProfileName,D as resolvePriorIdentity,m as readProfileStrict,l as readProfile,z as readAgentConfigWithSecrets,v as readAgentConfig,i as readActiveProfileName,A as readActiveProfile,k as listProfileNames,f as getProfilesDir,h as getProfilePath,r as getProductionGatewayUrls,w as getOrCreateAgentInstanceId,H as getEnvPinnedGateways,u as getAgentConfigSeed,s as getAgentConfigPath,t as getAgentConfigDefaults,g as getActiveProfilePointerPath,B as gatewayOriginOf,q as ensureProfilesInitialized,F as describeProfileEnvironmentConflict,G as describeGatewayIdentityMismatch,E as describeGatewayIdentityConflict,o as deleteProfile,p as buildProfileSeed,C as buildPairedIdentity,e as assertValidProfileName,K as applyAgentSecretsToEnv,J as applyAgentConfigToEnv,I as __resetEnvPinnedGatewaysForTests,c as NAMED_ENV_PRESETS,d as DEFAULT_PROFILE_NAME,a as CURRENT_CONFIG_SCHEMA_VERSION,b as BUILTIN_PROFILE_SEEDS};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Ac as y,Bc as V,sc as G,zc as f}from"./index-8xh8m2z7.js";import"./index-xjr60th0.js";var N={pending:()=>G.gray("\u25CF"),active:()=>G.cyan("\u25B6"),ok:()=>G.green("\u2713"),warn:()=>G.yellow("\u26A0"),fail:()=>G.red("\u2717")};function L(E,A){if(A)console.log(" "+E)}async function O(E,A=2000){let W=new AbortController,j=setTimeout(()=>W.abort(),A);try{let q=await fetch(`${E}/health/ready`,{signal:W.signal});if(q.status!==200&&q.status!==503)return null;return await q.json()}catch{return null}finally{clearTimeout(j)}}function P(E){if(!E?.message)return null;let A=E.message.match(/provider:\s*(\S+)/);return A?A[1]:null}async function M(E,A={}){let W=A.timeoutMs??60000,j=A.pollIntervalMs??500,q=A.verbose!==!1;if(q)f("Waiting for agent to become ready");let C={daemon:!1,awaiting:!1,initializing:!1,db:!1,session:!1,tunnel:!1},z=Date.now(),X="",H=0,D=null;while(Date.now()-z<W){let Q=await O(E);if(!Q){await T(j);continue}if(!C.daemon)L(`${N.ok()} Daemon listening on ${E}`,q),C.daemon=!0;let F=Q.bootState??"unknown",Y=Q.components??{};if(F!==X){if(X=F,F==="awaiting-config"&&!C.awaiting)L(`${N.warn()} Workspace config: ${G.yellow("awaiting OAuth credentials \u2014 register this agent in the VibeControls UI")}`,q),C.awaiting=!0;else if(F==="initializing"&&!C.initializing)L(`${N.active()} Finalizing: fetching encryption key, opening storage, loading plugins\u2026`,q),C.initializing=!0}if(F==="awaiting-config"){if(H++,H>=2)return{outcome:"awaiting-config",bootState:F,degradedReasons:[],summary:"Agent is awaiting workspace registration. Open the VibeControls UI \u2192 Agents \u2192 Add Agent, paste the API Key and Tunnel URL printed above."}}else H=0;if(Y.db?.ok&&!C.db)L(`${N.ok()} Storage encryption key loaded, DB opened`,q),C.db=!0;if(Y.session?.ok&&!C.session){let x=Y.session.message??"";L(`${N.ok()} Plugins started \u2014 ${x}`,q),C.session=!0}let Z=P(Y.tunnel);if(Z&&Z!=="bootstrap"&&Z!==D){if(D=Z,!C.tunnel)L(`${N.ok()} Tunnel ready (provider: ${Z})`,q),C.tunnel=!0}let I=Q.status==="degraded";if(F==="ready"&&!I){if(q)V(),y("Status",G.green("ready"));return{outcome:"ready",bootState:F,degradedReasons:[],summary:"Agent ready."}}if(F==="degraded"||F==="ready"&&I){let x=Q.degradedReasons??[],_=x;if(x.length===0){let J=[];for(let[$,K]of Object.entries(Y)){if($==="boot"||$==="lifecycle")continue;if(K&&!K.ok&&K.message)J.push({plugin:$,message:K.message})}for(let[$,K]of Object.entries(Q.plugins??{}))if(K&&!K.ok&&K.message)J.push({plugin:`plugin:${$}`,message:K.message});_=J}if(q){V(),L(`${N.fail()} Agent boot ${G.red("degraded")} \u2014 investigate before retrying`,q);for(let J of _)L(` ${G.gray("\xB7")} [${J.plugin}] ${J.message}`,q);V()}return{outcome:"degraded",bootState:F,degradedReasons:_,summary:_.length?`Agent degraded: ${_.map((J)=>`[${J.plugin}] ${J.message}`).join("; ")}`:"Agent degraded with no reported reason \u2014 check vibe logs."}}await T(j)}if(q)V(),L(`${N.warn()} Timed out after ${Math.round(W/1000)}s; last bootState=${X||"unknown"}. Check ${G.bold("vibe logs")} for details.`,q),V();return{outcome:"timeout",bootState:X||"unknown",degradedReasons:[],summary:`Timed out waiting for ready. Last bootState=${X||"unknown"}.`}}function T(E){return new Promise((A)=>setTimeout(A,E))}export{M as trackAgentReady};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{n as a}from"./index-f2asckf0.js";import"./index-hrfkzecw.js";import"./index-dx9hjdp4.js";import"./index-6jzsthh9.js";import"./index-qdbxvcwr.js";import"./index-xtbppqnv.js";import"./index-29fmptfn.js";import"./index-w7gctzhm.js";import"./index-hey6w5m0.js";import"./index-7wejfjj9.js";import"./index-ea42kfvk.js";import"./index-rmh8pff5.js";import"./index-x4eaagvr.js";import"./index-ekr40gvh.js";import"./index-3p4n7nwg.js";import"./index-vnxqna70.js";import"./index-bv1z3fxw.js";import"./index-jbxh0ffn.js";import"./index-kteawn2b.js";import"./index-2q2jadag.js";import"./index-qqq9qyy6.js";import"./index-gz5t0vvc.js";import"./index-mbhq916m.js";import"./index-xjr60th0.js";export{a as createApp};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{K as a,L as b,M as c,N as d}from"./index-y42xsgr6.js";import"./index-ea42kfvk.js";import"./index-8q19ryt2.js";import"./index-wj5hx7gq.js";import"./index-8xh8m2z7.js";import"./index-js2r0men.js";import"./index-kteawn2b.js";import"./index-2q2jadag.js";import"./index-qqq9qyy6.js";import"./index-gz5t0vvc.js";import"./index-mbhq916m.js";import"./index-xjr60th0.js";export{d as register,a as generateSystemdUnit,b as generateLaunchdPlist,c as ensureAutostartConfigured};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{t as a}from"./index-2sn36kaj.js";import"./index-qqq9qyy6.js";import"./index-gz5t0vvc.js";import"./index-mbhq916m.js";import"./index-xjr60th0.js";export{a as bootstrapWorkspace};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{S as a,T as b}from"./index-54mmh1eb.js";import"./index-xjr60th0.js";export{b as installDependencies,a as checkDependencies};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Wd as K,ae as D}from"./index-qqq9qyy6.js";import"./index-gz5t0vvc.js";import"./index-mbhq916m.js";import"./index-xjr60th0.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 $(J,Q,Z){D().logger[J](b,Q,Z)}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 Z=process.env.VIBE_BRIDGE_URL;if(Z)return Z;return Q.toString()}catch{return process.env.VIBE_BRIDGE_URL??""}}async function x(){if(z.stopped||z.ws)return;if(!K.isConfigured()){$("debug","Gateway client not configured yet; deferring bridge connect");return}if(!z.agentId){$("debug","No agentId set yet; deferring bridge connect");return}let J,Q,Z;try{let Y=await K.getAccessToken();J=Y.token,Q=Y.workspaceGatewayUrl,Z=Y.workspaceId}catch(Y){$("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){$("warn","Cannot resolve bridge URL from workspaceGatewayUrl",{workspaceGatewayUrl:Q}),W();return}$("info","Connecting to agent-bridge",{url:q,agentId:z.agentId});let H;try{H=new WebSocket(q,{headers:{Authorization:`Bearer ${J}`,...Z?{"x-workspace-id":Z}:{}}})}catch(Y){$("warn","Bridge connect threw",{error:Y instanceof Error?Y.message:String(Y)}),W();return}z.ws=H,H.addEventListener("open",()=>{z.reconnectAttempt=0,$("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,$("info","Bridge welcome received \u2014 connection ready",{workspaceId:typeof V.workspaceId==="string"?V.workspaceId:void 0}),L(),P();else if(V.type==="error")$("warn","Bridge error frame",{error:V})}),H.addEventListener("close",(Y)=>{if($("info","Bridge socket closed",{code:Y.code,reason:Y.reason}),M(),!z.stopped)W()}),H.addEventListener("error",(Y)=>{$("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 $("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)$("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().catch((Z)=>{$("debug",`Bridge reconnect attempt failed: ${Z instanceof Error?Z.message:String(Z)}`)})},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().catch((Z)=>{$("debug",`Bridge connect failed: ${Z instanceof Error?Z.message:String(Z)}`)})},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{$d as b,_d as a,ae as c,be as d,ce as e}from"./index-qqq9qyy6.js";import"./index-gz5t0vvc.js";import"./index-mbhq916m.js";import"./index-xjr60th0.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{ac as a,bc as b,cc as c,dc as d,ec as e,fc as f,gc as g,hc as h,ic as i,jc as j,kc as k}from"./index-8q19ryt2.js";import"./index-xjr60th0.js";export{a as program,d as createOption,b as createCommand,c as createArgument,j as Option,g as InvalidOptionArgumentError,f as InvalidArgumentError,k as Help,e as CommanderError,h as Command,i as Argument};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import"./index-xjr60th0.js";var e=null;function n(t){e=t}function r(){return e}export{n as setFinalizeRetryHandle,r as getFinalizeRetryHandle};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ae as Y}from"./index-qqq9qyy6.js";import"./index-gz5t0vvc.js";import"./index-mbhq916m.js";import"./index-xjr60th0.js";var Z=[300000,600000,900000,1800000];function j(R){let W=R.backoffsMs??Z,w=0,z=!1,G=null,J=null,I=null,q=Y();if(q.getBootState()==="ready")return{cancel(){},async forceRetryNow(){return{ok:!0}},getState(){return{attempt:0,cancelled:!0,nextAttemptAt:null}}};function Q(){if(G!==null)clearTimeout(G),G=null,J=null}function X(){if(z)return Promise.resolve({ok:!1,error:"retry worker cancelled"});if(q.getBootState()==="ready")return z=!0,Q(),Promise.resolve({ok:!0});if(I)return I;return w+=1,R.onAttempt?.(w),q.logger.info("finalize-retry",`Background finalize retry attempt ${w}`),I=(async()=>{try{let v=await R.trigger();if(v.ok)q.logger.info("finalize-retry",`Background finalize succeeded on attempt ${w} \u2014 agent recovered`),z=!0,Q();else q.recordFinalizeError(v.error,w),q.logger.warn("finalize-retry",`Background finalize attempt ${w} failed`,{error:v.error});return v}catch(v){let H=v instanceof Error?v.message:String(v);return q.recordFinalizeError(H,w),q.logger.error("finalize-retry",`Background finalize attempt ${w} threw`,{error:H}),{ok:!1,error:H}}finally{I=null}})(),I}function V(){if(z)return;if(q.getBootState()==="ready"){z=!0;return}if(G!==null)return;let v=Math.min(w,W.length-1),H=W[v];J=Date.now()+H,G=setTimeout(async()=>{if(G=null,await X(),!z&&q.getBootState()!=="ready")V()},H)}return V(),{cancel(){z=!0,Q()},async forceRetryNow(){if(q.getBootState()==="ready")return{ok:!0};if(z)return{ok:!1,error:"retry worker cancelled"};Q();let v=await X();if(!z&&q.getBootState()!=="ready")V();return v},getState(){return{attempt:w,cancelled:z,nextAttemptAt:J?new Date(J).toISOString():null}}}}export{j as startFinalizeRetryWorker};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Ud as a,Vd as b,Wd as c,Xd as d}from"./index-qqq9qyy6.js";import"./index-gz5t0vvc.js";import"./index-mbhq916m.js";import"./index-xjr60th0.js";export{a as normalizeGatewayUrl,c as gatewayClient,d as default,b as GatewayClient};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{f as D}from"./index-3tf12pw3.js";import{g as C}from"./index-hp8jrj6j.js";import{ue as z,we as B}from"./index-xjr60th0.js";var H=z((v)=>{Object.defineProperty(v,"__esModule",{value:!0});v.getMachineId=void 0;var E=B("fs"),F=D(),q=C();async function G(){try{return(await E.promises.readFile("/etc/hostid",{encoding:"utf8"})).trim()}catch(k){q.diag.debug(`error reading machine id: ${k}`)}try{return(await(0,F.execAsync)("kenv -q smbios.system.uuid")).stdout.trim()}catch(k){q.diag.debug(`error reading machine id: ${k}`)}return}v.getMachineId=G});export default H();
@@ -1,3 +0,0 @@
1
- // @bun
2
- import{f as D}from"./index-3tf12pw3.js";import{g as C}from"./index-hp8jrj6j.js";import{ue as B}from"./index-xjr60th0.js";var H=B((q)=>{Object.defineProperty(q,"__esModule",{value:!0});q.getMachineId=void 0;var E=D(),F=C();async function G(){try{let f=(await(0,E.execAsync)('ioreg -rd1 -c "IOPlatformExpertDevice"')).stdout.split(`
3
- `).find((z)=>z.includes("IOPlatformUUID"));if(!f)return;let k=f.split('" = "');if(k.length===2)return k[1].slice(0,-1)}catch(b){F.diag.debug(`error reading machine id: ${b}`)}return}q.getMachineId=G});export default H();
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{g as B}from"./index-hp8jrj6j.js";import{ue as z,we as A}from"./index-xjr60th0.js";var F=z((k)=>{Object.defineProperty(k,"__esModule",{value:!0});k.getMachineId=void 0;var C=A("fs"),D=B();async function E(){let v=["/etc/machine-id","/var/lib/dbus/machine-id"];for(let w of v)try{return(await C.promises.readFile(w,{encoding:"utf8"})).trim()}catch(b){D.diag.debug(`error reading machine id: ${b}`)}return}k.getMachineId=E});export default F();
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{g as q}from"./index-hp8jrj6j.js";import{ue as k}from"./index-xjr60th0.js";var z=k((b)=>{Object.defineProperty(b,"__esModule",{value:!0});b.getMachineId=void 0;var v=q();async function w(){v.diag.debug("could not read machine-id: unsupported platform");return}b.getMachineId=w});export default z();
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{f as E}from"./index-3tf12pw3.js";import{g as D}from"./index-hp8jrj6j.js";import{ue as B,we as C}from"./index-xjr60th0.js";var J=B((v)=>{Object.defineProperty(v,"__esModule",{value:!0});v.getMachineId=void 0;var q=C("process"),F=E(),G=D();async function H(){let b="%windir%\\System32\\REG.exe";if(q.arch==="ia32"&&"PROCESSOR_ARCHITEW6432"in q.env)b="%windir%\\sysnative\\cmd.exe /c "+b;try{let k=(await(0,F.execAsync)(`${b} QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid`)).stdout.split("REG_SZ");if(k.length===2)return k[1].trim()}catch(f){G.diag.debug(`error reading machine id: ${f}`)}return}v.getMachineId=H});export default J();
@@ -1,2 +0,0 @@
1
- // @bun
2
- import"./index-xjr60th0.js";var a="./highlights-x6tmsnaa.scm";export{a as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import"./index-xjr60th0.js";var r="./highlights-eq9cgrbb.scm";export{r as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import"./index-xjr60th0.js";var n="./highlights-hk7bwhj4.scm";export{n as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import"./index-xjr60th0.js";var t="./highlights-ghv9g403.scm";export{t as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import"./index-xjr60th0.js";var t="./highlights-r812a2qc.scm";export{t as default};
@@ -1,10 +0,0 @@
1
- // @bun
2
- import{a as P,b as S,c as v}from"./index-b16y8wyz.js";import{g as M}from"./index-hp8jrj6j.js";import{ue as z,we as E}from"./index-xjr60th0.js";var I=z((_)=>{Object.defineProperty(_,"__esModule",{value:!0});_.PrometheusSerializer=void 0;var b=M(),H=v(),T=S(),y=P(),h="otel.scope.schema_url";function C(F){return F.replace(/\\/g,"\\\\").replace(/\n/g,"\\n")}function k(F=""){if(typeof F!=="string")F=JSON.stringify(F);return C(F).replace(/"/g,"\\\"")}var d=/[^a-z0-9_]/gi,l=/_{2,}/g;function w(F){return F.replace(d,"_").replace(l,"_")}function p(F,J){if(!F.endsWith("_total")&&J.dataPointType===H.DataPointType.SUM&&J.isMonotonic)F=F+"_total";return F}function u(F){if(F===1/0)return"+Inf";else if(F===-1/0)return"-Inf";else return`${F}`}function m(F){switch(F.dataPointType){case H.DataPointType.SUM:if(F.isMonotonic)return"counter";return"gauge";case H.DataPointType.GAUGE:return"gauge";case H.DataPointType.HISTOGRAM:return"histogram";default:return"untyped"}}function B(F,J,K,Q,V){let W=!1,X="";for(let[Y,$]of Object.entries(J)){let Z=w(Y);W=!0,X+=`${X.length>0?",":""}${Z}="${k($)}"`}if(V)for(let[Y,$]of Object.entries(V)){let Z=w(Y);W=!0,X+=`${X.length>0?",":""}${Z}="${k($)}"`}if(W)F+=`{${X}}`;return`${F} ${u(K)}${Q!==void 0?" "+String(Q):""}
3
- `}var c="# no registered metrics";class A{_prefix;_appendTimestamp;_additionalAttributes;_withResourceConstantLabels;_withoutScopeInfo;_withoutTargetInfo;constructor(F,J=!1,K,Q,V){if(F)this._prefix=F+"_";this._appendTimestamp=J,this._withResourceConstantLabels=K,this._withoutScopeInfo=!!V,this._withoutTargetInfo=!!Q}serialize(F){let J="";this._additionalAttributes=this._filterResourceConstantLabels(F.resource.attributes,this._withResourceConstantLabels);for(let K of F.scopeMetrics)J+=this._serializeScopeMetrics(K);if(J==="")J+=c;return this._serializeResource(F.resource)+J}_filterResourceConstantLabels(F,J){if(J){let K={};for(let[Q,V]of Object.entries(F))if(Q.match(J))K[Q]=V;return K}return}_serializeScopeMetrics(F){let J="";for(let K of F.metrics)J+=this._serializeMetricData(K,F.scope)+`
4
- `;return J}_serializeMetricData(F,J){let K=w(C(F.descriptor.name));if(this._prefix)K=`${this._prefix}${K}`;let Q=F.dataPointType;K=p(K,F);let V=`# HELP ${K} ${C(F.descriptor.description||"description missing")}`,W=F.descriptor.unit?`
5
- # UNIT ${K} ${C(F.descriptor.unit)}`:"",X=`# TYPE ${K} ${m(F)}`,Y;if(this._withoutScopeInfo)Y=this._additionalAttributes;else{let Z={[y.ATTR_OTEL_SCOPE_NAME]:J.name};if(J.schemaUrl)Z[h]=J.schemaUrl;if(J.version)Z[y.ATTR_OTEL_SCOPE_VERSION]=J.version;Y=Object.assign(Z,this._additionalAttributes)}let $="";switch(Q){case H.DataPointType.SUM:case H.DataPointType.GAUGE:{$=F.dataPoints.map((Z)=>this._serializeSingularDataPoint(K,F,Z,Y)).join("");break}case H.DataPointType.HISTOGRAM:{$=F.dataPoints.map((Z)=>this._serializeHistogramDataPoint(K,F,Z,Y)).join("");break}default:b.diag.error(`Unrecognizable DataPointType: ${Q} for metric "${K}"`)}return`${V}${W}
6
- ${X}
7
- ${$}`.trim()}_serializeSingularDataPoint(F,J,K,Q){let V="",{value:W,attributes:X}=K,Y=(0,T.hrTimeToMilliseconds)(K.endTime);return V+=B(F,X,W,this._appendTimestamp?Y:void 0,Q),V}_serializeHistogramDataPoint(F,J,K,Q){let V="",W=K.attributes,X=K.value,Y=(0,T.hrTimeToMilliseconds)(K.endTime);for(let j of["count","sum"]){let q=X[j];if(q!=null)V+=B(F+"_"+j,W,q,this._appendTimestamp?Y:void 0,Q)}let $=0,Z=X.buckets.counts.entries(),R=!1;for(let[j,q]of Z){$+=q;let O=X.buckets.boundaries[j];if(O===void 0&&R)break;if(O===1/0)R=!0;V+=B(F+"_bucket",W,$,this._appendTimestamp?Y:void 0,Object.assign({},Q,{le:O===void 0||O===1/0?"+Inf":String(O)}))}return V}_serializeResource(F){if(this._withoutTargetInfo===!0)return"";let J="target_info",K=`# HELP ${J} Target metadata`,Q=`# TYPE ${J} gauge`,V=B(J,F.attributes,1).trim();return`${K}
8
- ${Q}
9
- ${V}
10
- `}}_.PrometheusSerializer=A});var f=z((g)=>{Object.defineProperty(g,"__esModule",{value:!0});g.PrometheusExporter=void 0;var U=M(),n=S(),N=v(),o=E("http"),i=I(),s=E("url");class G extends N.MetricReader{static DEFAULT_OPTIONS={host:void 0,port:9464,endpoint:"/metrics",prefix:"",appendTimestamp:!1,withResourceConstantLabels:void 0,withoutScopeInfo:!1,withoutTargetInfo:!1};_host;_port;_baseUrl;_endpoint;_server;_prefix;_appendTimestamp;_serializer;_startServerPromise;constructor(F={},J=()=>{}){super({aggregationSelector:(W)=>{return{type:N.AggregationType.DEFAULT}},aggregationTemporalitySelector:(W)=>N.AggregationTemporality.CUMULATIVE,metricProducers:F.metricProducers});this._host=F.host||process.env.OTEL_EXPORTER_PROMETHEUS_HOST||G.DEFAULT_OPTIONS.host,this._port=F.port||Number(process.env.OTEL_EXPORTER_PROMETHEUS_PORT)||G.DEFAULT_OPTIONS.port,this._prefix=F.prefix||G.DEFAULT_OPTIONS.prefix,this._appendTimestamp=typeof F.appendTimestamp==="boolean"?F.appendTimestamp:G.DEFAULT_OPTIONS.appendTimestamp;let K=F.withResourceConstantLabels||G.DEFAULT_OPTIONS.withResourceConstantLabels,Q=F.withoutScopeInfo||G.DEFAULT_OPTIONS.withoutScopeInfo,V=F.withoutTargetInfo||G.DEFAULT_OPTIONS.withoutTargetInfo;if(this._server=(0,o.createServer)(this._requestHandler).unref(),this._serializer=new i.PrometheusSerializer(this._prefix,this._appendTimestamp,K,V,Q),this._baseUrl=`http://${this._host}:${this._port}/`,this._endpoint=(F.endpoint||G.DEFAULT_OPTIONS.endpoint).replace(/^([^/])/,"/$1"),F.preventServerStart!==!0)this.startServer().then(J,(W)=>{U.diag.error(W),J(W)});else if(J)queueMicrotask(J)}async onForceFlush(){}onShutdown(){return this.stopServer()}stopServer(){if(!this._server)return U.diag.debug("Prometheus stopServer() was called but server was never started."),Promise.resolve();else return new Promise((F)=>{this._server.close((J)=>{if(!J)U.diag.debug("Prometheus exporter was stopped");else if(J.code!=="ERR_SERVER_NOT_RUNNING")(0,n.globalErrorHandler)(J);F()})})}startServer(){return this._startServerPromise??=new Promise((F,J)=>{this._server.once("error",J),this._server.listen({port:this._port,host:this._host},()=>{U.diag.debug(`Prometheus exporter server started: ${this._host}:${this._port}/${this._endpoint}`),F()})}),this._startServerPromise}getMetricsRequestHandler(F,J){this._exportMetrics(J)}_requestHandler=(F,J)=>{let K;try{if(F.url!=null)K=new s.URL(F.url,this._baseUrl).pathname}catch{J.statusCode=400,J.end("Bad Request");return}if(K===this._endpoint)this._exportMetrics(J);else this._notFound(J)};_exportMetrics=(F)=>{F.statusCode=200,F.setHeader("content-type","text/plain"),this.collect().then((J)=>{let{resourceMetrics:K,errors:Q}=J;if(Q.length)U.diag.error("PrometheusExporter: metrics collection errors",...Q);F.end(this._serializer.serialize(K))},(J)=>{F.end(`# failed to export metrics: ${J}`)})};_notFound=(F)=>{F.statusCode=404,F.end()}}g.PrometheusExporter=G});var e=z((L)=>{Object.defineProperty(L,"__esModule",{value:!0});L.PrometheusSerializer=L.PrometheusExporter=void 0;var a=f();Object.defineProperty(L,"PrometheusExporter",{enumerable:!0,get:function(){return a.PrometheusExporter}});var r=I();Object.defineProperty(L,"PrometheusSerializer",{enumerable:!0,get:function(){return r.PrometheusSerializer}})});export default e();