@reason-machines/cli-linux-x64 0.2.388 → 0.2.390
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.
- package/bin/ara +2 -2
- package/bin/vm-hands/api-2edgrjpe.js +2 -0
- package/bin/vm-hands/api-credentials-1bfy2pqp.js +2 -0
- package/bin/vm-hands/{ask-relay-rpekz0vc.js → ask-relay-fhcfxc8e.js} +3 -3
- package/bin/vm-hands/connect-cli-9aczr82r.js +2 -0
- package/bin/vm-hands/{custom-endpoint-device-baqm3872.js → custom-endpoint-device-3g0rc3wp.js} +1 -1
- package/bin/vm-hands/desktop-account-8yf4aqgb.js +2 -0
- package/bin/vm-hands/{device-workspace-0kk5ef85.js → device-workspace-35hjc1ff.js} +1 -1
- package/bin/vm-hands/{hands-worker-source-mshf7c6v.js → hands-worker-source-msdkfx9x.js} +1 -1
- package/bin/vm-hands/{index-cvnymkkb.js → index-m32pjcjr.js} +1 -1
- package/bin/vm-hands/{install-receipt-352cy8vj.js → install-receipt-7qanbz38.js} +1 -1
- package/bin/vm-hands/local-automation-dcqf14d4.js +2 -0
- package/bin/vm-hands/local-capabilities-pv3gr2hy.js +2 -0
- package/bin/vm-hands/local-desktop-users-p6n48895.js +2 -0
- package/bin/vm-hands/local-display-mac-7havkbhd.js +2 -0
- package/bin/vm-hands/local-display-session-gnx1pp3w.js +2 -0
- package/bin/vm-hands/local-pty-session-8ny1n2fv.js +2 -0
- package/bin/vm-hands/{managed-runtime-wzk0q157.js → managed-runtime-7zsf50b5.js} +1 -1
- package/bin/vm-hands/network-contract-3h853c6e.js +2 -0
- package/bin/vm-hands/package-04cf0m62.js +2 -0
- package/bin/vm-hands/permissions-dsmaj350.js +2 -0
- package/bin/vm-hands/{reason-hands-protocol-z95pxxbh.js → reason-hands-protocol-mw7ba8vz.js} +1 -1
- package/bin/vm-hands/{serve-service-d2q1pdxh.js → serve-service-qax96kty.js} +1 -1
- package/bin/vm-hands/{status-x8g58cxm.js → status-1v4paztv.js} +2 -2
- package/bin/vm-hands/version-8eeqhkse.js +2 -0
- package/bin/vm-hands/{vm-hands-entry-lite-jx3w1z5q.js → vm-hands-entry-lite-00800vjk.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-v2ptg6br.js → vm-hands-entry-lite-02zaqpgh.js} +5 -5
- package/bin/vm-hands/{vm-hands-entry-lite-zr8gf6nd.js → vm-hands-entry-lite-0seprnh3.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-qnnfvm5r.js → vm-hands-entry-lite-0z73amf7.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-y55f8dyw.js → vm-hands-entry-lite-180h5amj.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-pk3q774c.js → vm-hands-entry-lite-3nr9q3nf.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-b1ygrkbq.js → vm-hands-entry-lite-3ptq7p60.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-fyvgav60.js → vm-hands-entry-lite-5x04hakp.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-yzaz1e8r.js → vm-hands-entry-lite-6t0a7k6v.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-zs3jsffv.js → vm-hands-entry-lite-7s9z3tdn.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-stbfyev7.js → vm-hands-entry-lite-88h9vwrv.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-f89wk20p.js → vm-hands-entry-lite-8e932j3c.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-e05sgnwe.js → vm-hands-entry-lite-8pgggvbb.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-ammr3xbc.js → vm-hands-entry-lite-a1yy1yp3.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-289qftes.js → vm-hands-entry-lite-adpzn7fe.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-mbs7d7ye.js → vm-hands-entry-lite-atg4z1vg.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-y2s2w174.js → vm-hands-entry-lite-bwpay74g.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-e2mjbqmr.js → vm-hands-entry-lite-csecgmaa.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-spccx392.js → vm-hands-entry-lite-e73s63fb.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-p6g561rq.js → vm-hands-entry-lite-ebgackey.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-d7cvwy3k.js → vm-hands-entry-lite-ecsgqm1s.js} +2 -2
- package/bin/vm-hands/vm-hands-entry-lite-ezahexcb.js +5 -0
- package/bin/vm-hands/{vm-hands-entry-lite-grjkhbf2.js → vm-hands-entry-lite-f78n4wqt.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-te0p47ak.js → vm-hands-entry-lite-fb02h1zm.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-fw5ztpwn.js → vm-hands-entry-lite-g87z5eb6.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-6shgavn0.js → vm-hands-entry-lite-gq3bzj7d.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-s7k376cz.js → vm-hands-entry-lite-h0keewxv.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-fb5dzy9x.js → vm-hands-entry-lite-hfv2tsm9.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-3vb4he21.js → vm-hands-entry-lite-hp0ccw3e.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-jjgqsan6.js → vm-hands-entry-lite-jsbgswhd.js} +3 -3
- package/bin/vm-hands/{vm-hands-entry-lite-ma001vzh.js → vm-hands-entry-lite-ksz1k1dh.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-kb981w39.js → vm-hands-entry-lite-mc3pkj0q.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-sex82vb1.js → vm-hands-entry-lite-mft9ke08.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-9fc26f9c.js → vm-hands-entry-lite-n11e88ty.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-sb7n76g7.js → vm-hands-entry-lite-p1s0xyc2.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-n25efwqt.js → vm-hands-entry-lite-r166b92s.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-6tv7j3ej.js → vm-hands-entry-lite-rnmy7f5e.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-sv8bb7jq.js → vm-hands-entry-lite-rxg5nf73.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-nf0avf46.js → vm-hands-entry-lite-t6dxxwc8.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-30rnhzfj.js → vm-hands-entry-lite-trm3dn8c.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-r7czqrtj.js → vm-hands-entry-lite-wjwwzxej.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-2e18tm6w.js → vm-hands-entry-lite-wpcagqfw.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-nr1narzb.js → vm-hands-entry-lite-y99g8x7f.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-axe84b1n.js → vm-hands-entry-lite-zd5pw8gj.js} +2 -2
- package/bin/vm-hands/vm-hands-entry-lite.js +1 -1
- package/bin/vm-hands/{vm-hands-executor-j4q5snaz.js → vm-hands-executor-zsepc201.js} +1 -1
- package/bin/vm-hands/vm-hands-op-runner-sfhzq9bc.js +2 -0
- package/bin/vm-hands/vm-hands-runtime-r0y0c22t.js +4 -0
- package/bin/vm-hands/worker-sandbox-nnk7fq89.js +2 -0
- package/package.json +1 -1
- package/bin/vm-hands/api-9jsc2wk3.js +0 -2
- package/bin/vm-hands/api-credentials-jhaxk9e6.js +0 -2
- package/bin/vm-hands/connect-cli-xk4wx40j.js +0 -2
- package/bin/vm-hands/desktop-account-374pyd2h.js +0 -2
- package/bin/vm-hands/local-automation-fqf1yxn8.js +0 -2
- package/bin/vm-hands/local-capabilities-0xqv6w37.js +0 -2
- package/bin/vm-hands/local-desktop-users-39d8h875.js +0 -2
- package/bin/vm-hands/local-display-mac-yt4tpb96.js +0 -2
- package/bin/vm-hands/local-display-session-12q3s3p1.js +0 -2
- package/bin/vm-hands/local-pty-session-142rrpf9.js +0 -2
- package/bin/vm-hands/network-contract-m55ndrgk.js +0 -2
- package/bin/vm-hands/package-k4xz7vcr.js +0 -2
- package/bin/vm-hands/permissions-zajmtjzs.js +0 -2
- package/bin/vm-hands/version-55234k7v.js +0 -2
- package/bin/vm-hands/vm-hands-entry-lite-wzqzjd6f.js +0 -5
- package/bin/vm-hands/vm-hands-op-runner-btwvjt4p.js +0 -2
- package/bin/vm-hands/vm-hands-runtime-gw2wdm13.js +0 -4
- package/bin/vm-hands/worker-sandbox-r41yz175.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{ed as hq,fd as lq}from"./vm-hands-entry-lite-g7h6wjqy.js";import{$h as
|
|
2
|
+
import{ed as hq,fd as lq}from"./vm-hands-entry-lite-g7h6wjqy.js";import{$h as Wq,Wh as Nq,Xh as vq,ai as Xq,bi as X,ei as dq,gi as Aq,hi as cq,ji as c,ki as P,li as Bq}from"./vm-hands-entry-lite-bwpay74g.js";import{Di as Kq}from"./vm-hands-entry-lite-ksz1k1dh.js";import{Yi as oq,_i as sq,bj as uq,cj as pq,dj as rq,ej as Dq}from"./vm-hands-entry-lite-rnmy7f5e.js";import{mj as d}from"./vm-hands-entry-lite-5x04hakp.js";import{Ck as Gq}from"./vm-hands-entry-lite-fb02h1zm.js";import{randomUUID as C}from"crypto";import{chmodSync as Jq,closeSync as u,constants as m,existsSync as E,fstatSync as nq,lstatSync as D,mkdirSync as n,openSync as iq,readFileSync as g,readdirSync as Oq,readlinkSync as T,realpathSync as S,renameSync as k,rmSync as v,statSync as x,symlinkSync as Qq,unlinkSync as I,writeFileSync as h}from"fs";import{basename as r,dirname as B,isAbsolute as MG,join as K,relative as NG,resolve as O,sep as aq}from"path";import{spawnSync as Eq}from"child_process";import{createRequire as eq}from"module";var Zq=1,tq=1,qG=128,AG=65536,BG="https://reasonmachines.com/api/runtime-manifest-v2",DG=30000,OG=600000,Vq=1e4,EG=60000,IG=/^\d+\.\d+\.\d+(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/;var Pq=/^[a-z0-9_.-]{1,80}$/,CG=64,TG="so.ara.device-broker",gq=["com.apple.security.cs.allow-jit","com.apple.security.cs.allow-unsigned-executable-memory"],SG=["service.install_started","service.install_completed","service.install_failed","service.launcher_adopted","service.launcher_conflict","service.started","service.reconnecting","service.reconnected","service.idle_sleep_held","service.idle_sleep_released","service.idle_sleep_failed","service.start_failed","service.stopped","service.exit_failed","service.singleton_rejected","credential.migration_started","credential.migration_completed","credential.migration_failed","credential.store_started","credential.store_completed","credential.store_failed","credential.delete_started","credential.delete_completed","credential.delete_failed","update.check_started","update.not_available","update.download_started","update.downloaded","update.verified","update.activated","update.rollback","update.failed","executor.update.check_started","executor.update.not_available","executor.update.download_started","executor.update.downloaded","executor.update.verified","executor.update.activated","executor.update.rollback","executor.update.failed","identity.refresh_completed","identity.refresh_failed","update.device_moved","update.components_installed","update.deferred","update.deferral_expired","worker.previous_exit","worker.capabilities_withheld","identity.computer_use_unavailable"];function t(q){if(q?.aborted)throw new X("update_cancelled","Managed runtime update request was cancelled.")}function Iq(q){return Boolean(q)&&typeof q==="object"&&!Array.isArray(q)}function Cq(q,G,J=[]){let Q=new Set([...G,...J]);return G.every((R)=>(R in q))&&Object.keys(q).every((R)=>Q.has(R))}function A(q){return typeof q==="string"&&IG.test(q)}function GG(q){return typeof q==="string"&&!Number.isNaN(Date.parse(q))&&new Date(q).toISOString()===q}function FG(q){return Xq.includes(q)}function b(q){n(q,{recursive:!0,mode:448}),Jq(q,448)}function JG(q,G){b(B(q));let J=`${q}.${process.pid}.${C()}.tmp`;try{h(J,G,{mode:384,flag:"wx"}),Jq(J,384),k(J,q)}finally{if(E(J))I(J)}}function Tq(q={}){if((q.platform??process.platform)!=="darwin")throw new X("unsupported_platform","The managed Reason runtime is currently available only on macOS.");let J=q.environment??process.env,Q=Kq(J,"REASON_CLI_CHANNEL")==="staging",R=Q?Kq(J,"REASON_MANAGED_RUNTIME_ROOT")?.trim():void 0,U=q.root!==void 0||Boolean(R&&MG(R))?null:K(q.home??d(),"Library","Application Support"),_=q.root??(U?K(U,Q?"Reason Staging":"Reason","CLI"):R);return{executableName:"reason",root:_,...U?{legacyRoot:K(U,"Ara",...Q?["staging","runtime"]:["runtime"])}:{},versions:K(_,"versions"),current:K(_,"current"),previous:K(_,"previous"),brokerLock:K(_,"broker.lock"),transitionLock:K(_,"transition.lock"),lifecycleEvents:K(_,"lifecycle-events")}}function gJ(q){let G=q.legacyRoot;if(!G)return null;return{root:G,versions:K(G,"versions"),current:K(G,"current"),previous:K(G,"previous"),brokerLock:K(G,"broker.lock"),transitionLock:K(G,"transition.lock"),lifecycleEvents:K(G,"lifecycle-events")}}function F(q,G){if(!A(G))throw new X("invalid_version","Invalid managed Reason runtime version.");let J=K(q.versions,G,"ara");if(!q.executableName)return J;let Q=K(q.versions,G,q.executableName),R=(_)=>{try{return D(_),!0}catch(Z){if(Z.code==="ENOENT")return!1;throw Z}},W=R(J),U=R(Q);if(W&&U)throw new X("installed_artifact_mismatch","Ambiguous managed runtime executable layout.");return W?J:Q}function i(q,G){if(!A(G))throw new X("invalid_version","Invalid managed Reason runtime version.");return Sq(F(q,G))}function Sq(q){return K(B(q),r(q)==="reason"?vq:Nq)}function QG(q,G){if(!A(q)||!A(G))throw new X("invalid_version","Invalid managed Reason runtime version.");let[J,Q]=q.split("-",2),[R,W]=G.split("-",2),U=J.split(".").map(Number),_=R.split(".").map(Number);for(let H=0;H<3;H+=1){let j=U[H]-_[H];if(j!==0)return j<0?-1:1}if(Q===void 0||W===void 0){if(Q===W)return 0;return Q===void 0?1:-1}let Z=Q.split("."),$=W.split("."),Y=Math.max(Z.length,$.length);for(let H=0;H<Y;H+=1){let j=Z[H],z=$[H];if(j===void 0||z===void 0){if(j===z)return 0;return j===void 0?-1:1}if(j===z)continue;let M=/^\d+$/.test(j),w=/^\d+$/.test(z);if(M&&w)return Number(j)<Number(z)?-1:1;if(M!==w)return M?-1:1;return j<z?-1:1}return 0}function LG(q=process.arch){let G=`darwin-${q}`;if(!FG(G))throw new X("unsupported_architecture","The managed Reason runtime supports only Apple Silicon and Intel Macs.");return G}function bq(q){return[...q.matchAll(/<key>\s*([^<]+?)\s*<\/key>/g)].map((G)=>G[1].trim())}function yq(q){let G=q.match(/^CodeDirectory .*$/gm)??[];return G.length>0&&G.every((J)=>{return(/ flags=0x[0-9a-f]+\(([^)]*)\)(?: |$)/.exec(J)?.[1]?.split(/[ ,]+/).filter(Boolean)??[]).includes("runtime")})}function wG(q){let G=`TeamIdentifier=${oq}`,J=`Identifier=${TG}`,Q=bq(q.brokerEntitlements),R=bq(q.credentialLibraryEntitlements);if(!q.brokerDetail.split(`
|
|
3
3
|
`).includes(G)||!q.brokerDetail.split(`
|
|
4
4
|
`).includes(J)||!yq(q.brokerDetail)||Q.length!==gq.length||gq.some((W)=>!new RegExp(`<key>\\s*${W.replaceAll(".","\\.")}\\s*</key>\\s*<true\\s*/>`).test(q.brokerEntitlements)))throw new X("invalid_code_signature","Managed runtime broker has an invalid Reason signature, identifier, or entitlement set.");if(!q.credentialLibraryDetail.split(`
|
|
5
5
|
`).includes(G)||!yq(q.credentialLibraryDetail)||R.length!==0)throw new X("invalid_code_signature","Managed runtime credential library has an invalid signature or entitlement.")}function y(q,G){let J=Eq("/usr/bin/codesign",q,{stdio:["ignore","pipe","pipe"]});if(J.status!==0)throw new X("invalid_code_signature",G);return[new TextDecoder().decode(J.stdout??new Uint8Array),new TextDecoder().decode(J.stderr??new Uint8Array)].join("")}var Fq=(q,G)=>{y(["--verify","--strict","--verbose=2",q],"Managed runtime broker code signature is invalid."),y(["--verify","--strict","--verbose=2",G],"Managed runtime credential library code signature is invalid."),wG({brokerDetail:y(["-d","--verbose=4",q],"Managed runtime broker signer could not be inspected."),brokerEntitlements:y(["-d","--entitlements",":-",q],"Managed runtime broker entitlements could not be inspected."),credentialLibraryDetail:y(["-d","--verbose=4",G],"Managed runtime credential library signer could not be inspected."),credentialLibraryEntitlements:y(["-d","--entitlements",":-",G],"Managed runtime credential library entitlements could not be inspected.")})};async function kG(q,G,J){let Q=q.headers.get("content-length");if(Q!==null){let Y=Number(Q);if(!Number.isSafeInteger(Y)||Y<0||Y>G)throw new X("response_too_large","Managed runtime response exceeded its size limit.")}if(!q.body){let Y=new Uint8Array(await q.arrayBuffer());if(Y.byteLength>G)throw new X("response_too_large","Managed runtime response exceeded its size limit.");return Y}let R=q.body.getReader(),W=[],U=0,_=()=>{if(!J)return R.read();return new Promise((Y,H)=>{let j=()=>{J.removeEventListener("abort",j),R.cancel(J.reason).catch(()=>{}),H(J.reason??new DOMException("Aborted","AbortError"))};if(J.aborted){j();return}J.addEventListener("abort",j,{once:!0}),R.read().then((z)=>{J.removeEventListener("abort",j),Y(z)},(z)=>{J.removeEventListener("abort",j),H(z)})})};try{while(!0){let Y=await _();if(Y.done)break;if(U+=Y.value.byteLength,U>G)throw await R.cancel(),new X("response_too_large","Managed runtime response exceeded its size limit.");W.push(Y.value)}}finally{try{R.releaseLock()}catch{}}let Z=new Uint8Array(U),$=0;for(let Y of W)Z.set(Y,$),$+=Y.byteLength;return Z}async function p(q){let G;try{G=new URL(q.url)}catch{throw new X("invalid_update_url","Managed runtime update URL is invalid.")}if(G.protocol!=="https:"||G.username||G.password||G.hash)throw new X("invalid_update_url","Managed runtime update URL must use HTTPS.");let J=new AbortController,Q,R=()=>{Q??="caller",J.abort(q.signal?.reason)};if(q.signal?.aborted)R();else q.signal?.addEventListener("abort",R,{once:!0});let W=setTimeout(()=>{Q??="timeout",J.abort(Error("managed runtime fetch timed out"))},q.timeoutMs),U=(_,Z)=>{if(_ instanceof X)return _;if(Q==="caller")return new X("update_cancelled","Managed runtime update request was cancelled.");if(Q==="timeout")return new X("update_fetch_timeout","Managed runtime update request timed out.");return new X("update_fetch_failed",Z)};try{let _;try{if(_=await q.fetchImpl(G,{headers:{accept:q.accept},signal:J.signal}),J.signal.aborted)throw U(J.signal.reason,"Managed runtime update request was cancelled.")}catch(Z){throw U(Z,"Managed runtime update request failed.")}if(!_.ok)throw new X("update_http_error","Managed runtime update request was rejected.");if(_.url&&new URL(_.url).protocol!=="https:")throw new X("insecure_redirect","Managed runtime update redirected to an insecure URL.");try{let Z=await kG(_,q.maximumBytes,J.signal);if(J.signal.aborted)throw U(J.signal.reason,"Managed runtime update response was cancelled.");return Z}catch(Z){throw U(Z,"Managed runtime update response failed.")}}finally{clearTimeout(W),q.signal?.removeEventListener("abort",R)}}async function RG(q,G,J=Vq,Q){let R=typeof J==="number"?J:Vq,W=typeof J==="number"?Q:J;if(W?.aborted)return!1;let U=await hq([q,"--version"],{timeoutMs:R,...W?{signal:W}:{}});return U.exitCode===0&&U.stdout.trim().replace(/^v/,"")===G}async function xG(q){let G=!1,J=null,Q=null,R=(W)=>{try{N(q.paths,W,{now:q.now})}catch{}};try{let W=q.home??d();if(!rq(q.manifest.version,W))return{status:"current"};Q=pq(W);let U=await p({url:new URL(dq,q.manifest.artifacts[q.target].broker.url).toString(),maximumBytes:Wq,fetchImpl:async(j,z)=>{let M=await q.fetchImpl(j,z);return G=M.status===404,M},timeoutMs:q.timeoutMs,accept:"application/json",signal:q.signal}),{manifest:_}=cq(new TextDecoder().decode(U),q.trustedKeys);if(_.version!==q.manifest.version||_.published_at!==q.manifest.published_at)throw new X("identity_manifest_mismatch","Background identity manifest names another release.");let Z=_.artifacts[q.target],$=await p({url:Z.url,maximumBytes:Z.size_bytes,fetchImpl:q.fetchImpl,timeoutMs:q.timeoutMs,accept:"application/octet-stream",signal:q.signal});P($,Z),b(q.workDirectory),J=K(q.workDirectory,`.identity-${process.pid}-${C()}`),n(J,{mode:448});let Y=K(J,"identity.tgz");if(h(Y,$,{mode:384,flag:"wx"}),Eq("/usr/bin/tar",["-xzf",Y,"-C",J],{stdio:"ignore",timeout:60000}).status!==0)throw new X("identity_extract_failed","Background identity archive could not be extracted.");return Dq({sourceApp:K(J,"Reason.app"),home:W,releaseSigned:!0,...q.command?{command:q.command}:{}}),R({event:"identity.refresh_completed",runtime_version:q.manifest.version,...Q?{from_version:Q}:{},to_version:q.manifest.version}),{status:"installed"}}catch(W){if(G)return{status:"unpublished"};let U=W instanceof X||W instanceof sq?W.code:"identity_install_failed";return process.stderr.write(`Reason background identity: identity_update_failed (${U})
|