@reason-machines/cli-linux-arm64-musl 0.2.365 → 0.2.366

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 (85) hide show
  1. package/bin/ara +1 -1
  2. package/bin/vm-hands/api-13266c99.js +2 -0
  3. package/bin/vm-hands/api-credentials-q6vq26w0.js +2 -0
  4. package/bin/vm-hands/{ask-relay-mvmxwbdf.js → ask-relay-ar561trh.js} +3 -3
  5. package/bin/vm-hands/connect-cli-gjf47h7z.js +2 -0
  6. package/bin/vm-hands/custom-endpoint-device-m1kn3rkk.js +2 -0
  7. package/bin/vm-hands/desktop-account-vfbchnax.js +2 -0
  8. package/bin/vm-hands/{device-workspace-c05vq771.js → device-workspace-nvcschtn.js} +1 -1
  9. package/bin/vm-hands/{hands-worker-source-wfv9csj2.js → hands-worker-source-k9k2vj4y.js} +1 -1
  10. package/bin/vm-hands/{index-80ep9259.js → index-ae8w22py.js} +1 -1
  11. package/bin/vm-hands/{install-receipt-pbfhgaxc.js → install-receipt-4cnygt5g.js} +1 -1
  12. package/bin/vm-hands/local-automation-0j57c21p.js +2 -0
  13. package/bin/vm-hands/local-capabilities-6pqbn5wm.js +2 -0
  14. package/bin/vm-hands/local-desktop-users-nwyzyc05.js +2 -0
  15. package/bin/vm-hands/local-display-mac-ewqyyxk5.js +2 -0
  16. package/bin/vm-hands/local-display-session-a3rr41av.js +2 -0
  17. package/bin/vm-hands/local-pty-session-8k64gfn8.js +2 -0
  18. package/bin/vm-hands/{managed-runtime-wepb0xwj.js → managed-runtime-3fkrr7cf.js} +1 -1
  19. package/bin/vm-hands/{network-contract-zjq3w2n3.js → network-contract-wep9fv9j.js} +1 -1
  20. package/bin/vm-hands/package-pfdm6awy.js +2 -0
  21. package/bin/vm-hands/permissions-d87nq1as.js +2 -0
  22. package/bin/vm-hands/{reason-hands-protocol-aj1zwpk0.js → reason-hands-protocol-78nr9pzf.js} +1 -1
  23. package/bin/vm-hands/serve-service-tzdt63z3.js +2 -0
  24. package/bin/vm-hands/{status-9jex7h4b.js → status-9420cxy5.js} +2 -2
  25. package/bin/vm-hands/version-ss8wa2cx.js +2 -0
  26. package/bin/vm-hands/{vm-hands-entry-lite-1hv536wk.js → vm-hands-entry-lite-01sqtryp.js} +1 -1
  27. package/bin/vm-hands/{vm-hands-entry-lite-p11w3t99.js → vm-hands-entry-lite-1k23f7ja.js} +3 -3
  28. package/bin/vm-hands/{vm-hands-entry-lite-4xfs7y6w.js → vm-hands-entry-lite-1mrkcz0p.js} +1 -1
  29. package/bin/vm-hands/{vm-hands-entry-lite-dqnhebfx.js → vm-hands-entry-lite-2fpxf6vm.js} +1 -1
  30. package/bin/vm-hands/{vm-hands-entry-lite-jjkkee8q.js → vm-hands-entry-lite-630eqwb4.js} +2 -2
  31. package/bin/vm-hands/{vm-hands-entry-lite-cety9pka.js → vm-hands-entry-lite-7jhh57qs.js} +2 -2
  32. package/bin/vm-hands/{vm-hands-entry-lite-jpkf3569.js → vm-hands-entry-lite-7wgbj1kg.js} +2 -2
  33. package/bin/vm-hands/{vm-hands-entry-lite-qy9xzp2m.js → vm-hands-entry-lite-8a1zycjh.js} +2 -2
  34. package/bin/vm-hands/{vm-hands-entry-lite-6n6k2j2k.js → vm-hands-entry-lite-8crh75hs.js} +2 -2
  35. package/bin/vm-hands/{vm-hands-entry-lite-hfq6jjnh.js → vm-hands-entry-lite-arhbwrn1.js} +1 -1
  36. package/bin/vm-hands/{vm-hands-entry-lite-7nk0873d.js → vm-hands-entry-lite-ay6sk3xm.js} +1 -1
  37. package/bin/vm-hands/{vm-hands-entry-lite-cwf21py1.js → vm-hands-entry-lite-bhgsayph.js} +1 -1
  38. package/bin/vm-hands/{vm-hands-entry-lite-vcm4389c.js → vm-hands-entry-lite-cas0c9qd.js} +2 -2
  39. package/bin/vm-hands/{vm-hands-entry-lite-pkjkgy7n.js → vm-hands-entry-lite-cvc79v3m.js} +1 -1
  40. package/bin/vm-hands/{vm-hands-entry-lite-fr2k6eah.js → vm-hands-entry-lite-cvft83sx.js} +2 -2
  41. package/bin/vm-hands/{vm-hands-entry-lite-5w20j369.js → vm-hands-entry-lite-d0f4kbc8.js} +2 -2
  42. package/bin/vm-hands/{vm-hands-entry-lite-0e1svtw7.js → vm-hands-entry-lite-es39m2mg.js} +2 -2
  43. package/bin/vm-hands/{vm-hands-entry-lite-avstvbbc.js → vm-hands-entry-lite-g63y988w.js} +2 -2
  44. package/bin/vm-hands/{vm-hands-entry-lite-g6ktmqfg.js → vm-hands-entry-lite-gs8cpdfw.js} +2 -2
  45. package/bin/vm-hands/{vm-hands-entry-lite-xhr0m9r0.js → vm-hands-entry-lite-h6qss80e.js} +1 -1
  46. package/bin/vm-hands/{vm-hands-entry-lite-k7fkfytm.js → vm-hands-entry-lite-hzsk6tpw.js} +2 -2
  47. package/bin/vm-hands/{vm-hands-entry-lite-p1nb6n3r.js → vm-hands-entry-lite-jd49j573.js} +2 -2
  48. package/bin/vm-hands/{vm-hands-entry-lite-k70a8smw.js → vm-hands-entry-lite-m2h8vdr0.js} +2 -2
  49. package/bin/vm-hands/{vm-hands-entry-lite-tbps80f1.js → vm-hands-entry-lite-m57kpdgb.js} +2 -2
  50. package/bin/vm-hands/{vm-hands-entry-lite-kxtjkzzh.js → vm-hands-entry-lite-p24kmysw.js} +1 -1
  51. package/bin/vm-hands/{vm-hands-entry-lite-xj0p1ax7.js → vm-hands-entry-lite-p7hxm3hc.js} +2 -2
  52. package/bin/vm-hands/{vm-hands-entry-lite-hw8vgsmm.js → vm-hands-entry-lite-pby299bv.js} +1 -1
  53. package/bin/vm-hands/{vm-hands-entry-lite-csaw87kf.js → vm-hands-entry-lite-pcavxb2v.js} +2 -2
  54. package/bin/vm-hands/{vm-hands-entry-lite-0763vz5v.js → vm-hands-entry-lite-pd4gdky1.js} +1 -1
  55. package/bin/vm-hands/{vm-hands-entry-lite-5y2kfnv2.js → vm-hands-entry-lite-pk2xd13q.js} +2 -2
  56. package/bin/vm-hands/{vm-hands-entry-lite-6fvjbwqq.js → vm-hands-entry-lite-qxnzwjrp.js} +1 -1
  57. package/bin/vm-hands/{vm-hands-entry-lite-rc9s6tym.js → vm-hands-entry-lite-rax2e8y2.js} +1 -1
  58. package/bin/vm-hands/{vm-hands-entry-lite-1xrr710c.js → vm-hands-entry-lite-saqwe5sm.js} +2 -2
  59. package/bin/vm-hands/{vm-hands-entry-lite-zn303jrg.js → vm-hands-entry-lite-vebspwdp.js} +1 -1
  60. package/bin/vm-hands/{vm-hands-entry-lite-a8kxghsv.js → vm-hands-entry-lite-wdsk86sk.js} +2 -2
  61. package/bin/vm-hands/{vm-hands-entry-lite-ew8mgzjr.js → vm-hands-entry-lite-y9mpztzd.js} +2 -2
  62. package/bin/vm-hands/{vm-hands-entry-lite-rf609cca.js → vm-hands-entry-lite-zam0fx58.js} +1 -1
  63. package/bin/vm-hands/vm-hands-entry-lite.js +1 -1
  64. package/bin/vm-hands/{vm-hands-executor-bzd5x31p.js → vm-hands-executor-3h6qvnbd.js} +1 -1
  65. package/bin/vm-hands/vm-hands-op-runner-awbk4j07.js +2 -0
  66. package/bin/vm-hands/{vm-hands-runtime-fsmr8fnm.js → vm-hands-runtime-n31ghckd.js} +3 -3
  67. package/bin/vm-hands/worker-sandbox-72e3y7bk.js +2 -0
  68. package/package.json +1 -1
  69. package/bin/vm-hands/api-credentials-vtpssnm1.js +0 -2
  70. package/bin/vm-hands/api-dvwzjwmh.js +0 -2
  71. package/bin/vm-hands/connect-cli-ye1w9acn.js +0 -2
  72. package/bin/vm-hands/custom-endpoint-device-8v87dhjx.js +0 -2
  73. package/bin/vm-hands/desktop-account-q57958y1.js +0 -2
  74. package/bin/vm-hands/local-automation-sqw19k7h.js +0 -2
  75. package/bin/vm-hands/local-capabilities-571vxst3.js +0 -2
  76. package/bin/vm-hands/local-desktop-users-m7rexsex.js +0 -2
  77. package/bin/vm-hands/local-display-mac-9de01n3r.js +0 -2
  78. package/bin/vm-hands/local-display-session-s6r8e216.js +0 -2
  79. package/bin/vm-hands/local-pty-session-e7j0kj19.js +0 -2
  80. package/bin/vm-hands/package-44a3p8yk.js +0 -2
  81. package/bin/vm-hands/permissions-ep1vhj6p.js +0 -2
  82. package/bin/vm-hands/serve-service-byg13qw0.js +0 -2
  83. package/bin/vm-hands/version-4kpcq2k1.js +0 -2
  84. package/bin/vm-hands/vm-hands-op-runner-fw433ykg.js +0 -2
  85. package/bin/vm-hands/worker-sandbox-wb5thd4n.js +0 -2
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Xj as l}from"./vm-hands-entry-lite-kxtjkzzh.js";import{execFile as zj,spawn as I}from"child_process";var Cj="h264_ws_v1",kj="video",h=["smooth","sharp","data_saver","balanced"];var Yj="video_presets";var V=8388608,Y=65536,Lj="control",Aj="v1",d=200;function s(q){if(!q||typeof q!=="object"||Array.isArray(q))return null;let j=q,J=(Q)=>typeof Q==="string"&&Q.length>0&&Q.length<=d;if(Object.keys(j).length!==2||!J(j.user_id)||!J(j.name))return null;return{user_id:j.user_id,name:j.name}}var xj="windows",Mj="v1",A=200,o=(q)=>typeof q==="string"&&h.includes(q);function fj(q){if(!q||typeof q!=="object"||Array.isArray(q))return null;let j=q;if(Object.keys(j).length!==2||j.format!=="h264_ws_v1"||!o(j.preset))return null;return{format:"h264_ws_v1",preset:j.preset}}var $={hello:1,frame:2,stats:3,pong:4,serverClipboard:5,error:6,audioHello:7,audio:8,control:9,windows:10,pointer:16,key:17,config:18,ping:19,clientClipboard:20,keyframeRequest:21,ack:22,audioEnable:23};class U extends Error{constructor(q){super(q);this.name="DisplayVideoProtocolError"}}var e=new TextEncoder,jj=new TextDecoder("utf-8",{fatal:!0});function H(q,j){if(j.byteLength+1>V)throw new U("message_too_large");let J=new Uint8Array(5+j.byteLength),Q=new DataView(J.buffer);return Q.setUint32(0,j.byteLength+1),Q.setUint8(4,q),J.set(j,5),J}function R(q){let j=e.encode(q);if(j.byteLength>Y)throw new U("text_too_large");return j}function f(q,j){if(!Number.isInteger(q)||q<0||q>65535)throw new U(`invalid_${j}`);return q}function qj(q){if(!Number.isFinite(q))throw new U("invalid_window");return Math.max(-2147483648,Math.min(2147483647,Math.round(q)))}function hj(q){switch(q.type){case"hello":{let j=R(q.codec),J=new Uint8Array(6+j.byteLength),Q=new DataView(J.buffer);return Q.setUint16(0,f(q.width,"width")),Q.setUint16(2,f(q.height,"height")),Q.setUint8(4,Math.max(1,Math.min(240,Math.round(q.fps)))),Q.setUint8(5,h.indexOf(q.preset)),J.set(j,6),H($.hello,J)}case"frame":{let j=new Uint8Array(13+q.data.byteLength),J=new DataView(j.buffer);return J.setUint8(0,q.key?1:0),J.setUint32(1,q.seq>>>0),J.setBigUint64(5,BigInt(Math.max(0,Math.floor(q.captureMicros)))),j.set(q.data,13),H($.frame,j)}case"stats":return H($.stats,R(JSON.stringify(q.stats)));case"pong":case"ping":{let j=new Uint8Array(8);return new DataView(j.buffer).setFloat64(0,q.token),H(q.type==="ping"?$.ping:$.pong,j)}case"serverClipboard":return H($.serverClipboard,R(q.text));case"clientClipboard":return H($.clientClipboard,R(q.text));case"error":return H($.error,R(q.code));case"pointer":{let j=new Uint8Array(5),J=new DataView(j.buffer);return J.setUint16(0,f(q.x,"x")),J.setUint16(2,f(q.y,"y")),J.setUint8(4,q.buttons&255),H($.pointer,j)}case"key":{let j=new Uint8Array(5),J=new DataView(j.buffer);return J.setUint8(0,q.down?1:0),J.setUint32(1,q.keysym>>>0),H($.key,j)}case"config":return H($.config,Uint8Array.of(h.indexOf(q.preset)));case"keyframeRequest":return H($.keyframeRequest,new Uint8Array(0));case"audioHello":{let j=R(q.codec),J=new Uint8Array(5+j.byteLength),Q=new DataView(J.buffer);return Q.setUint32(0,q.sampleRate>>>0),Q.setUint8(4,q.channels&255),J.set(j,5),H($.audioHello,J)}case"audio":{let j=new Uint8Array(8+q.data.byteLength);return new DataView(j.buffer).setBigUint64(0,BigInt(Math.max(0,Math.floor(q.captureMicros)))),j.set(q.data,8),H($.audio,j)}case"control":return H($.control,R(JSON.stringify(q.control)));case"windows":{let j=q.bounds.slice(0,A),J=new Uint8Array(j.length*16),Q=new DataView(J.buffer);return j.forEach((Z,z)=>{[Z.x,Z.y,Z.width,Z.height].forEach((G,F)=>Q.setInt32(z*16+F*4,qj(G)))}),H($.windows,J)}case"audioEnable":return H($.audioEnable,Uint8Array.of(q.on?1:0));case"ack":{let j=new Uint8Array(4);return new DataView(j.buffer).setUint32(0,q.seq>>>0),H($.ack,j)}}}function T(q){let j=h[q];if(!j)throw new U("invalid_preset");return j}function C(q,j){if(q.byteLength!==j)throw new U("invalid_length")}function k(q){if(q.byteLength>Y)throw new U("text_too_large");try{return jj.decode(q)}catch{throw new U("invalid_text")}}function Jj(q){let j;try{j=JSON.parse(k(q))}catch{throw new U("invalid_stats")}let J=j;if(!J||typeof J!=="object"||["fps","kbps","dropped","restarts","queued_bytes"].some((Z)=>typeof J[Z]!=="number"||!Number.isFinite(J[Z])))throw new U("invalid_stats");return{fps:J.fps,kbps:J.kbps,dropped:J.dropped,restarts:J.restarts,queued_bytes:J.queued_bytes}}function Qj(q){let j;try{j=JSON.parse(k(q))}catch{throw new U("invalid_control")}let J=j;if(!J||typeof J!=="object"||typeof J.you!=="boolean"||typeof J.same_user!=="boolean")throw new U("invalid_control");let Q=J.holder===null?null:s(J.holder);if(Q===null&&J.holder!==null)throw new U("invalid_control");return{holder:Q,you:J.you,same_user:J.same_user}}function Zj(q,j){let J=new DataView(j.buffer,j.byteOffset,j.byteLength);switch(q){case $.hello:if(j.byteLength<6)throw new U("invalid_length");return{type:"hello",width:J.getUint16(0),height:J.getUint16(2),fps:J.getUint8(4),preset:T(J.getUint8(5)),codec:k(j.subarray(6))};case $.frame:if(j.byteLength<14)throw new U("invalid_length");if(J.getUint8(0)>1)throw new U("invalid_frame_flags");return{type:"frame",key:J.getUint8(0)===1,seq:J.getUint32(1),captureMicros:Number(J.getBigUint64(5)),data:j.subarray(13)};case $.stats:return{type:"stats",stats:Jj(j)};case $.ping:case $.pong:return C(j,8),{type:q===$.ping?"ping":"pong",token:J.getFloat64(0)};case $.serverClipboard:return{type:"serverClipboard",text:k(j)};case $.clientClipboard:return{type:"clientClipboard",text:k(j)};case $.error:return{type:"error",code:k(j)};case $.pointer:return C(j,5),{type:"pointer",x:J.getUint16(0),y:J.getUint16(2),buttons:J.getUint8(4)};case $.key:if(C(j,5),J.getUint8(0)>1)throw new U("invalid_key_flags");return{type:"key",down:J.getUint8(0)===1,keysym:J.getUint32(1)};case $.config:return C(j,1),{type:"config",preset:T(J.getUint8(0))};case $.keyframeRequest:return C(j,0),{type:"keyframeRequest"};case $.audioHello:if(j.byteLength<5)throw new U("invalid_length");return{type:"audioHello",sampleRate:J.getUint32(0),channels:J.getUint8(4),codec:k(j.subarray(5))};case $.audio:if(j.byteLength<9)throw new U("invalid_length");return{type:"audio",captureMicros:Number(J.getBigUint64(0)),data:j.subarray(8)};case $.audioEnable:if(C(j,1),J.getUint8(0)>1)throw new U("invalid_audio_flags");return{type:"audioEnable",on:J.getUint8(0)===1};case $.control:return{type:"control",control:Qj(j)};case $.windows:{if(j.byteLength%16!==0||j.byteLength>A*16)throw new U("invalid_length");let Q=[];for(let Z=0;Z<j.byteLength;Z+=16)Q.push({x:J.getInt32(Z),y:J.getInt32(Z+4),width:J.getInt32(Z+8),height:J.getInt32(Z+12)});return{type:"windows",bounds:Q}}case $.ack:return C(j,4),{type:"ack",seq:J.getUint32(0)};default:return null}}class $j{buffer=new Uint8Array(0);push(q){let j=new Uint8Array(this.buffer.byteLength+q.byteLength);j.set(this.buffer),j.set(q,this.buffer.byteLength);let J=[],Q=0;while(j.byteLength-Q>=4){let Z=new DataView(j.buffer,j.byteOffset+Q,4).getUint32(0);if(Z<1||Z>V)throw new U("invalid_message_length");if(j.byteLength-Q-4<Z)break;let z=j[Q+4],G=j.slice(Q+5,Q+4+Z),F=Zj(z,G);if(F)J.push(F);Q+=4+Z}return this.buffer=j.slice(Q),J}}var t="/usr/bin/osascript",Gj=5000,Kj=1048576,Uj=String.raw`
2
+ import{Yj as l}from"./vm-hands-entry-lite-p24kmysw.js";import{execFile as zj,spawn as I}from"child_process";var Cj="h264_ws_v1",kj="video",h=["smooth","sharp","data_saver","balanced"];var Yj="video_presets";var V=8388608,Y=65536,Lj="control",Aj="v1",d=200;function s(q){if(!q||typeof q!=="object"||Array.isArray(q))return null;let j=q,J=(Q)=>typeof Q==="string"&&Q.length>0&&Q.length<=d;if(Object.keys(j).length!==2||!J(j.user_id)||!J(j.name))return null;return{user_id:j.user_id,name:j.name}}var xj="windows",Mj="v1",A=200,o=(q)=>typeof q==="string"&&h.includes(q);function fj(q){if(!q||typeof q!=="object"||Array.isArray(q))return null;let j=q;if(Object.keys(j).length!==2||j.format!=="h264_ws_v1"||!o(j.preset))return null;return{format:"h264_ws_v1",preset:j.preset}}var $={hello:1,frame:2,stats:3,pong:4,serverClipboard:5,error:6,audioHello:7,audio:8,control:9,windows:10,pointer:16,key:17,config:18,ping:19,clientClipboard:20,keyframeRequest:21,ack:22,audioEnable:23};class U extends Error{constructor(q){super(q);this.name="DisplayVideoProtocolError"}}var e=new TextEncoder,jj=new TextDecoder("utf-8",{fatal:!0});function H(q,j){if(j.byteLength+1>V)throw new U("message_too_large");let J=new Uint8Array(5+j.byteLength),Q=new DataView(J.buffer);return Q.setUint32(0,j.byteLength+1),Q.setUint8(4,q),J.set(j,5),J}function R(q){let j=e.encode(q);if(j.byteLength>Y)throw new U("text_too_large");return j}function f(q,j){if(!Number.isInteger(q)||q<0||q>65535)throw new U(`invalid_${j}`);return q}function qj(q){if(!Number.isFinite(q))throw new U("invalid_window");return Math.max(-2147483648,Math.min(2147483647,Math.round(q)))}function hj(q){switch(q.type){case"hello":{let j=R(q.codec),J=new Uint8Array(6+j.byteLength),Q=new DataView(J.buffer);return Q.setUint16(0,f(q.width,"width")),Q.setUint16(2,f(q.height,"height")),Q.setUint8(4,Math.max(1,Math.min(240,Math.round(q.fps)))),Q.setUint8(5,h.indexOf(q.preset)),J.set(j,6),H($.hello,J)}case"frame":{let j=new Uint8Array(13+q.data.byteLength),J=new DataView(j.buffer);return J.setUint8(0,q.key?1:0),J.setUint32(1,q.seq>>>0),J.setBigUint64(5,BigInt(Math.max(0,Math.floor(q.captureMicros)))),j.set(q.data,13),H($.frame,j)}case"stats":return H($.stats,R(JSON.stringify(q.stats)));case"pong":case"ping":{let j=new Uint8Array(8);return new DataView(j.buffer).setFloat64(0,q.token),H(q.type==="ping"?$.ping:$.pong,j)}case"serverClipboard":return H($.serverClipboard,R(q.text));case"clientClipboard":return H($.clientClipboard,R(q.text));case"error":return H($.error,R(q.code));case"pointer":{let j=new Uint8Array(5),J=new DataView(j.buffer);return J.setUint16(0,f(q.x,"x")),J.setUint16(2,f(q.y,"y")),J.setUint8(4,q.buttons&255),H($.pointer,j)}case"key":{let j=new Uint8Array(5),J=new DataView(j.buffer);return J.setUint8(0,q.down?1:0),J.setUint32(1,q.keysym>>>0),H($.key,j)}case"config":return H($.config,Uint8Array.of(h.indexOf(q.preset)));case"keyframeRequest":return H($.keyframeRequest,new Uint8Array(0));case"audioHello":{let j=R(q.codec),J=new Uint8Array(5+j.byteLength),Q=new DataView(J.buffer);return Q.setUint32(0,q.sampleRate>>>0),Q.setUint8(4,q.channels&255),J.set(j,5),H($.audioHello,J)}case"audio":{let j=new Uint8Array(8+q.data.byteLength);return new DataView(j.buffer).setBigUint64(0,BigInt(Math.max(0,Math.floor(q.captureMicros)))),j.set(q.data,8),H($.audio,j)}case"control":return H($.control,R(JSON.stringify(q.control)));case"windows":{let j=q.bounds.slice(0,A),J=new Uint8Array(j.length*16),Q=new DataView(J.buffer);return j.forEach((Z,z)=>{[Z.x,Z.y,Z.width,Z.height].forEach((G,F)=>Q.setInt32(z*16+F*4,qj(G)))}),H($.windows,J)}case"audioEnable":return H($.audioEnable,Uint8Array.of(q.on?1:0));case"ack":{let j=new Uint8Array(4);return new DataView(j.buffer).setUint32(0,q.seq>>>0),H($.ack,j)}}}function T(q){let j=h[q];if(!j)throw new U("invalid_preset");return j}function C(q,j){if(q.byteLength!==j)throw new U("invalid_length")}function k(q){if(q.byteLength>Y)throw new U("text_too_large");try{return jj.decode(q)}catch{throw new U("invalid_text")}}function Jj(q){let j;try{j=JSON.parse(k(q))}catch{throw new U("invalid_stats")}let J=j;if(!J||typeof J!=="object"||["fps","kbps","dropped","restarts","queued_bytes"].some((Z)=>typeof J[Z]!=="number"||!Number.isFinite(J[Z])))throw new U("invalid_stats");return{fps:J.fps,kbps:J.kbps,dropped:J.dropped,restarts:J.restarts,queued_bytes:J.queued_bytes}}function Qj(q){let j;try{j=JSON.parse(k(q))}catch{throw new U("invalid_control")}let J=j;if(!J||typeof J!=="object"||typeof J.you!=="boolean"||typeof J.same_user!=="boolean")throw new U("invalid_control");let Q=J.holder===null?null:s(J.holder);if(Q===null&&J.holder!==null)throw new U("invalid_control");return{holder:Q,you:J.you,same_user:J.same_user}}function Zj(q,j){let J=new DataView(j.buffer,j.byteOffset,j.byteLength);switch(q){case $.hello:if(j.byteLength<6)throw new U("invalid_length");return{type:"hello",width:J.getUint16(0),height:J.getUint16(2),fps:J.getUint8(4),preset:T(J.getUint8(5)),codec:k(j.subarray(6))};case $.frame:if(j.byteLength<14)throw new U("invalid_length");if(J.getUint8(0)>1)throw new U("invalid_frame_flags");return{type:"frame",key:J.getUint8(0)===1,seq:J.getUint32(1),captureMicros:Number(J.getBigUint64(5)),data:j.subarray(13)};case $.stats:return{type:"stats",stats:Jj(j)};case $.ping:case $.pong:return C(j,8),{type:q===$.ping?"ping":"pong",token:J.getFloat64(0)};case $.serverClipboard:return{type:"serverClipboard",text:k(j)};case $.clientClipboard:return{type:"clientClipboard",text:k(j)};case $.error:return{type:"error",code:k(j)};case $.pointer:return C(j,5),{type:"pointer",x:J.getUint16(0),y:J.getUint16(2),buttons:J.getUint8(4)};case $.key:if(C(j,5),J.getUint8(0)>1)throw new U("invalid_key_flags");return{type:"key",down:J.getUint8(0)===1,keysym:J.getUint32(1)};case $.config:return C(j,1),{type:"config",preset:T(J.getUint8(0))};case $.keyframeRequest:return C(j,0),{type:"keyframeRequest"};case $.audioHello:if(j.byteLength<5)throw new U("invalid_length");return{type:"audioHello",sampleRate:J.getUint32(0),channels:J.getUint8(4),codec:k(j.subarray(5))};case $.audio:if(j.byteLength<9)throw new U("invalid_length");return{type:"audio",captureMicros:Number(J.getBigUint64(0)),data:j.subarray(8)};case $.audioEnable:if(C(j,1),J.getUint8(0)>1)throw new U("invalid_audio_flags");return{type:"audioEnable",on:J.getUint8(0)===1};case $.control:return{type:"control",control:Qj(j)};case $.windows:{if(j.byteLength%16!==0||j.byteLength>A*16)throw new U("invalid_length");let Q=[];for(let Z=0;Z<j.byteLength;Z+=16)Q.push({x:J.getInt32(Z),y:J.getInt32(Z+4),width:J.getInt32(Z+8),height:J.getInt32(Z+12)});return{type:"windows",bounds:Q}}case $.ack:return C(j,4),{type:"ack",seq:J.getUint32(0)};default:return null}}class $j{buffer=new Uint8Array(0);push(q){let j=new Uint8Array(this.buffer.byteLength+q.byteLength);j.set(this.buffer),j.set(q,this.buffer.byteLength);let J=[],Q=0;while(j.byteLength-Q>=4){let Z=new DataView(j.buffer,j.byteOffset+Q,4).getUint32(0);if(Z<1||Z>V)throw new U("invalid_message_length");if(j.byteLength-Q-4<Z)break;let z=j[Q+4],G=j.slice(Q+5,Q+4+Z),F=Zj(z,G);if(F)J.push(F);Q+=4+Z}return this.buffer=j.slice(Q),J}}var t="/usr/bin/osascript",Gj=5000,Kj=1048576,Uj=String.raw`
3
3
  ObjC.import("CoreGraphics");
4
4
  ObjC.import("ApplicationServices");
5
5
  ObjC.import("AppKit");
@@ -109,4 +109,4 @@ function run() {
109
109
  `);X>=0;X=B.indexOf(`
110
110
  `)){let S=B.slice(0,X);if(B=B.slice(X+1),!S.startsWith("c "))continue;let O=S.slice(2);if(O.length>Math.ceil(Y/3)*4||!/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(O)){K({reason:"display_protocol"});return}let _=Buffer.from(O,"base64");if(_.byteLength<=Y)q.clipboard(_.toString("utf8"));if(z)return}if(B.length>Math.ceil(Y/3)*4+2)K({reason:"display_protocol"})}),G.once("error",()=>W("Reason could not watch this Mac's desktop clipboard.")),G.once("exit",()=>{if(!z)W("Reason could not watch this Mac's desktop clipboard.")})};return J.stdout.on("data",(B)=>{if(z||Z===null)return;Z+=B.toString("utf8");let N=Z.indexOf(`
111
111
  `);if(N<0){if(Z.length>4096)K({reason:"display_protocol"});return}let X=y(Z.slice(0,N));if(Z=null,!X)K({reason:"display_protocol"});else if(!X.screen||!X.accessibility)W(j.length>0?"Reason's background worker needs Screen Recording and Accessibility on this Mac (its own Reason entry in System Settings > Privacy & Security, not the Reason app's): run `reason permissions allow` on this Mac.":"Allow Screen Recording and Accessibility for this Mac's Reason worker, then restart it.");else i(),q.ready({width:X.width,height:X.height})}),J.stdin.on("error",()=>{return}),J.once("error",()=>W("Reason could not start this Mac's desktop input.")),J.once("exit",()=>{if(Z!==null)W("Reason could not start this Mac's desktop input.");else K({reason:"display_closed"})}),{pointer:(B,N,X)=>L(Q.pointer(B,N,X)),key:(B,N)=>L(Q.key(B,N)),clipboard:(B)=>L([`c ${Buffer.from(B,"utf8").toString("base64")}`]),close(){z=!0,F()}}}
112
- export{Cj as vj,kj as wj,h as xj,Yj as yj,Y as zj,Lj as Aj,Aj as Bj,s as Cj,xj as Dj,Mj as Ej,fj as Fj,hj as Gj,$j as Hj,y as Ij,Sj as Jj,_j as Kj,Hj as Lj,Tj as Mj,a as Nj,Vj as Oj};
112
+ export{Cj as wj,kj as xj,h as yj,Yj as zj,Y as Aj,Lj as Bj,Aj as Cj,s as Dj,xj as Ej,Mj as Fj,fj as Gj,hj as Hj,$j as Ij,y as Jj,Sj as Kj,_j as Lj,Hj as Mj,Tj as Nj,a as Oj,Vj as Pj};
@@ -1,9 +1,9 @@
1
1
  // @bun
2
- import{Si as F}from"./vm-hands-entry-lite-tbps80f1.js";import{qj as b}from"./vm-hands-entry-lite-6n6k2j2k.js";import{randomUUID as d}from"crypto";import{spawnSync as C}from"child_process";import{chmodSync as zj,cpSync as Jj,existsSync as U,lstatSync as M,mkdirSync as h,readdirSync as Wj,readFileSync as I,readlinkSync as Zj,realpathSync as R,renameSync as P,rmdirSync as $j,rmSync as G,symlinkSync as E,writeFileSync as qj}from"fs";import{dirname as B,join as K,relative as Kj,resolve as Qj}from"path";var s="so.ara.cli",Vj="5LJFSBRY2F",wj="Background/Reason.app",m="ReasonBackgroundIdentity",Sj="Contents/Helpers/ReasonPermissionTile";var S="AraBackgroundIdentity",Xj="Reason",Dj=`anchor apple generic and identifier "${s}" and certificate leaf[subject.OU] = "${Vj}"`;class H extends Error{code;constructor(j,z){super(z);this.code=j;this.name="MacOSBackgroundIdentityError"}}var T="/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister";function v(j=F()){return K(j,"Library","Application Support","Reason","Background","Reason.app")}function _(j=F()){return K(j,"Library","Application Support","Ara","Background","Ara.app")}function fj(j=process.execPath){return K(B(R(j)),wj)}function Fj(j){try{return M(j).isFile()}catch{return!1}}function f(j){return[m,S].map((z)=>K(j,"Contents","MacOS",z)).find(Fj)??null}function w(j){try{if(!M(j).isDirectory())return!1;let z=I(K(j,"Contents","Info.plist"),"utf8");return z.includes(`<string>${s}</string>`)&&(z.includes(`<string>${Xj}</string>`)||z.includes("<string>Ara</string>"))&&f(j)!==null}catch{return!1}}function u(j=F()){let z=v(j);if(!w(z))return null;try{let J=I(K(z,"Contents","Info.plist"),"utf8");return/<key>CFBundleVersion<\/key>\s*<string>(\d+\.\d+\.\d+)<\/string>/.exec(J)?.[1]??null}catch{return null}}function Gj(j,z=F()){let J=u(z);return J===null||p(A(J.split(".")),A(j.split(/[.-]/).slice(0,3)))}var Yj=1e4;function i(j,z){return C(j,[...z],{stdio:"ignore",timeout:Yj}).status??1}var l=new Set;function r(j){if(process.env.REASON_TEST_REFUSE_REAL_IDENTITY!=="1")return;let z=(J)=>{try{return R(J)}catch{return Qj(J)}};if(j!==void 0&&z(j)!==z(F()))return;throw Error("A test tried to change this computer's real Reason background identity; pass a temporary home. Refused by scripts/test-env.ts.")}var c=/\/(?:runtime|CLI)\/versions\/(\d+)\.(\d+)\.(\d+)[^/]*\/[^/]+$|\/\.ara(?:-staging)?-worker-(\d+)\.(\d+)\.(\d+)[^/]*\/[^/]+$/,o=new Set(["ara","ara.exe","reason","reason.exe"]);function A(j){return j.map((z)=>Number(z))}function p(j,z){for(let J=0;J<3;J+=1)if(j[J]!==z[J])return j[J]<z[J];return!1}var Nj=[0,2,161];function Pj(j){if(j===null)return!0;let z=Nj,J=null;try{J=R(process.execPath)}catch{}return j.some((W)=>{let Z=c.exec(W);if(Z){let X=Z[1]===void 0?Z.slice(4,7):Z.slice(1,4);return p(A(X),z)}let $=W.slice(W.lastIndexOf("/")+1);return o.has($)&&W!==J&&W!==process.execPath})}function Bj(){let j=C("/bin/ps",["-xo","pid=,comm="],{encoding:"utf8",timeout:5000});if(j.status!==0)return null;let z=[];for(let J of j.stdout.split(`
2
+ import{Ti as F}from"./vm-hands-entry-lite-m57kpdgb.js";import{rj as b}from"./vm-hands-entry-lite-8crh75hs.js";import{randomUUID as d}from"crypto";import{spawnSync as C}from"child_process";import{chmodSync as zj,cpSync as Jj,existsSync as U,lstatSync as M,mkdirSync as h,readdirSync as Wj,readFileSync as I,readlinkSync as Zj,realpathSync as R,renameSync as P,rmdirSync as $j,rmSync as G,symlinkSync as E,writeFileSync as qj}from"fs";import{dirname as B,join as K,relative as Kj,resolve as Qj}from"path";var s="so.ara.cli",Vj="5LJFSBRY2F",wj="Background/Reason.app",m="ReasonBackgroundIdentity",Sj="Contents/Helpers/ReasonPermissionTile";var S="AraBackgroundIdentity",Xj="Reason",Dj=`anchor apple generic and identifier "${s}" and certificate leaf[subject.OU] = "${Vj}"`;class H extends Error{code;constructor(j,z){super(z);this.code=j;this.name="MacOSBackgroundIdentityError"}}var T="/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister";function v(j=F()){return K(j,"Library","Application Support","Reason","Background","Reason.app")}function _(j=F()){return K(j,"Library","Application Support","Ara","Background","Ara.app")}function fj(j=process.execPath){return K(B(R(j)),wj)}function Fj(j){try{return M(j).isFile()}catch{return!1}}function f(j){return[m,S].map((z)=>K(j,"Contents","MacOS",z)).find(Fj)??null}function w(j){try{if(!M(j).isDirectory())return!1;let z=I(K(j,"Contents","Info.plist"),"utf8");return z.includes(`<string>${s}</string>`)&&(z.includes(`<string>${Xj}</string>`)||z.includes("<string>Ara</string>"))&&f(j)!==null}catch{return!1}}function u(j=F()){let z=v(j);if(!w(z))return null;try{let J=I(K(z,"Contents","Info.plist"),"utf8");return/<key>CFBundleVersion<\/key>\s*<string>(\d+\.\d+\.\d+)<\/string>/.exec(J)?.[1]??null}catch{return null}}function Gj(j,z=F()){let J=u(z);return J===null||p(A(J.split(".")),A(j.split(/[.-]/).slice(0,3)))}var Yj=1e4;function i(j,z){return C(j,[...z],{stdio:"ignore",timeout:Yj}).status??1}var l=new Set;function r(j){if(process.env.REASON_TEST_REFUSE_REAL_IDENTITY!=="1")return;let z=(J)=>{try{return R(J)}catch{return Qj(J)}};if(j!==void 0&&z(j)!==z(F()))return;throw Error("A test tried to change this computer's real Reason background identity; pass a temporary home. Refused by scripts/test-env.ts.")}var c=/\/(?:runtime|CLI)\/versions\/(\d+)\.(\d+)\.(\d+)[^/]*\/[^/]+$|\/\.ara(?:-staging)?-worker-(\d+)\.(\d+)\.(\d+)[^/]*\/[^/]+$/,o=new Set(["ara","ara.exe","reason","reason.exe"]);function A(j){return j.map((z)=>Number(z))}function p(j,z){for(let J=0;J<3;J+=1)if(j[J]!==z[J])return j[J]<z[J];return!1}var Nj=[0,2,161];function Pj(j){if(j===null)return!0;let z=Nj,J=null;try{J=R(process.execPath)}catch{}return j.some((W)=>{let Z=c.exec(W);if(Z){let X=Z[1]===void 0?Z.slice(4,7):Z.slice(1,4);return p(A(X),z)}let $=W.slice(W.lastIndexOf("/")+1);return o.has($)&&W!==J&&W!==process.execPath})}function Bj(){let j=C("/bin/ps",["-xo","pid=,comm="],{encoding:"utf8",timeout:5000});if(j.status!==0)return null;let z=[];for(let J of j.stdout.split(`
3
3
  `)){let W=/^\s*(\d+)\s+(\S.*)$/.exec(J);if(!W||Number(W[1])===process.pid)continue;let Z=W[2].trimEnd(),$=Z.slice(Z.lastIndexOf("/")+1);if(!c.test(Z)&&o.has($)){let Q=C("/usr/sbin/lsof",["-a","-p",W[1],"-d","txt","-Fn"],{encoding:"utf8",timeout:5000}).stdout?.split(`
4
4
  `).find((V)=>V.startsWith("n/"));if(Q)Z=Q.slice(1)}z.push(Z)}return z}function vj(j){if(r(j.home),!w(j.sourceApp))throw new H("identity_invalid","The packaged Reason background identity is missing or invalid.");let z=j.command??i,J=v(j.home),W=B(J);h(W,{recursive:!0,mode:448}),zj(W,448);let Z=R(j.sourceApp),$=null;try{$=R(J)}catch{}if(Z!==$){let X=`${process.pid}.${d()}`,Q=K(W,`.Reason.app.${X}.tmp`),V=K(W,`.Reason.app.${X}.old`),Y=!1;try{if(Jj(Z,Q,{recursive:!0,errorOnExist:!0,preserveTimestamps:!0}),!w(Q))throw new H("identity_invalid","The copied Reason background identity is invalid.");let O=j.releaseSigned?["--test-requirement",`=${Dj}`]:[];if(z("/usr/bin/codesign",["--verify","--strict",...O,Q])!==0)throw new H("identity_invalid_signature","The installed Reason background identity has an invalid signature.");let L=!1;for(let D=0;D<4;D+=1){let N=!1;try{P(J,V),N=!0,Y=!0}catch(q){if(q.code!=="ENOENT")throw q}if(D===0)j.beforePublish?.();try{P(Q,J),L=!0}catch(q){let jj=q.code;if(!["EEXIST","ENOTEMPTY"].includes(jj??""))throw q;if(N)G(V,{recursive:!0,force:!0}),Y=!1;if(D===3)throw q;continue}if(N)G(V,{recursive:!0,force:!0}),Y=!1;break}if(!L)throw Error("Could not publish Reason's background identity.")}catch(O){if(Y&&!U(J)&&U(V))P(V,J);throw O}finally{G(Q,{recursive:!0,force:!0}),G(V,{recursive:!0,force:!0})}}return e(J,j,{verified:Z!==$}),J}function n(j){return K(B(j),".Reason.app.registered")}function t(j){try{let z=M(j);return z.isDirectory()?`${z.ino}:${z.birthtimeMs}`:null}catch{return null}}function k(j){let z=t(j);try{return z!==null&&I(n(j),"utf8")===z}catch{return!1}}function a(j){if(w(j))return"bundle";try{if(M(K(j,"Contents","Info.plist"),{throwIfNoEntry:!1}))return null;return M(K(j,"Contents","MacOS",S)).isSymbolicLink()?"retired":null}catch{return null}}function e(j,z,J={}){let W=z.command??i;if(!J.verified&&W("/usr/bin/codesign",["--verify","--strict",j])!==0)throw new H("identity_invalid_signature","The installed Reason background identity has an invalid signature.");if(W(T,["-f",j])!==0)throw new H("identity_register_failed","Could not register Reason's macOS background identity.");let Z=t(j);try{if(Z)qj(n(j),Z,{mode:384})}catch{}try{Oj(j,z.home,W,z.runningExecutables??Bj)}catch($){let X=$.code??"unknown";process.stderr.write(`Reason background identity: legacy_identity_retire_failed (${X})
5
5
  `)}}function Oj(j,z,J,W){let Z=f(j);if(!Z)return;let $=_(z),X=B($),Q=(q)=>K(q,"Contents","MacOS",S),V=Kj(B(Q($)),Z),Y=`${process.pid}.${d()}`,O=a($);if(O===null)return;let L=O==="bundle";if(L)J(T,["-u",$]);let D=K(X,`.Ara.app.${Y}.old`);if(!l.has($)&&!Pj(W())){if(!L)J(T,["-u",$]);try{P($,D)}catch(q){if(q.code==="ENOENT")return;throw q}G(D,{recursive:!0,force:!0}),Lj(X);return}if(!L){if(Zj(Q($))===V)return;let q=`${Q($)}.${Y}`;E(V,q);try{P(q,Q($))}finally{G(q,{force:!0})}return}let N=K(X,`.Ara.app.${Y}.shim`);h(B(Q(N)),{recursive:!0}),E(V,Q(N));try{try{P($,D)}catch(q){if(q.code==="ENOENT")return;throw q}try{P(N,$)}catch(q){if(U($))return;throw P(D,$),q}}finally{G(N,{recursive:!0,force:!0}),G(D,{recursive:!0,force:!0})}}function Lj(j){try{if(Wj(j).some((J)=>J!==".DS_Store"))return;G(K(j,".DS_Store"),{force:!0}),$j(j)}catch{}}var x=new Map;function Hj(j=F()){let z=x.get(j);if(z)return z;if(process.platform!=="darwin")return[];let J=g(j);if(J===null&&U(B(v(j))))Atomics.wait(new Int32Array(new SharedArrayBuffer(4)),0,0,100),J=g(j);if(J===null)return[];return x.set(j,J),J}function g(j){let z=v(j),J=_(j);if(!w(z)||!k(z))try{Mj({home:j,skipWhenSettled:!0})}catch{}let W=w(z)&&(k(z)||!w(J))?z:w(J)?J:null,Z=W?f(W):null;if(!Z)return null;if(W===J)l.add(J);let $=C(Z,["--can-spawn"],{env:{},timeout:2000,encoding:"utf8"});return $.status===0&&$.stdout===`spawn
6
6
  `?[Z,"--spawn"]:[]}var y=new Map;function Cj(j=F()){let z=Hj(j),J=z[0];if(!J)return[];let W=y.get(J);if(W===void 0){let Z=C(J,["--can-spawn-computer-use"],{env:{},timeout:2000,encoding:"utf8"});W=Z.status===0&&Z.stdout===`spawn
7
7
  `,y.set(J,W)}return W?z:[]}function Ej(j=Cj(),z=F()){if(j.length>0)return null;if(u(z)===null)return"computer_use_identity_missing";return Gj(b,z)?"computer_use_identity_outdated":"computer_use_identity_unavailable"}function Mj(j={}){r(j.home);let z=v(j.home);if(j.skipWhenSettled&&w(z)&&k(z)&&a(_(j.home))===null)return!0;if(!w(z)){let J=_(j.home);if(!w(J))return!1;try{return vj({...j,sourceApp:J}),!0}catch(W){if(!w(z))throw W}}return e(z,j),!0}var Rj="REASON_WORKER_IDENTITY_APP";function xj(j,z=process.env,J=F()){let W=z[Rj];return W&&W===v(J)?W:j}function gj(j,z){if(process.platform!=="darwin")return null;let J=v(j),W=K(J,"Contents","MacOS",m),Z=C(W,["--can-run-worker",z],{env:{},timeout:2000,encoding:"utf8"});return Z.status===0&&Z.stdout===`run-worker
8
8
  `?{app:J,executable:W}:null}
9
- export{s as Bi,Vj as Ci,Sj as Di,H as Ei,T as Fi,v as Gi,fj as Hi,u as Ii,Gj as Ji,vj as Ki,Hj as Li,Cj as Mi,Ej as Ni,Mj as Oi,Rj as Pi,xj as Qi,gj as Ri};
9
+ export{s as Ci,Vj as Di,Sj as Ei,H as Fi,T as Gi,v as Hi,fj as Ii,u as Ji,Gj as Ki,vj as Li,Hj as Mi,Cj as Ni,Ej as Oi,Mj as Pi,Rj as Qi,xj as Ri,gj as Si};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Sc as h}from"./vm-hands-entry-lite-f4gvypnx.js";import{$g as G,Hg as w,Ig as m,Jg as q,Kg as B,Lg as L,Mg as W,Ng as F,Pg as Q,Rg as j,Sg as k,Tg as J,Ug as z,Vg as Z,Xg as K,Yg as $,_g as _,ah as S,ch as M,fh as X}from"./vm-hands-entry-lite-vcm4389c.js";import{hj as y,ij as p,jj as x,kj as b}from"./vm-hands-entry-lite-dqnhebfx.js";var s=["cgroup_membership_read_failed","cgroup_v2_membership_absent","cgroup_scope_invalid","cgroup_root_unavailable","cgroup_directory_unavailable","cgroup_limit_read_failed","cgroup_events_read_failed","cgroup_current_read_failed","cgroup_stat_read_failed","boot_id_read_failed","boot_id_invalid","guest_meminfo_read_failed","guest_vmstat_read_failed","memory_counter_invalid","memory_field_missing","memory_capacity_invalid"];var o=String.raw`(function(fs, path) {
2
+ import{Sc as h}from"./vm-hands-entry-lite-f4gvypnx.js";import{$g as _,Ig as w,Jg as m,Kg as q,Lg as B,Mg as L,Ng as W,Og as F,Qg as Q,Sg as j,Tg as k,Ug as J,Vg as z,Wg as Z,Yg as K,Zg as $,ah as G,bh as S,dh as M,gh as X}from"./vm-hands-entry-lite-cas0c9qd.js";import{ij as y,jj as p,kj as x,lj as b}from"./vm-hands-entry-lite-2fpxf6vm.js";var s=["cgroup_membership_read_failed","cgroup_v2_membership_absent","cgroup_scope_invalid","cgroup_root_unavailable","cgroup_directory_unavailable","cgroup_limit_read_failed","cgroup_events_read_failed","cgroup_current_read_failed","cgroup_stat_read_failed","boot_id_read_failed","boot_id_invalid","guest_meminfo_read_failed","guest_vmstat_read_failed","memory_counter_invalid","memory_field_missing","memory_capacity_invalid"];var o=String.raw`(function(fs, path) {
3
3
  const fail = (message, reasonCode) => { throw Object.assign(Error(message), {reasonCode}); };
4
4
  const read = (p, reasonCode, trim=true) => { try { const text=fs.readFileSync(p, "utf8"); return trim?text.trim():text; }
5
5
  catch { fail("memory_read", reasonCode); } };