@reason-machines/cli-linux-x64 0.2.471 → 0.2.472
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-7xy672j8.js → api-44acg28r.js} +1 -1
- package/bin/vm-hands/{api-credentials-bbmmmkwx.js → api-credentials-xgdkkw50.js} +1 -1
- package/bin/vm-hands/{connect-cli-c5bmsf0p.js → connect-cli-g0mxm7j0.js} +1 -1
- package/bin/vm-hands/{local-automation-xqbgsg13.js → local-automation-ekt1js8y.js} +1 -1
- package/bin/vm-hands/{local-capabilities-rnsn2yye.js → local-capabilities-7wqzvqx6.js} +1 -1
- package/bin/vm-hands/{local-display-session-avdg9bkp.js → local-display-session-e8wmqfjb.js} +1 -1
- package/bin/vm-hands/local-display-video-byvrhcfh.js +2 -0
- package/bin/vm-hands/{local-managed-process-zvm6srg5.js → local-managed-process-k94nbtdk.js} +1 -1
- package/bin/vm-hands/{managed-runtime-10rq8hz6.js → managed-runtime-9enpnw3t.js} +1 -1
- package/bin/vm-hands/{permissions-0yb0vzqr.js → permissions-bwt84tb7.js} +1 -1
- package/bin/vm-hands/{serve-service-q02jz4d9.js → serve-service-h7hhaxgn.js} +1 -1
- package/bin/vm-hands/{status-3mgfgra8.js → status-6mmtbhk8.js} +1 -1
- package/bin/vm-hands/version-9nztkzcn.js +2 -0
- package/bin/vm-hands/{vm-hands-entry-lite-vm6et8tm.js → vm-hands-entry-lite-0ga37680.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-5zvph0py.js → vm-hands-entry-lite-0gy6q1d7.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-n1k1njzh.js → vm-hands-entry-lite-4p5p2rf4.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-8eksd9j1.js → vm-hands-entry-lite-ae58xq6a.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-7c7swrjq.js → vm-hands-entry-lite-b233mfa6.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-hdc0sb80.js → vm-hands-entry-lite-cgqns1tf.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-spajqeyc.js → vm-hands-entry-lite-ewp26q5v.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-eqbbemee.js → vm-hands-entry-lite-exjypzxr.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-gez48xt4.js → vm-hands-entry-lite-f9hf0m7b.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-vfxx44f3.js → vm-hands-entry-lite-fdy317tt.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-awp08wyd.js → vm-hands-entry-lite-gxj550g3.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-98rmcvag.js → vm-hands-entry-lite-h964wtbv.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-gdzw92jk.js → vm-hands-entry-lite-s1t43cbb.js} +1 -1
- package/bin/vm-hands/vm-hands-entry-lite-w60rs3pg.js +2 -0
- package/bin/vm-hands/{vm-hands-entry-lite-3pxmmb7z.js → vm-hands-entry-lite-xrcnj485.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-nxyk22qr.js → vm-hands-entry-lite-zs3bfc16.js} +1 -1
- package/bin/vm-hands/vm-hands-entry-lite.js +1 -1
- package/bin/vm-hands/{vm-hands-executor-zn1wyrng.js → vm-hands-executor-ppcn55eq.js} +1 -1
- package/bin/vm-hands/{vm-hands-op-runner-h6s4p65y.js → vm-hands-op-runner-45q2dzzd.js} +1 -1
- package/bin/vm-hands/{vm-hands-runtime-ecfwv3a4.js → vm-hands-runtime-t638pp9c.js} +3 -3
- package/package.json +1 -1
- package/bin/vm-hands/local-display-video-7t4c9cwg.js +0 -2
- package/bin/vm-hands/version-5ffeerbd.js +0 -2
- package/bin/vm-hands/vm-hands-entry-lite-zz8yhajj.js +0 -2
package/bin/reason
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
[diffend] Oversized file quarantined before diffing.
|
|
2
2
|
name: package/bin/reason
|
|
3
|
-
size:
|
|
4
|
-
sha256:
|
|
3
|
+
size: 90691040 bytes
|
|
4
|
+
sha256: 3a21631c5ff147fb3495cce57e7638528273ebca832023fcba5088f51c61fc7c
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{I,gs,Vo}from"./vm-hands-entry-lite-
|
|
2
|
+
import{I,gs,Vo}from"./vm-hands-entry-lite-xrcnj485.js";import"./vm-hands-entry-lite-b139fhbg.js";import"./vm-hands-entry-lite-k83rkcys.js";import"./vm-hands-entry-lite-fcvf8md1.js";import"./vm-hands-entry-lite-cf1x5cbr.js";import"./vm-hands-entry-lite-3krzmhkk.js";import"./vm-hands-entry-lite-vdhgwmmp.js";import"./vm-hands-entry-lite-rfz60hb3.js";export{I as ApiError,Vo as ReasonApi,gs as createMachineEnrollmentTicketWithToken};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Mi,qo,Wo,ms}from"./vm-hands-entry-lite-
|
|
2
|
+
import{Mi,qo,Wo,ms}from"./vm-hands-entry-lite-4p5p2rf4.js";import"./vm-hands-entry-lite-xrcnj485.js";import"./vm-hands-entry-lite-b139fhbg.js";import"./vm-hands-entry-lite-k83rkcys.js";import"./vm-hands-entry-lite-fcvf8md1.js";import"./vm-hands-entry-lite-cf1x5cbr.js";import"./vm-hands-entry-lite-3krzmhkk.js";import"./vm-hands-entry-lite-vdhgwmmp.js";import"./vm-hands-entry-lite-rfz60hb3.js";export{Mi as apiOriginFromEnvironment,qo as environmentApiKey,ms as requireApiCredentials,Wo as resolveApiCredentials};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{rt,us,ds,ps}from"./vm-hands-entry-lite-
|
|
2
|
+
import{rt,us,ds,ps}from"./vm-hands-entry-lite-f9hf0m7b.js";import"./vm-hands-entry-lite-03d1fhxv.js";import"./vm-hands-entry-lite-egax7vw4.js";import"./vm-hands-entry-lite-4p5p2rf4.js";import"./vm-hands-entry-lite-xrcnj485.js";import"./vm-hands-entry-lite-b139fhbg.js";import"./vm-hands-entry-lite-zs3bfc16.js";import"./vm-hands-entry-lite-0ga37680.js";import"./vm-hands-entry-lite-1f0v3jb4.js";import"./vm-hands-entry-lite-ae58xq6a.js";import"./vm-hands-entry-lite-gxj550g3.js";import"./vm-hands-entry-lite-hzh8fdxx.js";import"./vm-hands-entry-lite-kz48x6p0.js";import"./vm-hands-entry-lite-h6rhk6h1.js";import"./vm-hands-entry-lite-52x189kf.js";import"./vm-hands-entry-lite-tn8v3yfj.js";import"./vm-hands-entry-lite-fdy317tt.js";import"./vm-hands-entry-lite-0gy6q1d7.js";import"./vm-hands-entry-lite-ewp26q5v.js";import"./vm-hands-entry-lite-b233mfa6.js";import"./vm-hands-entry-lite-jyvmw8b7.js";import"./vm-hands-entry-lite-44qha2rt.js";import"./vm-hands-entry-lite-8qvsnkvv.js";import"./vm-hands-entry-lite-wrvz9jxy.js";import"./vm-hands-entry-lite-5zdybh8s.js";import"./vm-hands-entry-lite-r3yp6cr9.js";import"./vm-hands-entry-lite-cgqns1tf.js";import"./vm-hands-entry-lite-s1t43cbb.js";import"./vm-hands-entry-lite-w60rs3pg.js";import"./vm-hands-entry-lite-abfb6nms.js";import"./vm-hands-entry-lite-k83rkcys.js";import"./vm-hands-entry-lite-fcvf8md1.js";import"./vm-hands-entry-lite-cf1x5cbr.js";import"./vm-hands-entry-lite-3krzmhkk.js";import"./vm-hands-entry-lite-b8yapqfn.js";import"./vm-hands-entry-lite-7ja63pfz.js";import"./vm-hands-entry-lite-vdhgwmmp.js";import"./vm-hands-entry-lite-rfz60hb3.js";export{us as computerDisconnected,rt as connectionDirectory,ds as connectionReport,ps as restartConnection};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Pn,Os,Is,Ds,Ns,Tn}from"./vm-hands-entry-lite-
|
|
2
|
+
import{Pn,Os,Is,Ds,Ns,Tn}from"./vm-hands-entry-lite-fdy317tt.js";import"./vm-hands-entry-lite-0gy6q1d7.js";import"./vm-hands-entry-lite-ewp26q5v.js";import"./vm-hands-entry-lite-b233mfa6.js";import"./vm-hands-entry-lite-jyvmw8b7.js";import"./vm-hands-entry-lite-44qha2rt.js";import"./vm-hands-entry-lite-8qvsnkvv.js";import"./vm-hands-entry-lite-wrvz9jxy.js";import"./vm-hands-entry-lite-5zdybh8s.js";import"./vm-hands-entry-lite-r3yp6cr9.js";import"./vm-hands-entry-lite-cgqns1tf.js";import"./vm-hands-entry-lite-s1t43cbb.js";import"./vm-hands-entry-lite-w60rs3pg.js";import"./vm-hands-entry-lite-abfb6nms.js";import"./vm-hands-entry-lite-k83rkcys.js";import"./vm-hands-entry-lite-fcvf8md1.js";import"./vm-hands-entry-lite-cf1x5cbr.js";import"./vm-hands-entry-lite-3krzmhkk.js";import"./vm-hands-entry-lite-b8yapqfn.js";import"./vm-hands-entry-lite-7ja63pfz.js";import"./vm-hands-entry-lite-vdhgwmmp.js";import"./vm-hands-entry-lite-rfz60hb3.js";export{Is as ensureLocalBrowser,Pn as localAutomationAvailable,Ds as localBrowserProfile,Os as localUserChromeHost,Ns as runAutomationCallLocally,Tn as runLocalAutomation};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Go,Fi,pn,Ko,Jo,Zo,Xo,ks,Cs,As,Ps}from"./vm-hands-entry-lite-
|
|
2
|
+
import{Go,Fi,pn,Ko,Jo,Zo,Xo,ks,Cs,As,Ps}from"./vm-hands-entry-lite-0ga37680.js";import"./vm-hands-entry-lite-1f0v3jb4.js";import"./vm-hands-entry-lite-ae58xq6a.js";import"./vm-hands-entry-lite-gxj550g3.js";import"./vm-hands-entry-lite-hzh8fdxx.js";import"./vm-hands-entry-lite-kz48x6p0.js";import"./vm-hands-entry-lite-h6rhk6h1.js";import"./vm-hands-entry-lite-52x189kf.js";import"./vm-hands-entry-lite-tn8v3yfj.js";import"./vm-hands-entry-lite-fdy317tt.js";import"./vm-hands-entry-lite-0gy6q1d7.js";import"./vm-hands-entry-lite-ewp26q5v.js";import"./vm-hands-entry-lite-b233mfa6.js";import"./vm-hands-entry-lite-jyvmw8b7.js";import"./vm-hands-entry-lite-44qha2rt.js";import"./vm-hands-entry-lite-8qvsnkvv.js";import"./vm-hands-entry-lite-wrvz9jxy.js";import"./vm-hands-entry-lite-5zdybh8s.js";import"./vm-hands-entry-lite-r3yp6cr9.js";import"./vm-hands-entry-lite-cgqns1tf.js";import"./vm-hands-entry-lite-s1t43cbb.js";import"./vm-hands-entry-lite-w60rs3pg.js";import"./vm-hands-entry-lite-abfb6nms.js";import"./vm-hands-entry-lite-k83rkcys.js";import"./vm-hands-entry-lite-fcvf8md1.js";import"./vm-hands-entry-lite-cf1x5cbr.js";import"./vm-hands-entry-lite-3krzmhkk.js";import"./vm-hands-entry-lite-b8yapqfn.js";import"./vm-hands-entry-lite-7ja63pfz.js";import{r}from"./vm-hands-entry-lite-qy9xg6em.js";import"./vm-hands-entry-lite-vdhgwmmp.js";import"./vm-hands-entry-lite-rfz60hb3.js";export{r as LocalCapabilityError,Go as SHORT_REQUEST_CAPABILITIES,ks as capabilityInventoryForRoots,Fi as confinedExecutionShell,Ko as defaultLocalCommandRunner,Cs as deliverLocalHandsEnvironment,Xo as enrolledRootPaths,Ps as executeLocalOperation,As as rebindLocalHandsControl,Jo as runFileCapability,Zo as runTransferCapability,pn as spawnCaptured};
|
package/bin/vm-hands/{local-display-session-avdg9bkp.js → local-display-session-e8wmqfjb.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{$t,Ls,G,qe,Bt}from"./vm-hands-entry-lite-
|
|
2
|
+
import{$t,Ls,G,qe,Bt}from"./vm-hands-entry-lite-0gy6q1d7.js";import"./vm-hands-entry-lite-ewp26q5v.js";import"./vm-hands-entry-lite-b233mfa6.js";import"./vm-hands-entry-lite-jyvmw8b7.js";import"./vm-hands-entry-lite-44qha2rt.js";import"./vm-hands-entry-lite-8qvsnkvv.js";import"./vm-hands-entry-lite-wrvz9jxy.js";import"./vm-hands-entry-lite-5zdybh8s.js";import"./vm-hands-entry-lite-r3yp6cr9.js";import"./vm-hands-entry-lite-s1t43cbb.js";import"./vm-hands-entry-lite-w60rs3pg.js";import"./vm-hands-entry-lite-k83rkcys.js";import"./vm-hands-entry-lite-fcvf8md1.js";import"./vm-hands-entry-lite-cf1x5cbr.js";import"./vm-hands-entry-lite-3krzmhkk.js";import"./vm-hands-entry-lite-7ja63pfz.js";import"./vm-hands-entry-lite-vdhgwmmp.js";import"./vm-hands-entry-lite-rfz60hb3.js";export{qe as ensureLinuxDesktop,$t as localDisplayAvailable,Ls as localDisplayReady,G as privateDirectory,Bt as runLocalDisplayStream};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{On,In,Dn,Nn,Pr}from"./vm-hands-entry-lite-ewp26q5v.js";import"./vm-hands-entry-lite-b233mfa6.js";import"./vm-hands-entry-lite-jyvmw8b7.js";import"./vm-hands-entry-lite-r3yp6cr9.js";import"./vm-hands-entry-lite-s1t43cbb.js";import"./vm-hands-entry-lite-w60rs3pg.js";import"./vm-hands-entry-lite-cf1x5cbr.js";import"./vm-hands-entry-lite-3krzmhkk.js";export{On as MAC_SCREEN,In as WINDOWS_SCREEN,Dn as createDisplayVideoLane,Pr as localDisplayVideoAvailable,Nn as simulatorVideoFfmpeg};
|
package/bin/vm-hands/{local-managed-process-zvm6srg5.js → local-managed-process-k94nbtdk.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{nt,dr,Ts,Rs}from"./vm-hands-entry-lite-
|
|
2
|
+
import{nt,dr,Ts,Rs}from"./vm-hands-entry-lite-ae58xq6a.js";import"./vm-hands-entry-lite-gxj550g3.js";import"./vm-hands-entry-lite-hzh8fdxx.js";import"./vm-hands-entry-lite-kz48x6p0.js";import"./vm-hands-entry-lite-h6rhk6h1.js";import"./vm-hands-entry-lite-52x189kf.js";import"./vm-hands-entry-lite-8qvsnkvv.js";import"./vm-hands-entry-lite-wrvz9jxy.js";import"./vm-hands-entry-lite-5zdybh8s.js";import"./vm-hands-entry-lite-r3yp6cr9.js";import"./vm-hands-entry-lite-k83rkcys.js";import"./vm-hands-entry-lite-fcvf8md1.js";import"./vm-hands-entry-lite-cf1x5cbr.js";import"./vm-hands-entry-lite-3krzmhkk.js";import"./vm-hands-entry-lite-b8yapqfn.js";import"./vm-hands-entry-lite-7ja63pfz.js";import"./vm-hands-entry-lite-vdhgwmmp.js";import"./vm-hands-entry-lite-rfz60hb3.js";export{nt as ManagedProcessStoppedError,Ts as controlManagedDeviceProcess,Rs as retireManagedDeviceProcess,dr as runManagedDeviceProcess};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{_s,ys,bs,vs,Ss,Es,xs}from"./vm-hands-entry-lite-
|
|
2
|
+
import{_s,ys,bs,vs,Ss,Es,xs}from"./vm-hands-entry-lite-zs3bfc16.js";import"./vm-hands-entry-lite-52x189kf.js";import"./vm-hands-entry-lite-s1t43cbb.js";import"./vm-hands-entry-lite-w60rs3pg.js";import"./vm-hands-entry-lite-fcvf8md1.js";import"./vm-hands-entry-lite-cf1x5cbr.js";import"./vm-hands-entry-lite-3krzmhkk.js";import"./vm-hands-entry-lite-vdhgwmmp.js";import"./vm-hands-entry-lite-rfz60hb3.js";export{Ss as acquireManagedRuntimeDirectoryLock,bs as currentManagedRuntimeVersion,xs as flushManagedRuntimeLifecycleEvents,vs as isManagedRuntimeVersionExecutable,ys as legacyManagedRuntimePaths,_s as managedRuntimePaths,Es as recordManagedRuntimeLifecycle};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Qo,es,Ms,$s}from"./vm-hands-entry-lite-
|
|
2
|
+
import{Qo,es,Ms,$s}from"./vm-hands-entry-lite-b233mfa6.js";import"./vm-hands-entry-lite-jyvmw8b7.js";import"./vm-hands-entry-lite-s1t43cbb.js";import"./vm-hands-entry-lite-w60rs3pg.js";import"./vm-hands-entry-lite-cf1x5cbr.js";import"./vm-hands-entry-lite-3krzmhkk.js";export{$s as allowMacPermissions,Ms as permissionsSummary,es as readMacPermissions,Qo as reasonIdentity};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{qr,xe,J,Kn,Fs,ko,js,Ye,rs,Jn,Us,Hs,Wr,zs,qs}from"./vm-hands-entry-lite-
|
|
2
|
+
import{qr,xe,J,Kn,Fs,ko,js,Ye,rs,Jn,Us,Hs,Wr,zs,qs}from"./vm-hands-entry-lite-cgqns1tf.js";import"./vm-hands-entry-lite-s1t43cbb.js";import"./vm-hands-entry-lite-w60rs3pg.js";import"./vm-hands-entry-lite-abfb6nms.js";import"./vm-hands-entry-lite-k83rkcys.js";import"./vm-hands-entry-lite-fcvf8md1.js";import"./vm-hands-entry-lite-cf1x5cbr.js";import"./vm-hands-entry-lite-3krzmhkk.js";import"./vm-hands-entry-lite-vdhgwmmp.js";import"./vm-hands-entry-lite-rfz60hb3.js";export{qr as WORKER_SERVICE_ENV,J as WorkerServiceError,ko as connectServiceLabel,xe as defaultWorkerServiceHost,Hs as installWorkerService,Ye as installedWorkerService,js as isConnectServiceLabel,qs as removeWorkerService,Wr as restartWorkerService,zs as retargetWorkerServiceLogs,rs as retireLegacyWorkerService,Us as workerServiceDefinitionCurrent,Kn as workerServiceLauncher,Jn as workerServiceProcessRunning,Fs as workerServiceRetargetPending};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./vm-hands-entry-lite-
|
|
2
|
+
import"./vm-hands-entry-lite-xrcnj485.js";import"./vm-hands-entry-lite-fcvf8md1.js";import{_}from"./vm-hands-entry-lite-k83rkcys.js";import"./vm-hands-entry-lite-3krzmhkk.js";import"./vm-hands-entry-lite-b139fhbg.js";import"./vm-hands-entry-lite-rfz60hb3.js";import"./vm-hands-entry-lite-4p5p2rf4.js";import{Vt,dt}from"./vm-hands-entry-lite-8qvsnkvv.js";import{w,M,lr,Be,rt}from"./vm-hands-entry-lite-f9hf0m7b.js";import"./vm-hands-entry-lite-b8yapqfn.js";import"./vm-hands-entry-lite-0ga37680.js";import"./vm-hands-entry-lite-gxj550g3.js";import"./vm-hands-entry-lite-w60rs3pg.js";import"./vm-hands-entry-lite-hzh8fdxx.js";import"./vm-hands-entry-lite-1f0v3jb4.js";import"./vm-hands-entry-lite-03d1fhxv.js";import"./vm-hands-entry-lite-ewp26q5v.js";import"./vm-hands-entry-lite-jyvmw8b7.js";import"./vm-hands-entry-lite-s1t43cbb.js";import"./vm-hands-entry-lite-b233mfa6.js";import"./vm-hands-entry-lite-r3yp6cr9.js";import"./vm-hands-entry-lite-zs3bfc16.js";import"./vm-hands-entry-lite-abfb6nms.js";import"./vm-hands-entry-lite-cgqns1tf.js";import"./vm-hands-entry-lite-tn8v3yfj.js";import"./vm-hands-entry-lite-5zdybh8s.js";import"./vm-hands-entry-lite-kz48x6p0.js";import"./vm-hands-entry-lite-wrvz9jxy.js";import"./vm-hands-entry-lite-ae58xq6a.js";import"./vm-hands-entry-lite-7ja63pfz.js";import"./vm-hands-entry-lite-44qha2rt.js";import"./vm-hands-entry-lite-0gy6q1d7.js";import"./vm-hands-entry-lite-fdy317tt.js";import"./vm-hands-entry-lite-egax7vw4.js";import"./vm-hands-entry-lite-h6rhk6h1.js";import"./vm-hands-entry-lite-52x189kf.js";import{a}from"./vm-hands-entry-lite-cf1x5cbr.js";import{t,o,u,i,s,n}from"./vm-hands-entry-lite-5agyspqp.js";import"./vm-hands-entry-lite-vdhgwmmp.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 f(e){return`claude mcp add --transport http reason ${e}`}function h(e){return`codex mcp add reason --url ${e}
|
|
3
3
|
codex mcp login reason`}var F=f("https://mcp.reasonmachines.com/mcp"),z=h("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
4
|
|
|
5
5
|
Usage:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{ct,Lt,Cr,xn,Ar,kn,Cn,An}from"./vm-hands-entry-lite-tn8v3yfj.js";import{Pe,ir,ti,yt,Mo,oe,$o,Bo,et,Te,rn,ni,bt,ai,ci,li,ui,di,pi,hi,fi,mi,gi,_i,yi,wi,pe,Y,Re,q,bi,vi,Si,Ei,xi,ki,Ci,Ai,vt,Pi}from"./vm-hands-entry-lite-b8yapqfn.js";import{ue,Z,O}from"./vm-hands-entry-lite-3krzmhkk.js";import{P,Jt}from"./vm-hands-entry-lite-5zdybh8s.js";import{pr,Gi,Ki,it,Ji,Zi,Xi,Yi,Qi,eo,mr,gr,_r,gn,_n,yr,ro,yn,wr,me,ge,Rt,br,Sr,Ot}from"./vm-hands-entry-lite-
|
|
2
|
+
import{ct,Lt,Cr,xn,Ar,kn,Cn,An}from"./vm-hands-entry-lite-tn8v3yfj.js";import{Pe,ir,ti,yt,Mo,oe,$o,Bo,et,Te,rn,ni,bt,ai,ci,li,ui,di,pi,hi,fi,mi,gi,_i,yi,wi,pe,Y,Re,q,bi,vi,Si,Ei,xi,ki,Ci,Ai,vt,Pi}from"./vm-hands-entry-lite-b8yapqfn.js";import{ue,Z,O}from"./vm-hands-entry-lite-3krzmhkk.js";import{P,Jt}from"./vm-hands-entry-lite-5zdybh8s.js";import{pr,Gi,Ki,it,Ji,Zi,Xi,Yi,Qi,eo,mr,gr,_r,gn,_n,yr,ro,yn,wr,me,ge,Rt,br,Sr,Ot}from"./vm-hands-entry-lite-gxj550g3.js";import{D,R,b}from"./vm-hands-entry-lite-kz48x6p0.js";import{zi,qi,fn,Wi,mn,Vi,nt,dr}from"./vm-hands-entry-lite-ae58xq6a.js";import{K}from"./vm-hands-entry-lite-r3yp6cr9.js";import{He}from"./vm-hands-entry-lite-hzh8fdxx.js";import{j}from"./vm-hands-entry-lite-8qvsnkvv.js";import{ur,hn,Hi}from"./vm-hands-entry-lite-1f0v3jb4.js";import{fo,mo,lt,go,_o,yo,wo,bo}from"./vm-hands-entry-lite-jyvmw8b7.js";import{Or,qt,Ir,Fn,jn}from"./vm-hands-entry-lite-44qha2rt.js";import{$t,qe,Bt}from"./vm-hands-entry-lite-0gy6q1d7.js";import{Nn,x,uo}from"./vm-hands-entry-lite-ewp26q5v.js";import{po,ho}from"./vm-hands-entry-lite-b233mfa6.js";import{Mt,Pn,Tn}from"./vm-hands-entry-lite-fdy317tt.js";import{ye,oo,so}from"./vm-hands-entry-lite-h6rhk6h1.js";import{be}from"./vm-hands-entry-lite-yretc2th.js";import{Nt}from"./vm-hands-entry-lite-np07qyeq.js";import{ve,jt,Ut,Ht,E}from"./vm-hands-entry-lite-txd50spx.js";import{a,ie}from"./vm-hands-entry-lite-cf1x5cbr.js";import{t,k,o,d,u,i,W,g,ee,s,n,Uo}from"./vm-hands-entry-lite-5agyspqp.js";import{r}from"./vm-hands-entry-lite-qy9xg6em.js";import{fe,Ne,Le,Me,sn}from"./vm-hands-entry-lite-vdhgwmmp.js";import{$e}from"./vm-hands-entry-lite-mcjca0ez.js";import{request as kl}from"http";import{request as Tl}from"https";import{lookup as Dl}from"dns/promises";import{isIP as Nl}from"net";async function Ml(e){let l=new URL(e.url);return await new Promise((c,p)=>{let m=(l.protocol==="https:"?Tl:kl)(l,{method:"POST",headers:{...e.headers,"accept-encoding":"identity"},signal:e.signal,timeout:xn},(f)=>c({response:f,close:()=>{f.destroy(),m.destroy(),f.socket?.destroy()}}));m.once("error",p),m.once("timeout",()=>m.destroy(Object.assign(Error("custom_endpoint_timeout"),{code:"ETIMEDOUT"}))),m.end(e.body)})}var ji=new Set(["ENOTFOUND","EAI_AGAIN","EAI_NONAME","EAI_NODATA","EAI_FAIL","DNSException"]),$l=new Set(["ECONNREFUSED","ETIMEDOUT","ECONNRESET","EHOSTUNREACH","ENETUNREACH","EHOSTDOWN","ENETDOWN","EPIPE","ECONNABORTED","EADDRNOTAVAIL","ConnectionRefused","ConnectionClosed","ConnectionTimedOut","Timeout"]);function es(e,l=0){if(!e||typeof e!=="object"||l>3)return null;let c=e.code;if(typeof c==="string"){if(ji.has(c))return"custom_endpoint_host_not_found";if($l.has(c))return"custom_endpoint_connection_failed";if(/^(?:ERR_TLS_|ERR_SSL_|CERT_|UNABLE_TO_(?:GET|VERIFY|DECRYPT)|DEPTH_ZERO_SELF_SIGNED|SELF_SIGNED_CERT|HOSTNAME_MISMATCH|EPROTO$)/.test(c))return"custom_endpoint_tls_failed"}for(let p of[...e instanceof AggregateError?e.errors:[],e.cause]){let m=es(p,l+1);if(m)return m}return null}async function Bl(e,l){let c=es(e),p=new URL(l).hostname.replace(/^\[|\]$/g,"");if(c!==null&&c!=="custom_endpoint_connection_failed"||Nl(p)!==0)return c;let m;return await Promise.race([Dl(p).then(()=>!0,(h)=>!ji.has(String(h?.code))),new Promise((h)=>{m=setTimeout(()=>h(!0),5000)})]).finally(()=>clearTimeout(m))?c:"custom_endpoint_host_not_found"}function Fl(e){for(let l=42;;l++){if(l===127)l=256;let c=String.fromCodePoint(l);if(!e.includes(c))return c}}function Ul(e,l){let c=Buffer.from(e),p=Buffer.from(l),m=new Uint32Array(c.length);for(let h=1,y=0;h<c.length;h++){while(y&&c[h]!==c[y])y=m[y-1];if(c[h]===c[y])y++;m[h]=y}let f=0;return(h,y=!1)=>{let S=Buffer.allocUnsafe(h.length*p.length+f),w=0;for(let _ of h){while(f&&c[f]!==_){let v=m[f-1];w+=c.copy(S,w,0,f-v),f=v}if(c[f]===_){if(f++,f===c.length)w+=p.copy(S,w),f=0}else S[w++]=_}if(y)w+=c.copy(S,w,0,f),f=0;return S.subarray(0,w)}}async function ts(e){e.signal.throwIfAborted();let l=kn.safeParse(e.payload);if(!l.success)throw new r("custom_endpoint_invalid_request","Invalid local model request.");let c=l.data,p=Cn.parse(await e.credential(e.signal));if(!Ar(c,{baseUrl:c.baseUrl,api:p.api,execution:"device"}))throw new r("custom_endpoint_invalid_request","The request does not match the configured API.");e.signal.throwIfAborted();let m,f,h=0,y=0,S=0,w=Fl(p.apiKey),_=Ul(p.apiKey,w),v=async(I,A)=>{e.signal.throwIfAborted(),await new Promise((M,N)=>{let L=()=>{e.signal.removeEventListener("abort",L),N(e.signal.reason)};if(e.signal.addEventListener("abort",L,{once:!0}),e.signal.aborted){L();return}Promise.resolve().then(()=>(e.signal.throwIfAborted(),e.emit(I,A))).then(()=>{e.signal.removeEventListener("abort",L),M()},(B)=>{e.signal.removeEventListener("abort",L),N(B)})})},C=async(I)=>{if(h+=I.length,h>Lt)throw new r("custom_endpoint_response_too_large","Local model response exceeds the transport limit.");for(let A=0;A<I.length;A+=ct){if(S>=Cr)throw new r("custom_endpoint_response_too_large","Local model response exceeds the chunk limit.");await v(`custom_endpoint.chunk.${S++}`,{eof:!1,data:I.subarray(A,A+ct).toString("base64")})}};try{let I=await Ml({url:c.url,body:c.body,signal:e.signal,headers:{...c.headers,...p.api==="anthropic-messages"?{"x-api-key":p.apiKey}:{authorization:`Bearer ${p.apiKey}`}}});m=I.response,f=I.close;let A=m.statusCode??500;if(A>=300&&A<400)throw new r("custom_endpoint_redirect_refused","Local model redirects are not followed.");if(m.headers["content-encoding"]&&m.headers["content-encoding"]!=="identity")throw new r("custom_endpoint_encoding_unsupported","The local server must honor identity encoding.");let M={};for(let N of["content-type","retry-after","x-request-id","request-id"]){let L=m.headers[N];if(typeof L==="string")M[N]=L.replaceAll(p.apiKey,w).slice(0,4096)}await v("custom_endpoint.headers",{status:A,statusText:(m.statusMessage??"").replaceAll(p.apiKey,w).slice(0,256),headers:M});for await(let N of m){e.signal.throwIfAborted();let L=Buffer.isBuffer(N)?N:Buffer.from(N);if(y+=L.length,y>Lt)throw new r("custom_endpoint_response_too_large","Local model response exceeds the transport limit.");await C(_(L))}return await C(_(Buffer.alloc(0),!0)),await v(`custom_endpoint.chunk.${S}`,{eof:!0}),{bytes:h,chunks:S}}catch(I){if(e.signal.throwIfAborted(),I instanceof r)throw I;throw new r((m?null:await Bl(I,c.url))??"custom_endpoint_request_failed","The local model server could not complete the request.")}finally{f?.()}}import{join as rs}from"path";function Hl(e,l){return e===rs(l,".ara","workspace")||e===rs(l,".reason","workspace")}function ns(e,l){let c=e.filter((p)=>Hl(p.path,l));return c.length===1?c[0].path:null}var jl=/^[a-f0-9]{64}$/;var nn=32,ql=/^\/[^\x00-\x1f\x7f\\]*$/;function xr(e){if(typeof e!=="string"||e.length>4096||!ql.test(e))return!1;if(e==="/")return!0;return e.split("/").slice(1).every((l)=>l!==""&&l!=="."&&l!=="..")}function Er(e,l){let c=l==="win32"?/^([A-Za-z]):[\\/]*(.*)$/.exec(e):null;if(!c)return e;let p=c[2].split(/[\\/]+/).filter(Boolean).join("/");return`/${c[1].toUpperCase()}:${p?`/${p}`:""}`}function on(e){if(!e||typeof e!=="object"||Array.isArray(e))return;let l=e;if(!xr(l.home)||!Array.isArray(l.roots)||l.roots.length>nn)return;let c=[];for(let p of l.roots){if(!p||typeof p!=="object"||Array.isArray(p))return;let{path_fingerprint:m,path:f}=p;if(typeof m!=="string"||!jl.test(m)||!xr(f))return;c.push({path_fingerprint:m,path:f})}return{home:l.home,roots:c}}function Wl(e){let l=/^Reason contributor (rc_[0-9a-f]{32})$/.exec(e.name)?.[1];return e.email.toLowerCase()==="343777287+reason-contributors@users.noreply.github.com"&&l?l:void 0}function zl(e){return Wl(e)??e.email.toLowerCase()}function an(e){let l=/^Co-authored-by:\s*([^<>\r\n]+) <([^<>\s]+)>$/i.exec(e.trim());return l?zl({name:l[1],email:l[2]}):e.trim().toLowerCase()}var zt=(e)=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/[a-z]/gi,(l)=>`[${l.toLowerCase()}${l.toUpperCase()}]`),Gl=[...ve.map((e)=>`/(${e.map(zt).join("/")})(/|$)`),...jt.map((e)=>`/(${e.map(zt).join("/")})(/|$)`),...[...Ut].map((e)=>`/(${zt(e)})$`),`/${zt(".env.")}[^/]*$`,...Ht.map((e)=>`/[^/]*${zt(e)}$`)],os=`function localGithubSandboxProfile(root, temporary) {
|
|
3
3
|
return ['(version 1)','(deny default)','(import "system.sb")','(allow process-exec process-fork)',
|
|
4
4
|
'(allow file-read* (subpath "/bin") (subpath "/sbin") (subpath "/usr/bin") (subpath "/usr/sbin") (subpath "/usr/libexec") (subpath "/usr/share") (subpath "/private/var/select") (literal "/private/var/db/xcode_select_link"))',
|
|
5
5
|
'(allow file-read-metadata (path-ancestors "/opt/homebrew/bin") (path-ancestors "/usr/local/bin") (path-ancestors "/Library/Developer/CommandLineTools"))',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ln,vo,zt}from"./vm-hands-entry-lite-jyvmw8b7.js";import{Rn,Ve,lo,On,In,Dn,Pr,x}from"./vm-hands-entry-lite-
|
|
2
|
+
import{Ln,vo,zt}from"./vm-hands-entry-lite-jyvmw8b7.js";import{Rn,Ve,lo,On,In,Dn,Pr,x}from"./vm-hands-entry-lite-ewp26q5v.js";import{xt}from"./vm-hands-entry-lite-7ja63pfz.js";import{Dr}from"./vm-hands-entry-lite-44qha2rt.js";import{j}from"./vm-hands-entry-lite-8qvsnkvv.js";import{a}from"./vm-hands-entry-lite-cf1x5cbr.js";import{r}from"./vm-hands-entry-lite-qy9xg6em.js";import{execFile as z,spawn as H}from"child_process";import{randomBytes as Qe}from"crypto";import{chmodSync as De,existsSync as I,lstatSync as _e,mkdirSync as we,readFileSync as Re,rmSync as ee,writeFileSync as g}from"fs";import{connect as de}from"net";import{join as y}from"path";var S=32,w=76;var B="./desktop-wallpaper-0pjhgyfk.jpg";var O="./dock-browser-afp005mt.png";var F="./dock-files-rywdm96b.png";var k="./dock-terminal-s41cj1jp.png";var K=`# Sets the X root window background and _XROOTPMAP_ID, as feh --bg-fill does.
|
|
3
3
|
# The native Blaxel image ships no feh, hsetroot or compositor, but it does ship
|
|
4
4
|
# python3-gi and libX11. tint2 reads _XROOTPMAP_ID to draw its transparent panel.
|
|
5
5
|
# Usage: DISPLAY=:99 python3 set-root-wallpaper.py IMAGE
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Pt,I}from"./vm-hands-entry-lite-
|
|
2
|
+
import{Pt,I}from"./vm-hands-entry-lite-xrcnj485.js";import{T}from"./vm-hands-entry-lite-fcvf8md1.js";import{_,er}from"./vm-hands-entry-lite-k83rkcys.js";import{be}from"./vm-hands-entry-lite-yretc2th.js";function Mi(e,i){let r=T(e,"REASON_API_URL")?.trim();if(!r)return er(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 T(e,"REASON_API_URL")?.trim()?Mi(e,"production"):void 0}function qo(e){return T(e,"REASON_API_KEY")?.trim()||void 0}async function Wo(e,i){let r=e.env??process.env,t=qo(r);if(!t)return(e.getCredentials??Pt)({apiOrigin:l(r),signal:i});let a=Mi(r,e.channel??_({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=be(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 I(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 ms(e){let i=await Wo(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
3
|
export{Mi,qo,Wo,ms};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{H}from"./vm-hands-entry-lite-3krzmhkk.js";import{D,R,b}from"./vm-hands-entry-lite-kz48x6p0.js";import{je,hr,fr,wn,bn,ot}from"./vm-hands-entry-lite-
|
|
2
|
+
import{H}from"./vm-hands-entry-lite-3krzmhkk.js";import{D,R,b}from"./vm-hands-entry-lite-kz48x6p0.js";import{je,hr,fr,wn,bn,ot}from"./vm-hands-entry-lite-gxj550g3.js";import{Lr}from"./vm-hands-entry-lite-8qvsnkvv.js";import{p,at,En,_e,we}from"./vm-hands-entry-lite-h6rhk6h1.js";import{v,h}from"./vm-hands-entry-lite-52x189kf.js";import{a,tr,No}from"./vm-hands-entry-lite-cf1x5cbr.js";import{nn,y,t,k,o,d,is,Oe,Ii,u,i,W,g,ee,s,n,on}from"./vm-hands-entry-lite-5agyspqp.js";import{r}from"./vm-hands-entry-lite-qy9xg6em.js";import{se,A}from"./vm-hands-entry-lite-vdhgwmmp.js";import{randomUUID as Q}from"crypto";import{spawn as Le}from"child_process";import{existsSync as Z,lstatSync as me,mkdirSync as We,readFileSync as Ne,realpathSync as G,rmSync as Ve,writeFileSync as He}from"fs";import{dirname as Ue,join as j,relative as qe,sep as Je}from"path";var Se=["process.run.v1","process.full.v1"],xe=600000,Pe=1800000,Ee=20000,ne="process.cancel.v1",ie=i({action:n("start"),request_id:t().uuid(),command:t().min(1).max(16000).refine((e)=>!e.includes("\x00")),cwd:t().min(1).max(4096).refine((e)=>!e.includes("\x00")&&!e.startsWith("/")&&!e.split(/[\\/]/).includes("..")).describe("Path relative to the granted device root; omit to use that root. Must not start with /, contain a .. path segment, or contain a NUL character.").optional(),mode:s(["host","confined"]).default("host"),timeout_ms:o().int().min(1000).max(Pe).default(xe).describe("Absolute process budget including queue and startup time. Defaults to ten minutes; longer explicit requests require the selected root's advertised max_timeout_ms. Retrying never renews the deadline.")}).strict(),K={device_id:t().uuid(),root_id:t().uuid()},Re=g("action",[ie.extend(K),i({...K,action:n("inspect"),process_id:t().uuid(),after:o().int().min(0).default(0),wait_ms:o().int().min(0).max(Ee).default(0).describe("Wait for new output or a state change, bounded by this call's wait budget. Expiring this wait does not cancel the process or extend its deadline.")}).strict(),i({...K,action:n("cancel"),process_id:t().uuid()}).strict()]),Fe=nn(Re,{io:"input"}),Ke=ie.extend({process_brain_fence:t().uuid(),process_expires_at:y.datetime()}).strict(),J=i({version:n(1),process_id:t().uuid(),state:s(["starting","running","exited","cancelled","expired","uncertain"]),exit_code:o().int().nullable(),first_cursor:o().int().min(0),next_cursor:o().int().min(0),truncated:d(),observed_at:y.datetime(),output:u(i({cursor:o().int().min(1),stream:s(["stdout","stderr"]),text:t().max(32768)}).strict()).max(128)}).strict().refine((e)=>{if(Buffer.byteLength(JSON.stringify(e))>1e5||e.next_cursor<e.first_cursor-1)return!1;if((e.state==="starting"||e.state==="running"||e.state==="uncertain")&&e.exit_code!==null)return!1;if(e.state==="exited"&&(e.exit_code===null||e.exit_code<0||e.exit_code>255))return!1;if(e.state==="cancelled"&&e.exit_code!==130||e.state==="expired"&&e.exit_code!==124)return!1;let _=e.first_cursor-1;for(let l of e.output){if(l.cursor<=_||l.cursor>e.next_cursor)return!1;_=l.cursor}return!0});function ae(e){return Se.includes(e)}var Xe=i({operation_constraints:ee(t(),Oe())}),Ye=i({ready:n(!0),version:n(1),execution_mode:s(["host","confined"]),max_timeout_ms:o().int().min(1000).optional()});var Ie=i({version:n(1),process_id:t().uuid(),state:s(["queued","cancelled_before_start","not_started"]),exit_code:is(),output:u(Ii()).length(0),first_cursor:n(0),next_cursor:n(0),truncated:n(!1),cancellation_requested:n(!1),reason_code:s(["cancelled_before_start","process_journal_capacity","path_not_found","process_timeout_unsupported"]).optional(),expires_at:y.datetime().optional().describe("Accepted absolute process deadline. Reading, waiting and retrying do not extend it.")}).strict(),De=i({...J.shape,state:s(["queued","starting","running","exited","cancelled","expired","uncertain","cancelled_before_start","not_started"]),observed_at:y.datetime().optional(),expires_at:y.datetime().optional().describe("Accepted absolute process deadline. Reading, waiting and retrying do not extend it."),cancellation_requested:d(),reason_code:t().nullable().optional(),execution_authority:n("lost").optional().describe("Historical receipt only; the current Brain cannot control this older-generation process."),recovery:i({cause:n("brain_generation_changed"),terminal_confirmed:d(),next_step:s(["inspect_until_terminal","reconcile_effects_before_new_intent"])}).strict().optional().describe("Historical process recovery only. An unconfirmed outcome forbids replay. A confirmed terminal observation proves the old process stopped, not that its command had no effects. Reconcile the result; only restart still-needed, safely repeatable work with a new request_id and current authority. Respect user cancellation."),last_observed_state:J.shape.state.or(n("cancelled_before_start")).nullable().optional().describe("Last saved observation before authority was lost; a running observation does not establish current child liveness.")}).strict(),$e=nn(De),Qe=W([J,Ie.refine((e)=>e.state==="cancelled_before_start")]),X=i({version:n(1),process_id:t().uuid(),state:s(["exited","cancelled","expired"]),exit_code:o().int().min(0).max(255),observed_at:y.datetime()}).strict().refine((e)=>(e.state!=="cancelled"||e.exit_code===130)&&(e.state!=="expired"||e.exit_code===124)),Ze=i({process_terminal_observation:X}).strict();var zi="preview.serve.v1",qi=43200000;var ce="preview.open.v1",de=1,fn="gid_proxy_v1",Wi="egress",mn=/^(?:\*\.)?[a-z0-9](?:[a-z0-9.-]{0,251}[a-z0-9])?(?::[1-9][0-9]{0,4})?$/,Ce=i({version:n(fn),allowed_domains:u(t().max(260).regex(mn)).max(1024)}).strict(),Ae=on((e)=>H(e)!==null,"invalid workspace"),ke=i({version:n(1),request_id:k(),session_id:k(),command:t().min(1).max(16000).refine((e)=>!e.includes("\x00")),port:o().int().min(1024).max(65535),workspace:Ae,egress:Ce.optional()}).strict(),Vi=ke.extend({expires_at:y.datetime()}).strict();var Me=4,Te=5000;function Y(e,c,_){let l=null;try{l=at(e)}catch{}En({deviceRelayUrl:l?.deviceRelayUrl??"",binding:l?.binding??null,jobId:c,port:l?.binding.port??0,reason:l?_:"binding_invalid"})}function le(e){let c=new Map;return{open(_){let l=(x)=>Y(_,e.claim.operation_id,x),C;try{C=at(_)}catch{return l("binding_invalid")}let{binding:w,deviceRelayUrl:z}=C,E=e.claim.owner;if(!E||w.organizationId!==E.organization_id||w.userId!==E.user_id||w.deviceId!==E.device_id||w.rootId!==e.claim.root_id||w.jobId!==e.claim.operation_id||w.fenceId!==e.claim.operation_id||w.generation!==de||w.expiresAtMs>Math.min(Date.now()+p.lifetimeMs+Te,e.expiresAtMs))return l("binding_mismatch");if(w.expiresAtMs<=Date.now())return l("binding_expired");if(c.get(w.port)?.abort(),c.delete(w.port),c.size>=Me)return l("preview_capacity");let L=new AbortController;c.set(w.port,L);let P=we({binding:w,deniedPorts:e.deniedPorts,readCurrentJob:async()=>{if(L.signal.aborted)return null;let x=await e.inspect();return x?{binding:w,executorLaunchId:e.executorLaunchId,job:x}:null}});_e({binding:w,deviceRelayUrl:z,port:P,signal:L.signal}).then((x)=>x.closed,(x)=>{let I=x instanceof Error?x.message:"preview_failed";if(I!=="preview_not_authorized")process.stderr.write(`${JSON.stringify({event:"worker_preview.open_failed",job_id:w.jobId,port:w.port,reason_code:I})}
|
|
3
3
|
`)}).finally(()=>{if(c.get(w.port)===L)c.delete(w.port)})},dispose(){for(let _ of c.values())_.abort();c.clear()}}}class nt extends r{observation;constructor(e){super("process_authority_lost","Process authority was lost; the owned process group has stopped.");this.observation=e}}var fe=256,B=new Map,he="preview.serve.v1",V=new Map;function be(e){let c=V.get(e.operation_id);if(c){if(c.claim!==e)throw M("process_authority_lost");return c}if(V.size>=fe)throw M("process_journal_capacity");let _={claim:e,executing:!1,cancelRequested:!1,phase:"pending"};return V.set(e.operation_id,_),_}function pe(e){return{version:1,process_id:e,state:"cancelled_before_start",exit_code:null,output:[],first_cursor:0,next_cursor:0,truncated:!1,cancellation_requested:!1,reason_code:"cancelled_before_start"}}var ue=(e)=>new Promise((c)=>setTimeout(c,e)),M=(e="process_outcome_uncertain")=>new r(e,"The managed process outcome could not be confirmed; inspect its saved receipt before starting another intent.");function ze(e=a(),c=Ge()){let _=Ue(Lr({},e)),l=qe(tr(e),_),[C,...w]=l.split(Je);return{directory:j(c,l,"processes"),previous:[j(_,"processes"),...C==="reason"?[j(c,"ara",...w,"processes")]:[]]}}function Ge(){if(process.platform!=="darwin")throw new r("process_unavailable","Managed Mac process execution is unavailable.");let e=No();if(!e)throw new r("process_unavailable","The private per-user process directory is unavailable.");return e}async function dr(e){if(!e.claim.owner||e.signal.aborted||e.expiresAtMs<=Date.now())throw M("process_authority_lost");let c=be(e.claim);if(c.executing)throw M("process_busy");if(c.executing=!0,c.cancelRequested)return c.phase="settling",pe(e.claim.operation_id);c.phase="starting";let _=e.journals??ze();We(_.directory,{recursive:!0,mode:448});let l=hr({runtimeDirectory:G(_.directory),previousRuntimeDirectories:(_.previous??[]).filter((m)=>Z(m)).map((m)=>G(m)),root:e.root,runId:JSON.stringify([e.claim.owner,e.claim.run_id,e.claim.root_id,e.claim.operation_id]),maxScopes:fe});try{for(let m of[e.root,e.cwd])if(!je(G(m),l.journalDirectory))throw new r("process_journal_inside_workspace","The selected root contains the private process journal. Select an existing narrower granted workspace root outside the journal; no command was dispatched.")}catch(m){throw l.disposeSocket(),m}let C=me(l.journalDirectory),w=e.claim.capability===he,z=()=>B.set(e.claim.operation_id,{path:l.journalDirectory,ino:C.ino,dev:C.dev,anyCompletion:w}),E=l.launchDirectory,L=j(E,"config.json"),P={url:"",transport:"local_job_ipc",directShell:{mode:e.mode,executable:e.shell,jobId:e.claim.operation_id},workerVersion:D,protocolVersion:2,workerArtifactSha256:b,workerEntrypoint:R,targetGeneration:1,fenceId:Q(),...process.platform==="win32"?{bashExecutable:se()}:{},workRoot:e.root,workspaceAliasPath:e.root,repoPath:e.cwd,jobEnvPath:j(E,"unused.env"),replSocketPath:j(E,"unused.sock"),readyPath:j(E,"ready.json"),directTerminalReceiptPath:j(E,"terminal.json"),launchId:Q(),expiresAtMs:e.expiresAtMs+5000,bashTimeoutMs:60000,replTimeoutMs:1000,allowedTools:["bash"],managedJobs:{journalDirectory:l.journalDirectory,scopeId:l.scopeId},jobControlSocketPath:l.socketPath,...e.prefix?{bashCommandPrefix:e.prefix}:{},...e.jobsUser?{jobsUser:e.jobsUser}:{}},x;try{He(L,JSON.stringify(P),{mode:384});let m=wn({configPath:L,root:e.cwd,grantedRoot:e.root,workRoot:e.root,temporaryDirectory:E});x=e.spawnWorker?.(L,P)??Le(m.command,m.args,{...m.options,env:e.environment,stdio:[bn,"ignore","ignore"]})}catch(m){throw l.disposeSocket(),m}let I=!1,F=new Promise((m,S)=>{x.once("exit",(f)=>{I=!0,m(f)}),x.once("error",(f)=>{I=!0,S(f)})});F.catch(()=>{});let ge={root:e.root,runId:e.claim.run_id,scopeId:l.scopeId,socketPath:l.socketPath,generation:1,fenceId:P.fenceId,executorLaunchId:P.launchId,expiresAtMs:P.expiresAtMs},N=async(m)=>{let S=await fr(ge,{type:"job",version:2,generation:1,id:Q(),jobId:e.claim.operation_id,...m==="start"?{action:m,input:{script:e.command,leaseExpiresAtMs:e.expiresAtMs}}:m==="inspect"?{action:m,input:{after:0}}:m==="probe"?{action:"inspect",input:{after:Number.MAX_SAFE_INTEGER}}:{action:m,input:{}}},new AbortController().signal);if(!S.ok)throw M(S.error);return S.job},U=!1,q=!1,te,re=()=>{U=!0,ot(x,"SIGTERM")};e.signal.addEventListener("abort",re,{once:!0});let T,oe=0,ve=async(m)=>{let S=[...m.output],f={version:1,process_id:e.claim.operation_id,state:m.state,exit_code:m.exitCode,first_cursor:m.firstCursor,next_cursor:m.nextCursor,truncated:m.truncated,output:S,observed_at:new Date().toISOString()};while(Buffer.byteLength(JSON.stringify(f))>90000&&S.length)S.shift(),f.truncated=!0,f.first_cursor=S[0]?.cursor??f.next_cursor+1;T=J.parse(f),await e.emit(T),oe=Date.now()};try{let m=Math.min(Date.now()+1e4,e.expiresAtMs);while(!Z(P.readyPath)){if(I)throw new r("process_start_failed","The managed process supervisor exited before accepting a command; no command was dispatched.");if(e.signal.aborted||Date.now()>=m)throw M("process_start_unconfirmed");await ue(25)}let S=JSON.parse(Ne(P.readyPath,"utf8"));if(S.launchId!==P.launchId||S.fenceId!==P.fenceId||S.workerArtifactSha256!==b)throw M();if(e.signal.throwIfAborted(),c.cancelRequested)return pe(e.claim.operation_id);let f;try{q=!0,f=await N("start")}catch(O){if(!(O instanceof r)||O.code!=="hands_job_result_unknown")throw O;f=await N("inspect")}if(c.phase="running",c.cancel=async()=>{await N("cancel")},w&&e.preview)c.tunnels=le({claim:e.claim,executorLaunchId:P.launchId,expiresAtMs:e.expiresAtMs,deniedPorts:e.preview.deniedPorts,inspect:async()=>c.phase==="running"&&!I?await N("probe"):null});if(c.cancelRequested)await c.cancel(),f=await N("inspect");for(;;){if(!["starting","running"].includes(f.state))c.phase="settling",c.cancel=void 0;if(!T||T.state!==f.state||T.next_cursor!==f.nextCursor&&Date.now()-oe>=5000)await ve(f);if(!["starting","running"].includes(f.state))break;if(e.signal.aborted||I)throw M();await ue(1000);try{f=await N("inspect"),te=void 0}catch(O){if(!(O instanceof r)||O.code!=="hands_job_result_unknown"||e.signal.aborted||I||Date.now()-(te??=Date.now())>120000)throw O}}if(!T||T.state==="uncertain")throw M();return T}finally{if(c.phase="settling",c.cancel=void 0,c.tunnels?.dispose(),c.tunnels=void 0,await c.cancelInFlight?.catch(()=>{}),e.signal.removeEventListener("abort",re),!I&&!U)ot(x,"SIGTERM");let m,S=await Promise.race([F.then((f)=>({code:f})),new Promise((f)=>{m=setTimeout(()=>f(null),6000)})]).finally(()=>{clearTimeout(m)});if(!S){try{ot(x,"SIGKILL")}catch{}try{await F}finally{if(I)l.disposeSocket()}throw M("process_cleanup_unconfirmed")}try{if((U||e.signal.aborted)&&S.code===0&&q){v(E);let f=JSON.parse(h(P.directTerminalReceiptPath)),O=X.safeParse(f.observation);if(Object.keys(f).length===4&&f.launch_id===P.launchId&&f.fence_id===P.fenceId&&f.scope_id===l.scopeId&&O.success&&O.data.process_id===e.claim.operation_id){if(w)z();throw new nt(O.data)}}}catch(f){if(f instanceof nt)throw f}finally{if(I)l.disposeSocket()}if(S.code!==0&&!U&&q)throw M("process_cleanup_unconfirmed");if(!U&&S.code===0&&(T&&["exited","cancelled","expired"].includes(T.state)||!q&&c.cancelRequested)||w&&S.code===0&&!q)z()}}async function Ts(e,c){if(c.kind===ce&&e.capability===he){let C=V.get(e.operation_id);if(C?.claim===e&&C.tunnels)C.tunnels.open(c.payload);else Y(c.payload,e.operation_id,"server_not_running");return!0}if(c.kind!==ne||!ae(e.capability)||!e.owner||c.payload.process_id!==e.operation_id)return!1;let _=V.get(e.operation_id);if(_&&_.claim!==e)return!1;let l=be(e);if(l.cancelRequested=!0,l.phase==="running"&&l.cancel)l.cancelInFlight??=l.cancel(),await l.cancelInFlight;return!0}function Rs(e,c){V.delete(e);let _=B.get(e);if(!_||c!=="succeeded"&&!_.anyCompletion)return B.delete(e),!1;try{let l=me(_.path);if(!l.isDirectory()||l.isSymbolicLink()||l.ino!==_.ino||l.dev!==_.dev||!A(l)||G(_.path)!==_.path||Z(j(_.path,"owner.lock")))return!1;return Ve(_.path,{recursive:!0}),B.delete(e),!0}catch{return!1}}
|
|
4
4
|
export{zi,qi,fn,Wi,mn,Vi,nt,dr,Ts,Rs};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ge,ut}from"./vm-hands-entry-lite-jyvmw8b7.js";import{mt}from"./vm-hands-entry-lite-
|
|
2
|
+
import{Ge,ut}from"./vm-hands-entry-lite-jyvmw8b7.js";import{mt}from"./vm-hands-entry-lite-w60rs3pg.js";import{Ao,le,Gr,ft,Po}from"./vm-hands-entry-lite-s1t43cbb.js";import{E}from"./vm-hands-entry-lite-txd50spx.js";import{a,tr}from"./vm-hands-entry-lite-cf1x5cbr.js";import{spawnSync as H}from"child_process";import{dirname as w}from"path";import{spawn as A}from"child_process";import{accessSync as _,constants as v}from"fs";import{basename as C,join as O}from"path";var l=null;function S(e){if(l===e)l=null;if(e.exitCode===null&&e.signalCode===null)e.kill("SIGTERM")}var Rr=(e,t)=>{if(l)S(l);let s=O(e,Ao);try{_(s,v.X_OK)}catch{return()=>{}}let n;try{n=A(s,["--app",e,"--name",C(e,".app"),"--permission",t==="screen"?"screen_recording":"accessibility"],{detached:!0,stdio:"ignore"})}catch{return()=>{}}return n.on("error",()=>{if(l===n)l=null}),n.once("exit",()=>{if(l===n)l=null}),n.unref(),l=n,()=>S(n)};import{chmodSync as ne,existsSync as se,mkdirSync as re,readFileSync as D,realpathSync as ie,renameSync as oe,statSync as j,writeFileSync as ae}from"fs";import{dirname as de,isAbsolute as G,join as N,resolve as T,sep as b}from"path";function F(e=a()){return N(tr(e),"reason","protected-path-grants.json")}var f=null;function L(e){let t=JSON.parse(e);if(!Array.isArray(t?.grants))return[];return t.grants.flatMap((s)=>{let n=s;return n&&typeof n.path==="string"&&G(n.path)&&(n.kind==="file"||n.kind==="folder")&&typeof n.grantedAt==="number"?[{path:n.path,kind:n.kind,grantedAt:n.grantedAt}]:[]})}function y(e=F()){try{let{mtimeMs:t}=j(e);if(f&&f.file===e&&f.mtimeMs===t)return f.grants;let s=L(D(e,"utf8"));return f={file:e,mtimeMs:t,grants:s},s}catch{return[]}}function W(e,t){return e.kind==="file"?t===e.path:t===e.path||t.startsWith(`${e.path}${b}`)}function U(e,t){let s=T(e);return y(t).some((n)=>W(n,s))}function po(e,t){return E(e)&&!U(e,t)}function ho(e,t,s){let n=t?"file-read* file-write*":"file-read*";return y(s).filter((r)=>r.path===e||r.path.startsWith(`${e}${b}`)).map((r)=>`(allow ${n} (${r.kind==="file"?"literal":"subpath"} ${JSON.stringify(r.path)}))`)}var P="x-apple.systempreferences:com.apple.preference.security",J="curl -fsSL https://reasonmachines.com/install.sh | bash",q=180000,B=2000;var k={screen:{label:"Screen & System Audio Recording",purpose:"desktop video, computer-use screenshots",level:"required",pane:`${P}?Privacy_ScreenCapture`},accessibility:{label:"Accessibility",purpose:"computer-use clicks and typing, desktop input",level:"required",pane:`${P}?Privacy_Accessibility`},disk:{label:"Full Disk Access",purpose:"Sessions in Desktop, Documents, Downloads, iCloud Drive and Mail",level:"recommended",pane:`${P}?Privacy_AllFiles`}};function R(e){return e.executable}function K(e,t){if(e==="computer_use_identity_missing")return`Reason's background identity is not installed (${e}); reinstall Reason: ${J}`;if(e==="computer_use_identity_outdated")return`Reason's background identity is outdated (${Gr(t)??"unknown"}; this CLI is ${mt}) (${e}); \`reason update\` installs this release's`;return`Reason's background identity cannot run computer use for this CLI (${e}); run the installed \`reason\``}function Qo(e=a()){let t=ft(e);if(t.length>0)return{state:"ready",path:w(w(w(t[0]))),prefix:t};let s=Po(t,e)??"computer_use_identity_unavailable";return{state:s,path:le(e),detail:K(s,e)}}function V(){return{identity:()=>Qo(),grants:(e)=>Ge(e),request:(e,t)=>ut(e,t),worker:async()=>(await import("./status-6mmtbhk8.js")).connectionMacState(),open:(e)=>{H("/usr/bin/open",e,{stdio:"ignore",timeout:1e4})},tile:Rr,restartConnection:async()=>(await import("./connect-cli-g0mxm7j0.js")).restartConnection(),sleep:(e)=>new Promise((t)=>setTimeout(t,e)),now:()=>Date.now()}}function M(e,t,s){if(e.state!=="ready"||!t)return"unknown";return t[s]?"granted":"missing"}async function es(e){let t=e.identity(),s=t.state==="ready"?await e.grants(t.prefix):null,n=await e.worker(),r=n?R(n):null,i=!r||n?.full_disk_access==="unknown"?"unknown":n?.full_disk_access==="granted"?"granted":"missing",c=(u,d,o)=>{let{label:p,purpose:h,level:m}=k[u];return{id:u,label:p,purpose:h,level:m,state:d,holder:o}};return{identity:{state:t.state,path:t.path,detail:t.state==="ready"?null:t.detail},worker_detail:r?null:"Full Disk Access is read from this computer's running worker; `reason connect` starts it.",permissions:[c("screen",M(t,s,"screen"),t.path),c("accessibility",M(t,s,"accessibility"),t.path),c("disk",i,r)]}}function Ms(e){let t=e.identity.state==="ready"?null:e.identity.state,s=e.permissions.filter((i)=>i.state==="granted").length,n=[...t?[t]:[],...e.permissions.filter((i)=>i.state!=="granted"&&!(t&&i.id!=="disk")).map((i)=>`${i.label} ${i.state}`)],r=!t&&e.permissions.some((i)=>i.state==="missing");return`Permissions: ${s} of ${e.permissions.length}${n.length>0?` (${n.join(", ")})`:""}`+(r?" \u2014 reason permissions allow":n.length>0?" \u2014 reason permissions":"")}async function x(e,t){let s=t.now()+q;for(;;){if(await e())return!0;if(t.now()>=s)return!1;await t.sleep(B)}}async function $s(e,t){let s=t.host??V(),{io:n}=t,r=await es(s),i=r.permissions.filter((o)=>e.includes(o.id)&&o.state!=="granted");if(i.length===0)return n.stdout.write(`Reason permissions: ${e.map((o)=>k[o].label).join(", ")} already allowed.
|
|
3
3
|
`),0;let c=!1,u=!1,d=s.identity();for(let o of i){let{label:p,pane:h}=k[o.id];if(o.id!=="disk"){if(d.state!=="ready"){if(!c)n.stderr.write(`Reason permissions: ${d.detail}
|
|
4
4
|
`);c=!0;continue}let g=o.id;await s.request(d.prefix,g),s.open([h]);let I=s.tile(d.path,g);if(n.stdout.write(`Allow Reason in System Settings > Privacy & Security > ${p}.
|
|
5
5
|
`),!t.wait)continue;if(n.stdout.write(`Waiting for it (Ctrl-C to stop)\u2026
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{T}from"./vm-hands-entry-lite-fcvf8md1.js";import{_}from"./vm-hands-entry-lite-k83rkcys.js";import{Kr,Yn,Jr,Qn}from"./vm-hands-entry-lite-abfb6nms.js";import{Zn,Yt,Ro}from"./vm-hands-entry-lite-
|
|
2
|
+
import{T}from"./vm-hands-entry-lite-fcvf8md1.js";import{_}from"./vm-hands-entry-lite-k83rkcys.js";import{Kr,Yn,Jr,Qn}from"./vm-hands-entry-lite-abfb6nms.js";import{Zn,Yt,Ro}from"./vm-hands-entry-lite-s1t43cbb.js";import{C}from"./vm-hands-entry-lite-vdhgwmmp.js";import{spawnSync as y}from"child_process";import{createHash as ke,randomUUID as Se}from"crypto";import{chmodSync as we,existsSync as P,mkdirSync as $e,readdirSync as Ve,readFileSync as p,renameSync as ye,rmSync as u,statSync as ve,writeFileSync as be}from"fs";import{dirname as We,isAbsolute as q,join as g}from"path";import{spawnSync as de}from"child_process";import{readFileSync as me}from"fs";import{userInfo as D}from"os";import{join as fe}from"path";var ge="REASON_SCHEDULED_TASK";function H(r){return fe(r,"AppData","Local","Reason","Tasks")}function S(r){if(/[\0-\x1f\x7f"%]/.test(r))throw Error(`A background task cannot use a value with a double quote, percent sign or control character: ${r}`);return`'${r.replace(/['\u2018\u2019\u201a\u201b]/g,"$&$&")}'`}function M(r){if(!/^[A-Za-z0-9._-]+$/.test(r))throw Error(`Invalid Windows Scheduled Task name: ${r}`);return`$env:${ge}=${S(r)};`}function K(r){let e=Object.entries(r.environment).map(([t,i])=>{if(!/^[A-Za-z_][A-Za-z0-9_]*$/.test(t))throw Error(`Invalid Windows Scheduled Task environment name: ${t}`);return`$env:${t}=${S(i)};`}),n=`$global:LASTEXITCODE=1; & ${[r.program,...r.args].map(S).join(" ")} 2>&1 | ForEach-Object { Add-Content -LiteralPath ${S(r.log)} -Value $_.ToString() -Encoding UTF8 }; $c=$LASTEXITCODE;`;return[M(r.name),...e,"$ErrorActionPreference='Continue';",r.keepAlive?`do { ${n} if ($c) { Start-Sleep -Seconds 10 } } while ($c)`:`${n} exit $c`].join(" ")}function A(r){return r.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}function pe(){let r=process.env.USERDOMAIN?.trim();return r?`${r}\\${D().username}`:D().username}function U(r){let e=A(r.user??pe()),n=r.schedule==="logon",t=r.schedule==="logon"?`<LogonTrigger><Enabled>true</Enabled><UserId>${e}</UserId></LogonTrigger>`:`<TimeTrigger><Repetition><Interval>PT${r.schedule.everyMinutes}M</Interval><StopAtDurationEnd>false</StopAtDurationEnd></Repetition><StartBoundary>2026-01-01T00:00:00</StartBoundary><Enabled>true</Enabled></TimeTrigger>`,i=`-NoProfile -NonInteractive -ExecutionPolicy Bypass -WindowStyle Hidden -Command "${r.script}"`;return`<?xml version="1.0" encoding="UTF-16"?>
|
|
3
3
|
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
|
|
4
4
|
<RegistrationInfo>
|
|
5
5
|
<Description>${A(r.description)}</Description>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{S,zt,Mn,Ge,$n,Bn}from"./vm-hands-entry-lite-jyvmw8b7.js";import{Xn}from"./vm-hands-entry-lite-
|
|
2
|
+
import{S,zt,Mn,Ge,$n,Bn}from"./vm-hands-entry-lite-jyvmw8b7.js";import{Xn}from"./vm-hands-entry-lite-s1t43cbb.js";import{Gn}from"./vm-hands-entry-lite-r3yp6cr9.js";import{r}from"./vm-hands-entry-lite-qy9xg6em.js";import{execFile as ys,spawn as qe}from"child_process";import{existsSync as ws}from"fs";import{connect as xs}from"net";function pn(){let e=new Set,t=null,n=(s)=>({holder:t?.viewer??null,you:t===s,same_user:Boolean(t?.viewer&&s.viewer&&t.viewer.user_id===s.viewer.user_id)}),o=()=>{for(let s of e)s.notify(n(s))};return{join(s){return e.add(s),s.notify(n(s)),()=>{if(!e.delete(s))return;if(t!==s)return;t=null,o()}},claim(s){if(t===s||!e.has(s))return;t=s,o()}}}var ut=pn();import{createHash as St}from"crypto";import{once as Sn}from"events";import{createWriteStream as vn,existsSync as mr,mkdirSync as gr,mkdtempSync as hr,readFileSync as le,readdirSync as br,renameSync as yr,realpathSync as En,rmSync as Pn,statSync as Ne,writeFileSync as wr}from"fs";import{delimiter as _r,dirname as vt,join as b}from"path";import{finished as Cn}from"stream/promises";var We="omljlfpmafedpplnpkkahegadhkimdje",co="https://chromewebstore.google.com/detail/reason/omljlfpmafedpplnpkkahegadhkimdje";var O={ocu:{repository:"https://github.com/iFurySt/open-codex-computer-use.git",revision:"386a260d1ab8b690adbbb27f7471595cf0c2b752",version:"0.3.5"},obu:{repository:"https://github.com/iFurySt/open-browser-use.git",revision:"ac015846df75928fbcf0f3a0f3ba3a210ce1a507",version:"0.1.42"}},H={version:"155.0.8059.84",macArm64Sha256:"13b9e98ce56f5ce18e100a009f455c9285f399e7c9dc8a76fdf2f3a9755bb5f2",linux64Sha256:"cf0f049892dea22e6a6db26d47ed0d7776b7158edcbec4634086633df8bafcbc",win64Sha256:"507f2a031441d10c62b5e3d4e863f09ac1198a571c1419976cbd8387f639afde"};var J={ocu:{url:`https://registry.npmjs.org/open-computer-use/-/open-computer-use-${O.ocu.version}.tgz`,sha256:"7c16a87c8cd357787b02c0ebd040dd5f93880c1fb51c1901caa2e0c05d063130",size_bytes:5844280},obu:{url:`https://registry.npmjs.org/open-browser-use/-/open-browser-use-${O.obu.version}.tgz`,sha256:"9386d8ce0a147b3f55e1807b68edf736836378807541c457c9b5f6ca2cabaa4e",size_bytes:21372018},extension:{url:`https://github.com/iFurySt/open-browser-use/releases/download/v${O.obu.version}/open-browser-use-chrome-extension-${O.obu.version}.zip`,sha256:"c9c07bec1175e12ea6985b0e7784a5ef01fd03f014b958224a1e17dcd838a241",size_bytes:31070}},F="pnbmoicbkopffjjgfgfglopechaiemkp";import{spawn as Me}from"child_process";import{createRequire as fn}from"module";import{join as mn}from"path";var gn=30000,hn=1048576;function Te(){return process.env.SystemRoot??"C:\\Windows"}function bn(){return mn(Te(),"System32","WindowsPowerShell","v1.0","powershell.exe")}var yn=String.raw`
|
|
3
3
|
$ErrorActionPreference = "Stop"
|
|
4
4
|
Add-Type -TypeDefinition @"
|
|
5
5
|
using System;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var Qt={name:"github-native-engineer-device-worker-production",version:"0.2.
|
|
2
|
+
var Qt={name:"github-native-engineer-device-worker-production",version:"0.2.472",private:!0,type:"module",engines:{node:">=22",bun:">=1.3.0"},workspaces:["../../packages/runtime-distribution"],dependencies:{"@agentclientprotocol/sdk":"1.9.0","@anthropic-ai/sandbox-runtime":"^0.0.80","@earendil-works/pi-tui":"1.0.0","@reason/runtime-distribution":"workspace:*",diff:"8.0.4","open-browser-use-sdk":"0.1.42","playwright-core":"1.60.0",toml:"4.2.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
3
|
export{Qt};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{_,Io,ke}from"./vm-hands-entry-lite-k83rkcys.js";import{l,Wt,Ke,Nr,Vt,Mr,dt}from"./vm-hands-entry-lite-8qvsnkvv.js";import{wt,or}from"./vm-hands-entry-lite-b8yapqfn.js";import{dn}from"./vm-hands-entry-lite-
|
|
2
|
+
import{_,Io,ke}from"./vm-hands-entry-lite-k83rkcys.js";import{l,Wt,Ke,Nr,Vt,Mr,dt}from"./vm-hands-entry-lite-8qvsnkvv.js";import{wt,or}from"./vm-hands-entry-lite-b8yapqfn.js";import{dn}from"./vm-hands-entry-lite-0ga37680.js";import{B,m,te,Ue}from"./vm-hands-entry-lite-gxj550g3.js";import{F}from"./vm-hands-entry-lite-ewp26q5v.js";import{To}from"./vm-hands-entry-lite-s1t43cbb.js";import{xe,Ye,Jn,Wr}from"./vm-hands-entry-lite-cgqns1tf.js";import{f,v,h}from"./vm-hands-entry-lite-52x189kf.js";import{a}from"./vm-hands-entry-lite-cf1x5cbr.js";import{Fo,nn,y,t,k,Et,o,d,Oe,u,i,c,g,ss,s,n,on}from"./vm-hands-entry-lite-5agyspqp.js";import{closeSync as Lh,existsSync as Mh,mkdirSync as Dh,openSync as Th,readdirSync as Wh,realpathSync as pe,rmSync as Nh}from"fs";import{dirname as $h,join as J,resolve as Bh}from"path";import{createHash as Ct}from"crypto";import{platform as At}from"os";import{join as It}from"path";var xt=g("store",[c({version:n(1),store:n("keychain")}),c({version:n(1),store:n("file"),api_key:t().min(1).max(4096)})]),We=(e)=>It(e,"api-key.json");function Ne(e){let r=Ct("sha256").update(`reason-connect-api-key
|
|
3
3
|
${e}`).digest("hex");return new Ke(Wt(),At(),r)}function we(e,r=Ne(e)){if(!f(We(e)))return null;let p=xt.parse(JSON.parse(h(We(e))));if(p.store==="file")return p.api_key;try{let b=r.loadBinding();return b?new TextDecoder().decode(b):null}catch(b){if(!(b instanceof l))throw b;throw Error("worker_api_key_unreadable")}}import{readdirSync as Gt,renameSync as Fn,rmSync as jn}from"fs";import{join as ee}from"path";import{createHash as Mt}from"crypto";import{platform as Dt}from"os";import{join as N}from"path";function w(e){return{state:N(m(e),"device.json"),control:N(m(e),"control.json"),lock:N(m(e),"lifecycle.lock"),socket:N(m(e),"control.sock"),daemon:N(m(e),"daemon.json"),releaseCheck:N(m(e),"release-check.json"),updateDeferral:N(m(e),"update-deferral.json"),firstHeartbeat:N(m(e),"first-heartbeat.json")}}var rn=i({version:n(1),device_id:t().min(1).max(160),offer:Oe().optional(),enrollment_ms:o().int().nonnegative().max(or).optional()});function z(e,r=!1){v(m(e),r);let p=["local-device.key","local-device.binding","device.json"].filter((b)=>{let R=N(m(e),b);if(!f(R))return!1;return h(R),!0});return e.lifetime==="persistent"&&p.join()==="device.json"?Tt(e):new Nr(m(e))}function Tt(e){return new Ke(Wt(),Dt(),Nt(e))}function Nt(e){let r=Bt(e);return Mt("sha256").update(`reason-worker
|
|
4
4
|
${r?.directory??m(e)}`).digest("hex")}var Ht="keychain-scope.json";var $t=c({version:n(1),directory:t().min(1),devicePublicKey:t().min(1)});function Bt(e){let r=N(m(e),Ht);if(!f(r))return null;let p=$t.safeParse(JSON.parse(h(r))),b=w(e).state;if(!p.success||!f(b))return null;return JSON.parse(h(b))?.devicePublicKey===p.data.devicePublicKey?p.data:null}function M(e){if(!f(m(e)))return null;let r=Mr(w(e).state,{proofStore:z(e),repair:!1}),p=r!==null&&Io(e.apiOrigin,r.apiOrigin),b=p?[te(e),te({...e,apiOrigin:r.apiOrigin})]:[te(e)];if(r&&(!b.includes(r.worker?.configDigest??"")||r.worker.lifetime!==e.lifetime||r.apiOrigin!==e.apiOrigin&&!p||r.roots.length>32||r.roots[0]?.path!==e.workspaceRoot||r.handsSlots!==e.slots))throw Error("worker_config_binding_mismatch");return r}var Ut=c({version:n(1),drained:d(),revoked:d()});function H(e){let r=w(e).control;return f(r)?Ut.parse(JSON.parse(h(r))):{version:1,drained:!1,revoked:!1}}var jt=c({read:d(),write:d(),execute:d(),discover_environment:d(),expose_mcp:n(!1)}),qt=c({version:n(1),organization_id:t().min(1).max(160),enrollment_ticket:t().min(1).max(4096),code_verifier:t().regex(/^[A-Za-z0-9._~-]{43,128}$/),root_fingerprint_key:t().regex(/^[a-f0-9]{64}$/),root:c({path_fingerprint:t().regex(/^[a-f0-9]{64}$/),permissions:jt,execution_mode:s(["confined","host"]).default("confined")}),folders:u(c({path_fingerprint:t().regex(/^[a-f0-9]{64}$/)})).min(1).max(31).optional()}),_n=i({device_id:t().min(1).max(160),organization_id:t().min(1).max(160),auth_scheme:n("p256"),protocol_version:n(2),roots:u(i({id:t().min(1),label:t(),path_fingerprint:t()})).min(1).max(32),headless:i({lifecycle:s(["persistent","ephemeral"]),expires_at:y.datetime({offset:!0})}),first_heartbeat:Oe().optional()});var Nn=c({version:n(1),install_id:k(),fingerprint_key:t().regex(/^[a-f0-9]{64}$/)}),Hn=i({enrollment_ticket:t().min(1).max(4096),expires_at:y.datetime({offset:!0}),device_kind:n("headless"),lifecycle:s(["persistent","ephemeral"]),device_expires_at:y.datetime({offset:!0})});var $n=i({credentialKind:s(["oauth","api_key"]).optional(),apiOrigin:Et(),clientId:t(),accessToken:t().min(1).max(32768),refreshToken:t().max(32768),expiresAt:y.datetime({offset:!0}),scopes:u(t().max(128)).max(128),orgId:t().min(1).max(160)});var je=8;var Yt=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/,_e=(e)=>ee(m(e),"workspaces"),Xt="account.json",Zt=(e)=>f(ee(e,Xt));function Se(e){let r;try{r=Gt(_e(e))}catch{return[]}return r.filter((p)=>Yt.test(p)).sort().map((p)=>{let b=ee(_e(e),p),R=ee(b,"worker.json"),S=null;try{let P=B.safeParse(JSON.parse(h(R)));if(P.success&&P.data.stateDirectory===b)S=P.data}catch{}return{organizationId:p,directory:b,configPath:R,config:S,account:Zt(b)}})}var Qt=(e)=>ee(_e(e),"listed.json");function er(e){try{let r=JSON.parse(h(Qt(e))),p=r.names&&typeof r.names==="object"&&!Array.isArray(r.names)?Object.fromEntries(Object.entries(r.names).filter((R)=>typeof R[1]==="string")):{},b=r.refused&&typeof r.refused==="object"?r.refused:null;return{listed:r.listed===!0,reason:r.reason==="sign_in"?"sign_in":null,blocked:Array.isArray(r.blocked)?r.blocked.filter((R)=>typeof R==="string"):[],names:p,...b&&typeof b.device==="string"&&typeof b.roots==="string"&&typeof b.at==="number"&&Number.isFinite(b.at)&&typeof b.count==="number"&&Number.isInteger(b.count)&&b.count>=1?{refused:{device:b.device,roots:b.roots,at:b.at,count:b.count}}:{}}}catch{return null}}function qe(e,r){let p=Se(e),b=p.filter((C)=>C.account),R=p.filter((C)=>!C.account),S=er(e),P=S&&!S.listed?S.reason:null,E=P||R.length===0&&S&&!S.listed?[]:R;if(b.length===0&&E.length===0&&(P||S&&!S.listed))return{workspaces:null,off:P};return{off:P,workspaces:[...b,...E].map(({organizationId:C,config:L,account:x})=>{let A=!1,D=null,T=!1,he=null;try{A=L?H(L).revoked:!1,D=L&&!A?M(L):null;let Te=L?dt(w(L).daemon):null;T=r&&!!D&&Te?.state==="connected",he=T?Vt(Te,D):null}catch{}return{...he?{permission_recovery:he}:{},organization_id:C,device_id:D?.deviceId??null,name:S?.names?.[C]??null,root:D?.roots[0]?{id:D.roots[0].id,permissions:D.roots[0].permissions}:null,state:A?"removed":T?"connected":"not_running",blocked:!x&&!A&&!T&&(S?.blocked.includes(C)??!1),...x?{account:!0}:{}}})}}import{readFileSync as rr}from"fs";function lr(e){try{let r=JSON.parse(rr(`${e}.keep-awake.json`,"utf8"));return r!==null&&typeof r==="object"&&"version"in r&&r.version===1&&"enabled"in r&&r.enabled===!0?"battery_and_ac":void 0}catch(r){return r.code==="ENOENT"?"battery_and_ac":void 0}}import{chmodSync as Ni,lstatSync as Ze,mkdtempSync as Hi,realpathSync as nr,rmdirSync as $i,rmSync as Bi,unlinkSync as Ui}from"fs";import{createConnection as ir,createServer as ji}from"net";import{basename as Je,dirname as Ge,join as oe}from"path";var ar=s(["status","drain","resume","stop","reload_roots"]),sr=c({version:n(1),instanceId:t(),deviceId:t(),phase:s(["starting","running","reconnecting","stopping"]),drained:d(),activeClaims:o().int().nonnegative(),activeSessions:o().int().nonnegative().optional(),executionEligible:d(),supportedOperations:u(s(wt)).max(wt.length).optional(),capabilityReadiness:ss(s(wt),d()).optional(),lastHeartbeat:t().nullable(),expiresAt:t()}),Gi=c({nonce:t(),action:ar}),cr=i({nonce:k()}),dr=c({version:n(1),nonce:k(),socketPath:t().max(100)});function ur(e){return oe(w(e).lock,"control.json")}function Qe(e){return v(w(e).lock),cr.parse(JSON.parse(h(oe(w(e).lock,"owner.json"))))}function Xe(e){if(!f(e))return!1;let r=Ze(e);if(!r.isSocket()||r.uid!==process.getuid?.()||(r.mode&63)!==0)throw Error("worker_control_socket_not_private");return!0}function et(e,r){let p=ur(e);if(!f(p)){let S=w(e).socket;if(!f(S)||!Ze(S).isSocket())return null;return Xe(S)?S:null}let b=dr.parse(JSON.parse(h(p)));if(b.nonce!==r)throw Error("worker_instance_changed");if(process.platform==="win32"){if(!fr.test(b.socketPath))throw Error("worker_control_endpoint_invalid");return b.socketPath}let R=Ge(b.socketPath);if(Ge(R)!==nr("/tmp")||!/^(?:reason|ara)-worker-[A-Za-z0-9]{6}$/.test(Je(R))||Je(b.socketPath)!=="control.sock"||Buffer.byteLength(b.socketPath)>100)throw Error("worker_control_endpoint_invalid");if(!f(R))return null;return v(R),Xe(b.socketPath)?b.socketPath:null}var fr=/^\\\\\.\\pipe\\reason-worker-[0-9a-f-]{36}$/;function mr(e,r){try{let p=JSON.parse(h(oe(w(e).lock,"owner.json"))),b=p&&typeof p==="object"?p[r]:void 0;return typeof b==="string"?b:null}catch{return null}}function tt(e){return mr(e,"runtime_version")}function ot(e,r){if(r)return r.message==="worker_control_timeout"?"socket_timeout":"bad_reply";try{if(!f(oe(w(e).lock,"owner.json")))return"no_lock";return et(e,Qe(e).nonce)?"socket_refused":"no_socket"}catch{return"bad_reply"}}var Yi=c({instance:t().nullable(),since:o().int().nonnegative()});async function G(e,r){let p=w(e);if(!f(oe(p.lock,"owner.json")))return null;let b=Qe(e),R=et(e,b.nonce);if(!R)return null;return new Promise((S,P)=>{let E=ir(R),C="",L=!1,x=(A,D)=>{if(L)return;if(L=!0,E.destroy(),D)P(D);else S(A)};E.setTimeout(2000,()=>E.destroy(Error("worker_control_timeout"))),E.on("connect",()=>E.write(JSON.stringify({nonce:b.nonce,action:r})+`
|
|
5
5
|
`)),E.on("data",(A)=>{if(C+=A.toString(),Buffer.byteLength(C)>16384)E.destroy(Error("worker_control_oversize"))}),E.on("error",(A)=>{if("code"in A&&["ECONNREFUSED","ENOENT"].includes(String(A.code)))x(null);else x(null,A.message==="worker_control_timeout"?A:Error("worker_control_unavailable"))}),E.on("end",()=>{try{let A=sr.parse(JSON.parse(C));if(A.instanceId!==b.nonce)throw Error("worker_instance_changed");x(A)}catch{x(null,Error("worker_control_invalid_response"))}}),E.once("close",()=>x(null,Error("worker_control_unavailable")))})}import{realpathSync as wr}from"fs";import{constants as Re}from"fs";import{open as pr}from"fs/promises";var oa={platform:process.platform,home:a,async openFile(e){let r=await pr(e,Re.O_RDONLY|Re.O_NOFOLLOW|Re.O_NONBLOCK);return{isFile:async()=>(await r.stat()).isFile(),close:()=>r.close()}}};var Ha=To(wr(process.execPath));var fs=Buffer.from([0,255,3,4]);import{execFile as Zr}from"child_process";import{promisify as Qr}from"util";var vr=new RegExp("^/media/pr-screenshots/([0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})/([0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})/([a-z0-9][a-z0-9._-]*)\\.(png|jpe?g|gif|webp|webm|mp4)$","i");var Sr=new Set(["png","jpg","jpeg","gif","webp"]),Rr=new Set(["webm","mp4"]);function Er(e){if(!e)return null;try{return new URL(e).origin}catch{return null}}function at(e,r){let p;try{p=new URL(e)}catch{return null}let b=Er(r),R=p.hostname==="ara.so"||p.hostname.endsWith(".ara.so")||p.hostname==="reasonmachines.ai"||p.hostname.endsWith(".reasonmachines.ai")||p.hostname==="reasonmachines.com"||p.hostname.endsWith(".reasonmachines.com");if(p.protocol!=="https:"||!R&&p.origin!==b||p.username||p.password||p.port||p.search||p.hash)return null;let S=vr.exec(p.pathname);if(!S)return null;let P=S[1]?.toLowerCase(),E=S[2]?.toLowerCase(),C=S[3]?.toLowerCase(),L=S[4]?.toLowerCase();if(!P||!E||!C||!L)return null;let x=Sr.has(L)?"image":Rr.has(L)?"video":null;if(!x)return null;let A=/^(before|after)[\s:_-]+/.exec(C),D=p.pathname.replace(/^\/media\//,"");return{url:p.toString(),storagePath:D,runId:P,artifactId:E,fileName:`${C}.${L}`,kind:x,phase:A?.[1]==="before"||A?.[1]==="after"?A[1]:null}}var Pr=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,st=(e)=>Boolean(e&&typeof e==="object"&&!Array.isArray(e)),K=()=>{throw Error("cloud_browser_media_request_invalid")};function Pe(e){if(!st(e)||Object.keys(e).some((S)=>!["runId","configuredMediaOrigin","media"].includes(S))||typeof e.runId!=="string"||!Pr.test(e.runId)||typeof e.configuredMediaOrigin!=="string"||e.configuredMediaOrigin.length>2048||!Array.isArray(e.media)||e.media.length<1||e.media.length>8)return K();let r;try{r=new URL(e.configuredMediaOrigin)}catch{return K()}if(r.protocol!=="https:"||r.username||r.password||r.port||!Ue(r.origin,{mode:"public_web"}).allowed)return K();let p=e.runId.toLowerCase(),b=new Set,R=e.media.map((S)=>{if(!st(S)||Object.keys(S).some((E)=>!["url","sourceUrl","kind"].includes(E))||typeof S.url!=="string"||S.url.length>2048||typeof S.sourceUrl!=="string"||S.sourceUrl.length>8192||!["image","video"].includes(String(S.kind)))return K();let P=at(S.url,r.origin);if(!P||new URL(P.url).origin!==r.origin||P.runId!==p||P.kind!==S.kind||P.url!==S.url||b.has(S.url))return K();if(b.add(S.url),S.sourceUrl!==S.url){let E;try{E=new URL(S.sourceUrl)}catch{return K()}let C=/^\/(?:[a-f0-9]{40}|[a-f0-9]{64})\/([a-f0-9]+)$/.exec(E.pathname)?.[1];if(S.kind!=="image"||E.origin!=="https://camo.githubusercontent.com"||E.username||E.password||E.search||E.hash||!C||C.length%2!==0||Buffer.from(C,"hex").toString("utf8")!==S.url)return K()}return{url:S.url,sourceUrl:S.sourceUrl,kind:S.kind}});return{runId:e.runId,configuredMediaOrigin:r.origin,media:R}}var I=t().uuid(),X=t().regex(/^[a-f0-9]{64}$/),V=y.datetime({precision:3}),Ce=t().regex(/^[a-zA-Z0-9_-]{1,160}$/),ut=t().max(2048).regex(/^https:\/\/github\.com\/[A-Za-z0-9_-]+\/[A-Za-z0-9_.-]+\/pull\/[1-9][0-9]*$/).refine((e)=>![".",".."].includes(e.split("/")[4])),U=i({kind:n("primary_mac"),version:n(1),organizationId:Ce,userId:Ce,sessionId:Ce,runId:I,deviceId:I,rootId:I,rootRevision:t().min(1).max(64),binding:s(["workspace_source","mcp_control"]),targetRevision:o().int().nonnegative(),generation:I,profile:t().regex(/^(Default|Profile [0-9]+)$/),extensionInstanceId:t().min(1).max(1024)}).strict().refine((e)=>e.binding!=="workspace_source"||e.targetRevision===0),Cr=on().transform((e,r)=>{try{return dn(e)}catch{return r.addIssue({code:"custom",message:"proof_visual_contract_invalid"}),Fo}}),ue=i({version:n(1),owner:U,contextId:I,preparedAt:V,expiresAt:V,prUrl:ut,headSha:t().regex(/^[a-f0-9]{40}$/),skillDigest:X,evidenceKind:s(["image","video"]),visualPlan:Cr.optional(),uploadOrigin:t().url().refine((e)=>{let r=new URL(e);return r.protocol==="https:"&&r.origin===e&&!r.username&&!r.password}).optional()}).strict().refine((e)=>Date.parse(e.expiresAt)>Date.parse(e.preparedAt)&&Date.parse(e.expiresAt)-Date.parse(e.preparedAt)<=300000),Ar=i({version:n(1),producer:n("primary_mac"),context:ue,captureId:I,operationId:I,attemptId:I,tabId:o().int().positive(),startedAt:V,finishedAt:V,sha256:X,media:g("contentType",[i({contentType:n("image/png"),sizeBytes:o().int().min(24).max(8388608),width:o().int().min(1).max(4096),height:o().int().min(1).max(4096)}).strict(),i({contentType:n("video/webm"),sizeBytes:o().int().min(128).max(10485760),durationSeconds:o().min(0.05).max(15),frameCount:o().int().min(1).max(450),receivedFrameCount:o().int().min(1).max(2000)}).strict()])}).strict().superRefine((e,r)=>{let p=Date.parse(e.startedAt),b=Date.parse(e.finishedAt);if(p<Date.parse(e.context.preparedAt)||b<p||b>Date.parse(e.context.expiresAt)||b-p>30000||e.media.contentType==="video/webm"&&(e.media.receivedFrameCount<e.media.frameCount||Math.abs((b-p)/1000-e.media.durationSeconds)>0.1))r.addIssue({code:"custom",message:"mac_pr_proof_capture_chronology_invalid"})}),dc=g("action",[i({action:n("screenshot"),context_id:I,tab_id:o().int().positive()}).strict(),i({action:n("start_video"),context_id:I,tab_id:o().int().positive(),seconds:o().int().min(1).max(15)}).strict(),i({action:n("stop_video"),recording_operation_id:I}).strict()]),fe=i({login:t().regex(/^[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,37}[a-zA-Z0-9])?$/),id:t().regex(/^[1-9][0-9]{0,19}$/).nullable()}).strict(),ce=t().regex(/^[1-9][0-9]{0,19}$/),le=i({version:n(1),owner:U,expectedActorId:ce.nullable(),repositoryId:ce,repositoryFullName:t().max(200).regex(/^[A-Za-z0-9_-]+\/[A-Za-z0-9_.-]+$/).refine((e)=>![".",".."].includes(e.split("/")[1]))}).strict(),Ir=["browser_unavailable","github_page_unavailable","identity_check_failed","operation_incomplete","attachment_unavailable"],xr=g("status",[le.extend({status:n("ready"),observedActor:fe,checkedAt:V}),le.extend({status:n("not_ready"),reason:s(["authentication_required","identity_mismatch","authority_lost","unavailable"]),cause:s(Ir).optional()})]).refine((e)=>e.status!=="ready"||e.expectedActorId===null||e.observedActor.id===e.expectedActorId),Y=i({version:n(1),owner:U,expectedActorId:ce.nullable(),authenticatedActor:fe,attemptId:I,captureId:I,prUrl:ut,repositoryId:ce,headSha:t().regex(/^[a-f0-9]{40}$/),sha256:X,sizeBytes:o().int().min(128).max(10485760),contentType:n("video/webm")}).strict(),ft=t().regex(/^https:\/\/github\.com\/user-attachments\/assets\/[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/),Or=g("status",[Y.extend({status:n("not_attempted"),reason:s(["authentication_required","attachment_unavailable","identity_mismatch","capture_invalid","authority_lost"])}),Y.extend({status:n("uncertain"),reason:n("upload_outcome_unknown")}),Y.extend({status:n("uploaded"),observedActor:fe,nativeUrl:ft,uploadedAt:V})]).refine((e)=>(e.expectedActorId===null||e.authenticatedActor.id===e.expectedActorId)&&(e.status!=="uploaded"||e.observedActor.id===e.authenticatedActor.id&&e.observedActor.login===e.authenticatedActor.login)),de=Y.extend({nativeUrl:ft,observedActor:fe,bodySha256:X}),Lr=g("status",[de.extend({status:n("incomplete"),reason:s(["authentication_required","identity_mismatch","playback_unverified","authority_lost"])}),de.extend({status:n("verified"),sourceSha256:X,width:o().int().min(1).max(4096),height:o().int().min(1).max(4096),durationSeconds:o().positive().max(30),advancedSeconds:o().min(0.05).max(10),advancedFrames:o().int().positive(),playbackRestored:n(!0),verifiedAt:V})]).refine((e)=>(e.expectedActorId===null||e.authenticatedActor.id===e.expectedActorId)&&e.observedActor.id===e.authenticatedActor.id&&e.observedActor.login===e.authenticatedActor.login&&(e.status!=="verified"||e.sourceSha256===e.sha256)),Dr=on().transform((e,r)=>{try{let p=Pe(e);if(p.media.some((b)=>b.kind!=="image"))throw Error();return p}catch{return r.addIssue({code:"custom",message:"proof_media_request_invalid"}),Fo}}),Tr=g("action",[i({action:n("auth_check"),input:le}).strict(),i({action:n("prepare"),context:ue}).strict(),i({action:n("capture_png"),owner:U,contextId:I,tabId:o().int().positive()}).strict(),i({action:n("start_video"),owner:U,contextId:I,tabId:o().int().positive(),seconds:o().int().min(1).max(15)}).strict(),i({action:n("inspect_capture"),owner:U,captureId:I}).strict(),i({action:n("publish_video"),input:Y}).strict(),i({action:n("verify_png_media"),owner:U,media:Dr}).strict().refine((e)=>e.media.runId===e.owner.runId),i({action:n("verify_saved_media"),input:de}).strict(),i({action:n("publish_png"),owner:U,attemptId:I,captureId:I,sha256:X,sizeBytes:o().int().min(24).max(8388608),storagePath:t().max(512),uploadUrl:t().url().max(8192)}).strict()]);var Hr=i({requestId:I,command:Tr}).strict();var $r={type:"object",required:["action"],properties:{action:{type:"string",enum:["screenshot","start_video","stop_video"]},context_id:{type:"string",format:"uuid"},tab_id:{type:"integer",minimum:1},seconds:{type:"integer",minimum:1,maximum:15},recording_operation_id:{type:"string",format:"uuid"}},additionalProperties:!1},ct={type:"string",format:"uuid",description:"capture_context_id from tools.pr.prepareProof."},lt={type:"integer",minimum:1,description:"An already-owned tab's id."},uc={...$r,oneOf:[{type:"object",required:["action","context_id","tab_id"],additionalProperties:!1,properties:{action:{type:"string",const:"screenshot"},context_id:ct,tab_id:lt}},{type:"object",required:["action","context_id","tab_id","seconds"],additionalProperties:!1,properties:{action:{type:"string",const:"start_video"},context_id:ct,tab_id:lt,seconds:{type:"integer",minimum:1,maximum:15}}},{type:"object",required:["action","recording_operation_id"],additionalProperties:!1,properties:{action:{type:"string",const:"stop_video"},recording_operation_id:{type:"string",format:"uuid",description:"The recording_operation_id start_video returned."}}}]};var gc=i({operationId:t().uuid(),attemptId:t().uuid(),contextId:t().uuid(),tabId:o().int().positive()}).strict();var Br=String.raw`async (media) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{We,co,F,Ve,Ft,Tr,x}from"./vm-hands-entry-lite-
|
|
2
|
+
import{We,co,F,Ve,Ft,Tr,x}from"./vm-hands-entry-lite-ewp26q5v.js";import{K}from"./vm-hands-entry-lite-r3yp6cr9.js";import{ut}from"./vm-hands-entry-lite-jyvmw8b7.js";import{ft}from"./vm-hands-entry-lite-s1t43cbb.js";import{Rr}from"./vm-hands-entry-lite-b233mfa6.js";import{xt,Li}from"./vm-hands-entry-lite-7ja63pfz.js";import{G,qe}from"./vm-hands-entry-lite-0gy6q1d7.js";import{xe,Kn}from"./vm-hands-entry-lite-cgqns1tf.js";import{vt}from"./vm-hands-entry-lite-b8yapqfn.js";import{a}from"./vm-hands-entry-lite-cf1x5cbr.js";import{r}from"./vm-hands-entry-lite-qy9xg6em.js";import{C}from"./vm-hands-entry-lite-vdhgwmmp.js";import{spawn as R,spawnSync as st}from"child_process";import{createHash as it,randomUUID as ge}from"crypto";import{closeSync as at,copyFileSync as ae,existsSync as M,fstatSync as ct,mkdirSync as ce,openSync as lt,readdirSync as U,readFileSync as X,readlinkSync as dt,renameSync as he,rmSync as pt,statSync as mt,writeFileSync as gt}from"fs";import{connect as ht}from"net";import{tmpdir as L,userInfo as we}from"os";import{basename as le,delimiter as wt,dirname as B,join as f}from"path";var z=`import { spawn, execFileSync } from "node:child_process";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
4
4
|
import { readFileSync, readlinkSync, lstatSync, realpathSync, statSync, mkdtempSync, mkdirSync, chmodSync, writeFileSync, readdirSync, rmSync, openSync, readSync, closeSync, renameSync } from "node:fs";
|
|
5
5
|
import { tmpdir } from "node:os";
|