@reason-machines/cli-linux-x64 0.2.408 → 0.2.411
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/reason +2 -2
- package/bin/vm-hands/api-cjv8m2zy.js +2 -0
- package/bin/vm-hands/api-credentials-m5akr9fv.js +2 -0
- package/bin/vm-hands/connect-cli-kwxy8nva.js +2 -0
- package/bin/vm-hands/custom-endpoint-device-dkqb4rqy.js +2 -0
- package/bin/vm-hands/desktop-account-5v7x0ajx.js +2 -0
- package/bin/vm-hands/device-workspace-p9q9dckg.js +2 -0
- package/bin/vm-hands/{fsevents-vgg0dny6.js → fsevents-ekt70rcc.js} +1 -1
- package/bin/vm-hands/hands-worker-source-cgrpm21b.js +2 -0
- package/bin/vm-hands/{index-kx10kwyx.js → index-k8kcz8a3.js} +11 -11
- package/bin/vm-hands/install-receipt-7vt2y2vh.js +2 -0
- package/bin/vm-hands/local-automation-kqhprz6k.js +2 -0
- package/bin/vm-hands/local-capabilities-ptwd0rk9.js +2 -0
- package/bin/vm-hands/local-desktop-users-q886k0mm.js +2 -0
- package/bin/vm-hands/local-display-mac-w85956f1.js +2 -0
- package/bin/vm-hands/local-display-session-ycce0gqg.js +2 -0
- package/bin/vm-hands/local-pty-session-5f50sqq0.js +2 -0
- package/bin/vm-hands/managed-runtime-14qgbkr0.js +2 -0
- package/bin/vm-hands/network-contract-9x9kc5vv.js +2 -0
- package/bin/vm-hands/package-78fkast4.js +2 -0
- package/bin/vm-hands/permissions-v1120728.js +2 -0
- package/bin/vm-hands/reason-hands-protocol-2tnghj3b.js +2 -0
- package/bin/vm-hands/serve-service-cc42p3rv.js +2 -0
- package/bin/vm-hands/status-4chy5g03.js +10 -0
- package/bin/vm-hands/version-12b5jg7q.js +2 -0
- package/bin/vm-hands/{vm-hands-entry-lite-wyh6dp1t.js → vm-hands-entry-lite-09m2cdkw.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-4aejamqr.js → vm-hands-entry-lite-0xrsph3r.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-fyjzrvj5.js → vm-hands-entry-lite-1cwqa4jr.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-snmxxhza.js → vm-hands-entry-lite-1ksme5sc.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-ppytc9k7.js → vm-hands-entry-lite-1rrb66r9.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-pn92kh7b.js → vm-hands-entry-lite-1rtkf2xm.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-wf7ksh4e.js → vm-hands-entry-lite-1xtpeh3x.js} +5 -5
- package/bin/vm-hands/{vm-hands-entry-lite-g3ja0c3y.js → vm-hands-entry-lite-22kfyvnk.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-saqdrc2w.js → vm-hands-entry-lite-3zdxefjh.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-et2bh990.js → vm-hands-entry-lite-4fpjdnbk.js} +22 -22
- package/bin/vm-hands/{vm-hands-entry-lite-hzn1hf0p.js → vm-hands-entry-lite-6aeea05q.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-mw0gzbds.js → vm-hands-entry-lite-88swf2qr.js} +3 -3
- package/bin/vm-hands/{vm-hands-entry-lite-dkcm3hyn.js → vm-hands-entry-lite-89z488gz.js} +2 -2
- package/bin/vm-hands/vm-hands-entry-lite-8ns59paz.js +3 -0
- package/bin/vm-hands/{vm-hands-entry-lite-mvx29q2q.js → vm-hands-entry-lite-8t9xssf9.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-zn0v259d.js → vm-hands-entry-lite-907pa7f9.js} +4 -4
- package/bin/vm-hands/{vm-hands-entry-lite-zg3b0c08.js → vm-hands-entry-lite-9ay6f56v.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-wd576mgy.js → vm-hands-entry-lite-9c95p6n9.js} +29 -29
- package/bin/vm-hands/{vm-hands-entry-lite-9ym3sx81.js → vm-hands-entry-lite-ab2m9erf.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-79s23abx.js → vm-hands-entry-lite-b885gwfh.js} +4 -4
- package/bin/vm-hands/{vm-hands-entry-lite-51qvfk93.js → vm-hands-entry-lite-bdhjpv7g.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-5p5h1eng.js → vm-hands-entry-lite-ckv17tn8.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-8evzzh7v.js → vm-hands-entry-lite-eqgj4acy.js} +5 -5
- package/bin/vm-hands/{vm-hands-entry-lite-v3xznxcw.js → vm-hands-entry-lite-f5e3dbgk.js} +3 -3
- package/bin/vm-hands/vm-hands-entry-lite-ggj69hbj.js +2 -0
- package/bin/vm-hands/{vm-hands-entry-lite-8gtgr399.js → vm-hands-entry-lite-gvwdy3rf.js} +3 -3
- package/bin/vm-hands/{vm-hands-entry-lite-6p9c8nhf.js → vm-hands-entry-lite-hj8n59y9.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-4geps3jz.js → vm-hands-entry-lite-j7k3e5w0.js} +3 -3
- package/bin/vm-hands/{vm-hands-entry-lite-ym1djztp.js → vm-hands-entry-lite-k278g9kj.js} +5 -5
- package/bin/vm-hands/{vm-hands-entry-lite-hcw5tk5d.js → vm-hands-entry-lite-m11j0f9q.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-hfmydph9.js → vm-hands-entry-lite-mkmebj51.js} +4 -4
- package/bin/vm-hands/{vm-hands-entry-lite-0n2f3kx7.js → vm-hands-entry-lite-pgb514h0.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-dq1m5ykp.js → vm-hands-entry-lite-q0k6kx6d.js} +4 -4
- package/bin/vm-hands/{vm-hands-entry-lite-gc7c22pq.js → vm-hands-entry-lite-qysyf65v.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-762fbns7.js → vm-hands-entry-lite-rhhqbwmr.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-hee1h411.js → vm-hands-entry-lite-t07pdqxb.js} +10 -10
- package/bin/vm-hands/{vm-hands-entry-lite-6whxyzz2.js → vm-hands-entry-lite-t9nz0ty7.js} +5 -5
- package/bin/vm-hands/vm-hands-entry-lite-vrqzr15t.js +3 -0
- package/bin/vm-hands/{vm-hands-entry-lite-e5hbehqn.js → vm-hands-entry-lite-ydg5av4g.js} +16 -16
- package/bin/vm-hands/vm-hands-entry-lite-zcd0e9fx.js +540 -0
- package/bin/vm-hands/{vm-hands-entry-lite-w9ckj5k4.js → vm-hands-entry-lite-zg36myyf.js} +4 -4
- package/bin/vm-hands/vm-hands-entry-lite.js +2 -2
- package/bin/vm-hands/{vm-hands-executor-79av9nam.js → vm-hands-executor-xcyzs4av.js} +6 -6
- package/bin/vm-hands/vm-hands-op-runner-117jfr8y.js +2 -0
- package/bin/vm-hands/{vm-hands-runtime-yacvv937.js → vm-hands-runtime-1qtn08n0.js} +3 -3
- package/bin/vm-hands/worker-sandbox-smqj3mbe.js +2 -0
- package/package.json +1 -1
- package/bin/vm-hands/api-8d760ppa.js +0 -2
- package/bin/vm-hands/api-credentials-eea1g4aw.js +0 -2
- package/bin/vm-hands/connect-cli-m8xafyn5.js +0 -2
- package/bin/vm-hands/custom-endpoint-device-nfjhs9fv.js +0 -2
- package/bin/vm-hands/desktop-account-rx4ajy2j.js +0 -2
- package/bin/vm-hands/device-workspace-n9tn4bzw.js +0 -2
- package/bin/vm-hands/hands-worker-source-yxsap3qk.js +0 -2
- package/bin/vm-hands/install-receipt-rmsjtfqy.js +0 -2
- package/bin/vm-hands/local-automation-7qcnytj6.js +0 -2
- package/bin/vm-hands/local-capabilities-hchsc804.js +0 -2
- package/bin/vm-hands/local-desktop-users-c6858avg.js +0 -2
- package/bin/vm-hands/local-display-mac-zmbp9z4c.js +0 -2
- package/bin/vm-hands/local-display-session-7bgp7gvf.js +0 -2
- package/bin/vm-hands/local-pty-session-8m175hqx.js +0 -2
- package/bin/vm-hands/managed-runtime-nkmg5s5h.js +0 -2
- package/bin/vm-hands/network-contract-qt2s82ap.js +0 -2
- package/bin/vm-hands/package-11mkdcmn.js +0 -2
- package/bin/vm-hands/permissions-67xv16a5.js +0 -2
- package/bin/vm-hands/reason-hands-protocol-r356wr4t.js +0 -2
- package/bin/vm-hands/serve-service-4n7e0b08.js +0 -2
- package/bin/vm-hands/status-e7r62q4e.js +0 -10
- package/bin/vm-hands/version-vdev7tyq.js +0 -2
- package/bin/vm-hands/vm-hands-entry-lite-8bzqc4xa.js +0 -2
- package/bin/vm-hands/vm-hands-entry-lite-qffs74x1.js +0 -540
- package/bin/vm-hands/vm-hands-entry-lite-rwr09j4w.js +0 -3
- package/bin/vm-hands/vm-hands-entry-lite-w8kc4jtb.js +0 -3
- package/bin/vm-hands/vm-hands-op-runner-kh1myd15.js +0 -2
- package/bin/vm-hands/worker-sandbox-x8dsz324.js +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Nr,Pn,Lr,Tn}from"./vm-hands-entry-lite-qysyf65v.js";import"./vm-hands-entry-lite-ckv17tn8.js";import"./vm-hands-entry-lite-t7an5zg2.js";import"./vm-hands-entry-lite-89z488gz.js";import"./vm-hands-entry-lite-8t9xssf9.js";export{Nr as installationReceiptPath,Lr as installerReasonAlias,Pn as installerReceiptLauncher,Tn as loadInstallationReceipt};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{mn,ss,as,cs,ls,gn}from"./vm-hands-entry-lite-mkmebj51.js";import"./vm-hands-entry-lite-ydg5av4g.js";import"./vm-hands-entry-lite-1rtkf2xm.js";import"./vm-hands-entry-lite-q0k6kx6d.js";import"./vm-hands-entry-lite-bdhjpv7g.js";import"./vm-hands-entry-lite-22kfyvnk.js";import"./vm-hands-entry-lite-f5e3dbgk.js";import"./vm-hands-entry-lite-t07pdqxb.js";import"./vm-hands-entry-lite-qysyf65v.js";import"./vm-hands-entry-lite-ckv17tn8.js";import"./vm-hands-entry-lite-t7an5zg2.js";import"./vm-hands-entry-lite-rhhqbwmr.js";import"./vm-hands-entry-lite-eqgj4acy.js";import"./vm-hands-entry-lite-1xtpeh3x.js";import"./vm-hands-entry-lite-ggj69hbj.js";import"./vm-hands-entry-lite-89z488gz.js";import"./vm-hands-entry-lite-8t9xssf9.js";import"./vm-hands-entry-lite-k278g9kj.js";import"./vm-hands-entry-lite-gvwdy3rf.js";import"./vm-hands-entry-lite-9ay6f56v.js";import"./vm-hands-entry-lite-m11j0f9q.js";export{as as ensureLocalBrowser,mn as localAutomationAvailable,cs as localBrowserProfile,ss as localUserChromeHost,ls as runAutomationCallLocally,gn as runLocalAutomation};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{xo,vi,en,ko,Co,es,ts,Ao,Po,rs,ns,is,os}from"./vm-hands-entry-lite-zcd0e9fx.js";import"./vm-hands-entry-lite-4fpjdnbk.js";import"./vm-hands-entry-lite-9c95p6n9.js";import"./vm-hands-entry-lite-b885gwfh.js";import"./vm-hands-entry-lite-88swf2qr.js";import"./vm-hands-entry-lite-09m2cdkw.js";import"./vm-hands-entry-lite-ab2m9erf.js";import"./vm-hands-entry-lite-mkmebj51.js";import"./vm-hands-entry-lite-ydg5av4g.js";import"./vm-hands-entry-lite-1rtkf2xm.js";import"./vm-hands-entry-lite-q0k6kx6d.js";import"./vm-hands-entry-lite-bdhjpv7g.js";import"./vm-hands-entry-lite-22kfyvnk.js";import"./vm-hands-entry-lite-f5e3dbgk.js";import"./vm-hands-entry-lite-t07pdqxb.js";import"./vm-hands-entry-lite-qysyf65v.js";import"./vm-hands-entry-lite-ckv17tn8.js";import"./vm-hands-entry-lite-t7an5zg2.js";import"./vm-hands-entry-lite-rhhqbwmr.js";import"./vm-hands-entry-lite-eqgj4acy.js";import"./vm-hands-entry-lite-1xtpeh3x.js";import"./vm-hands-entry-lite-ggj69hbj.js";import"./vm-hands-entry-lite-89z488gz.js";import"./vm-hands-entry-lite-8t9xssf9.js";import"./vm-hands-entry-lite-k278g9kj.js";import"./vm-hands-entry-lite-gvwdy3rf.js";import"./vm-hands-entry-lite-9ay6f56v.js";import"./vm-hands-entry-lite-m11j0f9q.js";import{r}from"./vm-hands-entry-lite-qy9xg6em.js";export{r as LocalCapabilityError,xo as SHORT_REQUEST_CAPABILITIES,rs as capabilityInventoryForRoots,vi as confinedExecutionShell,ko as defaultLocalCommandRunner,ns as deliverLocalHandsEnvironment,Po as enrolledRootPaths,os as executeLocalOperation,ts as grantLocalHandsWorkspaceControl,es as openHandsWorkspaceGrant,is as rebindLocalHandsControl,Co as runFileCapability,Ao as runTransferCapability,en as spawnCaptured};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{gt,Us,Hs,gi,_i}from"./vm-hands-entry-lite-gvwdy3rf.js";import"./vm-hands-entry-lite-9ay6f56v.js";import"./vm-hands-entry-lite-m11j0f9q.js";export{Us as forgetLocalDesktopUse,_i as holdLocalDesktop,gt as noteLocalDesktopUse,Hs as releaseLocalDesktop,gi as trackDesktopRun};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{At,us,V,Be,Pt}from"./vm-hands-entry-lite-ydg5av4g.js";import"./vm-hands-entry-lite-1rtkf2xm.js";import"./vm-hands-entry-lite-q0k6kx6d.js";import"./vm-hands-entry-lite-bdhjpv7g.js";import"./vm-hands-entry-lite-22kfyvnk.js";import"./vm-hands-entry-lite-f5e3dbgk.js";import"./vm-hands-entry-lite-ckv17tn8.js";import"./vm-hands-entry-lite-t7an5zg2.js";import"./vm-hands-entry-lite-rhhqbwmr.js";import"./vm-hands-entry-lite-eqgj4acy.js";import"./vm-hands-entry-lite-1xtpeh3x.js";import"./vm-hands-entry-lite-ggj69hbj.js";import"./vm-hands-entry-lite-89z488gz.js";import"./vm-hands-entry-lite-8t9xssf9.js";import"./vm-hands-entry-lite-gvwdy3rf.js";import"./vm-hands-entry-lite-9ay6f56v.js";import"./vm-hands-entry-lite-m11j0f9q.js";export{Be as ensureLinuxDesktop,At as localDisplayAvailable,us as localDisplayReady,V as privateDirectory,Pt as runLocalDisplayStream};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{wr,Tt,br,Ro,_n,vr,yn}from"./vm-hands-entry-lite-1rtkf2xm.js";import"./vm-hands-entry-lite-q0k6kx6d.js";import"./vm-hands-entry-lite-bdhjpv7g.js";import"./vm-hands-entry-lite-22kfyvnk.js";import"./vm-hands-entry-lite-ckv17tn8.js";import"./vm-hands-entry-lite-t7an5zg2.js";import"./vm-hands-entry-lite-89z488gz.js";import"./vm-hands-entry-lite-8t9xssf9.js";export{Tt as LOCAL_PTY_MAX_BUFFERED_OUTPUT_BYTES,br as LOCAL_PTY_MAX_SESSIONS,wr as LOCAL_PTY_MAX_SESSION_MS,vr as defaultConnect,Ro as defaultLoginShell,_n as ptyRuntimeSupported,yn as runLocalPtySession};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Go,Ko,Jo,Zo,Xo,Yo,Qo}from"./vm-hands-entry-lite-j7k3e5w0.js";import"./vm-hands-entry-lite-09m2cdkw.js";import"./vm-hands-entry-lite-t7an5zg2.js";import"./vm-hands-entry-lite-1xtpeh3x.js";import"./vm-hands-entry-lite-ggj69hbj.js";import"./vm-hands-entry-lite-89z488gz.js";import"./vm-hands-entry-lite-8t9xssf9.js";import"./vm-hands-entry-lite-9ay6f56v.js";import"./vm-hands-entry-lite-m11j0f9q.js";export{Xo as acquireManagedRuntimeDirectoryLock,Jo as currentManagedRuntimeVersion,Qo as flushManagedRuntimeLifecycleEvents,Zo as isManagedRuntimeVersionExecutable,Ko as legacyManagedRuntimePaths,Go as managedRuntimePaths,Yo as recordManagedRuntimeLifecycle};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Ge,Ce,vs,Ss,Es,Bn,xs,Vr,Fn,dt,Ae,pt,jn,Un,Hn,qn,zn,Wn,Vn,Gn,Kn,Jn,Zn,Xn,Yn,Qn,ei,ti,pe,X,Pe,q,ri,ni,ii,Y,oi,si,ai,ci,li,ht,ui,ks,Gt,di,Cs,No,As,Ps,Ts,Rs,Os,Is,Ds,Ns,Ls,Ms,$s,Bs,Fs,js}from"./vm-hands-entry-lite-k278g9kj.js";export{ui as AUTOMATION_CLOUD_SESSIONS,ht as AUTOMATION_USER_CHROME,Zn as HANDS_CLOUD_ACCESS,Xn as HANDS_CLOUD_ACCESS_KEY,pe as HANDS_CONFINEMENT,X as HANDS_CONFINEMENT_KEY,Un as HANDS_ENVIRONMENT_AT_CLAIM,Hn as HANDS_ENVIRONMENT_AT_CLAIM_KEY,Fn as HANDS_ENVIRONMENT_DELIVERY,dt as HANDS_ENVIRONMENT_DELIVER_CONTROL,Yn as HANDS_HEADLESS_BROWSER,Qn as HANDS_HEADLESS_BROWSER_KEY,ri as HANDS_JOBS_USER,ni as HANDS_JOBS_USER_KEY,ei as HANDS_LARGE_ENVIRONMENT,ti as HANDS_LARGE_ENVIRONMENT_KEY,Pe as HANDS_MODEL_JOBS_EGRESS,q as HANDS_MODEL_JOBS_EGRESS_KEY,Wn as HANDS_REBIND,Jn as HANDS_REBIND_CONTROL,Kn as HANDS_REBIND_KEY,oi as HANDS_SESSION_CAP_KEY,si as HANDS_SESSION_CAP_NONE,ii as HANDS_SESSION_GROUP,Y as HANDS_SESSION_GROUP_KEY,qn as HANDS_WORKSPACE_CHECK,zn as HANDS_WORKSPACE_CHECK_KEY,Vn as HANDS_WORKSPACE_GRANT,Gn as HANDS_WORKSPACE_GRANT_KEY,ci as JOBS_START_WAIT,li as JOBS_START_WAIT_KEY,Ce as LOCAL_OPERATION_MAX_BYTES,Ge as LOCAL_RUNTIME_PROTOCOL_VERSION,Es as LOCAL_RUNTIME_ROUTES,Vr as LOCAL_RUNTIME_SESSION_CLAIM_WAIT_MAX_MS,Bn as LOCAL_RUNTIME_SESSION_PATH,Gt as LOCAL_RUNTIME_WORKER_STARTUP_MAX_MS,vs as RELAY_HOST_ALIAS_HEADER,Ss as RELAY_HOST_ALIAS_VERSION,jn as VM_HANDS_UNBIND_UNVERIFIED_EVENT,Ae as VM_HANDS_WORKSPACE_DEFERRED_KEY,pt as VM_HANDS_WORKSPACE_GRANT_CONTROL,ai as WORKER_PREVIEW_CARRIED_JOBS,ks as WORKER_STARTUP_TIMING_STAGES,di as buildLocalRuntimeDeviceProofBytes,xs as localRuntimeSessionRoutable,Ds as parseLocalRuntimeDisconnectResponse,Ps as parseLocalRuntimeEnrollmentResponse,Cs as parseLocalRuntimeErrorEnvelope,Rs as parseLocalRuntimeFirstHeartbeat,Ts as parseLocalRuntimeHeartbeatResponse,Is as parseLocalRuntimeIdentityResponse,Ls as parseLocalRuntimeLifecycleResponse,Ns as parseLocalRuntimeLocalSubscriptionResponse,Ms as parseLocalRuntimeOperationClaim,js as parseLocalRuntimeOperationCompletionResponse,Fs as parseLocalRuntimeOperationEnvironmentResponse,Bs as parseLocalRuntimeOperationEventsResponse,$s as parseLocalRuntimeOperationHeartbeatResponse,No as parseLocalRuntimeProofChallenge,As as parseLocalRuntimeRegistrationResponse,Os as parseLocalRuntimeRootsSyncResponse};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Io,Do,ys,bs}from"./vm-hands-entry-lite-rhhqbwmr.js";import"./vm-hands-entry-lite-eqgj4acy.js";import"./vm-hands-entry-lite-1xtpeh3x.js";import"./vm-hands-entry-lite-ggj69hbj.js";import"./vm-hands-entry-lite-89z488gz.js";import"./vm-hands-entry-lite-8t9xssf9.js";export{bs as allowMacPermissions,ys as permissionsSummary,Do as readMacPermissions,Io as reasonIdentity};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{k,kr,Cr,wn,tt,bn,Ar,je,ye,vn,Ue,Nt,te,He,Sn,we,Lt,Pr,Mt,Tr,En,ae,U,N,ce,Rr,Or,xn}from"./vm-hands-entry-lite-22kfyvnk.js";import"./vm-hands-entry-lite-8t9xssf9.js";export{Tr as REASON_HANDS_CLOSE_CODES,Ue as REASON_HANDS_JOB_CONTROL_MAX_FRAME_BYTES,Ar as REASON_HANDS_JOB_MAX_INPUT_CHARS,je as REASON_HANDS_JOB_MAX_OUTPUT_CHARS,ye as REASON_HANDS_JOB_MAX_OUTPUT_CHUNKS,vn as REASON_HANDS_JOB_MAX_RECORDS,bn as REASON_HANDS_MAX_ERROR_CHARS,kr as REASON_HANDS_MAX_FRAME_BYTES,Cr as REASON_HANDS_MAX_INPUT_CHARS,tt as REASON_HANDS_MAX_OUTPUT_CHARS,wn as REASON_HANDS_MAX_STRUCTURED_INPUT_CHARS,k as REASON_HANDS_PROTOCOL_VERSION,Pr as REASON_HANDS_PTY_ANCHOR_EXIT_MS,Mt as REASON_HANDS_PTY_CLEANUP_RECEIPT_MS,Lt as REASON_HANDS_PTY_CLEANUP_SWEEP_MS,we as REASON_HANDS_PTY_MAX_DIMENSION,te as REASON_HANDS_PTY_MAX_INPUT_BYTES,He as REASON_HANDS_PTY_MAX_OUTPUT_BYTES,Sn as REASON_HANDS_PTY_MAX_PENDING_INPUT_BYTES,Nt as REASON_HANDS_PTY_PROTOCOL_VERSION,En as REASON_HANDS_WORKSPACE_BEFORE_MAX_OUTPUT_CHARS,U as isReasonHandsGeneration,ce as isReasonHandsPtyJobId,ae as isReasonHandsRequestId,N as isReasonHandsUuid,Rr as parseReasonHandsJobRequest,Or as parseReasonHandsJobResult,xn as parseReasonHandsPtyReceipt};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Ir,be,K,Cn,ps,Wi,hs,qe,Oo,An,fs,ms,Dr,gs,_s}from"./vm-hands-entry-lite-t07pdqxb.js";import"./vm-hands-entry-lite-qysyf65v.js";import"./vm-hands-entry-lite-ckv17tn8.js";import"./vm-hands-entry-lite-t7an5zg2.js";import"./vm-hands-entry-lite-1xtpeh3x.js";import"./vm-hands-entry-lite-ggj69hbj.js";import"./vm-hands-entry-lite-89z488gz.js";import"./vm-hands-entry-lite-8t9xssf9.js";import"./vm-hands-entry-lite-9ay6f56v.js";import"./vm-hands-entry-lite-m11j0f9q.js";export{Ir as WORKER_SERVICE_ENV,K as WorkerServiceError,Wi as connectServiceLabel,be as defaultWorkerServiceHost,ms as installWorkerService,qe as installedWorkerService,hs as isConnectServiceLabel,_s as removeWorkerService,Dr as restartWorkerService,gs as retargetWorkerServiceLogs,Oo as retireLegacyWorkerService,fs as workerServiceDefinitionCurrent,Cn as workerServiceLauncher,An as workerServiceProcessRunning,ps as workerServiceRetargetPending};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import"./vm-hands-entry-lite-zg36myyf.js";import"./vm-hands-entry-lite-t7an5zg2.js";import{g}from"./vm-hands-entry-lite-ckv17tn8.js";import"./vm-hands-entry-lite-8t9xssf9.js";import"./vm-hands-entry-lite-m11j0f9q.js";import"./vm-hands-entry-lite-1cwqa4jr.js";import{Ot,et}from"./vm-hands-entry-lite-q0k6kx6d.js";import{w,M,Xt,De,Ke}from"./vm-hands-entry-lite-t9nz0ty7.js";import"./vm-hands-entry-lite-k278g9kj.js";import"./vm-hands-entry-lite-zcd0e9fx.js";import"./vm-hands-entry-lite-4fpjdnbk.js";import"./vm-hands-entry-lite-ggj69hbj.js";import"./vm-hands-entry-lite-88swf2qr.js";import"./vm-hands-entry-lite-b885gwfh.js";import"./vm-hands-entry-lite-vrqzr15t.js";import"./vm-hands-entry-lite-ydg5av4g.js";import"./vm-hands-entry-lite-eqgj4acy.js";import"./vm-hands-entry-lite-1xtpeh3x.js";import"./vm-hands-entry-lite-rhhqbwmr.js";import"./vm-hands-entry-lite-f5e3dbgk.js";import"./vm-hands-entry-lite-j7k3e5w0.js";import"./vm-hands-entry-lite-qysyf65v.js";import"./vm-hands-entry-lite-t07pdqxb.js";import"./vm-hands-entry-lite-ab2m9erf.js";import"./vm-hands-entry-lite-22kfyvnk.js";import"./vm-hands-entry-lite-9c95p6n9.js";import"./vm-hands-entry-lite-bdhjpv7g.js";import"./vm-hands-entry-lite-gvwdy3rf.js";import"./vm-hands-entry-lite-1rtkf2xm.js";import"./vm-hands-entry-lite-mkmebj51.js";import"./vm-hands-entry-lite-09m2cdkw.js";import{a}from"./vm-hands-entry-lite-89z488gz.js";import{t,o,u,i,s,n}from"./vm-hands-entry-lite-907pa7f9.js";import"./vm-hands-entry-lite-9ay6f56v.js";import{readFileSync as me,realpathSync as k,renameSync as ge,unlinkSync as fe,writeFileSync as he}from"fs";import{dirname as ye,join as I}from"path";function h(e){return`claude mcp add --transport http reason ${e}`}function C(e){return`codex mcp add reason --url ${e}
|
|
3
|
+
codex mcp login reason`}var F=h("https://mcp.reasonmachines.com/mcp"),z=C("https://mcp.reasonmachines.com/mcp"),B=`https://claude.ai/settings/connectors?add=custom&url=${encodeURIComponent("https://mcp.reasonmachines.com/mcp")}`,H=`https://cursor.com/install-mcp?name=reason&config=${encodeURIComponent(btoa(JSON.stringify({url:"https://mcp.reasonmachines.com/mcp"})))}`;var b="https://github.com/reason-machines/reason-plugins",X=`Connect a coding agent to Reason over MCP
|
|
4
|
+
|
|
5
|
+
Usage:
|
|
6
|
+
reason mcp Show how to connect Claude Code, Codex, or another MCP client
|
|
7
|
+
reason mcp uninstall Remove only this machine's registrations of the earlier, retired server
|
|
8
|
+
|
|
9
|
+
Plugins for Claude Code and Codex: ${b}
|
|
10
|
+
`;var P=s(["granted","not_granted","unknown"]),y=i({status:P,checkedAt:o().finite(),executablePath:t().min(1)});var Oe=i({version:n(1),key:t(),at:o(),self:i({principal_type:t(),user_id:t().optional(),user_name:t().nullish(),email:t().nullish(),org_id:t(),organization_name:t().nullish(),organization_slug:t().nullish(),mcp_connections:u(i({client_id:t(),client_name:t(),last_used_at:t().nullable()})).optional()})});var x=30000;function L(e,c=Date.now(),R=null){let r=et(e),d=(()=>{if(r?.state!=="connected"&&r?.state!=="starting")return!1;try{return process.kill(r.pid,0),!0}catch{return!1}})(),S=d&&r?.state==="connected",p=(f)=>S&&c-f>=0&&c-f<x,l=y.safeParse(r?.fullDiskAccess),m=Ot(r,R,c);return{...m?{permission_recovery:m}:{},full_disk_access:l.success&&p(l.data.checkedAt)?l.data.status:"unknown",keep_awake:{enabled:Xt(e)==="battery_and_ac",holding:r?.idleSleepHold===!0&&p(Date.parse(r.lastHeartbeatAt??""))},executable:d&&l.success?l.data.executablePath:null}}function Ne(e=g()){if(process.platform!=="darwin")return null;let c=De(I(Ke(k(a()),e),"worker.json"));return c?L(w(c).daemon,Date.now(),M(c)):null}export{Ne as connectionMacState};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{I}from"./vm-hands-entry-lite-
|
|
2
|
+
import{I}from"./vm-hands-entry-lite-9ay6f56v.js";import{randomUUID as m}from"crypto";import{closeSync as k,constants as c,fstatSync as u,lstatSync as s,mkdirSync as l,openSync as E,readFileSync as S,realpathSync as a,renameSync as g,unlinkSync as p,writeFileSync as v}from"fs";import{dirname as w,resolve as _}from"path";var d=65536;function f(r){try{return s(r),!0}catch(o){if(o instanceof Error&&"code"in o&&o.code==="ENOENT")return!1;throw o}}function b(r,o=!1){if(!f(r)){if(!o)throw Error("worker_state_missing");y(r),l(r,{mode:448})}let e=s(r);if(!e.isDirectory()||e.isSymbolicLink()||!I(e)||a(r)!==_(r))throw Error("worker_state_directory_not_private_or_canonical")}function y(r){let o=w(r);if(!f(o))y(o),l(o,{mode:448});if(a(o)!==_(o))throw Error("worker_parent_not_canonical")}function h(r,o=d){let e=E(r,c.O_RDONLY|c.O_NOFOLLOW);try{let n=u(e);if(!n.isFile()||n.nlink!==1||!I(n)||n.size>o)throw Error("worker_file_not_private");return S(e,"utf8")}finally{k(e)}}function Bi(r,o,e=d){let n=JSON.stringify(o);if(n===void 0)throw Error("worker_file_invalid");let t=n+`
|
|
3
3
|
`;if(Buffer.byteLength(t,"utf8")>e)throw Error("worker_file_too_large");if(b(w(r)),f(r))h(r,e);let i=`${r}.${m()}`;try{v(i,t,{mode:384,flag:"wx"}),g(i,r)}finally{if(f(i))p(i)}}
|
|
4
|
-
export{f,b,h,
|
|
4
|
+
export{f,b,h,Bi};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var l=Object.create;var{getPrototypeOf:m,defineProperty:h,getOwnPropertyNames:n}=Object;var k=Object.prototype.hasOwnProperty;function o(a){return this[a]}var p,q,
|
|
3
|
-
export{
|
|
2
|
+
var l=Object.create;var{getPrototypeOf:m,defineProperty:h,getOwnPropertyNames:n}=Object;var k=Object.prototype.hasOwnProperty;function o(a){return this[a]}var p,q,mi=(a,b,c)=>{var d=a!=null&&typeof a==="object";if(d){var i=b?p??=new WeakMap:q??=new WeakMap,j=i.get(a);if(j)return j}c=a!=null?l(m(a)):{};let f=b||!a||!a.__esModule||!k.call(a,"default")?h(c,"default",{value:a,enumerable:!0}):c;if(a&&typeof a==="object"||typeof a==="function"){for(let g of n(a))if(!k.call(f,g))h(f,g,{get:o.bind(a,g),enumerable:!0})}if(d)i.set(a,f);return f};var he=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports);var r=(a)=>a;function s(a,b){this[a]=r.bind(null,b)}var Bo=(a,b)=>{for(var c in b)h(a,c,{get:b[c],enumerable:!0,configurable:!0,set:s.bind(b,c)})};var Fo=(a,b,c)=>()=>{if(a)try{b=a(a=0)}catch(d){c=[d]}if(c)throw c[0];return b};var e=import.meta.require;
|
|
3
|
+
export{mi,he,Bo,Fo,e};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{
|
|
2
|
+
import{_t,R}from"./vm-hands-entry-lite-zg36myyf.js";import{C}from"./vm-hands-entry-lite-t7an5zg2.js";import{g,$t}from"./vm-hands-entry-lite-ckv17tn8.js";import{_e}from"./vm-hands-entry-lite-pmcz7j7t.js";function yi(e,i){let r=C(e,"REASON_API_URL")?.trim();if(!r)return $t(i);let t=new URL(r);if(t.protocol!=="https:"&&!(t.protocol==="http:"&&["127.0.0.1","localhost","::1"].includes(t.hostname)))throw Error("REASON_API_URL must use HTTPS (HTTP is allowed only for loopback development).");return t.origin}function l(e){return C(e,"REASON_API_URL")?.trim()?yi(e,"production"):void 0}function vo(e){return C(e,"REASON_API_KEY")?.trim()||void 0}async function So(e,i){let r=e.env??process.env,t=vo(r);if(!t)return(e.getCredentials??_t)({apiOrigin:l(r),signal:i});let a=yi(r,e.channel??g({env:r})),o=await(e.fetchImpl??fetch)(a+"/v3/self",{redirect:"error",headers:{authorization:"Bearer "+t,accept:"application/json"},signal:i}),p=await o.json().catch(()=>({})),n=_e(p)?p:{};if(!o.ok){let s=typeof n.detail==="string"?n.detail:typeof n.message==="string"?n.message:"API key authentication failed ("+o.status+")";throw new R(o.status,typeof n.error==="string"?n.error:"api_key_auth_failed",s)}if(typeof n.org_id!=="string"||!n.org_id)throw Error("The API key in the environment did not resolve to a Workspace.");let c=Array.isArray(n.scopes)?n.scopes.filter((s)=>typeof s==="string"):[];return{credentialKind:"api_key",apiOrigin:a,accessToken:t,orgId:n.org_id,clientId:"api-key",refreshToken:"",expiresAt:"",scopes:c}}async function Wo(e){let i=await So(e),r=l(e.env??process.env);if(!i)throw Error(r?`Not signed in to ${r}. Set REASON_API_KEY, or run \`reason login --api-url ${r}\`.`:"Not signed in. Run `reason login`, or set REASON_API_KEY.");return i}
|
|
3
|
+
export{yi,vo,So,Wo};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var
|
|
3
|
-
export{
|
|
2
|
+
var Ht={name:"github-native-engineer-device-worker-production",version:"0.2.411",private:!0,type:"module",engines:{node:">=22",bun:">=1.3.0"},workspaces:["../../packages/runtime-distribution"],dependencies:{"@anthropic-ai/sandbox-runtime":"^0.0.73","@earendil-works/pi-tui":"1.0.0","@modelcontextprotocol/sdk":"^1.29.0","@reason/runtime-distribution":"workspace:*","playwright-core":"1.60.0",zod:"^4.4.3"},overrides:{"@hono/node-server":"^1.19.15","@earendil-works/pi-agent-core":"1.0.0","@earendil-works/pi-ai":"1.0.0","@earendil-works/pi-coding-agent":"1.0.0","@earendil-works/chord":"1.0.0","@earendil-works/pi-codemode":"1.0.0","@earendil-works/pi-mcp":"1.0.0","@earendil-works/pi-telemetry":"1.0.0","@earendil-works/pi-tui":"1.0.0","brace-expansion":"2.1.7",axios:"^1.20.0","basic-ftp":"^6.2.1","@grpc/grpc-js":"^1.14.5",browserslist:"^4.28.8","engine.io":"^6.6.7","fast-uri":"^3.1.8",hono:"^4.13.7","ip-address":"^10.7.1",nanoid:"^3.3.18",dompurify:"^3.4.17",postcss:"^8.5.23",qs:"^6.16.0","shell-quote":"^1.11.0","socket.io-parser":"^4.2.7",tmp:"^0.2.7",toml:"^4.2.0",undici:"^8.10.2",ws:"^8.21.0","js-yaml":"^4.3.2","@modelcontextprotocol/sdk":"^1.31.0","proxy-addr":"^2.0.8","source-map-js":"^1.2.2"}};
|
|
3
|
+
export{Ht};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var i="libara_device_keychain.dylib",e="libreason_device_keychain.dylib";class
|
|
3
|
-
export{
|
|
2
|
+
var i="libara_device_keychain.dylib",e="libreason_device_keychain.dylib";class rt extends Error{code;constructor(n,t){super(t);this.code=n;this.name="ManagedRuntimeError"}}import{existsSync as s}from"fs";import{join as a}from"path";function Vi(n){let t=a(n,e);return s(t)?t:a(n,i)}
|
|
3
|
+
export{rt,Vi};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{H}from"./vm-hands-entry-lite-
|
|
3
|
-
export{
|
|
2
|
+
import{H}from"./vm-hands-entry-lite-8t9xssf9.js";import{tt}from"./vm-hands-entry-lite-22kfyvnk.js";import{Dt}from"./vm-hands-entry-lite-bdhjpv7g.js";import{j}from"./vm-hands-entry-lite-q0k6kx6d.js";import{ne}from"./vm-hands-entry-lite-89z488gz.js";import{Ie}from"./vm-hands-entry-lite-8ns59paz.js";import{r}from"./vm-hands-entry-lite-qy9xg6em.js";import{existsSync as D,realpathSync as q,statSync as K}from"fs";import{platform as h}from"os";import{isAbsolute as z,sep as G}from"path";import{existsSync as X}from"fs";import{createRequire as Y}from"module";var k=Ie(Dt)(()=>Y(import.meta.url)("bun:ffi"),X);function E(){return process.platform==="win32"&&typeof globalThis.Bun<"u"&&k.available()}function C(e=process.env){return k.defaultShell(e)}function M(e){return k.shellArgs(e)}function N(e){let n=k.spawn({...e,env:e.environment});return n.exited.then(()=>n.close()),{write:(o)=>n.write(o),resize:(o,t)=>n.resize(o,t),kill:()=>n.close(),exited:n.exited}}var wr=43200000,Tt=tt,br=4,Q=/^[A-Za-z0-9._:-]{1,160}$/,V=1000;function I(e){return Boolean(e)&&typeof e==="object"&&!Array.isArray(e)}function P(e,n){if(typeof e!=="number"||!Number.isFinite(e)||e<=0)return n;return Math.min(V,Math.max(1,Math.floor(e)))}function Z(e,n=Date.now()){let o=["relay_url","session_id","expires_at"],t=new Set([...o,"cols","rows","cwd","workspace"]);if(!I(e)||o.some((b)=>!(b in e))||Object.keys(e).some((b)=>!t.has(b)))throw new r("invalid_pty_request","Reason terminal request is malformed.");let{relay_url:c,session_id:m,expires_at:g}=e;if(typeof c!=="string")throw new r("invalid_pty_request","Reason terminal relay URL is missing.");let d;try{d=new URL(c)}catch{throw new r("invalid_pty_request","Reason terminal relay URL is invalid.")}if(d.protocol!=="wss:"&&d.protocol!=="ws:"||d.username||d.password)throw new r("invalid_pty_request","Reason terminal relay URL is invalid.");if(typeof m!=="string"||!Q.test(m))throw new r("invalid_pty_request","Reason terminal session identity is invalid.");let p=typeof g==="string"?Date.parse(g):Number.NaN;if(!Number.isFinite(p)||p<=n)throw new r("invalid_pty_request","Reason terminal session has already expired.");if(e.cwd!==void 0&&typeof e.cwd!=="string")throw new r("invalid_pty_request","Reason terminal working directory is invalid.");let a=e.workspace===void 0?void 0:H(e.workspace);if(a===null||a&&e.cwd!==void 0)throw new r("invalid_pty_request","Reason terminal workspace is invalid.");return{relay_url:c,session_id:m,expires_at:new Date(Math.min(p,n+wr)).toISOString(),cols:P(e.cols,80),rows:P(e.rows,24),...e.cwd===void 0?{}:{cwd:e.cwd},...a?{workspace:a}:{}}}function ee(e,n){if(h()==="win32")[e,n]=[e.toLowerCase(),n.toLowerCase()];return n===e||n.startsWith(e+G)}function W(e,n){if(n===void 0)return e;if(!z(n))throw new r("pty_cwd_invalid","Reason terminal working directory must be absolute.");let o;try{o=q(n)}catch{throw new r("pty_cwd_invalid","Reason terminal working directory does not exist.")}if(!ee(e,o))throw new r("pty_cwd_outside_root","Reason terminal working directory escapes the granted root.");if(!K(o).isDirectory())throw new r("pty_cwd_invalid","Reason terminal working directory is not a directory.");return o}function Ro(e=process.env){if(h()==="win32")return C(e);let n=e.SHELL;if(n&&z(n)&&D(n))return n;for(let o of h()==="darwin"?["/bin/zsh","/bin/bash","/bin/sh"]:["/bin/bash","/bin/sh"])if(D(o))return o;return"/bin/sh"}function re(){let e=globalThis.Bun;if(!e)throw new r("pty_unavailable","Reason terminals require the Bun runtime.");return e.spawn}function _n(){if(h()==="win32")return E();return typeof globalThis.Bun<"u"}var te=(e)=>{if(h()==="win32")try{return N({...e,file:e.shell,args:M(e.shell),environment:{...e.environment,TERM:"xterm-256color"}})}catch{throw new r("pty_unavailable","Reason could not allocate a pseudo-terminal.")}let n=re()({cmd:[e.shell,"-i","-l"],cwd:e.cwd,env:{...e.environment,TERM:"xterm-256color"},terminal:{cols:e.cols,rows:e.rows,data:(t,c)=>{e.onData(c)}}}),o=n.terminal;if(!o){try{n.kill()}catch{}throw new r("pty_unavailable","Reason could not allocate a pseudo-terminal.")}return{write:(t)=>o.write(t),resize:(t,c)=>o.resize(t,c),kill:()=>{try{n.kill()}catch{}},exited:n.exited.then((t)=>typeof t==="number"?t:null,()=>null)}},vr=(e,n)=>n===void 0?new WebSocket(e):new WebSocket(e,{proxy:n}),v=new Set;function oe(e){if(v.size>=br||v.has(e))return null;v.add(e);let n=!1;return()=>{if(n)return;n=!0,v.delete(e)}}async function yn(e,n={}){let o=n.now??Date.now,t=Z(e.payload,o()),c=oe(e.operationId);if(!c)throw new r("pty_slot_busy","This Reason Device already runs the maximum number of terminals.");let m=o(),g,d,p;try{let a=t.workspace?ne(e.root,t.workspace):void 0;g=a?W(D(a.boundary)?q(a.boundary):a.boundary,a.path):W(e.root,t.cwd),d=n.environment??process.env,p=n.shellPath??Ro(d)}catch(a){throw c(),a}return await new Promise((a,b)=>{let w=null,i=null,S=!1,x=!1,y=!1,T=null,U=0,B=0,O=[],R=0,A=null,l=(s)=>{if(y)return;if(y=!0,A)clearTimeout(A);e.signal.removeEventListener("abort",L);try{w?.kill()}catch{}try{i?.close(1000,"pty_session_over")}catch{}if(c(),s.kind==="rejected"){b(s.error);return}let u={reason:s.reason,exit_code:T,output_bytes:U,input_bytes:B,duration_ms:Math.max(0,o()-m)};e.emitEvent("pty.stopped",{...u}).catch(()=>{return}),a({...u})},L=()=>{let s=e.signal.reason;l({kind:"rejected",error:s instanceof r?s:new r("cancelled","Reason closed the terminal session.")})};if(e.signal.aborted){L();return}e.signal.addEventListener("abort",L,{once:!0}),A=setTimeout(()=>l({kind:"resolved",reason:"session_expired"}),Math.max(1,Date.parse(t.expires_at)-o()));let F=(s)=>{if(U+=s.byteLength,!S||!i){if(O.push(s),R+=s.byteLength,R>Tt)l({kind:"resolved",reason:"output_backpressure"});return}try{i.send(s)}catch{l({kind:"resolved",reason:"relay_closed"});return}if(i.bufferedAmount>Tt)l({kind:"resolved",reason:"output_backpressure"})};try{w=(n.spawnPty??te)({shell:p,args:["-i","-l"],cwd:g,cols:t.cols,rows:t.rows,environment:d,onData:(s)=>{if(!y)F(s)}})}catch(s){l({kind:"rejected",error:s instanceof r?s:new r("pty_spawn_failed","Reason could not start the terminal shell.")});return}w.exited.then((s)=>{if(y)return;if(T=s,S&&i)try{i.send(JSON.stringify({t:"exit",code:s}))}catch{}l({kind:"resolved",reason:"shell_exited"})});let J=(n.loadProxy??j)()?.url;try{i=(n.connect??vr)(t.relay_url,J)}catch{l({kind:"rejected",error:new r("pty_relay_unavailable","Reason could not reach the terminal relay.")});return}i.binaryType="arraybuffer",i.onopen=()=>{if(y||!i)return;S=!0;try{i.send(JSON.stringify({t:"open",cols:t.cols,rows:t.rows}));for(let s of O.splice(0))i.send(s);R=0}catch{l({kind:"resolved",reason:"relay_closed"});return}x=!0,e.emitEvent("pty.ready",{session_id:t.session_id,cols:t.cols,rows:t.rows}).catch(()=>{return})},i.onmessage=(s)=>{if(y||!w)return;let u=s.data;if(typeof u==="string"){let f;try{f=JSON.parse(u)}catch{return}if(!I(f))return;if(f.t==="resize"){try{w.resize(P(f.cols,t.cols),P(f.rows,t.rows))}catch{}return}if(f.t==="close")l({kind:"resolved",reason:"client_closed"});return}let _=u instanceof ArrayBuffer?new Uint8Array(u):ArrayBuffer.isView(u)?new Uint8Array(u.buffer,u.byteOffset,u.byteLength):null;if(!_||_.byteLength===0)return;B+=_.byteLength;try{w.write(_)}catch{}},i.onclose=()=>{if(y)return;if(!x){l({kind:"rejected",error:new r("pty_relay_unavailable","Reason could not reach the terminal relay.")});return}l({kind:"resolved",reason:"relay_closed"})},i.onerror=()=>{if(y||x)return;l({kind:"rejected",error:new r("pty_relay_unavailable","Reason could not reach the terminal relay.")})}})}
|
|
3
|
+
export{wr,Tt,br,Ro,_n,vr,yn};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{ct}from"./vm-hands-entry-lite-ggj69hbj.js";import{a}from"./vm-hands-entry-lite-89z488gz.js";import{randomUUID as L}from"crypto";import{spawnSync as b}from"child_process";import{chmodSync as ee,cpSync as te,existsSync as x,lstatSync as A,mkdirSync as Y,readdirSync as ne,readFileSync as w,readlinkSync as re,realpathSync as T,renameSync as E,rmdirSync as ie,rmSync as g,symlinkSync as M,writeFileSync as oe}from"fs";import{dirname as I,join as u,relative as se,resolve as ce}from"path";var Ln="so.ara.cli",k=[Ln,"com.reasonmachines.cli"],F="5LJFSBRY2F";function jr(e){return`(${e.map((t)=>`identifier "${t}"`).join(" or ")}) and anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.6] exists and certificate leaf[field.1.2.840.113635.100.6.1.13] exists and certificate leaf[subject.OU] = "${F}"`}var G="ReasonBackgroundIdentity",so="Contents/Helpers/ReasonPermissionTile",ae="so.ara.cli.permission-tile",Ne=jr([ae,"com.reasonmachines.cli.permission-tile"]),v="AraBackgroundIdentity",ue="Reason",Ce=jr(k),de=`anchor apple generic and (${k.map((e)=>`identifier "${e}"`).join(" or ")}) and certificate leaf[subject.OU] = "${F}"`;class h extends Error{code;constructor(e,t){super(t);this.code=e;this.name="MacOSBackgroundIdentityError"}}var R="/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister";function le(e=a()){return u(e,"Library","Application Support","Reason","Background","Reason.app")}function O(e=a()){return u(e,"Library","Application Support","Ara","Background","Ara.app")}function fe(e){try{return A(e).isFile()}catch{return!1}}function D(e){return[G,v].map((t)=>u(e,"Contents","MacOS",t)).find(fe)??null}function d(e){try{if(!A(e).isDirectory())return!1;let t=w(u(e,"Contents","Info.plist"),"utf8");return k.some((n)=>t.includes(`<string>${n}</string>`))&&(t.includes(`<string>${ue}</string>`)||t.includes("<string>Ara</string>"))&&D(e)!==null}catch{return!1}}function Ur(e=a()){let t=le(e);if(!d(t))return null;try{let n=w(u(t,"Contents","Info.plist"),"utf8");return/<key>CFBundleVersion<\/key>\s*<string>(\d+\.\d+\.\d+)<\/string>/.exec(n)?.[1]??null}catch{return null}}function pe(e,t=a()){let n=Ur(t);return n===null||j(N(n.split(".")),N(e.split(/[.-]/).slice(0,3)))}var ge=1e4;function K(e,t){return b(e,[...t],{stdio:"ignore",timeout:ge}).status??1}var W=new Set;function H(e){if(process.env.REASON_TEST_REFUSE_REAL_IDENTITY!=="1")return;let t=(n)=>{try{return T(n)}catch{return ce(n)}};if(e!==void 0&&t(e)!==t(a()))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 V=/\/(?:runtime|CLI)\/versions\/(\d+)\.(\d+)\.(\d+)[^/]*\/[^/]+$|\/\.(?:ara|reason)(?:-staging)?-worker-(\d+)\.(\d+)\.(\d+)[^/]*\/[^/]+$/,J=new Set(["ara","ara.exe","reason","reason.exe"]);function N(e){return e.map((t)=>Number(t))}function j(e,t){for(let n=0;n<3;n+=1)if(e[n]!==t[n])return e[n]<t[n];return!1}var ye=[0,2,161];function me(e){if(e===null)return!0;let t=ye,n=null;try{n=T(process.execPath)}catch{}return e.some((r)=>{let i=V.exec(r);if(i){let f=i[1]===void 0?i.slice(4,7):i.slice(1,4);return j(N(f),t)}let o=r.slice(r.lastIndexOf("/")+1);return J.has(o)&&r!==n&&r!==process.execPath})}function Ee(){let e=b("/bin/ps",["-xo","pid=,comm="],{encoding:"utf8",timeout:5000});if(e.status!==0)return null;let t=[];for(let n of e.stdout.split(`
|
|
3
3
|
`)){let r=/^\s*(\d+)\s+(\S.*)$/.exec(n);if(!r||Number(r[1])===process.pid)continue;let i=r[2].trimEnd(),o=i.slice(i.lastIndexOf("/")+1);if(!V.test(i)&&J.has(o)){let c=b("/usr/sbin/lsof",["-a","-p",r[1],"-d","txt","-Fn"],{encoding:"utf8",timeout:5000}).stdout?.split(`
|
|
4
4
|
`).find((l)=>l.startsWith("n/"));if(c)i=c.slice(1)}t.push(i)}return t}function _e(e){if(H(e.home),!d(e.sourceApp))throw new h("identity_invalid","The packaged Reason background identity is missing or invalid.");let t=e.command??K,n=le(e.home),r=I(n);Y(r,{recursive:!0,mode:448}),ee(r,448);let i=T(e.sourceApp),o=null;try{o=T(n)}catch{}if(i!==o){let f=`${process.pid}.${L()}`,c=u(r,`.Reason.app.${f}.tmp`),l=u(r,`.Reason.app.${f}.old`),y=!1;try{if(te(i,c,{recursive:!0,errorOnExist:!0,preserveTimestamps:!0}),!d(c))throw new h("identity_invalid","The copied Reason background identity is invalid.");let _=e.releaseSigned?["--test-requirement",`=${de}`]:[];if(t("/usr/bin/codesign",["--verify","--strict",..._,c])!==0)throw new h("identity_invalid_signature","The installed Reason background identity has an invalid signature.");let S=!1;for(let p=0;p<4;p+=1){let m=!1;try{E(n,l),m=!0,y=!0}catch(s){if(s.code!=="ENOENT")throw s}if(p===0)e.beforePublish?.();try{E(c,n),S=!0}catch(s){let Z=s.code;if(!["EEXIST","ENOTEMPTY"].includes(Z??""))throw s;if(m)g(l,{recursive:!0,force:!0}),y=!1;if(p===3)throw s;continue}if(m)g(l,{recursive:!0,force:!0}),y=!1;break}if(!S)throw Error("Could not publish Reason's background identity.")}catch(_){if(y&&!x(n)&&x(l))E(l,n);throw _}finally{g(c,{recursive:!0,force:!0}),g(l,{recursive:!0,force:!0})}}return z(n,e,{verified:i!==o}),n}function X(e){return u(I(e),".Reason.app.registered")}function q(e){try{let t=A(e);return t.isDirectory()?`${t.ino}:${t.birthtimeMs}`:null}catch{return null}}function C(e){let t=q(e);try{return t!==null&&w(X(e),"utf8")===t}catch{return!1}}function Q(e){if(d(e))return"bundle";try{if(A(u(e,"Contents","Info.plist"),{throwIfNoEntry:!1}))return null;return A(u(e,"Contents","MacOS",v)).isSymbolicLink()?"retired":null}catch{return null}}function z(e,t,n={}){let r=t.command??K;if(!n.verified&&r("/usr/bin/codesign",["--verify","--strict",e])!==0)throw new h("identity_invalid_signature","The installed Reason background identity has an invalid signature.");if(r(R,["-f",e])!==0)throw new h("identity_register_failed","Could not register Reason's macOS background identity.");let i=q(e);try{if(i)oe(X(e),i,{mode:384})}catch{}try{Se(e,t.home,r,t.runningExecutables??Ee)}catch(o){let f=o.code??"unknown";process.stderr.write(`Reason background identity: legacy_identity_retire_failed (${f})
|
|
5
|
-
`)}}function Se(e,t,n,r){let i=D(e);if(!i)return;let o=O(t),f=I(o),c=(s)=>u(s,"Contents","MacOS",v),l=se(I(c(o)),i),y=`${process.pid}.${L()}`,_=Q(o);if(_===null)return;let S=_==="bundle";if(S)n(R,["-u",o]);let p=u(f,`.Ara.app.${y}.old`);if(!W.has(o)&&!me(r())){if(!S)n(R,["-u",o]);try{E(o,p)}catch(s){if(s.code==="ENOENT")return;throw s}g(p,{recursive:!0,force:!0}),Ie(f);return}if(!S){if(re(c(o))===l)return;let s=`${c(o)}.${y}`;M(l,s);try{E(s,c(o))}finally{g(s,{force:!0})}return}let m=u(f,`.Ara.app.${y}.shim`);Y(I(c(m)),{recursive:!0}),M(l,c(m));try{try{E(o,p)}catch(s){if(s.code==="ENOENT")return;throw s}try{E(m,o)}catch(s){if(x(o))return;throw E(p,o),s}}finally{g(m,{recursive:!0,force:!0}),g(p,{recursive:!0,force:!0})}}function Ie(e){try{if(ne(e).some((n)=>n!==".DS_Store"))return;g(u(e,".DS_Store"),{force:!0}),ie(e)}catch{}}var B=new Map;function
|
|
6
|
-
`?[i,"--spawn"]:[]}var P=new Map;function
|
|
7
|
-
`,P.set(n,r)}return r?t:[]}function
|
|
5
|
+
`)}}function Se(e,t,n,r){let i=D(e);if(!i)return;let o=O(t),f=I(o),c=(s)=>u(s,"Contents","MacOS",v),l=se(I(c(o)),i),y=`${process.pid}.${L()}`,_=Q(o);if(_===null)return;let S=_==="bundle";if(S)n(R,["-u",o]);let p=u(f,`.Ara.app.${y}.old`);if(!W.has(o)&&!me(r())){if(!S)n(R,["-u",o]);try{E(o,p)}catch(s){if(s.code==="ENOENT")return;throw s}g(p,{recursive:!0,force:!0}),Ie(f);return}if(!S){if(re(c(o))===l)return;let s=`${c(o)}.${y}`;M(l,s);try{E(s,c(o))}finally{g(s,{force:!0})}return}let m=u(f,`.Ara.app.${y}.shim`);Y(I(c(m)),{recursive:!0}),M(l,c(m));try{try{E(o,p)}catch(s){if(s.code==="ENOENT")return;throw s}try{E(m,o)}catch(s){if(x(o))return;throw E(p,o),s}}finally{g(m,{recursive:!0,force:!0}),g(p,{recursive:!0,force:!0})}}function Ie(e){try{if(ne(e).some((n)=>n!==".DS_Store"))return;g(u(e,".DS_Store"),{force:!0}),ie(e)}catch{}}var B=new Map;function Mn(e=a()){let t=B.get(e);if(t)return t;if(process.platform!=="darwin")return[];let n=U(e);if(n===null&&x(I(le(e))))Atomics.wait(new Int32Array(new SharedArrayBuffer(4)),0,0,100),n=U(e);if(n===null)return[];return B.set(e,n),n}function U(e){let t=le(e),n=O(e);if(!d(t)||!C(t))try{he({home:e,skipWhenSettled:!0})}catch{}let r=d(t)&&(C(t)||!d(n))?t:d(n)?n:null,i=r?D(r):null;if(!i)return null;if(r===n)W.add(n);let o=b(i,["--can-spawn"],{env:{},timeout:2000,encoding:"utf8"});return o.status===0&&o.stdout===`spawn
|
|
6
|
+
`?[i,"--spawn"]:[]}var P=new Map;function at(e=a()){let t=Mn(e),n=t[0];if(!n)return[];let r=P.get(n);if(r===void 0){let i=b(n,["--can-spawn-computer-use"],{env:{},timeout:2000,encoding:"utf8"});r=i.status===0&&i.stdout===`spawn
|
|
7
|
+
`,P.set(n,r)}return r?t:[]}function ao(e=at(),t=a()){if(e.length>0)return null;if(Ur(t)===null)return"computer_use_identity_missing";return pe(ct,t)?"computer_use_identity_outdated":"computer_use_identity_unavailable"}function he(e={}){H(e.home);let t=le(e.home);if(e.skipWhenSettled&&d(t)&&C(t)&&Q(O(e.home))===null)return!0;if(!d(t)){let n=O(e.home);if(!d(n))return!1;try{return _e({...e,sourceApp:n}),!0}catch(r){if(!d(t))throw r}}return z(t,e),!0}var Ut="REASON_WORKER_IDENTITY_APP";function co(e,t=process.env,n=a()){let r=t[Ut];return r&&r===le(n)?r:e}function lo(e,t){if(process.platform!=="darwin")return null;let n=le(e),r=u(n,"Contents","MacOS",G),i=b(r,["--can-run-worker",t],{env:{},timeout:2000,encoding:"utf8"});return i.status===0&&i.stdout===`run-worker
|
|
8
8
|
`?{app:n,executable:r}:null}
|
|
9
|
-
export{
|
|
9
|
+
export{Ln,jr,so,le,Ur,Mn,at,ao,Ut,co,lo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{H}from"./vm-hands-entry-lite-
|
|
2
|
+
import{H}from"./vm-hands-entry-lite-8t9xssf9.js";var Hi=32;var qi="__ARA_PI_TOOL_CONFINED_SCRIPT_5f0c9e2a__",zi=262144;var k=2,kr=33554432,Cr=200000,wn=4000000,tt=240000;var bn=2000;var Ar=16384,je=32768,ye=128,vn=64,Ue=2097152,Nt=1,te=16384,He=32768,Sn=8388608,we=1000,Lt=2500,Pr=2000,Mt=Lt+Pr,R=/^[A-Za-z0-9][A-Za-z0-9._:-]{0,199}$/,y=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,Tr={text_only:4430,invalid_json:4431,invalid_cancel_request:4432,invalid_sdk_response:4433,claim_required:4434,invalid_claim:4435,executor_mismatch:4436,stale_generation:4437,fence_conflict:4438,frame_too_large:4439,result_too_large:4440,progress_too_large:4441,terminal_cleanup_started:4442,job_journal_unavailable:4443},I=new Map(Object.entries(Tr).map(([t,n])=>[n,t]));var h=["cancelled","command_failed","duplicate_request_id","duplicate_result_evicted","invalid_repl_response","invalid_request","process_group_cleanup_unconfirmed","repl_failed","result_too_large","repl_response_too_large","repl_transport_failed","request_ledger_full","request_journal_unavailable","request_outcome_uncertain","maintenance_held","request_not_found","resume_digest_mismatch","spawn_failed","stale_generation","timeout"],E=new Set(h),En=16384;var S=["maintenance_held","invalid_job_request","jobs_disabled","job_not_found","job_conflict","job_capacity","job_journal_unavailable","job_not_running","job_lease_expired","job_input_sequence","job_input_backpressure","stale_generation","pty_unsupported","job_mode_mismatch"];class o extends Error{code;constructor(t){super(t);this.name="HandsProtocolError",this.code=t}}function m(t){return new TextEncoder().encode(t).byteLength}function a(t){return typeof t==="object"&&t!==null&&!Array.isArray(t)}function s(t,n){let e=new Set(n);return Object.keys(t).every((i)=>e.has(i))}function ae(t){return typeof t==="string"&&R.test(t)}function U(t){return Number.isSafeInteger(t)&&Number(t)>=1}function N(t){return typeof t==="string"&&y.test(t)}function ce(t){return typeof t==="string"&&t.startsWith("pty-")&&N(t.slice(4))}function p(t){return[t.cols,t.rows].every((n)=>Number.isSafeInteger(n)&&Number(n)>=1&&Number(n)<=we)}function _(t){if(typeof t!=="string"||t.length>Math.ceil(te/3)*4||t.length%4!==0||!/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t))return-1;let n=t.endsWith("==")?2:t.endsWith("=")?1:0;if(n&&"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(t[t.length-n-1])&(n===2?15:3))return-1;let i=t.length/4*3-n;return i<=te?i:-1}function l(t){if(m(t)>kr)throw new o("frame_too_large");try{return JSON.parse(t)}catch{throw new o("invalid_json")}}function Rr(t){let n=l(t);if(!a(n)||!s(n,["type","version","generation","id","jobId","action","input"])||n.type!=="job"||n.version!==k||!U(n.generation)||!ae(n.id)||!ae(n.jobId)||!a(n.input))throw new o("invalid_job_request");let e=n.input,i=Number.isSafeInteger(e.leaseExpiresAtMs)&&Number(e.leaseExpiresAtMs)>0,d=Number.isSafeInteger(e.sequence)&&Number(e.sequence)>=1;if(!(n.action==="start"?e.mode==="pty"?s(e,["mode","cols","rows","leaseExpiresAtMs"])&&ce(n.jobId)&&p(e)&&i:s(e,["script","leaseExpiresAtMs"])&&typeof e.script==="string"&&e.script.length<=Cr&&i:n.action==="inspect"?s(e,["after"])&&Number.isSafeInteger(e.after)&&Number(e.after)>=0:n.action==="input"?"dataBase64"in e?s(e,["sequence","dataBase64"])&&ce(n.jobId)&&d&&_(e.dataBase64)>0:s(e,["sequence","data","eof"])&&d&&typeof e.data==="string"&&e.data.length<=Ar&&typeof e.eof==="boolean":n.action==="resize"?s(e,["sequence","cols","rows"])&&ce(n.jobId)&&d&&p(e):n.action==="renew"?s(e,["leaseExpiresAtMs"])&&i:n.action==="cancel"&&s(e,[])))throw new o("invalid_job_request");return n}function Or(t){let n=l(t);if(!a(n)||!s(n,["type","version","generation","id","ok","job","error"])||n.type!=="job_result"||n.version!==k||!U(n.generation)||!ae(n.id))throw new o("invalid_job_result");if(n.ok===!1&&n.job===void 0&&typeof n.error==="string"&&S.some((r)=>r===n.error))return n;let e=n.job;if(n.ok!==!0||n.error!==void 0||!a(e)||!s(e,["jobId","state","startedAtMs","finishedAtMs","leaseExpiresAtMs","exitCode","inputSequence","output","firstCursor","nextCursor","truncated","process","environmentRevision","environmentSnapshotId","pty"])||!ae(e.jobId)||!["starting","running","exited","cancelled","expired","uncertain"].includes(String(e.state))||!Number.isSafeInteger(e.startedAtMs)||Number(e.startedAtMs)<1||!Number.isSafeInteger(e.leaseExpiresAtMs)||Number(e.leaseExpiresAtMs)<1||e.finishedAtMs!==null&&(!Number.isSafeInteger(e.finishedAtMs)||Number(e.finishedAtMs)<Number(e.startedAtMs))||e.exitCode!==null&&(!Number.isSafeInteger(e.exitCode)||Number(e.exitCode)<0||Number(e.exitCode)>255)||!Number.isSafeInteger(e.inputSequence)||Number(e.inputSequence)<0||!Number.isSafeInteger(e.firstCursor)||Number(e.firstCursor)<1||!Number.isSafeInteger(e.nextCursor)||Number(e.nextCursor)<Number(e.firstCursor)-1||typeof e.truncated!=="boolean"||!Array.isArray(e.output)||e.output.length>ye)throw new o("invalid_job_result");if(e.environmentRevision===void 0!==(e.environmentSnapshotId===void 0)||e.environmentRevision!==void 0&&(!Number.isSafeInteger(e.environmentRevision)||Number(e.environmentRevision)<1||!N(e.environmentSnapshotId)))throw new o("invalid_job_result");let i=Number(e.firstCursor)-1,d=0;for(let r of e.output){if(!a(r)||!s(r,["cursor","stream","text"])||!Number.isSafeInteger(r.cursor)||Number(r.cursor)<=i||Number(r.cursor)>Number(e.nextCursor)||!["stdout","stderr"].includes(String(r.stream))||typeof r.text!=="string")throw new o("invalid_job_result");d+=r.text.length,i=Number(r.cursor)}if(d>je)throw new o("invalid_job_result");let c=e.state==="starting"||e.state==="running";if(c&&(e.finishedAtMs!==null||e.exitCode!==null)||!c&&e.finishedAtMs===null||e.state==="uncertain"&&e.exitCode!==null||e.state==="exited"&&e.exitCode===null||e.state==="cancelled"&&e.exitCode!==130||e.state==="expired"&&e.exitCode!==124)throw new o("invalid_job_result");if(e.process!==void 0){let r=e.process;if(!a(r)||!s(r,["pid","processGroupId","executorLaunchId"])||!Number.isSafeInteger(r.pid)||Number(r.pid)<1||r.processGroupId!==r.pid||!N(r.executorLaunchId)||!["starting","running"].includes(String(e.state)))throw new o("invalid_job_result")}if(e.pty!==void 0){let r=e.pty;if(!a(r)||!s(r,["version","cols","rows","output","cleanup"])||r.version!==Nt||!ce(e.jobId)||!p(r)||e.output.length!==0||!Array.isArray(r.output)||r.output.length>ye||(c?r.cleanup!=="pending":e.state==="uncertain"?r.cleanup!=="unconfirmed":r.cleanup!=="confirmed")||e.state==="running"&&(e.process===void 0||e.environmentRevision===void 0))throw new o("invalid_job_result");let g=Number(e.firstCursor)-1,b=0;for(let u of r.output){if(!a(u)||!s(u,["cursor","dataBase64"])||!Number.isSafeInteger(u.cursor)||Number(u.cursor)<=g||Number(u.cursor)>Number(e.nextCursor))throw new o("invalid_job_result");let f=_(u.dataBase64);if(f<=0||(b+=f)>He)throw new o("invalid_job_result");g=Number(u.cursor)}}return n}function xn(t){if(m(t)>Ue)throw new o("frame_too_large");let n=l(t);if(!a(n)||!s(n,["version","sessionId","operationId","runId","deviceId","rootId","workspace","binding","targetRevision","rootGrantRevision","generation","fenceId","executorLaunchId","job"])||n.version!==Nt||![n.sessionId,n.operationId,n.runId].every(ae)||![n.deviceId,n.rootId,n.fenceId,n.executorLaunchId].every(N)||!U(n.generation)||!Number.isSafeInteger(n.rootGrantRevision)||Number(n.rootGrantRevision)<1||!["workspace_source","mcp_control"].includes(String(n.binding))||!Number.isSafeInteger(n.targetRevision)||Number(n.targetRevision)<0||n.binding==="workspace_source"&&n.targetRevision!==0||!a(n.workspace))throw new o("invalid_pty_receipt");if(!H(n.workspace))throw new o("invalid_pty_receipt");let e=Or(JSON.stringify({type:"job_result",version:k,generation:n.generation,id:n.operationId,ok:!0,job:n.job}));if(!e.ok||!e.job.pty||e.job.pty.output.length!==0||e.job.process&&e.job.process.executorLaunchId!==n.executorLaunchId)throw new o("invalid_pty_receipt");return n}export{Hi,qi,zi,k,kr,Cr,wn,tt,bn,Ar,je,ye,vn,Ue,Nt,te,He,Sn,we,Lt,Pr,Mt,Tr,En,ae,U,N,ce,Rr,Or,xn};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{r}from"./vm-hands-entry-lite-qy9xg6em.js";import{readdirSync as g,readFileSync as S}from"fs";import{userInfo as b}from"os";var
|
|
3
|
-
export{
|
|
2
|
+
import{r}from"./vm-hands-entry-lite-qy9xg6em.js";import{readdirSync as g,readFileSync as S}from"fs";import{userInfo as b}from"os";var Yt="--vm-hands-op-runner-kind=person";function P(n){let a=new Set([n]),i=[];try{i=g("/proc")}catch{}for(let t of i){if(!/^\d+$/.test(t))continue;try{let c=S(`/proc/${t}/stat`,"utf8");if(Number(c.slice(c.lastIndexOf(")")+2).split(" ")[3])===n)a.add(Number(t))}catch{}}for(let t of a)try{process.kill(t,"SIGKILL")}catch{}}var k=(n)=>{let a=globalThis.Bun;if(!a)throw new r("pty_unavailable","Reason terminals require the Bun runtime.");let i=a.spawn({cmd:[n.shell,...n.args],cwd:n.cwd,env:{...n.environment,TERM:"xterm-256color"},terminal:{cols:n.cols,rows:n.rows,data:(s,l)=>n.onData(l)}}),t=i.terminal,c=()=>{P(i.pid);try{t?.close()}catch{}};if(!t)throw c(),new r("pty_unavailable","Reason could not allocate a pseudo-terminal.");return{write:(s)=>t.write(s),resize:(s,l)=>t.resize(s,l),kill:c,exited:i.exited.then((s)=>typeof s==="number"?s:null,()=>null)}};function _(){let n=(()=>{try{return b().username}catch{return}})();return{PATH:process.env.PATH,HOME:process.env.HOME,SHELL:process.env.SHELL,LANG:"C.UTF-8",...n?{USER:n,LOGNAME:n}:{}}}async function zo(){let[{executeLocalOperation:n,spawnCaptured:a},{runLocalPtySession:i},{configureDesktopAccount:t},{configureWorkerSandbox:c}]=await Promise.all([import("./local-capabilities-ptwd0rk9.js"),import("./local-pty-session-5f50sqq0.js"),import("./desktop-account-5v7x0ajx.js"),import("./worker-sandbox-smqj3mbe.js")]);c();let y=process.argv.includes(Yt),s=(p,e,m)=>a(p,e[0]==="-lic"?["-lc",...e.slice(1)]:e,m),l=(process.geteuid?.()??0)!==0,u=new Map,d=(p)=>{try{process.send?.(p)}catch{}};process.on("message",(p)=>{let e=p;if(e?.t==="cancel"){u.get(e.id)?.abort();return}if(e?.t!=="op")return;if(!l){d({t:"done",id:e.id,completion:{status:"failed",error_code:"vm_hands_payload_account_unavailable"}});return}let m=e.claim.capability;if(m==="pty.start"&&!y){d({t:"done",id:e.id,completion:{status:"failed",error_code:"capability_not_granted"}});return}let f=new AbortController;u.set(e.id,f);let w=m==="pty.start"?{runPtySession:(o)=>i(o,{spawnPty:k,environment:_(),loadProxy:()=>null})}:{worker:e.worker,...m==="exec.full"?{spawnFullControl:s}:{}};n(e.state,e.claim,{...w,signal:f.signal,emit:(o)=>{let{deliverySignal:h,...v}=o;d({t:"event",id:e.id,event:v})}}).then((o)=>d({t:"done",id:e.id,completion:o}),(o)=>d({t:"done",id:e.id,completion:{status:"failed",error_code:o&&typeof o==="object"&&"code"in o&&typeof o.code==="string"?o.code:"vm_hands_op_failed"}})).finally(()=>u.delete(e.id))}),process.on("disconnect",()=>process.exit(0)),await new Promise(()=>{})}
|
|
3
|
+
export{Yt,zo};
|