@reason-machines/cli-linux-arm64-musl 0.2.282 → 0.2.284

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/bin/ara +1 -1
  2. package/bin/vm-hands/connect-cli-qgb0c8w3.js +2 -0
  3. package/bin/vm-hands/{custom-endpoint-device-92914wyp.js → custom-endpoint-device-7kd3qh6r.js} +1 -1
  4. package/bin/vm-hands/desktop-account-5kmddfvt.js +2 -0
  5. package/bin/vm-hands/{device-workspace-zk5xwd10.js → device-workspace-te28d7t5.js} +1 -1
  6. package/bin/vm-hands/{hands-worker-source-da93x0qx.js → hands-worker-source-6ts5hhas.js} +1 -1
  7. package/bin/vm-hands/{index-w9nq2f0p.js → index-9aw1gjs5.js} +1 -1
  8. package/bin/vm-hands/local-automation-hke70vcy.js +2 -0
  9. package/bin/vm-hands/local-capabilities-kx04m22x.js +2 -0
  10. package/bin/vm-hands/local-desktop-users-nxyv3mk1.js +2 -0
  11. package/bin/vm-hands/local-display-mac-rp51a8w7.js +2 -0
  12. package/bin/vm-hands/local-display-session-3ax4x1jh.js +2 -0
  13. package/bin/vm-hands/{network-contract-41qanjhp.js → network-contract-wkc0ycet.js} +1 -1
  14. package/bin/vm-hands/package-56yg8k4a.js +2 -0
  15. package/bin/vm-hands/permissions-dtrq2yvs.js +2 -0
  16. package/bin/vm-hands/{reason-hands-protocol-51gs8j7v.js → reason-hands-protocol-2gkb9qeb.js} +1 -1
  17. package/bin/vm-hands/{status-sj500a30.js → status-1gp3c1j6.js} +2 -2
  18. package/bin/vm-hands/version-h4be3gh5.js +2 -0
  19. package/bin/vm-hands/{vm-hands-entry-lite-fraghb8k.js → vm-hands-entry-lite-4fnbmmp6.js} +1 -1
  20. package/bin/vm-hands/{vm-hands-entry-lite-ptmqg51y.js → vm-hands-entry-lite-53jm8bj7.js} +2 -2
  21. package/bin/vm-hands/vm-hands-entry-lite-5pb2jqh3.js +343 -0
  22. package/bin/vm-hands/{vm-hands-entry-lite-s2xydt0n.js → vm-hands-entry-lite-5vrdj7jm.js} +2 -2
  23. package/bin/vm-hands/{vm-hands-entry-lite-am0fatcw.js → vm-hands-entry-lite-7e0r93qr.js} +2 -2
  24. package/bin/vm-hands/{vm-hands-entry-lite-54n8tmj1.js → vm-hands-entry-lite-7neqq6s2.js} +24 -23
  25. package/bin/vm-hands/{vm-hands-entry-lite-c2nrar90.js → vm-hands-entry-lite-8kqg77ym.js} +1 -1
  26. package/bin/vm-hands/{vm-hands-entry-lite-z2np2gzv.js → vm-hands-entry-lite-9dr4z8fr.js} +2 -2
  27. package/bin/vm-hands/{vm-hands-entry-lite-bw9verbt.js → vm-hands-entry-lite-avqrqtfe.js} +2 -2
  28. package/bin/vm-hands/{vm-hands-entry-lite-1nnj48qj.js → vm-hands-entry-lite-csnwmngz.js} +2 -2
  29. package/bin/vm-hands/{vm-hands-entry-lite-65pbrs1x.js → vm-hands-entry-lite-h2xpqaxn.js} +1 -1
  30. package/bin/vm-hands/{vm-hands-entry-lite-bfwf82rw.js → vm-hands-entry-lite-k1wbh9dq.js} +2 -2
  31. package/bin/vm-hands/{vm-hands-entry-lite-84aq8d12.js → vm-hands-entry-lite-kxbpf40y.js} +1 -1
  32. package/bin/vm-hands/{vm-hands-entry-lite-sv6xwe0h.js → vm-hands-entry-lite-m5pmd2cz.js} +2 -2
  33. package/bin/vm-hands/{vm-hands-entry-lite-25t4e0vk.js → vm-hands-entry-lite-pfsce35z.js} +3 -3
  34. package/bin/vm-hands/{vm-hands-entry-lite-s5qn1k80.js → vm-hands-entry-lite-qbk0wxrz.js} +2 -2
  35. package/bin/vm-hands/{vm-hands-entry-lite-7gh1rbn7.js → vm-hands-entry-lite-ss2w3h3d.js} +1 -1
  36. package/bin/vm-hands/{vm-hands-entry-lite-1fznjm91.js → vm-hands-entry-lite-vqcatbcw.js} +2 -2
  37. package/bin/vm-hands/{vm-hands-entry-lite-9pmag2qk.js → vm-hands-entry-lite-vvmq0mtv.js} +2 -2
  38. package/bin/vm-hands/{vm-hands-entry-lite-ffg7rf02.js → vm-hands-entry-lite-wffqkcjq.js} +1 -1
  39. package/bin/vm-hands/{vm-hands-entry-lite-1hwdab4e.js → vm-hands-entry-lite-whcnpjdx.js} +1 -1
  40. package/bin/vm-hands/{vm-hands-entry-lite-anaydk9m.js → vm-hands-entry-lite-y9k070mt.js} +2 -2
  41. package/bin/vm-hands/{vm-hands-entry-lite-bwt3y6wz.js → vm-hands-entry-lite-yf8h8gmh.js} +1 -1
  42. package/bin/vm-hands/{vm-hands-entry-lite-gqncr2j0.js → vm-hands-entry-lite-yh7n4svm.js} +2 -2
  43. package/bin/vm-hands/{vm-hands-entry-lite-k4c504n7.js → vm-hands-entry-lite-yvmzze06.js} +1 -1
  44. package/bin/vm-hands/vm-hands-entry-lite.js +1 -1
  45. package/bin/vm-hands/{vm-hands-executor-p7kq9n00.js → vm-hands-executor-jqm7qrjs.js} +1 -1
  46. package/bin/vm-hands/{vm-hands-op-runner-350k7hem.js → vm-hands-op-runner-t3w7aasf.js} +1 -1
  47. package/bin/vm-hands/{vm-hands-runtime-st3eagc2.js → vm-hands-runtime-4fsnx2aq.js} +3 -3
  48. package/bin/vm-hands/worker-sandbox-4c9302zr.js +2 -0
  49. package/package.json +1 -1
  50. package/bin/vm-hands/connect-cli-26easn4y.js +0 -2
  51. package/bin/vm-hands/desktop-account-vsrtgkk9.js +0 -2
  52. package/bin/vm-hands/local-automation-hk8bgn7w.js +0 -2
  53. package/bin/vm-hands/local-capabilities-j6cmcwdc.js +0 -2
  54. package/bin/vm-hands/local-desktop-users-3j79jbyp.js +0 -2
  55. package/bin/vm-hands/local-display-mac-j1v3mcgx.js +0 -2
  56. package/bin/vm-hands/local-display-session-4402sa84.js +0 -2
  57. package/bin/vm-hands/package-rx9y4bwe.js +0 -2
  58. package/bin/vm-hands/permissions-avhf90my.js +0 -2
  59. package/bin/vm-hands/version-zanrbm0q.js +0 -2
  60. package/bin/vm-hands/vm-hands-entry-lite-21zpypby.js +0 -343
  61. package/bin/vm-hands/worker-sandbox-nnce49w0.js +0 -2
package/bin/ara CHANGED
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: package/bin/ara
3
3
  size: 98283384 bytes
4
- sha256: 3437d9b62af0ce3dae8bd670a252b931d62bc5d2bb1512228f6934a43485c32f
4
+ sha256: 09f9dd1187a2e80b2472609ba6a265ae3e920894b9358a4bb758651715ba30a1
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{g as a,h as b,i as c,j as d,k as e,l as f,m as g,n as h,o as i,p as j,q as k,r as l,s as m}from"./vm-hands-entry-lite-5pb2jqh3.js";import"./vm-hands-entry-lite-yvmzze06.js";import"./vm-hands-entry-lite-7e0r93qr.js";import"./vm-hands-entry-lite-csnwmngz.js";import"./vm-hands-entry-lite-8kqg77ym.js";import"./vm-hands-entry-lite-h2xpqaxn.js";import"./vm-hands-entry-lite-qvrnx0vk.js";import"./vm-hands-entry-lite-n07kxrd1.js";import"./vm-hands-entry-lite-whcnpjdx.js";import"./vm-hands-entry-lite-7neqq6s2.js";import"./vm-hands-entry-lite-yh7n4svm.js";import"./vm-hands-entry-lite-m5pmd2cz.js";import"./vm-hands-entry-lite-avqrqtfe.js";import"./vm-hands-entry-lite-k1wbh9dq.js";import"./vm-hands-entry-lite-53jm8bj7.js";import"./vm-hands-entry-lite-pfsce35z.js";import"./vm-hands-entry-lite-5vrdj7jm.js";import"./vm-hands-entry-lite-qbk0wxrz.js";import"./vm-hands-entry-lite-vvmq0mtv.js";import"./vm-hands-entry-lite-kxbpf40y.js";import"./vm-hands-entry-lite-9dr4z8fr.js";import"./vm-hands-entry-lite-vqcatbcw.js";import"./vm-hands-entry-lite-y9k070mt.js";import"./vm-hands-entry-lite-wffqkcjq.js";import"./vm-hands-entry-lite-ss2w3h3d.js";export{g as runDisconnectCli,f as runConnectCli,m as restartConnectionWhenIdle,l as restartConnection,h as logoutConnection,k as connectionUsesUserChrome,i as connectionReport,j as connectionForBrowserExtension,c as connectionDirectory,d as computerDisconnected,e as addConnectionFolder,b as DISCONNECT_HELP,a as CONNECT_HELP};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{$b as b,_b as a,ac as c,bc as d,cc as e,dc as f,ec as g,fc as h,gc as i,hc as j,ic as k,jc as l,kc as m}from"./vm-hands-entry-lite-1hwdab4e.js";import"./vm-hands-entry-lite-sv6xwe0h.js";import"./vm-hands-entry-lite-7gh1rbn7.js";export{h as customEndpointRequestMatchesConfig,i as CustomEndpointDeviceRequestSchema,l as CustomEndpointDeviceReceiptSchema,j as CustomEndpointDeviceHeadersSchema,m as CustomEndpointDeviceCredentialSchema,k as CustomEndpointDeviceChunkSchema,f as CUSTOM_ENDPOINT_DEVICE_TIMEOUT_MS,g as CUSTOM_ENDPOINT_DEVICE_SAFE_HEADERS,c as CUSTOM_ENDPOINT_DEVICE_MAX_RESPONSE_BYTES,d as CUSTOM_ENDPOINT_DEVICE_MAX_CHUNKS,e as CUSTOM_ENDPOINT_DEVICE_MAX_BODY_BYTES,b as CUSTOM_ENDPOINT_DEVICE_CHUNK_BYTES,a as CUSTOM_ENDPOINT_DEVICE_CAPABILITY};
2
+ import{$b as b,_b as a,ac as c,bc as d,cc as e,dc as f,ec as g,fc as h,gc as i,hc as j,ic as k,jc as l,kc as m}from"./vm-hands-entry-lite-whcnpjdx.js";import"./vm-hands-entry-lite-m5pmd2cz.js";import"./vm-hands-entry-lite-ss2w3h3d.js";export{h as customEndpointRequestMatchesConfig,i as CustomEndpointDeviceRequestSchema,l as CustomEndpointDeviceReceiptSchema,j as CustomEndpointDeviceHeadersSchema,m as CustomEndpointDeviceCredentialSchema,k as CustomEndpointDeviceChunkSchema,f as CUSTOM_ENDPOINT_DEVICE_TIMEOUT_MS,g as CUSTOM_ENDPOINT_DEVICE_SAFE_HEADERS,c as CUSTOM_ENDPOINT_DEVICE_MAX_RESPONSE_BYTES,d as CUSTOM_ENDPOINT_DEVICE_MAX_CHUNKS,e as CUSTOM_ENDPOINT_DEVICE_MAX_BODY_BYTES,b as CUSTOM_ENDPOINT_DEVICE_CHUNK_BYTES,a as CUSTOM_ENDPOINT_DEVICE_CAPABILITY};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ug as a,Vg as b,Wg as c,Xg as d,Yg as e}from"./vm-hands-entry-lite-qbk0wxrz.js";import"./vm-hands-entry-lite-vvmq0mtv.js";import"./vm-hands-entry-lite-kxbpf40y.js";import"./vm-hands-entry-lite-ss2w3h3d.js";export{b as passwdAccount,e as desktopHome,d as desktopAccount,c as configureDesktopAccount,a as DESKTOP_USER_ENV};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{ah as a,bh as b,ch as c,dh as d,eh as e,fh as f,gh as g,hh as h,ih as i,jh as j,kh as k,lh as l,mh as m,nh as n,oh as o,ph as p,qh as q,rh as r,sh as s,th as t}from"./vm-hands-entry-lite-84aq8d12.js";import"./vm-hands-entry-lite-7gh1rbn7.js";export{j as parseDeviceWorkspace,g as isSessionWorktreePath,h as isDeviceWorkspacePath,i as deviceWorkspaceRootRelative,s as computeWorkerWorkspace,r as cloudSessionRootLayout,t as cloudSessionLayoutOfRoot,q as cloudSessionLayout,m as SIDECHAT_WORKSPACE_ID,f as SESSION_WORKTREE_ID,e as SESSION_WORKTREES,c as SESSION_WORKSPACE_LAYOUT,a as REASON_WORKSPACE_BASE,d as HANDS_WORKSPACE_LAYOUT_KEY,b as HANDS_WORKSPACE_BASE_KEY,p as CLOUD_SESSION_ROOT_SHELL_PATTERNS,o as CLOUD_SESSION_ROOT,l as CLOUD_SESSION_CONTROL_BASE,n as CLOUD_REPOSITORY_WORKSPACE_ID,k as CLOUD_PAYLOAD_HOME};
2
+ import{ch as a,dh as b,eh as c,fh as d,gh as e,hh as f,ih as g,jh as h,kh as i,lh as j,mh as k,nh as l,oh as m,ph as n,qh as o,rh as p,sh as q,th as r,uh as s,vh as t}from"./vm-hands-entry-lite-kxbpf40y.js";import"./vm-hands-entry-lite-ss2w3h3d.js";export{j as parseDeviceWorkspace,g as isSessionWorktreePath,h as isDeviceWorkspacePath,i as deviceWorkspaceRootRelative,s as computeWorkerWorkspace,r as cloudSessionRootLayout,t as cloudSessionLayoutOfRoot,q as cloudSessionLayout,m as SIDECHAT_WORKSPACE_ID,f as SESSION_WORKTREE_ID,e as SESSION_WORKTREES,c as SESSION_WORKSPACE_LAYOUT,a as REASON_WORKSPACE_BASE,d as HANDS_WORKSPACE_LAYOUT_KEY,b as HANDS_WORKSPACE_BASE_KEY,p as CLOUD_SESSION_ROOT_SHELL_PATTERNS,o as CLOUD_SESSION_ROOT,l as CLOUD_SESSION_CONTROL_BASE,n as CLOUD_REPOSITORY_WORKSPACE_ID,k as CLOUD_PAYLOAD_HOME};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Ab as a,Bb as b,Cb as c,Db as d,Eb as e,Fb as f,Gb as g,Hb as h,Ib as i}from"./vm-hands-entry-lite-c2nrar90.js";import"./vm-hands-entry-lite-n07kxrd1.js";import"./vm-hands-entry-lite-ptmqg51y.js";import"./vm-hands-entry-lite-84aq8d12.js";import"./vm-hands-entry-lite-7gh1rbn7.js";export{e as selectCloudChildPath,a as REASON_HANDS_WORKER_VERSION,h as REASON_HANDS_WORKER_SOURCE,b as REASON_HANDS_WORKER_ENTRYPOINT,i as REASON_HANDS_WORKER_ARTIFACT_SHA256,f as REASON_HANDS_MAC_PTY_MEMBER_SOURCE,g as REASON_HANDS_LINUX_PTY_PROBE_SOURCE,d as REASON_HANDS_CLOUD_CHILD_PATH_MACOS,c as REASON_HANDS_CLOUD_CHILD_PATH_LINUX};
2
+ import{Ab as a,Bb as b,Cb as c,Db as d,Eb as e,Fb as f,Gb as g,Hb as h,Ib as i}from"./vm-hands-entry-lite-8kqg77ym.js";import"./vm-hands-entry-lite-n07kxrd1.js";import"./vm-hands-entry-lite-53jm8bj7.js";import"./vm-hands-entry-lite-kxbpf40y.js";import"./vm-hands-entry-lite-ss2w3h3d.js";export{e as selectCloudChildPath,a as REASON_HANDS_WORKER_VERSION,h as REASON_HANDS_WORKER_SOURCE,b as REASON_HANDS_WORKER_ENTRYPOINT,i as REASON_HANDS_WORKER_ARTIFACT_SHA256,f as REASON_HANDS_MAC_PTY_MEMBER_SOURCE,g as REASON_HANDS_LINUX_PTY_PROBE_SOURCE,d as REASON_HANDS_CLOUD_CHILD_PATH_MACOS,c as REASON_HANDS_CLOUD_CHILD_PATH_LINUX};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{x as fJ0}from"./vm-hands-entry-lite-bwt3y6wz.js";import{Hh as WV0,Ih as X$,Kh as X0}from"./vm-hands-entry-lite-7gh1rbn7.js";var f0=X$((UU0,Q_)=>{var __dirname="/Users/runner/work/monorepo/monorepo/production/node_modules/.bun/playwright-core@1.60.0/node_modules/playwright-core/lib",ln=Object.create,H5=Object.defineProperty,mn=Object.getOwnPropertyDescriptor,sT=Object.getOwnPropertyNames,dn=Object.getPrototypeOf,cn=Object.prototype.hasOwnProperty,e=(Q,Y)=>function(){return Y||(0,Q[sT(Q)[0]])((Y={exports:{}}).exports,Y),Y.exports},eQ=(Q,Y)=>{for(var X in Y)H5(Q,X,{get:Y[X],enumerable:!0})},eT=(Q,Y,X,J)=>{if(Y&&typeof Y==="object"||typeof Y==="function"){for(let G of sT(Y))if(!cn.call(Q,G)&&G!==X)H5(Q,G,{get:()=>Y[G],enumerable:!(J=mn(Y,G))||J.enumerable})}return Q},j1=(Q,Y,X)=>(X=Q!=null?ln(dn(Q)):{},eT(Y||!Q||!Q.__esModule?H5(X,"default",{value:Q,enumerable:!0}):X,Q)),pn=(Q)=>eT(H5({},"__esModule",{value:!0}),Q),nn=e({"node_modules/colors/lib/styles.js"(Q,Y){var X={};Y.exports=X;var J={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(J).forEach(function(G){var Z=J[G],$=X[G]=[];$.open="\x1B["+Z[0]+"m",$.close="\x1B["+Z[1]+"m"})}}),an=e({"node_modules/colors/lib/system/has-flag.js"(Q,Y){Y.exports=function(X,J){J=J||process.argv;var G=J.indexOf("--"),Z=/^-{1,2}/.test(X)?"":"--",$=J.indexOf(Z+X);return $!==-1&&(G===-1?!0:$<G)}}}),on=e({"node_modules/colors/lib/system/supports-colors.js"(Q,Y){var X=X0("os"),J=an(),G=process.env,Z=void 0;if(J("no-color")||J("no-colors")||J("color=false"))Z=!1;else if(J("color")||J("colors")||J("color=true")||J("color=always"))Z=!0;if("FORCE_COLOR"in G)Z=G.FORCE_COLOR.length===0||parseInt(G.FORCE_COLOR,10)!==0;function $(H){if(H===0)return!1;return{level:H,hasBasic:!0,has256:H>=2,has16m:H>=3}}function W(H){if(Z===!1)return 0;if(J("color=16m")||J("color=full")||J("color=truecolor"))return 3;if(J("color=256"))return 2;if(H&&!H.isTTY&&Z!==!0)return 0;var B=Z?1:0;if(process.platform==="win32"){var V=X.release().split(".");if(Number(process.versions.node.split(".")[0])>=8&&Number(V[0])>=10&&Number(V[2])>=10586)return Number(V[2])>=14931?3:2;return 1}if("CI"in G){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(M){return M in G})||G.CI_NAME==="codeship")return 1;return B}if("TEAMCITY_VERSION"in G)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(G.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in G){var U=parseInt((G.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(G.TERM_PROGRAM){case"iTerm.app":return U>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(G.TERM))return 2;if(/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(G.TERM))return 1;if("COLORTERM"in G)return 1;if(G.TERM==="dumb")return B;return B}function K(H){var B=W(H);return $(B)}Y.exports={supportsColor:K,stdout:K(process.stdout),stderr:K(process.stderr)}}}),rn=e({"node_modules/colors/lib/custom/trap.js"(Q,Y){Y.exports=function(J,G){var Z="";J=J||"Run the trap, drop the bass",J=J.split("");var $={a:["@","\u0104","\u023A","\u0245","\u0394","\u039B","\u0414"],b:["\xDF","\u0181","\u0243","\u026E","\u03B2","\u0E3F"],c:["\xA9","\u023B","\u03FE"],d:["\xD0","\u018A","\u0500","\u0501","\u0502","\u0503"],e:["\xCB","\u0115","\u018E","\u0258","\u03A3","\u03BE","\u04BC","\u0A6C"],f:["\u04FA"],g:["\u0262"],h:["\u0126","\u0195","\u04A2","\u04BA","\u04C7","\u050A"],i:["\u0F0F"],j:["\u0134"],k:["\u0138","\u04A0","\u04C3","\u051E"],l:["\u0139"],m:["\u028D","\u04CD","\u04CE","\u0520","\u0521","\u0D69"],n:["\xD1","\u014B","\u019D","\u0376","\u03A0","\u048A"],o:["\xD8","\xF5","\xF8","\u01FE","\u0298","\u047A","\u05DD","\u06DD","\u0E4F"],p:["\u01F7","\u048E"],q:["\u09CD"],r:["\xAE","\u01A6","\u0210","\u024C","\u0280","\u042F"],s:["\xA7","\u03DE","\u03DF","\u03E8"],t:["\u0141","\u0166","\u0373"],u:["\u01B1","\u054D"],v:["\u05D8"],w:["\u0428","\u0460","\u047C","\u0D70"],x:["\u04B2","\u04FE","\u04FC","\u04FD"],y:["\xA5","\u04B0","\u04CB"],z:["\u01B5","\u0240"]};return J.forEach(function(W){W=W.toLowerCase();var K=$[W]||[" "],H=Math.floor(Math.random()*K.length);if(typeof $[W]<"u")Z+=$[W][H];else Z+=W}),Z}}}),tn=e({"node_modules/colors/lib/custom/zalgo.js"(Q,Y){Y.exports=function(J,G){J=J||" he is here ";var Z={up:["\u030D","\u030E","\u0304","\u0305","\u033F","\u0311","\u0306","\u0310","\u0352","\u0357","\u0351","\u0307","\u0308","\u030A","\u0342","\u0313","\u0308","\u034A","\u034B","\u034C","\u0303","\u0302","\u030C","\u0350","\u0300","\u0301","\u030B","\u030F","\u0312","\u0313","\u0314","\u033D","\u0309","\u0363","\u0364","\u0365","\u0366","\u0367","\u0368","\u0369","\u036A","\u036B","\u036C","\u036D","\u036E","\u036F","\u033E","\u035B","\u0346","\u031A"],down:["\u0316","\u0317","\u0318","\u0319","\u031C","\u031D","\u031E","\u031F","\u0320","\u0324","\u0325","\u0326","\u0329","\u032A","\u032B","\u032C","\u032D","\u032E","\u032F","\u0330","\u0331","\u0332","\u0333","\u0339","\u033A","\u033B","\u033C","\u0345","\u0347","\u0348","\u0349","\u034D","\u034E","\u0353","\u0354","\u0355","\u0356","\u0359","\u035A","\u0323"],mid:["\u0315","\u031B","\u0300","\u0301","\u0358","\u0321","\u0322","\u0327","\u0328","\u0334","\u0335","\u0336","\u035C","\u035D","\u035E","\u035F","\u0360","\u0362","\u0338","\u0337","\u0361"," \u0489"]},$=[].concat(Z.up,Z.down,Z.mid);function W(B){var V=Math.floor(Math.random()*B);return V}function K(B){var V=!1;return $.filter(function(U){V=U===B}),V}function H(B,V){var U="",M,L;V=V||{},V.up=typeof V.up<"u"?V.up:!0,V.mid=typeof V.mid<"u"?V.mid:!0,V.down=typeof V.down<"u"?V.down:!0,V.size=typeof V.size<"u"?V.size:"maxi",B=B.split("");for(L in B){if(K(L))continue;switch(U=U+B[L],M={up:0,down:0,mid:0},V.size){case"mini":M.up=W(8),M.mid=W(2),M.down=W(8);break;case"maxi":M.up=W(16)+3,M.mid=W(4)+1,M.down=W(64)+3;break;default:M.up=W(8)+1,M.mid=W(6)/2,M.down=W(8)+1;break}var F=["up","mid","down"];for(var z in F){var N=F[z];for(var A=0;A<=M[N];A++)if(V[N])U=U+Z[N][W(Z[N].length)]}}return U}return H(J,G)}}}),sn=e({"node_modules/colors/lib/maps/america.js"(Q,Y){Y.exports=function(X){return function(J,G,Z){if(J===" ")return J;switch(G%3){case 0:return X.red(J);case 1:return X.white(J);case 2:return X.blue(J)}}}}}),en=e({"node_modules/colors/lib/maps/zebra.js"(Q,Y){Y.exports=function(X){return function(J,G,Z){return G%2===0?J:X.inverse(J)}}}}),Qi=e({"node_modules/colors/lib/maps/rainbow.js"(Q,Y){Y.exports=function(X){var J=["red","yellow","green","blue","magenta"];return function(G,Z,$){if(G===" ")return G;else return X[J[Z++%J.length]](G)}}}}),Yi=e({"node_modules/colors/lib/maps/random.js"(Q,Y){Y.exports=function(X){var J=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(G,Z,$){return G===" "?G:X[J[Math.round(Math.random()*(J.length-2))]](G)}}}}),Xi=e({"node_modules/colors/lib/colors.js"(Q,Y){var X={};Y.exports=X,X.themes={};var J=X0("util"),G=X.styles=nn(),Z=Object.defineProperties,$=new RegExp(/[\r\n]+/g);if(X.supportsColor=on().supportsColor,typeof X.enabled>"u")X.enabled=X.supportsColor()!==!1;X.enable=function(){X.enabled=!0},X.disable=function(){X.enabled=!1},X.stripColors=X.strip=function(N){return(""+N).replace(/\x1B\[\d+m/g,"")};var W=X.stylize=function(A,R){if(!X.enabled)return A+"";var q=G[R];if(!q&&R in X)return X[R](A);return q.open+A+q.close},K=/[|\\{}()[\]^$+*?.]/g,H=function(N){if(typeof N!=="string")throw TypeError("Expected a string");return N.replace(K,"\\$&")};function B(N){var A=function R(){return M.apply(R,arguments)};return A._styles=N,A.__proto__=U,A}var V=function(){var N={};return G.grey=G.gray,Object.keys(G).forEach(function(A){G[A].closeRe=new RegExp(H(G[A].close),"g"),N[A]={get:function(){return B(this._styles.concat(A))}}}),N}(),U=Z(function(){},V);function M(){var N=Array.prototype.slice.call(arguments),A=N.map(function(O){if(O!=null&&O.constructor===String)return O;else return J.inspect(O)}).join(" ");if(!X.enabled||!A)return A;var R=A.indexOf(`
2
+ import{x as fJ0}from"./vm-hands-entry-lite-yf8h8gmh.js";import{Jh as WV0,Kh as X$,Mh as X0}from"./vm-hands-entry-lite-ss2w3h3d.js";var f0=X$((UU0,Q_)=>{var __dirname="/Users/runner/work/monorepo/monorepo/production/node_modules/.bun/playwright-core@1.60.0/node_modules/playwright-core/lib",ln=Object.create,H5=Object.defineProperty,mn=Object.getOwnPropertyDescriptor,sT=Object.getOwnPropertyNames,dn=Object.getPrototypeOf,cn=Object.prototype.hasOwnProperty,e=(Q,Y)=>function(){return Y||(0,Q[sT(Q)[0]])((Y={exports:{}}).exports,Y),Y.exports},eQ=(Q,Y)=>{for(var X in Y)H5(Q,X,{get:Y[X],enumerable:!0})},eT=(Q,Y,X,J)=>{if(Y&&typeof Y==="object"||typeof Y==="function"){for(let G of sT(Y))if(!cn.call(Q,G)&&G!==X)H5(Q,G,{get:()=>Y[G],enumerable:!(J=mn(Y,G))||J.enumerable})}return Q},j1=(Q,Y,X)=>(X=Q!=null?ln(dn(Q)):{},eT(Y||!Q||!Q.__esModule?H5(X,"default",{value:Q,enumerable:!0}):X,Q)),pn=(Q)=>eT(H5({},"__esModule",{value:!0}),Q),nn=e({"node_modules/colors/lib/styles.js"(Q,Y){var X={};Y.exports=X;var J={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(J).forEach(function(G){var Z=J[G],$=X[G]=[];$.open="\x1B["+Z[0]+"m",$.close="\x1B["+Z[1]+"m"})}}),an=e({"node_modules/colors/lib/system/has-flag.js"(Q,Y){Y.exports=function(X,J){J=J||process.argv;var G=J.indexOf("--"),Z=/^-{1,2}/.test(X)?"":"--",$=J.indexOf(Z+X);return $!==-1&&(G===-1?!0:$<G)}}}),on=e({"node_modules/colors/lib/system/supports-colors.js"(Q,Y){var X=X0("os"),J=an(),G=process.env,Z=void 0;if(J("no-color")||J("no-colors")||J("color=false"))Z=!1;else if(J("color")||J("colors")||J("color=true")||J("color=always"))Z=!0;if("FORCE_COLOR"in G)Z=G.FORCE_COLOR.length===0||parseInt(G.FORCE_COLOR,10)!==0;function $(H){if(H===0)return!1;return{level:H,hasBasic:!0,has256:H>=2,has16m:H>=3}}function W(H){if(Z===!1)return 0;if(J("color=16m")||J("color=full")||J("color=truecolor"))return 3;if(J("color=256"))return 2;if(H&&!H.isTTY&&Z!==!0)return 0;var B=Z?1:0;if(process.platform==="win32"){var V=X.release().split(".");if(Number(process.versions.node.split(".")[0])>=8&&Number(V[0])>=10&&Number(V[2])>=10586)return Number(V[2])>=14931?3:2;return 1}if("CI"in G){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(M){return M in G})||G.CI_NAME==="codeship")return 1;return B}if("TEAMCITY_VERSION"in G)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(G.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in G){var U=parseInt((G.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(G.TERM_PROGRAM){case"iTerm.app":return U>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(G.TERM))return 2;if(/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(G.TERM))return 1;if("COLORTERM"in G)return 1;if(G.TERM==="dumb")return B;return B}function K(H){var B=W(H);return $(B)}Y.exports={supportsColor:K,stdout:K(process.stdout),stderr:K(process.stderr)}}}),rn=e({"node_modules/colors/lib/custom/trap.js"(Q,Y){Y.exports=function(J,G){var Z="";J=J||"Run the trap, drop the bass",J=J.split("");var $={a:["@","\u0104","\u023A","\u0245","\u0394","\u039B","\u0414"],b:["\xDF","\u0181","\u0243","\u026E","\u03B2","\u0E3F"],c:["\xA9","\u023B","\u03FE"],d:["\xD0","\u018A","\u0500","\u0501","\u0502","\u0503"],e:["\xCB","\u0115","\u018E","\u0258","\u03A3","\u03BE","\u04BC","\u0A6C"],f:["\u04FA"],g:["\u0262"],h:["\u0126","\u0195","\u04A2","\u04BA","\u04C7","\u050A"],i:["\u0F0F"],j:["\u0134"],k:["\u0138","\u04A0","\u04C3","\u051E"],l:["\u0139"],m:["\u028D","\u04CD","\u04CE","\u0520","\u0521","\u0D69"],n:["\xD1","\u014B","\u019D","\u0376","\u03A0","\u048A"],o:["\xD8","\xF5","\xF8","\u01FE","\u0298","\u047A","\u05DD","\u06DD","\u0E4F"],p:["\u01F7","\u048E"],q:["\u09CD"],r:["\xAE","\u01A6","\u0210","\u024C","\u0280","\u042F"],s:["\xA7","\u03DE","\u03DF","\u03E8"],t:["\u0141","\u0166","\u0373"],u:["\u01B1","\u054D"],v:["\u05D8"],w:["\u0428","\u0460","\u047C","\u0D70"],x:["\u04B2","\u04FE","\u04FC","\u04FD"],y:["\xA5","\u04B0","\u04CB"],z:["\u01B5","\u0240"]};return J.forEach(function(W){W=W.toLowerCase();var K=$[W]||[" "],H=Math.floor(Math.random()*K.length);if(typeof $[W]<"u")Z+=$[W][H];else Z+=W}),Z}}}),tn=e({"node_modules/colors/lib/custom/zalgo.js"(Q,Y){Y.exports=function(J,G){J=J||" he is here ";var Z={up:["\u030D","\u030E","\u0304","\u0305","\u033F","\u0311","\u0306","\u0310","\u0352","\u0357","\u0351","\u0307","\u0308","\u030A","\u0342","\u0313","\u0308","\u034A","\u034B","\u034C","\u0303","\u0302","\u030C","\u0350","\u0300","\u0301","\u030B","\u030F","\u0312","\u0313","\u0314","\u033D","\u0309","\u0363","\u0364","\u0365","\u0366","\u0367","\u0368","\u0369","\u036A","\u036B","\u036C","\u036D","\u036E","\u036F","\u033E","\u035B","\u0346","\u031A"],down:["\u0316","\u0317","\u0318","\u0319","\u031C","\u031D","\u031E","\u031F","\u0320","\u0324","\u0325","\u0326","\u0329","\u032A","\u032B","\u032C","\u032D","\u032E","\u032F","\u0330","\u0331","\u0332","\u0333","\u0339","\u033A","\u033B","\u033C","\u0345","\u0347","\u0348","\u0349","\u034D","\u034E","\u0353","\u0354","\u0355","\u0356","\u0359","\u035A","\u0323"],mid:["\u0315","\u031B","\u0300","\u0301","\u0358","\u0321","\u0322","\u0327","\u0328","\u0334","\u0335","\u0336","\u035C","\u035D","\u035E","\u035F","\u0360","\u0362","\u0338","\u0337","\u0361"," \u0489"]},$=[].concat(Z.up,Z.down,Z.mid);function W(B){var V=Math.floor(Math.random()*B);return V}function K(B){var V=!1;return $.filter(function(U){V=U===B}),V}function H(B,V){var U="",M,L;V=V||{},V.up=typeof V.up<"u"?V.up:!0,V.mid=typeof V.mid<"u"?V.mid:!0,V.down=typeof V.down<"u"?V.down:!0,V.size=typeof V.size<"u"?V.size:"maxi",B=B.split("");for(L in B){if(K(L))continue;switch(U=U+B[L],M={up:0,down:0,mid:0},V.size){case"mini":M.up=W(8),M.mid=W(2),M.down=W(8);break;case"maxi":M.up=W(16)+3,M.mid=W(4)+1,M.down=W(64)+3;break;default:M.up=W(8)+1,M.mid=W(6)/2,M.down=W(8)+1;break}var F=["up","mid","down"];for(var z in F){var N=F[z];for(var A=0;A<=M[N];A++)if(V[N])U=U+Z[N][W(Z[N].length)]}}return U}return H(J,G)}}}),sn=e({"node_modules/colors/lib/maps/america.js"(Q,Y){Y.exports=function(X){return function(J,G,Z){if(J===" ")return J;switch(G%3){case 0:return X.red(J);case 1:return X.white(J);case 2:return X.blue(J)}}}}}),en=e({"node_modules/colors/lib/maps/zebra.js"(Q,Y){Y.exports=function(X){return function(J,G,Z){return G%2===0?J:X.inverse(J)}}}}),Qi=e({"node_modules/colors/lib/maps/rainbow.js"(Q,Y){Y.exports=function(X){var J=["red","yellow","green","blue","magenta"];return function(G,Z,$){if(G===" ")return G;else return X[J[Z++%J.length]](G)}}}}),Yi=e({"node_modules/colors/lib/maps/random.js"(Q,Y){Y.exports=function(X){var J=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(G,Z,$){return G===" "?G:X[J[Math.round(Math.random()*(J.length-2))]](G)}}}}),Xi=e({"node_modules/colors/lib/colors.js"(Q,Y){var X={};Y.exports=X,X.themes={};var J=X0("util"),G=X.styles=nn(),Z=Object.defineProperties,$=new RegExp(/[\r\n]+/g);if(X.supportsColor=on().supportsColor,typeof X.enabled>"u")X.enabled=X.supportsColor()!==!1;X.enable=function(){X.enabled=!0},X.disable=function(){X.enabled=!1},X.stripColors=X.strip=function(N){return(""+N).replace(/\x1B\[\d+m/g,"")};var W=X.stylize=function(A,R){if(!X.enabled)return A+"";var q=G[R];if(!q&&R in X)return X[R](A);return q.open+A+q.close},K=/[|\\{}()[\]^$+*?.]/g,H=function(N){if(typeof N!=="string")throw TypeError("Expected a string");return N.replace(K,"\\$&")};function B(N){var A=function R(){return M.apply(R,arguments)};return A._styles=N,A.__proto__=U,A}var V=function(){var N={};return G.grey=G.gray,Object.keys(G).forEach(function(A){G[A].closeRe=new RegExp(H(G[A].close),"g"),N[A]={get:function(){return B(this._styles.concat(A))}}}),N}(),U=Z(function(){},V);function M(){var N=Array.prototype.slice.call(arguments),A=N.map(function(O){if(O!=null&&O.constructor===String)return O;else return J.inspect(O)}).join(" ");if(!X.enabled||!A)return A;var R=A.indexOf(`
3
3
  `)!=-1,q=this._styles,D=q.length;while(D--){var E=G[q[D]];if(A=E.open+A.replace(E.closeRe,E.open)+E.close,R)A=A.replace($,function(O){return E.close+O+E.open})}return A}X.setTheme=function(N){if(typeof N==="string"){console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));");return}for(var A in N)(function(R){X[R]=function(q){if(typeof N[R]==="object"){var D=q;for(var E in N[R])D=X[N[R][E]](D);return D}return X[N[R]](q)}})(A)};function L(){var N={};return Object.keys(V).forEach(function(A){N[A]={get:function(){return B([A])}}}),N}var F=function(A,R){var q=R.split("");return q=q.map(A),q.join("")};X.trap=rn(),X.zalgo=tn(),X.maps={},X.maps.america=sn()(X),X.maps.zebra=en()(X),X.maps.rainbow=Qi()(X),X.maps.random=Yi()(X);for(z in X.maps)(function(N){X[N]=function(A){return F(X.maps[N],A)}})(z);var z;Z(X,L())}}),Ji=e({"node_modules/colors/safe.js"(Q,Y){var X=Xi();Y.exports=X}}),Gi=e({"node_modules/ms/index.js"(Q,Y){var X=1000,J=X*60,G=J*60,Z=G*24,$=Z*7,W=Z*365.25;Y.exports=function(U,M){M=M||{};var L=typeof U;if(L==="string"&&U.length>0)return K(U);else if(L==="number"&&isFinite(U))return M.long?B(U):H(U);throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(U))};function K(U){if(U=String(U),U.length>100)return;var M=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(U);if(!M)return;var L=parseFloat(M[1]),F=(M[2]||"ms").toLowerCase();switch(F){case"years":case"year":case"yrs":case"yr":case"y":return L*W;case"weeks":case"week":case"w":return L*$;case"days":case"day":case"d":return L*Z;case"hours":case"hour":case"hrs":case"hr":case"h":return L*G;case"minutes":case"minute":case"mins":case"min":case"m":return L*J;case"seconds":case"second":case"secs":case"sec":case"s":return L*X;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return L;default:return}}function H(U){var M=Math.abs(U);if(M>=Z)return Math.round(U/Z)+"d";if(M>=G)return Math.round(U/G)+"h";if(M>=J)return Math.round(U/J)+"m";if(M>=X)return Math.round(U/X)+"s";return U+"ms"}function B(U){var M=Math.abs(U);if(M>=Z)return V(U,M,Z,"day");if(M>=G)return V(U,M,G,"hour");if(M>=J)return V(U,M,J,"minute");if(M>=X)return V(U,M,X,"second");return U+" ms"}function V(U,M,L,F){var z=M>=L*1.5;return Math.round(U/L)+" "+F+(z?"s":"")}}}),Qj=e({"node_modules/debug/src/common.js"(Q,Y){function X(J){Z.debug=Z,Z.default=Z,Z.coerce=V,Z.disable=H,Z.enable=W,Z.enabled=B,Z.humanize=Gi(),Z.destroy=U,Object.keys(J).forEach((M)=>{Z[M]=J[M]}),Z.names=[],Z.skips=[],Z.formatters={};function G(M){let L=0;for(let F=0;F<M.length;F++)L=(L<<5)-L+M.charCodeAt(F),L|=0;return Z.colors[Math.abs(L)%Z.colors.length]}Z.selectColor=G;function Z(M){let L,F=null,z,N;function A(...R){if(!A.enabled)return;let q=A,D=Number(new Date),E=D-(L||D);if(q.diff=E,q.prev=L,q.curr=D,L=D,R[0]=Z.coerce(R[0]),typeof R[0]!=="string")R.unshift("%O");let O=0;R[0]=R[0].replace(/%([a-zA-Z%])/g,(I,P)=>{if(I==="%%")return"%";O++;let C=Z.formatters[P];if(typeof C==="function"){let b=R[O];I=C.call(q,b),R.splice(O,1),O--}return I}),Z.formatArgs.call(q,R),(q.log||Z.log).apply(q,R)}if(A.namespace=M,A.useColors=Z.useColors(),A.color=Z.selectColor(M),A.extend=$,A.destroy=Z.destroy,Object.defineProperty(A,"enabled",{enumerable:!0,configurable:!1,get:()=>{if(F!==null)return F;if(z!==Z.namespaces)z=Z.namespaces,N=Z.enabled(M);return N},set:(R)=>{F=R}}),typeof Z.init==="function")Z.init(A);return A}function $(M,L){let F=Z(this.namespace+(typeof L>"u"?":":L)+M);return F.log=this.log,F}function W(M){Z.save(M),Z.namespaces=M,Z.names=[],Z.skips=[];let L=(typeof M==="string"?M:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let F of L)if(F[0]==="-")Z.skips.push(F.slice(1));else Z.names.push(F)}function K(M,L){let F=0,z=0,N=-1,A=0;while(F<M.length)if(z<L.length&&(L[z]===M[F]||L[z]==="*"))if(L[z]==="*")N=z,A=F,z++;else F++,z++;else if(N!==-1)z=N+1,A++,F=A;else return!1;while(z<L.length&&L[z]==="*")z++;return z===L.length}function H(){let M=[...Z.names,...Z.skips.map((L)=>"-"+L)].join(",");return Z.enable(""),M}function B(M){for(let L of Z.skips)if(K(M,L))return!1;for(let L of Z.names)if(K(M,L))return!0;return!1}function V(M){if(M instanceof Error)return M.stack||M.message;return M}function U(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return Z.enable(Z.load()),Z}Y.exports=X}}),Zi=e({"node_modules/debug/src/browser.js"(Q,Y){Q.formatArgs=J,Q.save=G,Q.load=Z,Q.useColors=X,Q.storage=$(),Q.destroy=(()=>{let K=!1;return()=>{if(!K)K=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}})(),Q.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function X(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let K;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(K=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(K[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function J(K){if(K[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+K[0]+(this.useColors?"%c ":" ")+"+"+Y.exports.humanize(this.diff),!this.useColors)return;let H="color: "+this.color;K.splice(1,0,H,"color: inherit");let B=0,V=0;K[0].replace(/%[a-zA-Z%]/g,(U)=>{if(U==="%%")return;if(B++,U==="%c")V=B}),K.splice(V,0,H)}Q.log=console.debug||console.log||(()=>{});function G(K){try{if(K)Q.storage.setItem("debug",K);else Q.storage.removeItem("debug")}catch(H){}}function Z(){let K;try{K=Q.storage.getItem("debug")||Q.storage.getItem("DEBUG")}catch(H){}if(!K&&typeof process<"u"&&"env"in process)K=process.env.DEBUG;return K}function $(){try{return localStorage}catch(K){}}Y.exports=Qj()(Q);var{formatters:W}=Y.exports;W.j=function(K){try{return JSON.stringify(K)}catch(H){return"[UnexpectedJSONParseError]: "+H.message}}}}),$i=e({"node_modules/has-flag/index.js"(Q,Y){Y.exports=(X,J=process.argv)=>{let G=X.startsWith("-")?"":X.length===1?"-":"--",Z=J.indexOf(G+X),$=J.indexOf("--");return Z!==-1&&($===-1||Z<$)}}}),Wi=e({"node_modules/supports-color/index.js"(Q,Y){var X=X0("os"),J=X0("tty"),G=$i(),{env:Z}=process,$;if(G("no-color")||G("no-colors")||G("color=false")||G("color=never"))$=0;else if(G("color")||G("colors")||G("color=true")||G("color=always"))$=1;function W(){if("FORCE_COLOR"in Z){if(Z.FORCE_COLOR==="true")return 1;if(Z.FORCE_COLOR==="false")return 0;return Z.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(Z.FORCE_COLOR,10),3)}}function K(V){if(V===0)return!1;return{level:V,hasBasic:!0,has256:V>=2,has16m:V>=3}}function H(V,{streamIsTTY:U,sniffFlags:M=!0}={}){let L=W();if(L!==void 0)$=L;let F=M?$:L;if(F===0)return 0;if(M){if(G("color=16m")||G("color=full")||G("color=truecolor"))return 3;if(G("color=256"))return 2}if(V&&!U&&F===void 0)return 0;let z=F||0;if(Z.TERM==="dumb")return z;if(process.platform==="win32"){let N=X.release().split(".");if(Number(N[0])>=10&&Number(N[2])>=10586)return Number(N[2])>=14931?3:2;return 1}if("CI"in Z){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some((N)=>(N in Z))||Z.CI_NAME==="codeship")return 1;return z}if("TEAMCITY_VERSION"in Z)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Z.TEAMCITY_VERSION)?1:0;if(Z.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Z){let N=Number.parseInt((Z.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Z.TERM_PROGRAM){case"iTerm.app":return N>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(Z.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Z.TERM))return 1;if("COLORTERM"in Z)return 1;return z}function B(V,U={}){let M=H(V,{streamIsTTY:V&&V.isTTY,...U});return K(M)}Y.exports={supportsColor:B,stdout:B({isTTY:J.isatty(1)}),stderr:B({isTTY:J.isatty(2)})}}}),Ki=e({"node_modules/debug/src/node.js"(Q,Y){var X=X0("tty"),J=X0("util");Q.init=B,Q.log=W,Q.formatArgs=Z,Q.save=K,Q.load=H,Q.useColors=G,Q.destroy=J.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),Q.colors=[6,2,3,4,5,1];try{let U=Wi();if(U&&(U.stderr||U).level>=2)Q.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]}catch(U){}Q.inspectOpts=Object.keys(process.env).filter((U)=>{return/^debug_/i.test(U)}).reduce((U,M)=>{let L=M.substring(6).toLowerCase().replace(/_([a-z])/g,(z,N)=>{return N.toUpperCase()}),F=process.env[M];if(/^(yes|on|true|enabled)$/i.test(F))F=!0;else if(/^(no|off|false|disabled)$/i.test(F))F=!1;else if(F==="null")F=null;else F=Number(F);return U[L]=F,U},{});function G(){return"colors"in Q.inspectOpts?Boolean(Q.inspectOpts.colors):X.isatty(process.stderr.fd)}function Z(U){let{namespace:M,useColors:L}=this;if(L){let F=this.color,z="\x1B[3"+(F<8?F:"8;5;"+F),N=` ${z};1m${M} \x1B[0m`;U[0]=N+U[0].split(`
4
4
  `).join(`
5
5
  `+N),U.push(z+"m+"+Y.exports.humanize(this.diff)+"\x1B[0m")}else U[0]=$()+M+" "+U[0]}function $(){if(Q.inspectOpts.hideDate)return"";return new Date().toISOString()+" "}function W(...U){return process.stderr.write(J.formatWithOptions(Q.inspectOpts,...U)+`
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Cc as a,Dc as b,Ec as c,Fc as d,Gc as e,Hc as f,Ic as g,Jc as h,Kc as i,Lc as j,Mc as k,Nc as l}from"./vm-hands-entry-lite-7neqq6s2.js";import"./vm-hands-entry-lite-yh7n4svm.js";import"./vm-hands-entry-lite-m5pmd2cz.js";import"./vm-hands-entry-lite-avqrqtfe.js";import"./vm-hands-entry-lite-k1wbh9dq.js";import"./vm-hands-entry-lite-53jm8bj7.js";import"./vm-hands-entry-lite-pfsce35z.js";import"./vm-hands-entry-lite-5vrdj7jm.js";import"./vm-hands-entry-lite-qbk0wxrz.js";import"./vm-hands-entry-lite-vvmq0mtv.js";import"./vm-hands-entry-lite-kxbpf40y.js";import"./vm-hands-entry-lite-9dr4z8fr.js";import"./vm-hands-entry-lite-vqcatbcw.js";import"./vm-hands-entry-lite-y9k070mt.js";import"./vm-hands-entry-lite-wffqkcjq.js";import"./vm-hands-entry-lite-ss2w3h3d.js";export{d as runRelayed,e as runMacComputerUse,l as runLocalAutomation,k as runAutomationCallLocally,b as parseAutomationPayload,g as localUserChromeProfiles,h as localUserChromeInstance,f as localUserChromeHost,j as localBrowserProfile,c as localAutomationAvailable,i as ensureLocalBrowser,a as AUTOMATION_CHUNK_BYTES};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{$ as o,P as c,Q as d,R as e,S as f,T as g,U as h,V as i,W as j,X as k,Y as l,Z as m,_ as n,aa as p,ba as q,ca as r,da as s,ea as t,fa as u}from"./vm-hands-entry-lite-7e0r93qr.js";import"./vm-hands-entry-lite-csnwmngz.js";import"./vm-hands-entry-lite-8kqg77ym.js";import"./vm-hands-entry-lite-h2xpqaxn.js";import"./vm-hands-entry-lite-qvrnx0vk.js";import{Zb as b}from"./vm-hands-entry-lite-n07kxrd1.js";import"./vm-hands-entry-lite-whcnpjdx.js";import"./vm-hands-entry-lite-7neqq6s2.js";import"./vm-hands-entry-lite-yh7n4svm.js";import"./vm-hands-entry-lite-m5pmd2cz.js";import"./vm-hands-entry-lite-avqrqtfe.js";import"./vm-hands-entry-lite-k1wbh9dq.js";import"./vm-hands-entry-lite-53jm8bj7.js";import"./vm-hands-entry-lite-pfsce35z.js";import"./vm-hands-entry-lite-5vrdj7jm.js";import"./vm-hands-entry-lite-qbk0wxrz.js";import"./vm-hands-entry-lite-vvmq0mtv.js";import"./vm-hands-entry-lite-kxbpf40y.js";import"./vm-hands-entry-lite-9dr4z8fr.js";import"./vm-hands-entry-lite-vqcatbcw.js";import"./vm-hands-entry-lite-y9k070mt.js";import{Ih as a}from"./vm-hands-entry-lite-wffqkcjq.js";import"./vm-hands-entry-lite-ss2w3h3d.js";export{g as spawnCaptured,f as sandboxProfile,e as safeEnvironment,k as runTransferCapability,i as runFileCapability,t as rebindLocalHandsControl,j as localGithubPreviewServerLaunch,b as isProtectedLocalPath,u as executeLocalOperation,m as enrolledWorkspaceRootFingerprint,q as enrolledRootPaths,p as enrolledHomeContainedRootFingerprints,n as enrolledAccountRootPath,o as enrolledAccountRootFingerprint,s as deliverLocalHandsEnvironment,h as defaultLocalCommandRunner,d as confinedExecutionShell,r as capabilityInventoryForRoots,c as SHORT_REQUEST_CAPABILITIES,a as LocalCapabilityError,l as LOCAL_CAPABILITY_REGISTRY};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Bh as a,Ch as b,Dh as c,Eh as d,Fh as e,Gh as f,Hh as g}from"./vm-hands-entry-lite-y9k070mt.js";import"./vm-hands-entry-lite-wffqkcjq.js";import"./vm-hands-entry-lite-ss2w3h3d.js";export{f as trackDesktopRun,c as releaseLocalDesktop,a as noteLocalDesktopUse,g as holdLocalDesktop,b as forgetLocalDesktopUse,e as DESKTOP_WAIT_MS,d as DESKTOP_IDLE_MS};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ng as a,Og as b,Pg as c,Qg as d,Rg as e,Sg as f,Tg as g}from"./vm-hands-entry-lite-5vrdj7jm.js";import"./vm-hands-entry-lite-wffqkcjq.js";import"./vm-hands-entry-lite-ss2w3h3d.js";export{c as requestMacScreenAccess,d as parseMacWindowBounds,a as parseMacScreenStatus,e as openMacWindowBounds,g as openMacInput,b as macScreenStatus,f as MacInputTranslator};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ae as h,te as a,ue as b,ve as c,we as d,xe as e,ye as f,ze as g}from"./vm-hands-entry-lite-avqrqtfe.js";import"./vm-hands-entry-lite-k1wbh9dq.js";import"./vm-hands-entry-lite-53jm8bj7.js";import"./vm-hands-entry-lite-pfsce35z.js";import"./vm-hands-entry-lite-5vrdj7jm.js";import"./vm-hands-entry-lite-qbk0wxrz.js";import"./vm-hands-entry-lite-vvmq0mtv.js";import"./vm-hands-entry-lite-kxbpf40y.js";import"./vm-hands-entry-lite-9dr4z8fr.js";import"./vm-hands-entry-lite-vqcatbcw.js";import"./vm-hands-entry-lite-y9k070mt.js";import"./vm-hands-entry-lite-wffqkcjq.js";import"./vm-hands-entry-lite-ss2w3h3d.js";export{h as runLocalDisplayStream,f as privateDirectory,c as parseDisplayStreamPayload,e as localDisplayReady,d as localDisplayAvailable,g as ensureLinuxDesktop,a as LOCAL_DISPLAY_MAX_SESSION_MS,b as LINUX_WORKER_DISPLAY};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{$c as h,Ad as I,Bd as J,Cd as K,Dd as L,Ed as M,Fd as N,Gd as O,Hd as P,Id as Q,Jd as R,Kd as S,Ld as T,Md as U,Nd as V,Od as W,Pd as X,Qd as Y,Rd as Z,Sd as _,Td as $,Uc as a,Ud as aa,Vc as b,Vd as ba,Wc as c,Wd as ca,Xc as d,Xd as da,Yc as e,Yd as ea,Zc as f,Zd as fa,_c as g,ad as i,bd as j,cd as k,dd as l,ed as m,fd as n,gd as o,hd as p,id as q,jd as r,kd as s,ld as t,md as u,nd as v,od as w,pd as x,qd as y,rd as z,sd as A,td as B,ud as C,vd as D,wd as E,xd as F,yd as G,zd as H}from"./vm-hands-entry-lite-gqncr2j0.js";import"./vm-hands-entry-lite-sv6xwe0h.js";import"./vm-hands-entry-lite-7gh1rbn7.js";export{Y as parseLocalRuntimeRootsSyncResponse,U as parseLocalRuntimeRegistrationResponse,T as parseLocalRuntimeProofChallenge,ca as parseLocalRuntimeOperationHeartbeatResponse,da as parseLocalRuntimeOperationEventsResponse,ea as parseLocalRuntimeOperationEnvironmentResponse,fa as parseLocalRuntimeOperationCompletionResponse,ba as parseLocalRuntimeOperationClaim,$ as parseLocalRuntimeLocalSubscriptionResponse,aa as parseLocalRuntimeLifecycleResponse,Z as parseLocalRuntimeIdentityResponse,W as parseLocalRuntimeHeartbeatResponse,X as parseLocalRuntimeFirstHeartbeat,S as parseLocalRuntimeErrorEnvelope,V as parseLocalRuntimeEnrollmentResponse,_ as parseLocalRuntimeDisconnectResponse,j as localRuntimeSessionRoutable,R as buildLocalRuntimeDeviceProofBytes,I as WORKER_PREVIEW_CARRIED_JOBS,e as RELAY_HOST_ALIAS_VERSION,d as RELAY_HOST_ALIAS_HEADER,N as LOCAL_RUNTIME_WORKER_STARTUP_MAX_MS,k as LOCAL_RUNTIME_SESSION_VM_HANDS_REGISTER,h as LOCAL_RUNTIME_SESSION_PRE_AUTH_MAX_BYTES,g as LOCAL_RUNTIME_SESSION_PATH,m as LOCAL_RUNTIME_SESSION_CLOSE,l as LOCAL_RUNTIME_SESSION_CLAIM_WAIT_MAX_MS,i as LOCAL_RUNTIME_SESSION_AUTH_DEADLINE_MS,b as LOCAL_RUNTIME_ROUTE_PREFIX,f as LOCAL_RUNTIME_ROUTES,a as LOCAL_RUNTIME_PROTOCOL_VERSION,O as LOCAL_RUNTIME_LIFECYCLE_EVENTS,Q as LOCAL_RUNTIME_LEGACY_DEVICE_PROOF_TAG,P as LOCAL_RUNTIME_DEVICE_PROOF_TAG,c as LOCAL_OPERATION_MAX_BYTES,K as JOBS_START_WAIT_KEY,J as JOBS_START_WAIT,H as HANDS_SESSION_GROUP_KEY,G as HANDS_SESSION_GROUP,s as HANDS_REBIND_KEY,t as HANDS_REBIND_CONTROL,r as HANDS_REBIND,D as HANDS_MODEL_JOBS_EGRESS_KEY,C as HANDS_MODEL_JOBS_EGRESS,z as HANDS_LARGE_ENVIRONMENT_KEY,y as HANDS_LARGE_ENVIRONMENT,F as HANDS_JOBS_USER_KEY,E as HANDS_JOBS_USER,x as HANDS_HEADLESS_BROWSER_KEY,w as HANDS_HEADLESS_BROWSER,o as HANDS_ENVIRONMENT_DELIVER_CONTROL,n as HANDS_ENVIRONMENT_DELIVERY,q as HANDS_ENVIRONMENT_AT_CLAIM_KEY,p as HANDS_ENVIRONMENT_AT_CLAIM,B as HANDS_CONFINEMENT_KEY,A as HANDS_CONFINEMENT,v as HANDS_CLOUD_ACCESS_KEY,u as HANDS_CLOUD_ACCESS,L as AUTOMATION_USER_CHROME,M as AUTOMATION_CLOUD_SESSIONS};
2
+ import{$c as f,$d as fa,Ad as G,Bd as H,Cd as I,Dd as J,Ed as K,Fd as L,Gd as M,Hd as N,Id as O,Jd as P,Kd as Q,Ld as R,Md as S,Nd as T,Od as U,Pd as V,Qd as W,Rd as X,Sd as Y,Td as Z,Ud as _,Vd as $,Wc as a,Wd as aa,Xc as b,Xd as ba,Yc as c,Yd as ca,Zc as d,Zd as da,_c as e,_d as ea,ad as g,bd as h,cd as i,dd as j,ed as k,fd as l,gd as m,hd as n,id as o,jd as p,kd as q,ld as r,md as s,nd as t,od as u,pd as v,qd as w,rd as x,sd as y,td as z,ud as A,vd as B,wd as C,xd as D,yd as E,zd as F}from"./vm-hands-entry-lite-yh7n4svm.js";import"./vm-hands-entry-lite-m5pmd2cz.js";import"./vm-hands-entry-lite-ss2w3h3d.js";export{Y as parseLocalRuntimeRootsSyncResponse,U as parseLocalRuntimeRegistrationResponse,T as parseLocalRuntimeProofChallenge,ca as parseLocalRuntimeOperationHeartbeatResponse,da as parseLocalRuntimeOperationEventsResponse,ea as parseLocalRuntimeOperationEnvironmentResponse,fa as parseLocalRuntimeOperationCompletionResponse,ba as parseLocalRuntimeOperationClaim,$ as parseLocalRuntimeLocalSubscriptionResponse,aa as parseLocalRuntimeLifecycleResponse,Z as parseLocalRuntimeIdentityResponse,W as parseLocalRuntimeHeartbeatResponse,X as parseLocalRuntimeFirstHeartbeat,S as parseLocalRuntimeErrorEnvelope,V as parseLocalRuntimeEnrollmentResponse,_ as parseLocalRuntimeDisconnectResponse,j as localRuntimeSessionRoutable,R as buildLocalRuntimeDeviceProofBytes,I as WORKER_PREVIEW_CARRIED_JOBS,e as RELAY_HOST_ALIAS_VERSION,d as RELAY_HOST_ALIAS_HEADER,N as LOCAL_RUNTIME_WORKER_STARTUP_MAX_MS,k as LOCAL_RUNTIME_SESSION_VM_HANDS_REGISTER,h as LOCAL_RUNTIME_SESSION_PRE_AUTH_MAX_BYTES,g as LOCAL_RUNTIME_SESSION_PATH,m as LOCAL_RUNTIME_SESSION_CLOSE,l as LOCAL_RUNTIME_SESSION_CLAIM_WAIT_MAX_MS,i as LOCAL_RUNTIME_SESSION_AUTH_DEADLINE_MS,b as LOCAL_RUNTIME_ROUTE_PREFIX,f as LOCAL_RUNTIME_ROUTES,a as LOCAL_RUNTIME_PROTOCOL_VERSION,O as LOCAL_RUNTIME_LIFECYCLE_EVENTS,Q as LOCAL_RUNTIME_LEGACY_DEVICE_PROOF_TAG,P as LOCAL_RUNTIME_DEVICE_PROOF_TAG,c as LOCAL_OPERATION_MAX_BYTES,K as JOBS_START_WAIT_KEY,J as JOBS_START_WAIT,H as HANDS_SESSION_GROUP_KEY,G as HANDS_SESSION_GROUP,s as HANDS_REBIND_KEY,t as HANDS_REBIND_CONTROL,r as HANDS_REBIND,D as HANDS_MODEL_JOBS_EGRESS_KEY,C as HANDS_MODEL_JOBS_EGRESS,z as HANDS_LARGE_ENVIRONMENT_KEY,y as HANDS_LARGE_ENVIRONMENT,F as HANDS_JOBS_USER_KEY,E as HANDS_JOBS_USER,x as HANDS_HEADLESS_BROWSER_KEY,w as HANDS_HEADLESS_BROWSER,o as HANDS_ENVIRONMENT_DELIVER_CONTROL,n as HANDS_ENVIRONMENT_DELIVERY,q as HANDS_ENVIRONMENT_AT_CLAIM_KEY,p as HANDS_ENVIRONMENT_AT_CLAIM,B as HANDS_CONFINEMENT_KEY,A as HANDS_CONFINEMENT,v as HANDS_CLOUD_ACCESS_KEY,u as HANDS_CLOUD_ACCESS,L as AUTOMATION_USER_CHROME,M as AUTOMATION_CLOUD_SESSIONS};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{x as a}from"./vm-hands-entry-lite-yf8h8gmh.js";import"./vm-hands-entry-lite-ss2w3h3d.js";export default a();
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{qg as a,rg as b,sg as c,tg as d,ug as e,vg as f,wg as g,xg as h,yg as i,zg as j}from"./vm-hands-entry-lite-pfsce35z.js";import"./vm-hands-entry-lite-5vrdj7jm.js";import"./vm-hands-entry-lite-vvmq0mtv.js";import"./vm-hands-entry-lite-kxbpf40y.js";import"./vm-hands-entry-lite-9dr4z8fr.js";import"./vm-hands-entry-lite-vqcatbcw.js";import"./vm-hands-entry-lite-wffqkcjq.js";import"./vm-hands-entry-lite-ss2w3h3d.js";export{j as runPermissionsCli,d as reasonIdentity,e as readMacPermissions,f as permissionsSummary,i as parsePermissionsArgs,c as fullDiskAccessTarget,g as formatMacPermissions,h as allowMacPermissions,a as PERMISSIONS_HELP,b as MAC_PERMISSION_IDS};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{$f as U,Af as t,Bf as u,Cf as v,Df as w,Ef as x,Ff as y,Gf as z,Hf as A,If as B,Jf as C,Kf as D,Lf as E,Mf as F,Nf as G,Of as H,Pf as I,Qf as J,Rf as K,Sf as L,Tf as M,Uf as N,Vf as O,Wf as P,Xf as Q,Yf as R,Zf as S,_f as T,ag as V,bg as W,cg as X,dg as Y,hf as a,if as b,jf as c,kf as d,lf as e,mf as f,nf as g,of as h,pf as i,qf as j,rf as k,sf as l,tf as m,uf as n,vf as o,wf as p,xf as q,yf as r,zf as s}from"./vm-hands-entry-lite-ptmqg51y.js";import"./vm-hands-entry-lite-84aq8d12.js";import"./vm-hands-entry-lite-7gh1rbn7.js";export{w as reasonHandsCloseReason,X as parseReasonHandsSdkResponse,W as parseReasonHandsSdkRequest,I as parseReasonHandsResult,H as parseReasonHandsRequest,O as parseReasonHandsPtyReceipt,J as parseReasonHandsProgress,N as parseReasonHandsJobResult,M as parseReasonHandsJobRequest,L as parseReasonHandsClaimAck,K as parseReasonHandsClaim,P as parseReasonHandsCancelRequest,Q as parseReasonHandsCancelAck,E as isReasonHandsUuid,C as isReasonHandsRequestId,F as isReasonHandsPtyJobId,D as isReasonHandsGeneration,G as isReasonHandsArtifactSha256,Y as encodeReasonHandsSdkResponse,S as encodeReasonHandsResult,R as encodeReasonHandsRequest,T as encodeReasonHandsProgress,V as encodeReasonHandsClaimAck,U as encodeReasonHandsClaim,z as REASON_HANDS_SDK_MAX_QUERY_CHARS,y as REASON_HANDS_SDK_MAX_NAME_CHARS,n as REASON_HANDS_PTY_PROTOCOL_VERSION,q as REASON_HANDS_PTY_MAX_PENDING_INPUT_BYTES,p as REASON_HANDS_PTY_MAX_OUTPUT_BYTES,o as REASON_HANDS_PTY_MAX_INPUT_BYTES,r as REASON_HANDS_PTY_MAX_DIMENSION,s as REASON_HANDS_PTY_CLEANUP_SWEEP_MS,u as REASON_HANDS_PTY_CLEANUP_RECEIPT_MS,t as REASON_HANDS_PTY_ANCHOR_EXIT_MS,a as REASON_HANDS_PROTOCOL_VERSION,f as REASON_HANDS_OUTPUT_TRUNCATED_MARKER,d as REASON_HANDS_MAX_STRUCTURED_INPUT_CHARS,e as REASON_HANDS_MAX_OUTPUT_CHARS,c as REASON_HANDS_MAX_INPUT_CHARS,b as REASON_HANDS_MAX_FRAME_BYTES,g as REASON_HANDS_MAX_ERROR_CHARS,h as REASON_HANDS_JOB_PROTOCOL_VERSION,l as REASON_HANDS_JOB_MAX_RECORDS,k as REASON_HANDS_JOB_MAX_OUTPUT_CHUNKS,j as REASON_HANDS_JOB_MAX_OUTPUT_CHARS,i as REASON_HANDS_JOB_MAX_INPUT_CHARS,A as REASON_HANDS_JOB_ERRORS,m as REASON_HANDS_JOB_CONTROL_MAX_FRAME_BYTES,x as REASON_HANDS_ERROR_CODES,v as REASON_HANDS_CLOSE_CODES,B as HandsProtocolError};
2
+ import{$f as S,Af as r,Bf as s,Cf as t,Df as u,Ef as v,Ff as w,Gf as x,Hf as y,If as z,Jf as A,Kf as B,Lf as C,Mf as D,Nf as E,Of as F,Pf as G,Qf as H,Rf as I,Sf as J,Tf as K,Uf as L,Vf as M,Wf as N,Xf as O,Yf as P,Zf as Q,_f as R,ag as T,bg as U,cg as V,dg as W,eg as X,fg as Y,jf as a,kf as b,lf as c,mf as d,nf as e,of as f,pf as g,qf as h,rf as i,sf as j,tf as k,uf as l,vf as m,wf as n,xf as o,yf as p,zf as q}from"./vm-hands-entry-lite-53jm8bj7.js";import"./vm-hands-entry-lite-kxbpf40y.js";import"./vm-hands-entry-lite-ss2w3h3d.js";export{w as reasonHandsCloseReason,X as parseReasonHandsSdkResponse,W as parseReasonHandsSdkRequest,I as parseReasonHandsResult,H as parseReasonHandsRequest,O as parseReasonHandsPtyReceipt,J as parseReasonHandsProgress,N as parseReasonHandsJobResult,M as parseReasonHandsJobRequest,L as parseReasonHandsClaimAck,K as parseReasonHandsClaim,P as parseReasonHandsCancelRequest,Q as parseReasonHandsCancelAck,E as isReasonHandsUuid,C as isReasonHandsRequestId,F as isReasonHandsPtyJobId,D as isReasonHandsGeneration,G as isReasonHandsArtifactSha256,Y as encodeReasonHandsSdkResponse,S as encodeReasonHandsResult,R as encodeReasonHandsRequest,T as encodeReasonHandsProgress,V as encodeReasonHandsClaimAck,U as encodeReasonHandsClaim,z as REASON_HANDS_SDK_MAX_QUERY_CHARS,y as REASON_HANDS_SDK_MAX_NAME_CHARS,n as REASON_HANDS_PTY_PROTOCOL_VERSION,q as REASON_HANDS_PTY_MAX_PENDING_INPUT_BYTES,p as REASON_HANDS_PTY_MAX_OUTPUT_BYTES,o as REASON_HANDS_PTY_MAX_INPUT_BYTES,r as REASON_HANDS_PTY_MAX_DIMENSION,s as REASON_HANDS_PTY_CLEANUP_SWEEP_MS,u as REASON_HANDS_PTY_CLEANUP_RECEIPT_MS,t as REASON_HANDS_PTY_ANCHOR_EXIT_MS,a as REASON_HANDS_PROTOCOL_VERSION,f as REASON_HANDS_OUTPUT_TRUNCATED_MARKER,d as REASON_HANDS_MAX_STRUCTURED_INPUT_CHARS,e as REASON_HANDS_MAX_OUTPUT_CHARS,c as REASON_HANDS_MAX_INPUT_CHARS,b as REASON_HANDS_MAX_FRAME_BYTES,g as REASON_HANDS_MAX_ERROR_CHARS,h as REASON_HANDS_JOB_PROTOCOL_VERSION,l as REASON_HANDS_JOB_MAX_RECORDS,k as REASON_HANDS_JOB_MAX_OUTPUT_CHUNKS,j as REASON_HANDS_JOB_MAX_OUTPUT_CHARS,i as REASON_HANDS_JOB_MAX_INPUT_CHARS,A as REASON_HANDS_JOB_ERRORS,m as REASON_HANDS_JOB_CONTROL_MAX_FRAME_BYTES,x as REASON_HANDS_ERROR_CODES,v as REASON_HANDS_CLOSE_CODES,B as HandsProtocolError};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{a as Wq,b as Bq,c as bq,d as Fq,e as Dq,f as kq,i as Kq,j as Vq,o as Hq}from"./vm-hands-entry-lite-21zpypby.js";import"./vm-hands-entry-lite-k4c504n7.js";import"./vm-hands-entry-lite-am0fatcw.js";import"./vm-hands-entry-lite-1nnj48qj.js";import"./vm-hands-entry-lite-c2nrar90.js";import"./vm-hands-entry-lite-65pbrs1x.js";import"./vm-hands-entry-lite-qvrnx0vk.js";import"./vm-hands-entry-lite-n07kxrd1.js";import"./vm-hands-entry-lite-1hwdab4e.js";import{lc as jq}from"./vm-hands-entry-lite-54n8tmj1.js";import"./vm-hands-entry-lite-gqncr2j0.js";import{_d as G}from"./vm-hands-entry-lite-sv6xwe0h.js";import"./vm-hands-entry-lite-bw9verbt.js";import{$e as Qq,Ce as H,De as u,Ee as s}from"./vm-hands-entry-lite-bfwf82rw.js";import"./vm-hands-entry-lite-ptmqg51y.js";import"./vm-hands-entry-lite-25t4e0vk.js";import"./vm-hands-entry-lite-s2xydt0n.js";import"./vm-hands-entry-lite-s5qn1k80.js";import{Xg as l}from"./vm-hands-entry-lite-9pmag2qk.js";import"./vm-hands-entry-lite-84aq8d12.js";import{uh as R}from"./vm-hands-entry-lite-z2np2gzv.js";import"./vm-hands-entry-lite-1fznjm91.js";import"./vm-hands-entry-lite-anaydk9m.js";import"./vm-hands-entry-lite-ffg7rf02.js";import{Kh as $q}from"./vm-hands-entry-lite-7gh1rbn7.js";import{createHash as tq,randomBytes as sq}from"crypto";import{readFileSync as eq,realpathSync as Aq,renameSync as aq,unlinkSync as nq,writeFileSync as q3}from"fs";import{dirname as x3,join as zq}from"path";import{spawnSync as Mq}from"child_process";import{accessSync as _q,constants as wq,existsSync as L,mkdirSync as Lq,readFileSync as fq,renameSync as Sq,writeFileSync as hq}from"fs";import{homedir as Cq}from"os";import{delimiter as gq,dirname as mq,join as T}from"path";import{existsSync as Tq,readFileSync as Uq}from"fs";import{join as vq}from"path";var Eq=`---
2
+ import{a as Wq,b as Bq,c as bq,d as Fq,e as Dq,f as kq,i as Kq,j as Vq,o as Hq}from"./vm-hands-entry-lite-5pb2jqh3.js";import"./vm-hands-entry-lite-yvmzze06.js";import"./vm-hands-entry-lite-7e0r93qr.js";import"./vm-hands-entry-lite-csnwmngz.js";import"./vm-hands-entry-lite-8kqg77ym.js";import"./vm-hands-entry-lite-h2xpqaxn.js";import"./vm-hands-entry-lite-qvrnx0vk.js";import"./vm-hands-entry-lite-n07kxrd1.js";import"./vm-hands-entry-lite-whcnpjdx.js";import{lc as jq}from"./vm-hands-entry-lite-7neqq6s2.js";import"./vm-hands-entry-lite-yh7n4svm.js";import{ae as G}from"./vm-hands-entry-lite-m5pmd2cz.js";import"./vm-hands-entry-lite-avqrqtfe.js";import{Ee as H,Fe as u,Ge as s,bf as Qq}from"./vm-hands-entry-lite-k1wbh9dq.js";import"./vm-hands-entry-lite-53jm8bj7.js";import"./vm-hands-entry-lite-pfsce35z.js";import"./vm-hands-entry-lite-5vrdj7jm.js";import"./vm-hands-entry-lite-qbk0wxrz.js";import{Zg as l}from"./vm-hands-entry-lite-vvmq0mtv.js";import"./vm-hands-entry-lite-kxbpf40y.js";import{wh as R}from"./vm-hands-entry-lite-9dr4z8fr.js";import"./vm-hands-entry-lite-vqcatbcw.js";import"./vm-hands-entry-lite-y9k070mt.js";import"./vm-hands-entry-lite-wffqkcjq.js";import{Mh as $q}from"./vm-hands-entry-lite-ss2w3h3d.js";import{createHash as tq,randomBytes as sq}from"crypto";import{readFileSync as eq,realpathSync as Aq,renameSync as aq,unlinkSync as nq,writeFileSync as q3}from"fs";import{dirname as x3,join as zq}from"path";import{spawnSync as Mq}from"child_process";import{accessSync as _q,constants as wq,existsSync as L,mkdirSync as Lq,readFileSync as fq,renameSync as Sq,writeFileSync as hq}from"fs";import{homedir as Cq}from"os";import{delimiter as gq,dirname as mq,join as T}from"path";import{existsSync as Tq,readFileSync as Uq}from"fs";import{join as vq}from"path";var Eq=`---
3
3
  name: reason
4
4
  description: Integrate software with Reason's public REST API using a scoped API key. Use for API clients, CI, service integrations, or cloud coding-session automation.
5
5
  ---
@@ -79,7 +79,7 @@ This computer
79
79
  `),b.version)x.stdout.write(`Version: ${b.version}${b.version===R?"":` (${R} is installed; \`reason connect\` restarts it on that)`}
80
80
  `);if(x.stdout.write(`Folder: ${b.folder}
81
81
  `),x.stdout.write(`Sessions: ${b.sessions_running===null?"":`${b.sessions_running} running, `}${b.sessions_max===1?"one at a time":`up to ${b.sessions_max} at once`}
82
- `),A){let Z=A,V=await(J.readPermissionsSummary??(async()=>{let{permissionsSummary:Rq,readMacPermissions:Nq,reasonIdentity:Iq}=await import("./permissions-avhf90my.js"),{macScreenStatus:Oq}=await import("./local-display-mac-j1v3mcgx.js");return Rq(await Nq({identity:()=>Iq(),grants:Oq,worker:async()=>Z}))}))().catch(()=>null);if(V)x.stdout.write(`${V}
82
+ `),A){let Z=A,V=await(J.readPermissionsSummary??(async()=>{let{permissionsSummary:Rq,readMacPermissions:Nq,reasonIdentity:Iq}=await import("./permissions-dtrq2yvs.js"),{macScreenStatus:Oq}=await import("./local-display-mac-rp51a8w7.js");return Rq(await Nq({identity:()=>Iq(),grants:Oq,worker:async()=>Z}))}))().catch(()=>null);if(V)x.stdout.write(`${V}
83
83
  `);x.stdout.write(`Keep awake: ${A.keep_awake.enabled?"on":"off"}${A.keep_awake.holding?" (holding)":""}
84
84
  `)}if(b.service)x.stdout.write(`Logs: ${b.service.logs}
85
85
  `);for(let Z of b.workspaces??[]){let V=Z.state==="removed"?"removed from that workspace":Z.blocked?"offline (this computer is outside that workspace's allowed networks)":Z.device_id?Gq[Z.state]:"connecting";x.stdout.write(`Also in workspace ${Z.name??Z.organization_id}${Z.account?" (another Reason account's)":""}: ${V}
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{wh as a,xh as b,yh as c,zh as d}from"./vm-hands-entry-lite-9dr4z8fr.js";import"./vm-hands-entry-lite-vqcatbcw.js";import"./vm-hands-entry-lite-ss2w3h3d.js";export{c as compareCliVersions,d as cliAndAgentVersion,b as CLI_VERSION_PATTERN,a as CLI_VERSION};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Jd as UJ,_c as CJ,gd as qJ}from"./vm-hands-entry-lite-gqncr2j0.js";import{createHash as v,randomBytes as t}from"crypto";import{closeSync as QJ,fsyncSync as FJ,mkdirSync as kJ,openSync as WJ,renameSync as SJ,rmSync as gJ,statSync as BJ,writeSync as PJ,constants as S}from"fs";import{join as V}from"path";var HJ=1;var d=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function e(J){if(J.environment!==void 0||J.payload.environment!==void 0)throw new W("vm_hands_bind_invalid","bind carries a plaintext environment");if(J.payload.vm_hands_env_deferred===!0&&J.environment_sealed!==void 0)throw new W("vm_hands_bind_invalid","split bind carries an environment");return J.environment_sealed!==void 0}function jJ(J,Z){let{payload:z,authority:G}=J;if(!z||typeof z!=="object"||Array.isArray(z)||!G||typeof G!=="object"||Array.isArray(G)||!Z.deviceId||!Z.rootId||z.run_id!==Z.runId||z.device_id!==Z.deviceId||G.device_id!==Z.deviceId||z.root_id!==Z.rootId||Z.snapshotId!==void 0&&z.snapshot_id!==Z.snapshotId)throw new W("vm_hands_env_invalid","environment does not match this Hands");return z}function NJ(J){if(J.capability!=="hands.connect")throw new W("vm_hands_bind_invalid","not a hands.connect claim");let Z=J.payload;return{kind:"vm_hands.bind",v:1,bind_id:J.attempt_id,attempt_id:J.attempt_id,attempt_token:J.attempt_token,run_id:J.run_id,session_id:typeof Z.workspace_id==="string"&&d.test(Z.workspace_id)?Z.workspace_id:J.run_id,brain_generation:Z.target_generation,fence_id:Z.target_fence_id,lease_until:J.lease_until,policy:{agent_profile:"",confinement_key:String(Z.hands_confinement??""),browser_egress:Z.browser_egress??null,policy_digest:Z.vm_hands_policy_digest},cwd:typeof Z.cwd==="string"?Z.cwd:"",claim:J,env:e(J)?J.environment_sealed:null}}class W extends Error{code;constructor(J,Z){super(Z);this.code=J}}var g=(J)=>Buffer.from(J instanceof Uint8Array?J:new Uint8Array(J)).toString("base64url"),y=(J)=>new Uint8Array(Buffer.from(J,"base64url"));function R(J){if(J===null||typeof J!=="object")return JSON.stringify(J);if(Array.isArray(J))return`[${J.map(R).join(",")}]`;return`{${Object.keys(J).sort().map((Z)=>`${JSON.stringify(Z)}:${R(J[Z])}`).join(",")}}`}async function aJ(J){let Z=await crypto.subtle.importKey("pkcs8",y(J.device_key.pkcs8),{name:"ECDSA",namedCurve:"P-256"},!1,["sign"]),z=y(J.device_key.spki),G=await crypto.subtle.generateKey({name:"ECDH",namedCurve:"P-256"},!1,["deriveKey"]),N=new Uint8Array(await crypto.subtle.exportKey("spki",G.publicKey)),D=v("sha256").update(z).digest("base64url");return{signing:{privateKey:Z},agreement:G,signingSpki:z,agreementSpki:N,fingerprint:D}}class VJ{init;keys;hooks;options;state="identity_free";lastBrainGeneration=0;bound=null;servedRun=!1;verifiedSinceRun=!1;envDirectory=null;constructor(J,Z,z,G){this.init=J;this.keys=Z;this.hooks=z;this.options=G;if(!d.test(J.workspace_id)&&!/^ws-[a-z0-9]{8,64}$/.test(J.workspace_id))throw new W("vm_hands_layout_invalid","bad workspace id");if(!Number.isSafeInteger(J.instance_generation)||J.instance_generation<1)throw new W("vm_hands_layout_invalid","bad generation")}get phase(){return this.state}get boundRunId(){return this.state==="bound"?this.bound?.runId??null:null}canSpawn(J){return this.state==="bound"&&this.bound?.runId===J&&this.bound.envInstalled}async registerFrame(J){if(this.state!=="identity_free")throw new W("vm_hands_register_twice","already registered");if(typeof J!=="string"||J.length<16||J.length>256)throw new W("vm_hands_challenge_invalid","bad register challenge");let Z={challenge:J,t:"register",v:HJ,workspace_id:this.init.workspace_id,instance_generation:this.init.instance_generation,credential:this.init.credential,device_public_key:g(this.keys.signingSpki),env_public_key:g(this.keys.agreementSpki),key_fingerprint:this.keys.fingerprint,manifest_digest:this.init.manifest_digest,nonce:g(t(32)),timestamp_ms:(this.options.now??Date.now)(),vm_hands_attest_hold:!0},z=await crypto.subtle.sign({name:"ECDSA",hash:"SHA-256"},this.keys.signing.privateKey,new TextEncoder().encode(R(Z)));return{...Z,device_signature:g(z)}}async helloFrame(J,Z){if(this.state==="identity_free")throw new W("vm_hands_not_registered","hello before register");let z=String((this.options.now??Date.now)()),G=g(t(32)),N=UJ({method:"GET",pathAndQuery:CJ,timestamp:z,nonce:G,challenge:J,bodySha256:v("sha256").update("").digest("hex")}),D=new Uint8Array(await crypto.subtle.sign({name:"ECDSA",hash:"SHA-256"},this.keys.signing.privateKey,new Uint8Array(N)));return{t:"hello",timestamp:z,nonce:G,signature:g(vJ(D)),...Z?{vm_hands_previous_connection:Z}:{}}}registered(){if(this.state!=="identity_free")throw new W("vm_hands_register_unexpected","registered twice");this.state="registered"}async bind(J){if(this.state!=="registered")throw new W("vm_hands_not_registered","bind before register or while bound");if(J.kind!=="vm_hands.bind"||J.v!==1)throw new W("vm_hands_bind_invalid","bad bind");for(let G of[J.bind_id,J.attempt_id,J.run_id,J.session_id,J.fence_id])if(!d.test(G))throw new W("vm_hands_bind_invalid","bad id");if(!Number.isSafeInteger(J.brain_generation)||J.brain_generation<=this.lastBrainGeneration)throw new W("vm_hands_generation_stale","brain generation not strictly higher");if(J.env&&(J.env.aad!==J.bind_id||J.env.alg!=="ECDH-P256+A256GCM"))throw new W("vm_hands_bind_invalid","bad env envelope");if(!/^[0-9a-f]{64}$/.test(J.policy.policy_digest))throw new W("vm_hands_bind_invalid","bad policy or nonce");if(v("sha256").update(R({hands_confinement:J.policy.confinement_key||null,browser_egress:J.policy.browser_egress??null})).digest("hex")!==J.policy.policy_digest)throw new W("vm_hands_policy_mismatch","policy digest does not match the claim");this.lastBrainGeneration=J.brain_generation;let z=null;try{if(this.servedRun&&!this.verifiedSinceRun)await this.hooks.killAndVerifyPayload();this.verifiedSinceRun=!1;let{launchId:G,applied:N,readyData:D}=await this.hooks.startExecutor({sessionId:J.session_id,policyDigest:J.policy.policy_digest,confinementKey:J.policy.confinement_key,browserEgress:J.policy.browser_egress,cwd:J.cwd,claim:J.claim}),B=this.hooks.restatLayout(),M=null;if(J.env){let A=J.claim?.owner??{},x=jJ(await this.openSealed(J.env,J.bind_id),{runId:J.run_id,deviceId:typeof A.device_id==="string"?A.device_id:"",rootId:J.claim?.root_id??""});M=this.hooks.installEnvironment(x),z=this.writeJobEnvRootOnly(J.bind_id,x)}return this.servedRun=!0,this.bound={bindId:J.bind_id,runId:J.run_id,sessionId:J.session_id,brainGeneration:J.brain_generation,policyDigest:J.policy.policy_digest,launchId:G,envInstalled:M!==null,rootId:J.claim?.root_id??""},this.state="bound",{bind_id:J.bind_id,attempt_id:J.attempt_id,attempt_token:J.attempt_token,launch_id:G,snapshot_revision:M,layout:B,...D?{ready_data:D}:{},policy_digest:v("sha256").update(R({hands_confinement:N.hands_confinement??null,browser_egress:N.browser_egress??null})).digest("hex")}}catch(G){if(this.servedRun=!0,z)this.shred();let N=G&&typeof G==="object"&&"code"in G&&typeof G.code==="string"&&/^[a-z][a-z0-9_]{2,63}$/.test(G.code)?G.code:"vm_hands_bind_failed";throw G instanceof W?G:new W(N,"executor refused the bind")}}async deliverEnvironment(J){let Z=this.bound;if(this.state!=="bound"||!Z)throw new W("vm_hands_not_bound","environment delivered while not bound");if(J.attemptId!==Z.bindId)throw new W("vm_hands_env_invalid","environment for another attempt");if(!d.test(J.attemptId)||typeof J.snapshotId!=="string"||!J.snapshotId||J.snapshotId.length>128||J.snapshotId.includes("/"))throw new W("vm_hands_env_invalid","bad snapshot id");let z=`${J.attemptId}/${J.snapshotId}`;if(J.sealed?.alg!=="ECDH-P256+A256GCM"||J.sealed.aad!==z)throw new W("vm_hands_env_invalid","bad env envelope");let G=jJ(await this.openSealed(J.sealed,z),{runId:Z.runId,deviceId:J.deviceId,rootId:Z.rootId,snapshotId:J.snapshotId}),N=this.hooks.installEnvironment(G);return Z.envInstalled=!0,this.shred(),this.writeJobEnvRootOnly(`${Z.bindId}-r${N}`,G),{snapshot_id:J.snapshotId,installed_revision:N,installed:!0}}async attestFrame(J,Z){if(this.state==="identity_free")throw new W("vm_hands_not_registered","attest before register");if(!J||J.length>65536)throw new W("vm_hands_attest_invalid","no probe script");let z=await this.hooks.runProbe({nonce:Z,script:J});try{await this.hooks.killAndVerifyPayload(),this.verifiedSinceRun=!0}catch{this.servedRun=!0,this.verifiedSinceRun=!1}return{t:"attest",nonce:Z,exit_code:z.exitCode,markers:z.markers,proof_dir_inode:z.proofDirInode,script_sha256:v("sha256").update(J).digest("hex")}}executorExited(){return this.hooks.executorExited?.()??new Promise(()=>{})}async boundRefused(){await this.unbind()}async unbind(){let J=this.bound?.bindId??null;return this.state="unbinding",this.bound=null,await this.hooks.killAndVerifyPayload(),this.verifiedSinceRun=!0,this.shred(),this.state="registered",{bind_id:J,killed_verified:!0,shredded:!0,srt_fallbacks:this.hooks.takeSrtFallbacks?.()??null}}async openSealed(J,Z){let z=()=>{throw new W("vm_hands_env_invalid","env did not decrypt")},G=await crypto.subtle.importKey("spki",y(J.epk),{name:"ECDH",namedCurve:"P-256"},!1,[]).catch(z),N=await crypto.subtle.deriveKey({name:"ECDH",public:G},this.keys.agreement.privateKey,{name:"AES-GCM",length:256},!1,["decrypt"]),D=await crypto.subtle.decrypt({name:"AES-GCM",iv:y(J.iv),additionalData:new TextEncoder().encode(Z)},N,y(J.ct)).catch(z),B=JSON.parse(new TextDecoder().decode(D));if(!B||typeof B!=="object"||Array.isArray(B))throw new W("vm_hands_env_invalid","env not an object");return B}writeJobEnvRootOnly(J,Z){let z=V(this.options.envRoot,`bind-${J}`);kJ(z,{mode:448});let G=BJ(z);if(!G.isDirectory()||(G.mode&63)!==0||G.uid!==(process.getuid?.()??-1))throw new W("vm_hands_env_dir_unsafe","env directory is not root's 0700");let N=Z.variables&&typeof Z.variables==="object"?Z.variables:{},D=Object.entries(N).filter(([A,x])=>/^[A-Za-z_][A-Za-z0-9_]*$/.test(A)&&typeof x==="string").map(([A,x])=>`export ${A}='${String(x).replaceAll("'","'\\''")}'`).join(`
2
+ import{Ld as UJ,ad as CJ,id as qJ}from"./vm-hands-entry-lite-yh7n4svm.js";import{createHash as v,randomBytes as t}from"crypto";import{closeSync as QJ,fsyncSync as FJ,mkdirSync as kJ,openSync as WJ,renameSync as SJ,rmSync as gJ,statSync as BJ,writeSync as PJ,constants as S}from"fs";import{join as V}from"path";var HJ=1;var d=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function e(J){if(J.environment!==void 0||J.payload.environment!==void 0)throw new W("vm_hands_bind_invalid","bind carries a plaintext environment");if(J.payload.vm_hands_env_deferred===!0&&J.environment_sealed!==void 0)throw new W("vm_hands_bind_invalid","split bind carries an environment");return J.environment_sealed!==void 0}function jJ(J,Z){let{payload:z,authority:G}=J;if(!z||typeof z!=="object"||Array.isArray(z)||!G||typeof G!=="object"||Array.isArray(G)||!Z.deviceId||!Z.rootId||z.run_id!==Z.runId||z.device_id!==Z.deviceId||G.device_id!==Z.deviceId||z.root_id!==Z.rootId||Z.snapshotId!==void 0&&z.snapshot_id!==Z.snapshotId)throw new W("vm_hands_env_invalid","environment does not match this Hands");return z}function NJ(J){if(J.capability!=="hands.connect")throw new W("vm_hands_bind_invalid","not a hands.connect claim");let Z=J.payload;return{kind:"vm_hands.bind",v:1,bind_id:J.attempt_id,attempt_id:J.attempt_id,attempt_token:J.attempt_token,run_id:J.run_id,session_id:typeof Z.workspace_id==="string"&&d.test(Z.workspace_id)?Z.workspace_id:J.run_id,brain_generation:Z.target_generation,fence_id:Z.target_fence_id,lease_until:J.lease_until,policy:{agent_profile:"",confinement_key:String(Z.hands_confinement??""),browser_egress:Z.browser_egress??null,policy_digest:Z.vm_hands_policy_digest},cwd:typeof Z.cwd==="string"?Z.cwd:"",claim:J,env:e(J)?J.environment_sealed:null}}class W extends Error{code;constructor(J,Z){super(Z);this.code=J}}var g=(J)=>Buffer.from(J instanceof Uint8Array?J:new Uint8Array(J)).toString("base64url"),y=(J)=>new Uint8Array(Buffer.from(J,"base64url"));function R(J){if(J===null||typeof J!=="object")return JSON.stringify(J);if(Array.isArray(J))return`[${J.map(R).join(",")}]`;return`{${Object.keys(J).sort().map((Z)=>`${JSON.stringify(Z)}:${R(J[Z])}`).join(",")}}`}async function aJ(J){let Z=await crypto.subtle.importKey("pkcs8",y(J.device_key.pkcs8),{name:"ECDSA",namedCurve:"P-256"},!1,["sign"]),z=y(J.device_key.spki),G=await crypto.subtle.generateKey({name:"ECDH",namedCurve:"P-256"},!1,["deriveKey"]),N=new Uint8Array(await crypto.subtle.exportKey("spki",G.publicKey)),D=v("sha256").update(z).digest("base64url");return{signing:{privateKey:Z},agreement:G,signingSpki:z,agreementSpki:N,fingerprint:D}}class VJ{init;keys;hooks;options;state="identity_free";lastBrainGeneration=0;bound=null;servedRun=!1;verifiedSinceRun=!1;envDirectory=null;constructor(J,Z,z,G){this.init=J;this.keys=Z;this.hooks=z;this.options=G;if(!d.test(J.workspace_id)&&!/^ws-[a-z0-9]{8,64}$/.test(J.workspace_id))throw new W("vm_hands_layout_invalid","bad workspace id");if(!Number.isSafeInteger(J.instance_generation)||J.instance_generation<1)throw new W("vm_hands_layout_invalid","bad generation")}get phase(){return this.state}get boundRunId(){return this.state==="bound"?this.bound?.runId??null:null}canSpawn(J){return this.state==="bound"&&this.bound?.runId===J&&this.bound.envInstalled}async registerFrame(J){if(this.state!=="identity_free")throw new W("vm_hands_register_twice","already registered");if(typeof J!=="string"||J.length<16||J.length>256)throw new W("vm_hands_challenge_invalid","bad register challenge");let Z={challenge:J,t:"register",v:HJ,workspace_id:this.init.workspace_id,instance_generation:this.init.instance_generation,credential:this.init.credential,device_public_key:g(this.keys.signingSpki),env_public_key:g(this.keys.agreementSpki),key_fingerprint:this.keys.fingerprint,manifest_digest:this.init.manifest_digest,nonce:g(t(32)),timestamp_ms:(this.options.now??Date.now)(),vm_hands_attest_hold:!0},z=await crypto.subtle.sign({name:"ECDSA",hash:"SHA-256"},this.keys.signing.privateKey,new TextEncoder().encode(R(Z)));return{...Z,device_signature:g(z)}}async helloFrame(J,Z){if(this.state==="identity_free")throw new W("vm_hands_not_registered","hello before register");let z=String((this.options.now??Date.now)()),G=g(t(32)),N=UJ({method:"GET",pathAndQuery:CJ,timestamp:z,nonce:G,challenge:J,bodySha256:v("sha256").update("").digest("hex")}),D=new Uint8Array(await crypto.subtle.sign({name:"ECDSA",hash:"SHA-256"},this.keys.signing.privateKey,new Uint8Array(N)));return{t:"hello",timestamp:z,nonce:G,signature:g(vJ(D)),...Z?{vm_hands_previous_connection:Z}:{}}}registered(){if(this.state!=="identity_free")throw new W("vm_hands_register_unexpected","registered twice");this.state="registered"}async bind(J){if(this.state!=="registered")throw new W("vm_hands_not_registered","bind before register or while bound");if(J.kind!=="vm_hands.bind"||J.v!==1)throw new W("vm_hands_bind_invalid","bad bind");for(let G of[J.bind_id,J.attempt_id,J.run_id,J.session_id,J.fence_id])if(!d.test(G))throw new W("vm_hands_bind_invalid","bad id");if(!Number.isSafeInteger(J.brain_generation)||J.brain_generation<=this.lastBrainGeneration)throw new W("vm_hands_generation_stale","brain generation not strictly higher");if(J.env&&(J.env.aad!==J.bind_id||J.env.alg!=="ECDH-P256+A256GCM"))throw new W("vm_hands_bind_invalid","bad env envelope");if(!/^[0-9a-f]{64}$/.test(J.policy.policy_digest))throw new W("vm_hands_bind_invalid","bad policy or nonce");if(v("sha256").update(R({hands_confinement:J.policy.confinement_key||null,browser_egress:J.policy.browser_egress??null})).digest("hex")!==J.policy.policy_digest)throw new W("vm_hands_policy_mismatch","policy digest does not match the claim");this.lastBrainGeneration=J.brain_generation;let z=null;try{if(this.servedRun&&!this.verifiedSinceRun)await this.hooks.killAndVerifyPayload();this.verifiedSinceRun=!1;let{launchId:G,applied:N,readyData:D}=await this.hooks.startExecutor({sessionId:J.session_id,policyDigest:J.policy.policy_digest,confinementKey:J.policy.confinement_key,browserEgress:J.policy.browser_egress,cwd:J.cwd,claim:J.claim}),B=this.hooks.restatLayout(),M=null;if(J.env){let A=J.claim?.owner??{},x=jJ(await this.openSealed(J.env,J.bind_id),{runId:J.run_id,deviceId:typeof A.device_id==="string"?A.device_id:"",rootId:J.claim?.root_id??""});M=this.hooks.installEnvironment(x),z=this.writeJobEnvRootOnly(J.bind_id,x)}return this.servedRun=!0,this.bound={bindId:J.bind_id,runId:J.run_id,sessionId:J.session_id,brainGeneration:J.brain_generation,policyDigest:J.policy.policy_digest,launchId:G,envInstalled:M!==null,rootId:J.claim?.root_id??""},this.state="bound",{bind_id:J.bind_id,attempt_id:J.attempt_id,attempt_token:J.attempt_token,launch_id:G,snapshot_revision:M,layout:B,...D?{ready_data:D}:{},policy_digest:v("sha256").update(R({hands_confinement:N.hands_confinement??null,browser_egress:N.browser_egress??null})).digest("hex")}}catch(G){if(this.servedRun=!0,z)this.shred();let N=G&&typeof G==="object"&&"code"in G&&typeof G.code==="string"&&/^[a-z][a-z0-9_]{2,63}$/.test(G.code)?G.code:"vm_hands_bind_failed";throw G instanceof W?G:new W(N,"executor refused the bind")}}async deliverEnvironment(J){let Z=this.bound;if(this.state!=="bound"||!Z)throw new W("vm_hands_not_bound","environment delivered while not bound");if(J.attemptId!==Z.bindId)throw new W("vm_hands_env_invalid","environment for another attempt");if(!d.test(J.attemptId)||typeof J.snapshotId!=="string"||!J.snapshotId||J.snapshotId.length>128||J.snapshotId.includes("/"))throw new W("vm_hands_env_invalid","bad snapshot id");let z=`${J.attemptId}/${J.snapshotId}`;if(J.sealed?.alg!=="ECDH-P256+A256GCM"||J.sealed.aad!==z)throw new W("vm_hands_env_invalid","bad env envelope");let G=jJ(await this.openSealed(J.sealed,z),{runId:Z.runId,deviceId:J.deviceId,rootId:Z.rootId,snapshotId:J.snapshotId}),N=this.hooks.installEnvironment(G);return Z.envInstalled=!0,this.shred(),this.writeJobEnvRootOnly(`${Z.bindId}-r${N}`,G),{snapshot_id:J.snapshotId,installed_revision:N,installed:!0}}async attestFrame(J,Z){if(this.state==="identity_free")throw new W("vm_hands_not_registered","attest before register");if(!J||J.length>65536)throw new W("vm_hands_attest_invalid","no probe script");let z=await this.hooks.runProbe({nonce:Z,script:J});try{await this.hooks.killAndVerifyPayload(),this.verifiedSinceRun=!0}catch{this.servedRun=!0,this.verifiedSinceRun=!1}return{t:"attest",nonce:Z,exit_code:z.exitCode,markers:z.markers,proof_dir_inode:z.proofDirInode,script_sha256:v("sha256").update(J).digest("hex")}}executorExited(){return this.hooks.executorExited?.()??new Promise(()=>{})}async boundRefused(){await this.unbind()}async unbind(){let J=this.bound?.bindId??null;return this.state="unbinding",this.bound=null,await this.hooks.killAndVerifyPayload(),this.verifiedSinceRun=!0,this.shred(),this.state="registered",{bind_id:J,killed_verified:!0,shredded:!0,srt_fallbacks:this.hooks.takeSrtFallbacks?.()??null}}async openSealed(J,Z){let z=()=>{throw new W("vm_hands_env_invalid","env did not decrypt")},G=await crypto.subtle.importKey("spki",y(J.epk),{name:"ECDH",namedCurve:"P-256"},!1,[]).catch(z),N=await crypto.subtle.deriveKey({name:"ECDH",public:G},this.keys.agreement.privateKey,{name:"AES-GCM",length:256},!1,["decrypt"]),D=await crypto.subtle.decrypt({name:"AES-GCM",iv:y(J.iv),additionalData:new TextEncoder().encode(Z)},N,y(J.ct)).catch(z),B=JSON.parse(new TextDecoder().decode(D));if(!B||typeof B!=="object"||Array.isArray(B))throw new W("vm_hands_env_invalid","env not an object");return B}writeJobEnvRootOnly(J,Z){let z=V(this.options.envRoot,`bind-${J}`);kJ(z,{mode:448});let G=BJ(z);if(!G.isDirectory()||(G.mode&63)!==0||G.uid!==(process.getuid?.()??-1))throw new W("vm_hands_env_dir_unsafe","env directory is not root's 0700");let N=Z.variables&&typeof Z.variables==="object"?Z.variables:{},D=Object.entries(N).filter(([A,x])=>/^[A-Za-z_][A-Za-z0-9_]*$/.test(A)&&typeof x==="string").map(([A,x])=>`export ${A}='${String(x).replaceAll("'","'\\''")}'`).join(`
3
3
  `)+`
4
4
  `,B=V(z,`.job.env.${t(8).toString("hex")}`),M=WJ(B,S.O_WRONLY|S.O_CREAT|S.O_EXCL|S.O_NOFOLLOW,384);try{PJ(M,D),FJ(M)}finally{QJ(M)}return SJ(B,V(z,"job.env")),this.envDirectory=z,V(z,"job.env")}shred(){let J=this.envDirectory;if(this.envDirectory=null,!J)return;try{let Z=V(J,"job.env"),z=BJ(Z).size,G=WJ(Z,S.O_WRONLY|S.O_NOFOLLOW);try{PJ(G,Buffer.alloc(z)),FJ(G)}finally{QJ(G)}}catch{}gJ(J,{recursive:!0,force:!0})}}function vJ(J){if(J.length!==64)throw new W("vm_hands_signature_invalid","unexpected ECDSA signature length");let Z=(N)=>{let D=0;while(D<N.length-1&&N[D]===0)D++;let B=N.subarray(D),M=B[0]&128?Uint8Array.of(0,...B):B;return Uint8Array.of(2,M.length,...M)},z=Z(J.subarray(0,32)),G=Z(J.subarray(32));return Uint8Array.of(48,z.length+G.length,...z,...G)}import{randomUUID as yJ}from"crypto";var RJ="/app/local-runtime/session?register=vm_hands_v1",fJ="/app/local-runtime",DJ=25000,bJ=20000,mJ=1e4,cJ=5000,pJ=new Set(["pty.start","jobs.control","preview.serve.v1","display.stream.v1"]),JJ=75000,lJ=1e4,u=20000;class h extends Error{}var dJ=64;async function AJ(J){let Z=[...J.modelOps];for(let z of Z)z.abort.abort();await Promise.race([Promise.all(Z.map((z)=>z.settled)),new Promise((z)=>setTimeout(z,cJ))])}async function f(J,Z){return await AJ(J),Z.unbind()}function o(J){for(let Z of J.outbox?.splice(0)??[])Z.reject(Error("vm_hands_attempt_ended"))}var LJ=15000,uJ=1e4;async function zZ(J){let Z=Date.now(),z={deviceId:null,connection:null,turn:null,lostAt:0,receipts:[],attest:"pending",attestWaiters:[],flush:null,modelOps:new Set},G=J.log??(()=>{}),N=async(D)=>{let B=z.turn;if(!B)return;z.turn=null,o(B);let M=await f(z,J.agent).catch(()=>null);if(M)z.receipts.push({turn:B,failure:"vm_hands_bind_lost",unbound:M});G("vm_hands.bound_dropped",{reason:D})};try{for(let D=0;!J.signal.aborted;D++){let B=await oJ(J,z).catch((A)=>{if(A instanceof W&&z.deviceId===null&&A.code==="vm_hands_no_session"&&Date.now()-Z<lJ)return{closeCode:0,closeReason:"vm_hands_no_session"};if(A instanceof W&&z.deviceId===null)throw A;return{closeCode:0,closeReason:A instanceof Error?A.message:String(A)}});if(G("vm_hands.session_closed",{close_code:B.closeCode,reason:B.closeReason.slice(0,120),registered:z.deviceId!==null}),B.closeCode===4401||z.attest==="refused")return;if(J.signal.aborted)return;if(z.turn&&Date.now()-z.lostAt>=JJ)await N("reconnect_deadline");let M=B.closeReason==="vm_hands_no_session"?Math.min(250*2**Math.min(D,5),2000):z.turn?Math.min(250*2**Math.min(D,5),5000,Math.max(0,z.lostAt+JJ-Date.now())):Math.min(500*2**D,30000);if(await new Promise((A)=>setTimeout(A,M)),z.turn&&Date.now()-z.lostAt>=JJ)await N("reconnect_deadline")}}finally{await N("session_ended")}}async function oJ(J,Z){let z=Z.deviceId,G=J.log??(()=>{}),N=z?`/app/local-runtime/session?device_id=${encodeURIComponent(z)}`:RJ,D=`${J.apiOrigin.replace(/^http/,"ws")}${N}`,B=new WebSocket(D),M=0,A="",x=new Map,i=[],b=null,MJ=new Promise(($)=>{B.onclose=(K)=>{M=K.code,A=K.reason;for(let Y of x.values())Y.reject(new h(`session closed ${K.code}`));for(let Y of Z.attestWaiters.splice(0))Y(!1);x.clear(),$()}});B.onmessage=($)=>{let K;try{K=JSON.parse(String($.data))}catch{B.close(4400);return}if(K.t==="res"){let Y=K;x.get(Y.id)?.resolve({status:Y.status,body:Y.body}),x.delete(Y.id);return}if(!b?.(K))i.push(K)};let m=($,K)=>new Promise((Y,F)=>{let P=i.findIndex((C)=>$.includes(C.t));if(P>=0){Y(i.splice(P,1)[0]);return}let U=setTimeout(()=>{b=null,F(new W("vm_hands_no_register",`no ${$.join("/")} in ${K} ms`))},K);b=(C)=>{if(!$.includes(C.t))return!1;return clearTimeout(U),b=null,Y(C),!0}}),c=($)=>B.send(JSON.stringify($)),w=($,K)=>new Promise((Y,F)=>{if(B.readyState!==WebSocket.OPEN){F(new h("session closed"));return}let P=yJ(),U=typeof K.wait_ms==="number"?K.wait_ms:0,C=setTimeout(()=>{if(!x.delete(P))return;F(new h(`no answer to ${$.split("/").pop()} in ${U+LJ} ms`)),B.close(4000,"request_timeout")},U+LJ);x.set(P,{reject:(X)=>{clearTimeout(C),F(X)},resolve:({status:X,body:Q})=>{clearTimeout(C);let j=null;try{j=Q?JSON.parse(Q):null}catch{}Y({status:X,json:j})}}),c({t:"req",id:P,path:`${fJ}${$}`,body:JSON.stringify(K)})}),ZJ=()=>B.close(1001,"stopping");J.signal.addEventListener("abort",ZJ,{once:!0});let r,p={turn:null},T=null,$J=!1,s=new Set,n=!1,l=!1;try{await new Promise((X,Q)=>{let j=setTimeout(()=>Q(Error("session open timeout")),uJ);B.onopen=()=>{clearTimeout(j),G("vm_hands.ws_open",{}),X()},B.onerror=()=>{clearTimeout(j),Q(Error("session socket error"))}});let $=await m(["challenge"],5000);G("vm_hands.challenge",{});let K=null,Y=null,F=null,P;if(z){c(await J.agent.helloFrame($.challenge,Z.connection));let X=await m(["ready"],1e4);if(typeof X.vm_hands_connection==="string")Z.connection=X.vm_hands_connection;if(P={device_id:z,...X.cadence?{cadence:X.cadence}:{}},typeof X.vm_hands_probe_script==="string"){if(F=X.vm_hands_probe_script,l=!0,J.agent.phase==="registered"&&!Z.turn)Z.attest="pending"}if(G("vm_hands.reconnected",{device_id:z}),Z.turn){let Q=X.vm_hands_bind;if(Q&&Q.operation_id===Z.turn.claim.operation_id&&Q.attempt_id===Z.turn.claim.attempt_id)K=Z.turn,G("vm_hands.bound_resumed",{operation_id:Q.operation_id});else{Y=Z.turn,Z.turn=null,o(Y);let j=await f(Z,J.agent).catch(()=>null);if(j)Z.receipts.push({turn:Y,failure:"vm_hands_bind_lost",unbound:j});G("vm_hands.bound_dropped",{reason:"not_named_on_reconnect"})}}}else{c(await J.agent.registerFrame($.challenge)),G("vm_hands.register_sent",{});let X=await m(["registered","register_refused"],1e4);if(X.t==="register_refused")throw new W(X.code,"register refused");J.agent.registered();let Q=X;if(P=Q,Z.deviceId=Q.device_id,typeof Q.vm_hands_connection==="string")Z.connection=Q.vm_hands_connection;if(typeof Q.vm_hands_probe_script==="string"){if(F=Q.vm_hands_probe_script,l=!0,J.agent.phase==="registered"&&!Z.turn)Z.attest="pending"}G("vm_hands.registered",{device_id:P.device_id})}let U=async()=>{let X=await w("/heartbeat",await J.heartbeat());if(X.status>=300)throw Error(`heartbeat ${X.status}`)};await U();let C=P.cadence?.presence_interval_ms??30000;if(r=setInterval(()=>{U().catch(()=>B.close())},C),F&&Z.attest!=="accepted"&&J.agent.phase==="registered"&&!Z.turn)IJ(F,$.challenge);try{if(await KJ(),K){let X=K;Z.flush=()=>zJ(X),Z.flush(),T=GJ(X).catch(async(Q)=>{await a(Q),B.close()}).finally(()=>{T=null})}while(!J.signal.aborted&&B.readyState===WebSocket.OPEN){let X=await w("/operations/claim",{wait_ms:Math.min(P.cadence?.claim_wait_ms??DJ,DJ)});if(X.status===204||!X.json)continue;if(X.status>=300)throw Error(`claim ${X.status}`);let Q=X.json;if(Q.capability==="hands.connect"){if(T){_({claim:Q,eventSeq:0}).complete("failed",{error_code:"vm_hands_busy"}).catch(()=>{return});continue}T=EJ(Q).catch(async(j)=>{await a(j),B.close()}).finally(()=>{T=null})}else _J(Q).catch(()=>{return})}}catch(X){await a(X)}}finally{if(r)clearInterval(r);if(J.signal.removeEventListener("abort",ZJ),Z.flush=null,B.close(),await MJ,await T,(J.agent.phase==="bound"||J.agent.phase==="unbinding")&&!Z.turn){let $=await f(Z,J.agent).catch(()=>null),K=p.turn;if($&&K)Z.receipts.push({turn:{...K,eventSeq:K.eventSeq+1},failure:"vm_hands_bind_lost",unbound:$});G("vm_hands.bound_dropped",{reason:"bound_after_loss"})}for(let $ of s)$.abort()}return{closeCode:M,closeReason:A};async function a($){if($J)return;if($J=!0,Z.turn&&$ instanceof h)Z.lostAt=Date.now();else{let K=Z.turn;if(Z.turn=null,K)o(K),J.onTurn?.(null);if(J.agent.phase==="bound"||J.agent.phase==="unbinding"){let Y=await f(Z,J.agent).catch(()=>null),F=p.turn;if(Y&&F)Z.receipts.push({turn:{...F,eventSeq:F.eventSeq+1},failure:"vm_hands_bind_lost",unbound:Y})}}G("vm_hands.session_lost",{error:$ instanceof Error?$.message:String($),bound_kept:Z.turn!==null})}function _($){let K=$.claim,Y={attempt_id:K.attempt_id,attempt_token:K.attempt_token},F=encodeURIComponent(K.operation_id);return{fence:Y,op:F,complete:(U,C={})=>w(`/operations/${F}/complete`,{...Y,status:U,...C}),emit:(U,C)=>{let X=($.chain??Promise.resolve()).catch(()=>{return}).then(()=>P(U,C));return $.chain=X,X}};async function P(U,C){let X=$.eventSeq,Q=(L)=>w(`/operations/${F}/events`,{...Y,event_seq_start:L,events:[{kind:U,payload:{sequence:L,capability:String(K.capability??"hands.connect"),data:C}}]}),j=X,E=await Q(j),I=E.status===409?E.json?.expected_event_seq:void 0;if(typeof I==="number"&&I===X+1)E={status:200,json:{duplicate:!0}};else if(typeof I==="number"&&I>=0&&I!==X)j=I,E=await Q(j);if(E.status<300)$.eventSeq=j+1;return E}}function xJ($){return(K,Y)=>new Promise((F,P)=>{if(Z.turn!==$){P(Error("vm_hands_attempt_ended"));return}if($.outbox??=[],$.outbox.length>=dJ){P(Error("vm_hands_outbox_full"));return}$.outbox.push({kind:K,data:Y,resolve:F,reject:P}),Z.flush?.()})}function zJ($){if(n)return;n=!0,(async()=>{try{while($.outbox?.length&&Z.turn===$&&B.readyState===WebSocket.OPEN){let K=$.outbox[0],Y;try{Y=await _($).emit(K.kind,K.data)}catch(F){if(F instanceof h)return;Y={status:500}}if($.outbox.shift(),Y.status<300)K.resolve();else K.reject(Error(`${K.kind} refused ${Y.status}`))}}finally{n=!1}})()}async function IJ($,K){try{let Y=await J.agent.attestFrame($,K);if(B.readyState!==WebSocket.OPEN)return;c(Y);let F=await m(["attested","attest_refused"],15000);Z.attest=F.t==="attested"?"accepted":"refused";for(let P of Z.attestWaiters.splice(0))P(Z.attest==="accepted");if(G("vm_hands.attest",{result:Z.attest,exit_code:Y.exit_code,...F.t==="attest_refused"?{code:String(F.code??"")}:{}}),Z.attest==="refused")B.close(4401,"attest_refused")}catch(Y){G("vm_hands.attest_failed",{code:Y instanceof W?Y.code:"probe_error"});for(let F of Z.attestWaiters.splice(0))F(!1);if(Z.attest!=="accepted")B.close(4000,"attest_unanswered")}}async function EJ($){let K=l&&Z.attest==="pending",Y=$.vm_hands_attest,F=Y;if(Z.attest==="refused"){G("vm_hands.claim_attest_refused",{said:typeof Y==="string"?Y.slice(0,16):typeof Y,local:Z.attest}),await _({claim:$,eventSeq:0}).complete("failed",{error_code:"vm_hands_unattested"}).catch(()=>{return});return}if(F==="accepted"){if(!K&&Z.attest!=="accepted"){Z.attest="accepted";for(let L of Z.attestWaiters.splice(0))L(!0)}}else if(F!=="pending"||!K){G("vm_hands.claim_attest_refused",{said:typeof Y==="string"?Y.slice(0,16):typeof Y,local:Z.attest}),await _({claim:$,eventSeq:0}).complete("failed",{error_code:"vm_hands_unattested"}).catch(()=>{return});return}if(Z.attest!=="accepted"){let L=Date.parse($.lease_until)-Date.now()-5000,H=Math.max(0,Math.min(u,Number.isFinite(L)?L:u));if(!await new Promise((q)=>{let O=setTimeout(()=>q(!1),H);Z.attestWaiters.push((k)=>{clearTimeout(O),q(k)})})){await _({claim:$,eventSeq:0}).complete("failed",{error_code:"vm_hands_unattested"}).catch(()=>{return});return}}let P={claim:$,eventSeq:0},{complete:U,emit:C}=_(P),X;try{if($.capability!=="hands.connect")throw new W("vm_hands_bind_invalid","not hands.connect");X=!e($)}catch(L){G("vm_hands.bind_refused",{code:L instanceof W?L.code:"unexpected"}),await U("failed",{error_code:L instanceof W?L.code:"vm_hands_bind_invalid"});return}let Q;try{Q=await J.agent.bind(NJ($))}catch(L){G("vm_hands.bind_refused",{code:L instanceof W?L.code:"unexpected"}),await U("failed",{error_code:L instanceof W?L.code:"vm_hands_bind_failed"});return}let j={...Q.ready_data??J.readyData({launchId:Q.launch_id,claim:$})};if(X)delete j.environment_installed;p.turn={claim:$,launchId:Q.launch_id,readyData:j,eventSeq:P.eventSeq,ackSeq:-1};let E=await C("hands.ready",{...j,vm_hands:{layout:Q.layout,policy_digest:Q.policy_digest,launch_id:Q.launch_id}});if(p.turn=null,E.status>=300){await AJ(Z),await J.agent.boundRefused(),await U("failed",{error_code:String(E.json?.error??"vm_hands_probe_failed")});return}let I={claim:$,launchId:Q.launch_id,readyData:j,eventSeq:P.eventSeq,ackSeq:-1};Z.turn=I,Z.flush=()=>zJ(I),J.onTurn?.(xJ(I)),await GJ(I)}async function GJ($){let{fence:K,op:Y}=_($),F=null,P=null,U=J.agent.executorExited().then((C)=>{return P=C,null});J:for(;;){let C=await Promise.race([U,w(`/operations/${Y}/heartbeat`,{...K,control_ack_seq:$.ackSeq,wait_ms:bJ})]);if(!C){F="vm_hands_executor_exited",G("vm_hands.executor_exited",{reason:P});break}if(C.status>=300)break;let X=(C.json?.controls??[]).slice().sort((Q,j)=>Q.seq-j.seq);for(let Q of X){if(Q.seq<=$.ackSeq)continue;if(Q.kind==="operation.cancel"||Q.kind==="cancel"){$.ackSeq=Q.seq;break J}if(Q.kind===qJ)try{await wJ($,Q.payload??{})}catch(j){if(j instanceof h)throw j;F=j instanceof W?j.code:"environment_unavailable",G("vm_hands.environment_refused",{code:F});break J}$.ackSeq=Q.seq}}await OJ($,F)}async function _J($){let K=$,Y={claim:K,eventSeq:0},{complete:F,emit:P,fence:U,op:C}={..._(Y)},X=$.vm_hands_origin==="person"?"person":"model",Q=String($.capability??"");if(!J.executeOp){await F("failed",{error_code:"vm_hands_op_unsupported"});return}if($.vm_hands_attest==="accepted"&&Z.attest==="pending"&&!(l&&Z.attest==="pending")){Z.attest="accepted";for(let q of Z.attestWaiters.splice(0))q(!0)}if(Z.attest!=="accepted"){let q=Date.parse(String($.lease_until??""))-Date.now()-5000,O=Z.attest==="refused"?0:Math.max(0,Math.min(u,Number.isFinite(q)?q:u));if(!(O>0&&await new Promise((XJ)=>{let hJ=setTimeout(()=>XJ(!1),O);Z.attestWaiters.push((TJ)=>{clearTimeout(hJ),XJ(TJ)})}))){await F("failed",{error_code:"vm_hands_unattested"});return}}if(X==="model"&&(J.agent.phase!=="bound"||J.agent.boundRunId!==K.run_id)){await F("failed",{error_code:"vm_hands_not_bound"});return}if(pJ.has(Q)&&J.agent.phase!=="bound"){await F("failed",{error_code:"vm_hands_not_bound"});return}let j=new AbortController;s.add(j);let E,I=new Promise((q)=>{E=q}),L={abort:j,settled:I};if(X==="model")Z.modelOps.add(L);let H=-1,YJ=setInterval(()=>{w(`/operations/${C}/heartbeat`,{...U,control_ack_seq:H,wait_ms:0}).then((q)=>{if(q.status>=300){j.abort();return}let O=q.json?.controls??[];for(let k of O)if(H=Math.max(H,k.seq),k.kind==="operation.cancel"||k.kind==="cancel")j.abort()},()=>j.abort())},mJ);try{let q=await J.executeOp({kind:X,claim:$,signal:j.signal,emit:async(O)=>{await P(O.kind,O.data??{})}});await F(q.status,{...q.result?{result:q.result}:{},...q.error_code!==void 0?{error_code:q.error_code}:{}}),G("vm_hands.op",{capability:Q,kind:X,status:q.status,code:q.error_code??null})}finally{clearInterval(YJ),s.delete(j),Z.modelOps.delete(L),E()}}async function OJ($,K){if(Z.turn===$)Z.turn=null;J.onTurn?.(null),o($);let Y=await f(Z,J.agent);Z.receipts.push({turn:$,failure:K,unbound:Y}),await KJ()}async function KJ(){while(Z.receipts.length){let{turn:$,failure:K,unbound:Y}=Z.receipts[0],{complete:F,emit:P}=_($);try{if(await P("hands.stopped",{...$.readyData,reason_code:K?"failed":"cancelled",killed_verified:Y.killed_verified,shredded:Y.shredded,...Y.srt_fallbacks?{vm_hands_srt_fallbacks:Y.srt_fallbacks}:{}}),K)await F("failed",{error_code:K});else await F("cancelled",{error_code:"driver_stopped"})}catch(U){if(U instanceof h)return}Z.receipts.shift()}}async function wJ($,K){let{fence:Y,op:F}=_($),P=K.snapshot_id;if(K.version!==1||typeof P!=="string"||Object.keys(K).length!==2)throw new W("vm_hands_env_invalid","invalid environment delivery");let U=await w(`/operations/${F}/environment`,{...Y,snapshot_id:P}),C=U.json?.environment_sealed;if(U.status!==200||!C||U.json?.payload!==void 0)throw new W("vm_hands_env_invalid","environment not delivered sealed");let X=await J.agent.deliverEnvironment({attemptId:$.claim.attempt_id,snapshotId:P,deviceId:Z.deviceId??"",sealed:C});if((await w(`/operations/${F}/environment-ack`,{...Y,...X})).status>=300)throw new W("vm_hands_env_ack_refused","environment ack refused")}}
5
5
  export{aJ as u,VJ as v,zZ as w};
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{jh as m}from"./vm-hands-entry-lite-84aq8d12.js";var E=["Click browser element","Double click browser element","Type text","Clear browser field","Press key","Scroll browser element into view","Drag on computer","Select browser option","Check browser control","Uncheck browser control","Hover browser element","Focus browser element","Open browser page","Reload browser page","Go back in browser","Go forward in browser","Take browser screenshot"],VA=32;function R(x){if(!Array.isArray(x)||x.length>32||!x.every((A)=>typeof A==="string"&&E.includes(A)))return;return x.slice()}var $A="__ARA_PI_TOOL_CONFINED_SCRIPT_5f0c9e2a__",JA=262144;function Y(x){if(!x||typeof x!=="object"||Array.isArray(x))return!1;let A=x,B=Object.keys(A);return B.length===2&&B.includes("template")&&B.includes("quoteDepth")&&typeof A.template==="string"&&A.template.length<=262144&&!A.template.includes("\x00")&&A.template.split("__ARA_PI_TOOL_CONFINED_SCRIPT_5f0c9e2a__").length===2&&(A.quoteDepth===1||A.quoteDepth===2||A.quoteDepth===3)}var X=2,P=33554432,K=200000,D=4000000,Q=240000,DA=`
2
+ import{lh as m}from"./vm-hands-entry-lite-kxbpf40y.js";var E=["Click browser element","Double click browser element","Type text","Clear browser field","Press key","Scroll browser element into view","Drag on computer","Select browser option","Check browser control","Uncheck browser control","Hover browser element","Focus browser element","Open browser page","Reload browser page","Go back in browser","Go forward in browser","Take browser screenshot"],VA=32;function R(x){if(!Array.isArray(x)||x.length>32||!x.every((A)=>typeof A==="string"&&E.includes(A)))return;return x.slice()}var $A="__ARA_PI_TOOL_CONFINED_SCRIPT_5f0c9e2a__",JA=262144;function Y(x){if(!x||typeof x!=="object"||Array.isArray(x))return!1;let A=x,B=Object.keys(A);return B.length===2&&B.includes("template")&&B.includes("quoteDepth")&&typeof A.template==="string"&&A.template.length<=262144&&!A.template.includes("\x00")&&A.template.split("__ARA_PI_TOOL_CONFINED_SCRIPT_5f0c9e2a__").length===2&&(A.quoteDepth===1||A.quoteDepth===2||A.quoteDepth===3)}var X=2,P=33554432,K=200000,D=4000000,Q=240000,DA=`
3
3
  ...[executor output truncated]`,j=2000,f=1,b=16384,p=32768,w=128,RA=64,i=2097152,h=1,y=16384,d=32768,YA=8388608,s=1000,c=2500,n=2000,LA=c+n,t=/^[A-Za-z0-9][A-Za-z0-9._:-]{0,199}$/,r=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,o={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},v=new Map(Object.entries(o).map(([x,A])=>[A,x]));function OA(x,A){return A||(v.get(x)??"")}var l=["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"],u=new Set(l),a=200,e=2000,AA=["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 G extends Error{code;constructor(x){super(x);this.name="HandsProtocolError",this.code=x}}function k(x){return new TextEncoder().encode(x).byteLength}function F(x){return typeof x==="object"&&x!==null&&!Array.isArray(x)}function W(x,A){let B=new Set(A);return Object.keys(x).every((N)=>B.has(N))}function M(x){return typeof x==="string"&&t.test(x)}function V(x){return Number.isSafeInteger(x)&&Number(x)>=1}function $(x){return typeof x==="string"&&r.test(x)}function C(x){return typeof x==="string"&&x.startsWith("pty-")&&$(x.slice(4))}function z(x){return[x.cols,x.rows].every((A)=>Number.isSafeInteger(A)&&Number(A)>=1&&Number(A)<=s)}function H(x){if(typeof x!=="string"||x.length>Math.ceil(y/3)*4||x.length%4!==0||!/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(x))return-1;let A=x.endsWith("==")?2:x.endsWith("=")?1:0;if(A&&"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(x[x.length-A-1])&(A===2?15:3))return-1;let N=x.length/4*3-A;return N<=y?N:-1}function S(x){return typeof x==="string"&&/^[0-9a-f]{64}$/.test(x)}function Z(x){if(k(x)>P)throw new G("frame_too_large");try{return JSON.parse(x)}catch{throw new G("invalid_json")}}function xA(x){let A=Z(x);if(!F(A)||!W(A,["version","generation","id","tool","input","semanticDigest","lifecycleLeaseId"])||A.version!==X||!V(A.generation)||!M(A.id)||!["bash","repl","resume","read","edit","write","pi_tool"].includes(String(A.tool))||!F(A.input)||A.lifecycleLeaseId!==void 0&&(A.tool!=="bash"||!$(A.lifecycleLeaseId)))throw new G("invalid_request");if(A.tool==="bash"){if(!W(A.input,["script","retainBackground","machineSdk"])||typeof A.input.script!=="string"||A.input.script.length>K||A.input.retainBackground!==void 0&&A.input.retainBackground!==!0||A.input.machineSdk!==void 0&&A.input.machineSdk!==!0||A.semanticDigest!==void 0&&!S(A.semanticDigest))throw new G("invalid_request");return{version:X,generation:A.generation,id:A.id,tool:"bash",input:{script:A.input.script,...A.input.retainBackground===!0?{retainBackground:!0}:{},...A.input.machineSdk===!0?{machineSdk:!0}:{}},...A.semanticDigest===void 0?{}:{semanticDigest:A.semanticDigest},...A.lifecycleLeaseId===void 0?{}:{lifecycleLeaseId:A.lifecycleLeaseId}}}if(A.tool==="resume"){if(A.semanticDigest!==void 0||!W(A.input,["semanticDigest"])||!S(A.input.semanticDigest))throw new G("invalid_request");return{version:X,generation:A.generation,id:A.id,tool:"resume",input:{semanticDigest:A.input.semanticDigest}}}if(A.tool==="repl"){if(!W(A.input,["code"])||typeof A.input.code!=="string"||A.input.code.length>K||A.semanticDigest!==void 0)throw new G("invalid_request");return{version:X,generation:A.generation,id:A.id,tool:"repl",input:{code:A.input.code}}}if(A.tool==="pi_tool"){let B=A.semanticDigest===void 0?BA(A.input):null;if(!B)throw new G("invalid_request");return{version:X,generation:A.generation,id:A.id,tool:"pi_tool",input:B}}if(A.tool==="read"){if(!W(A.input,["path","offset","limit"])||typeof A.input.path!=="string"||A.input.path.length<1||A.input.path.length>K||A.semanticDigest!==void 0||A.input.offset!==void 0&&(!Number.isSafeInteger(A.input.offset)||Number(A.input.offset)<1)||A.input.limit!==void 0&&(!Number.isSafeInteger(A.input.limit)||Number(A.input.limit)<1||Number(A.input.limit)>2000))throw new G("invalid_request");return{version:X,generation:A.generation,id:A.id,tool:"read",input:{path:A.input.path,...A.input.offset===void 0?{}:{offset:Number(A.input.offset)},...A.input.limit===void 0?{}:{limit:Number(A.input.limit)}}}}if(A.tool==="edit"){if(!W(A.input,["path","edits"])||typeof A.input.path!=="string"||A.input.path.length<1||!Array.isArray(A.input.edits)||A.input.edits.length<1||A.input.edits.length>128||A.semanticDigest!==void 0)throw new G("invalid_request");let B=A.input.path.length,N=[];for(let I of A.input.edits){if(!F(I)||!W(I,["oldText","newText"])||typeof I.oldText!=="string"||I.oldText.length<1||typeof I.newText!=="string")throw new G("invalid_request");if(B+=I.oldText.length+I.newText.length,B>D)throw new G("invalid_request");N.push({oldText:I.oldText,newText:I.newText})}return{version:X,generation:A.generation,id:A.id,tool:"edit",input:{path:A.input.path,edits:N}}}if(A.tool!=="write"||!W(A.input,["path","content"])||typeof A.input.path!=="string"||A.input.path.length<1||typeof A.input.content!=="string"||A.input.path.length+A.input.content.length>D||A.semanticDigest!==void 0)throw new G("invalid_request");return{version:X,generation:A.generation,id:A.id,tool:"write",input:{path:A.input.path,content:A.input.content}}}function L(x){return x===void 0||typeof x==="number"&&Number.isFinite(x)}function BA(x){let A=x.args;if(!W(x,["tool","args"])||!F(A))return null;if(x.tool==="bash")return W(A,["command","timeout"])&&typeof A.command==="string"&&A.command.length<=K&&L(A.timeout)?{tool:"bash",args:{command:A.command,...A.timeout===void 0?{}:{timeout:Number(A.timeout)}}}:null;if(typeof A.path!=="string"||A.path.length>K)return null;if(x.tool==="read")return W(A,["path","offset","limit"])&&L(A.offset)&&L(A.limit)?{tool:"read",args:{path:A.path,...A.offset===void 0?{}:{offset:Number(A.offset)},...A.limit===void 0?{}:{limit:Number(A.limit)}}}:null;if(x.tool==="write")return W(A,["path","content"])&&typeof A.content==="string"&&A.path.length+A.content.length<=D?{tool:"write",args:{path:A.path,content:A.content}}:null;if(x.tool!=="edit"||!W(A,["path","edits"])||!Array.isArray(A.edits))return null;let B=A.path.length,N=[];for(let I of A.edits){if(!F(I)||!W(I,["oldText","newText"])||typeof I.oldText!=="string"||typeof I.newText!=="string")return null;if(B+=I.oldText.length+I.newText.length,B>D)return null;N.push({oldText:I.oldText,newText:I.newText})}return{tool:"edit",args:{path:A.path,edits:N}}}function WA(x){if(!F(x))return null;if("thrown"in x)return W(x,["thrown"])&&typeof x.thrown==="string"?{thrown:x.thrown}:null;let A=x.structuredContent;if(!W(x,["content","details","structuredContent","isError"])||!Array.isArray(x.content)||x.isError!==void 0&&x.isError!==!0||A!==void 0&&(!F(A)||!W(A,["output","truncated","full_output_path","exit_code","wall_time_seconds"])||typeof A.output!=="string"||typeof A.truncated!=="boolean"||A.full_output_path!==void 0&&typeof A.full_output_path!=="string"||typeof A.exit_code!=="number"||typeof A.wall_time_seconds!=="number"))return null;let B=[];for(let N of x.content)if(F(N)&&N.type==="text"&&W(N,["type","text"])&&typeof N.text==="string")B.push({type:"text",text:N.text});else if(F(N)&&N.type==="image"&&W(N,["type","data","mimeType"])&&typeof N.data==="string"&&typeof N.mimeType==="string")B.push({type:"image",data:N.data,mimeType:N.mimeType});else return null;return{content:B,...x.details===void 0?{}:{details:x.details},...F(A)?{structuredContent:{output:String(A.output),truncated:A.truncated===!0,...typeof A.full_output_path==="string"?{full_output_path:A.full_output_path}:{},exit_code:Number(A.exit_code),wall_time_seconds:Number(A.wall_time_seconds)}}:{},...x.isError===!0?{isError:!0}:{}}}function GA(x){let A=Z(x);if(!F(A)||!W(A,["version","generation","id","ok","exitCode","stdout","stderr","cwd","error","resumed","browserActions","automaticProgressImage","piToolOutcome","workerElapsedMs","environmentWaitMs"])||A.version!==X||!V(A.generation)||!M(A.id)||typeof A.ok!=="boolean"||!Number.isSafeInteger(A.exitCode)||Number(A.exitCode)<0||Number(A.exitCode)>255||typeof A.stdout!=="string"||A.stdout.length>Q||typeof A.stderr!=="string"||A.stderr.length>Q||A.cwd!==void 0&&(typeof A.cwd!=="string"||A.cwd.length<1||A.cwd.length>4096||!A.cwd.startsWith("/")||A.cwd.includes("\x00"))||A.error!==void 0&&(typeof A.error!=="string"||A.error.length<1||A.error.length>j||!u.has(A.error))||A.browserActions!==void 0&&!R(A.browserActions)||A.automaticProgressImage!==void 0&&(A.automaticProgressImage!==!0||!A.ok)||A.resumed!==void 0&&A.resumed!==!0||A.workerElapsedMs!==void 0&&(!Number.isSafeInteger(A.workerElapsedMs)||Number(A.workerElapsedMs)<0)||A.environmentWaitMs!==void 0&&(!Number.isSafeInteger(A.environmentWaitMs)||Number(A.environmentWaitMs)<0)||A.ok&&(A.exitCode!==0||A.error!==void 0)||!A.ok&&A.exitCode===0)throw new G("invalid_result");let B=A.piToolOutcome===void 0?void 0:WA(A.piToolOutcome);if(B===null||B&&!A.ok)throw new G("invalid_result");return{version:X,generation:A.generation,id:A.id,ok:A.ok,exitCode:Number(A.exitCode),stdout:A.stdout,stderr:A.stderr,...typeof A.cwd==="string"?{cwd:A.cwd}:{},...A.browserActions!==void 0?{browserActions:R(A.browserActions)}:{},...typeof A.error==="string"?{error:A.error}:{},...A.automaticProgressImage===!0?{automaticProgressImage:!0}:{},...A.resumed===!0?{resumed:!0}:{},...B?{piToolOutcome:B}:{},...A.workerElapsedMs!==void 0?{workerElapsedMs:Number(A.workerElapsedMs)}:{},...A.environmentWaitMs!==void 0?{environmentWaitMs:Number(A.environmentWaitMs)}:{}}}function NA(x){let A=Z(x);if(!F(A)||!W(A,["type","version","generation","id","sequence","stdout","stderr"])||A.type!=="progress"||A.version!==X||!V(A.generation)||!M(A.id)||!Number.isSafeInteger(A.sequence)||Number(A.sequence)<1||typeof A.stdout!=="string"||A.stdout.length>Q||typeof A.stderr!=="string"||A.stderr.length>Q)throw new G("invalid_progress");return{type:"progress",version:X,generation:Number(A.generation),id:A.id,sequence:Number(A.sequence),stdout:A.stdout,stderr:A.stderr}}function UA(x){let A=Z(x);if(!F(A)||!W(A,["type","version","generation","fenceId","executorLaunchId","requestCancelVersion","managedJobsVersion","browserRunEnvelopeVersion","terminalCleanupVersion","guestMemoryVersion","guestMemoryDiagnosticsVersion","piToolsVersion","piToolsConfinement","backgroundBashVersion","machineSdkVersion","executionTimingVersion","environmentWaitVersion"])||A.type!=="claim"||A.version!==X||!V(A.generation)||!$(A.fenceId)||!$(A.executorLaunchId)||A.requestCancelVersion!==void 0&&A.requestCancelVersion!==1||A.managedJobsVersion!==void 0&&A.managedJobsVersion!==f||A.guestMemoryVersion!==void 0&&A.guestMemoryVersion!==1||A.guestMemoryDiagnosticsVersion!==void 0&&(A.guestMemoryDiagnosticsVersion!==1||A.guestMemoryVersion!==1)||A.terminalCleanupVersion!==void 0&&A.terminalCleanupVersion!==1||A.browserRunEnvelopeVersion!==void 0&&A.browserRunEnvelopeVersion!==1||A.piToolsVersion!==void 0&&A.piToolsVersion!==1||A.piToolsConfinement!==void 0&&(!Y(A.piToolsConfinement)||A.piToolsVersion!==1)||A.backgroundBashVersion!==void 0&&A.backgroundBashVersion!==1||A.machineSdkVersion!==void 0&&A.machineSdkVersion!==1||A.executionTimingVersion!==void 0&&A.executionTimingVersion!==1||A.environmentWaitVersion!==void 0&&(A.environmentWaitVersion!==1||A.executionTimingVersion!==1))throw new G("invalid_claim");return{type:"claim",version:X,generation:A.generation,fenceId:A.fenceId,executorLaunchId:A.executorLaunchId,...A.requestCancelVersion===1?{requestCancelVersion:1}:{},...A.managedJobsVersion===1?{managedJobsVersion:1}:{},...A.guestMemoryVersion===1?{guestMemoryVersion:1}:{},...A.guestMemoryDiagnosticsVersion===1?{guestMemoryDiagnosticsVersion:1}:{},...A.terminalCleanupVersion===1?{terminalCleanupVersion:1}:{},...A.browserRunEnvelopeVersion===1?{browserRunEnvelopeVersion:1}:{},...A.piToolsVersion===1?{piToolsVersion:1}:{},...Y(A.piToolsConfinement)?{piToolsConfinement:{template:A.piToolsConfinement.template,quoteDepth:A.piToolsConfinement.quoteDepth}}:{},...A.backgroundBashVersion===1?{backgroundBashVersion:1}:{},...A.machineSdkVersion===1?{machineSdkVersion:1}:{},...A.executionTimingVersion===1?{executionTimingVersion:1}:{},...A.environmentWaitVersion===1?{environmentWaitVersion:1}:{}}}function FA(x){let A=Z(x);if(!F(A)||!W(A,["type","version","generation","fenceId","executorLaunchId","workerVersion","workerArtifactSha256","requestCancelVersion","managedJobsVersion","lifecycleVersion","browserRunEnvelopeVersion","terminalCleanupVersion","guestMemoryVersion","guestMemoryDiagnosticsVersion","piToolsVersion","piToolsConfinementVersion","backgroundBashVersion","machineSdkVersion","executionTimingVersion","environmentWaitVersion"])||A.lifecycleVersion!==void 0&&A.lifecycleVersion!==1||A.piToolsVersion!==void 0&&A.piToolsVersion!==1||A.piToolsConfinementVersion!==void 0&&(A.piToolsConfinementVersion!==1||A.piToolsVersion!==1)||A.backgroundBashVersion!==void 0&&A.backgroundBashVersion!==1||A.machineSdkVersion!==void 0&&A.machineSdkVersion!==1||A.executionTimingVersion!==void 0&&A.executionTimingVersion!==1||A.environmentWaitVersion!==void 0&&(A.environmentWaitVersion!==1||A.executionTimingVersion!==1)||A.guestMemoryVersion!==void 0&&A.guestMemoryVersion!==1||A.guestMemoryDiagnosticsVersion!==void 0&&(A.guestMemoryDiagnosticsVersion!==1||A.guestMemoryVersion!==1)||A.terminalCleanupVersion!==void 0&&A.terminalCleanupVersion!==1||A.browserRunEnvelopeVersion!==void 0&&A.browserRunEnvelopeVersion!==1||A.type!=="claim_ack"||A.version!==X||!V(A.generation)||!$(A.fenceId)||!$(A.executorLaunchId)||!Number.isSafeInteger(A.workerVersion)||Number(A.workerVersion)<1||!S(A.workerArtifactSha256)||A.requestCancelVersion!==void 0&&A.requestCancelVersion!==1||A.managedJobsVersion!==void 0&&A.managedJobsVersion!==f)throw new G("invalid_claim_ack");return{type:"claim_ack",...A.guestMemoryVersion===1?{guestMemoryVersion:1}:{},...A.guestMemoryDiagnosticsVersion===1?{guestMemoryDiagnosticsVersion:1}:{},...A.terminalCleanupVersion===1?{terminalCleanupVersion:1}:{},...A.browserRunEnvelopeVersion===1?{browserRunEnvelopeVersion:1}:{},...A.lifecycleVersion===1?{lifecycleVersion:1}:{},...A.piToolsVersion===1?{piToolsVersion:1}:{},...A.piToolsConfinementVersion===1?{piToolsConfinementVersion:1}:{},...A.backgroundBashVersion===1?{backgroundBashVersion:1}:{},...A.machineSdkVersion===1?{machineSdkVersion:1}:{},...A.executionTimingVersion===1?{executionTimingVersion:1}:{},...A.environmentWaitVersion===1?{environmentWaitVersion:1}:{},version:X,generation:A.generation,fenceId:A.fenceId,executorLaunchId:A.executorLaunchId,workerVersion:Number(A.workerVersion),workerArtifactSha256:A.workerArtifactSha256,...A.requestCancelVersion===1?{requestCancelVersion:1}:{},...A.managedJobsVersion===1?{managedJobsVersion:1}:{}}}function zA(x){let A=Z(x);if(!F(A)||!W(A,["type","version","generation","id","jobId","action","input"])||A.type!=="job"||A.version!==X||!V(A.generation)||!M(A.id)||!M(A.jobId)||!F(A.input))throw new G("invalid_job_request");let B=A.input,N=Number.isSafeInteger(B.leaseExpiresAtMs)&&Number(B.leaseExpiresAtMs)>0,I=Number.isSafeInteger(B.sequence)&&Number(B.sequence)>=1;if(!(A.action==="start"?B.mode==="pty"?W(B,["mode","cols","rows","leaseExpiresAtMs"])&&C(A.jobId)&&z(B)&&N:W(B,["script","leaseExpiresAtMs"])&&typeof B.script==="string"&&B.script.length<=K&&N:A.action==="inspect"?W(B,["after"])&&Number.isSafeInteger(B.after)&&Number(B.after)>=0:A.action==="input"?"dataBase64"in B?W(B,["sequence","dataBase64"])&&C(A.jobId)&&I&&H(B.dataBase64)>0:W(B,["sequence","data","eof"])&&I&&typeof B.data==="string"&&B.data.length<=b&&typeof B.eof==="boolean":A.action==="resize"?W(B,["sequence","cols","rows"])&&C(A.jobId)&&I&&z(B):A.action==="renew"?W(B,["leaseExpiresAtMs"])&&N:A.action==="cancel"&&W(B,[])))throw new G("invalid_job_request");return A}function IA(x){let A=Z(x);if(!F(A)||!W(A,["type","version","generation","id","ok","job","error"])||A.type!=="job_result"||A.version!==X||!V(A.generation)||!M(A.id))throw new G("invalid_job_result");if(A.ok===!1&&A.job===void 0&&typeof A.error==="string"&&AA.some((U)=>U===A.error))return A;let B=A.job;if(A.ok!==!0||A.error!==void 0||!F(B)||!W(B,["jobId","state","startedAtMs","finishedAtMs","leaseExpiresAtMs","exitCode","inputSequence","output","firstCursor","nextCursor","truncated","process","environmentRevision","environmentSnapshotId","pty"])||!M(B.jobId)||!["starting","running","exited","cancelled","expired","uncertain"].includes(String(B.state))||!Number.isSafeInteger(B.startedAtMs)||Number(B.startedAtMs)<1||!Number.isSafeInteger(B.leaseExpiresAtMs)||Number(B.leaseExpiresAtMs)<1||B.finishedAtMs!==null&&(!Number.isSafeInteger(B.finishedAtMs)||Number(B.finishedAtMs)<Number(B.startedAtMs))||B.exitCode!==null&&(!Number.isSafeInteger(B.exitCode)||Number(B.exitCode)<0||Number(B.exitCode)>255)||!Number.isSafeInteger(B.inputSequence)||Number(B.inputSequence)<0||!Number.isSafeInteger(B.firstCursor)||Number(B.firstCursor)<1||!Number.isSafeInteger(B.nextCursor)||Number(B.nextCursor)<Number(B.firstCursor)-1||typeof B.truncated!=="boolean"||!Array.isArray(B.output)||B.output.length>w)throw new G("invalid_job_result");if(B.environmentRevision===void 0!==(B.environmentSnapshotId===void 0)||B.environmentRevision!==void 0&&(!Number.isSafeInteger(B.environmentRevision)||Number(B.environmentRevision)<1||!$(B.environmentSnapshotId)))throw new G("invalid_job_result");let N=Number(B.firstCursor)-1,I=0;for(let U of B.output){if(!F(U)||!W(U,["cursor","stream","text"])||!Number.isSafeInteger(U.cursor)||Number(U.cursor)<=N||Number(U.cursor)>Number(B.nextCursor)||!["stdout","stderr"].includes(String(U.stream))||typeof U.text!=="string")throw new G("invalid_job_result");I+=U.text.length,N=Number(U.cursor)}if(I>p)throw new G("invalid_job_result");let _=B.state==="starting"||B.state==="running";if(_&&(B.finishedAtMs!==null||B.exitCode!==null)||!_&&B.finishedAtMs===null||B.state==="uncertain"&&B.exitCode!==null||B.state==="exited"&&B.exitCode===null||B.state==="cancelled"&&B.exitCode!==130||B.state==="expired"&&B.exitCode!==124)throw new G("invalid_job_result");if(B.process!==void 0){let U=B.process;if(!F(U)||!W(U,["pid","processGroupId","executorLaunchId"])||!Number.isSafeInteger(U.pid)||Number(U.pid)<1||U.processGroupId!==U.pid||!$(U.executorLaunchId)||!["starting","running"].includes(String(B.state)))throw new G("invalid_job_result")}if(B.pty!==void 0){let U=B.pty;if(!F(U)||!W(U,["version","cols","rows","output","cleanup"])||U.version!==h||!C(B.jobId)||!z(U)||B.output.length!==0||!Array.isArray(U.output)||U.output.length>w||(_?U.cleanup!=="pending":B.state==="uncertain"?U.cleanup!=="unconfirmed":U.cleanup!=="confirmed")||B.state==="running"&&(B.process===void 0||B.environmentRevision===void 0))throw new G("invalid_job_result");let T=Number(B.firstCursor)-1,g=0;for(let J of U.output){if(!F(J)||!W(J,["cursor","dataBase64"])||!Number.isSafeInteger(J.cursor)||Number(J.cursor)<=T||Number(J.cursor)>Number(B.nextCursor))throw new G("invalid_job_result");let q=H(J.dataBase64);if(q<=0||(g+=q)>d)throw new G("invalid_job_result");T=Number(J.cursor)}}return A}function SA(x){if(k(x)>i)throw new G("frame_too_large");let A=Z(x);if(!F(A)||!W(A,["version","sessionId","operationId","runId","deviceId","rootId","workspace","binding","targetRevision","rootGrantRevision","generation","fenceId","executorLaunchId","job"])||A.version!==h||![A.sessionId,A.operationId,A.runId].every(M)||![A.deviceId,A.rootId,A.fenceId,A.executorLaunchId].every($)||!V(A.generation)||!Number.isSafeInteger(A.rootGrantRevision)||Number(A.rootGrantRevision)<1||!["workspace_source","mcp_control"].includes(String(A.binding))||!Number.isSafeInteger(A.targetRevision)||Number(A.targetRevision)<0||A.binding==="workspace_source"&&A.targetRevision!==0||!F(A.workspace))throw new G("invalid_pty_receipt");if(!m(A.workspace))throw new G("invalid_pty_receipt");let B=IA(JSON.stringify({type:"job_result",version:X,generation:A.generation,id:A.operationId,ok:!0,job:A.job}));if(!B.ok||!B.job.pty||B.job.pty.output.length!==0||B.job.process&&B.job.process.executorLaunchId!==A.executorLaunchId)throw new G("invalid_pty_receipt");return A}function TA(x){let A=Z(x);if(!F(A)||!W(A,["type","version","generation","id","targetId"])||A.type!=="cancel_request"||A.version!==X||!V(A.generation)||!M(A.id)||!M(A.targetId))throw new G("invalid_cancel_request");return A}function qA(x){let A=Z(x);if(!F(A)||!W(A,["type","version","generation","id","targetId","status"])||A.type!=="cancel_ack"||A.version!==X||!V(A.generation)||!M(A.id)||!M(A.targetId)||!["cancelled","settled","not_found","unsupported","unconfirmed"].includes(String(A.status)))throw new G("invalid_cancel_ack");return A}function wA(x){let A=JSON.stringify(x);return xA(A),A}function yA(x){let A=JSON.stringify(x);return GA(A),A}function mA(x){let A=JSON.stringify(x);return NA(A),A}function fA(x){let A=JSON.stringify(x);return UA(A),A}function hA(x){let A=JSON.stringify(x);return FA(A),A}function O(x){return typeof x==="string"&&x.length>=1&&x.length<=a&&!x.includes("\x00")}function XA(x){let A=["type","version","generation","id","jobRequestId","verb"];if(x.verb==="help")return W(x,A)?{verb:"help"}:null;if(x.verb==="describe"||x.verb==="namespace")return W(x,[...A,"name"])&&O(x.name)?{verb:x.verb,name:x.name}:null;if(x.verb==="search"){let B=x.args;if(!W(x,[...A,"query","args"])||typeof x.query!=="string"||x.query.trim().length<1||x.query.length>e)return null;if(B===void 0)return{verb:"search",query:x.query};if(!F(B)||!W(B,["namespace","limit"])||B.namespace!==void 0&&!O(B.namespace)||B.limit!==void 0&&(!Number.isSafeInteger(B.limit)||Number(B.limit)<1||Number(B.limit)>50))return null;return{verb:"search",query:x.query,args:{...typeof B.namespace==="string"?{namespace:B.namespace}:{},...B.limit===void 0?{}:{limit:Number(B.limit)}}}}if(x.verb!=="call"||!W(x,[...A,"name","args"])||!O(x.name)||!F(x.args)||JSON.stringify(x.args).length>K)return null;return{verb:"call",name:x.name,args:x.args}}function kA(x){let A=Z(x);if(!F(A)||A.type!=="sdk_request"||A.version!==X||!V(A.generation)||!M(A.id)||!M(A.jobRequestId))throw new G("invalid_sdk_request");let B=XA(A);if(!B)throw new G("invalid_sdk_request");return{type:"sdk_request",version:X,generation:Number(A.generation),id:A.id,jobRequestId:A.jobRequestId,...B}}function MA(x){let A=Z(x);if(!F(A)||A.type!=="sdk_response"||A.version!==X||!V(A.generation)||!M(A.id))throw new G("invalid_sdk_response");let B={type:"sdk_response",version:X,generation:Number(A.generation),id:A.id},N=["type","version","generation","id","ok"];if(A.ok===!0&&W(A,[...N,"result"])&&typeof A.result==="string"&&A.result.length<=Q)return{...B,ok:!0,result:A.result};if(A.ok===!1&&W(A,[...N,"error"])&&typeof A.error==="string"&&A.error.length>=1&&A.error.length<=Q)return{...B,ok:!1,error:A.error};throw new G("invalid_sdk_response")}function HA(x){let A=JSON.stringify(x);return MA(A),A}
4
- export{VA as ef,$A as ff,JA as gf,X as hf,P as if,K as jf,D as kf,Q as lf,DA as mf,j as nf,f as of,b as pf,p as qf,w as rf,RA as sf,i as tf,h as uf,y as vf,d as wf,YA as xf,s as yf,c as zf,n as Af,LA as Bf,o as Cf,OA as Df,l as Ef,a as Ff,e as Gf,AA as Hf,G as If,M as Jf,V as Kf,$ as Lf,C as Mf,S as Nf,xA as Of,GA as Pf,NA as Qf,UA as Rf,FA as Sf,zA as Tf,IA as Uf,SA as Vf,TA as Wf,qA as Xf,wA as Yf,yA as Zf,mA as _f,fA as $f,hA as ag,kA as bg,MA as cg,HA as dg};
4
+ export{VA as gf,$A as hf,JA as if,X as jf,P as kf,K as lf,D as mf,Q as nf,DA as of,j as pf,f as qf,b as rf,p as sf,w as tf,RA as uf,i as vf,h as wf,y as xf,d as yf,YA as zf,s as Af,c as Bf,n as Cf,LA as Df,o as Ef,OA as Ff,l as Gf,a as Hf,e as If,AA as Jf,G as Kf,M as Lf,V as Mf,$ as Nf,C as Of,S as Pf,xA as Qf,GA as Rf,NA as Sf,UA as Tf,FA as Uf,zA as Vf,IA as Wf,SA as Xf,TA as Yf,qA as Zf,wA as _f,yA as $f,mA as ag,fA as bg,hA as cg,kA as dg,MA as eg,HA as fg};