@reason-machines/cli-linux-arm64-musl 0.2.314 → 0.2.316
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/ara +2 -2
- package/bin/vm-hands/connect-cli-yr3p9qnz.js +2 -0
- package/bin/vm-hands/custom-endpoint-device-wzq9x8k5.js +2 -0
- package/bin/vm-hands/desktop-account-e9asw4vf.js +2 -0
- package/bin/vm-hands/{device-workspace-ecq3hfd6.js → device-workspace-1dm2ry6e.js} +1 -1
- package/bin/vm-hands/{hands-worker-source-w477y8ad.js → hands-worker-source-snbsr08g.js} +1 -1
- package/bin/vm-hands/{index-nxzv9qe7.js → index-p6kg955p.js} +1 -1
- package/bin/vm-hands/local-automation-2ympxn36.js +2 -0
- package/bin/vm-hands/local-capabilities-1zdjwqw6.js +2 -0
- package/bin/vm-hands/local-desktop-users-j09q8cnt.js +2 -0
- package/bin/vm-hands/local-display-mac-mjjems8c.js +2 -0
- package/bin/vm-hands/local-display-session-pyd8a5jn.js +2 -0
- package/bin/vm-hands/{network-contract-ggqak7gp.js → network-contract-kxgvk10y.js} +1 -1
- package/bin/vm-hands/package-28msp113.js +2 -0
- package/bin/vm-hands/permissions-sbhn2tza.js +2 -0
- package/bin/vm-hands/{reason-hands-protocol-as5477xr.js → reason-hands-protocol-7t7mewye.js} +1 -1
- package/bin/vm-hands/{status-gp9kxbq1.js → status-pp648fb9.js} +2 -2
- package/bin/vm-hands/version-vv364wfx.js +2 -0
- package/bin/vm-hands/{vm-hands-entry-lite-wgx7z7gt.js → vm-hands-entry-lite-14t846kp.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-6j2yaa4n.js → vm-hands-entry-lite-22jgncrd.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-ksd4969g.js → vm-hands-entry-lite-36ey39qm.js} +2 -2
- package/bin/vm-hands/vm-hands-entry-lite-3rx6cm14.js +3 -0
- package/bin/vm-hands/{vm-hands-entry-lite-hzkc742v.js → vm-hands-entry-lite-460d1y2d.js} +23 -23
- package/bin/vm-hands/{vm-hands-entry-lite-11qqexwe.js → vm-hands-entry-lite-7ve198cs.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-3tp9yvsn.js → vm-hands-entry-lite-8759hszg.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-ya1a2eep.js → vm-hands-entry-lite-93ejmwqn.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-hmff1sqa.js → vm-hands-entry-lite-a8r490bb.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-em388nee.js → vm-hands-entry-lite-cp1wqjs5.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-njt12v46.js → vm-hands-entry-lite-gmhdbe8v.js} +77 -77
- package/bin/vm-hands/{vm-hands-entry-lite-q6fshf3h.js → vm-hands-entry-lite-kqn1bkrr.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-7k65s010.js → vm-hands-entry-lite-mzxhng4z.js} +2 -2
- package/bin/vm-hands/vm-hands-entry-lite-n4xx6qfr.js +42 -0
- package/bin/vm-hands/{vm-hands-entry-lite-yp315y25.js → vm-hands-entry-lite-ne8kkvk4.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-rrk5g62b.js → vm-hands-entry-lite-q8b738zj.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-hf0mk7vd.js → vm-hands-entry-lite-t3gpbwqp.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-21qkhpm0.js → vm-hands-entry-lite-t9kc2r71.js} +1 -1
- package/bin/vm-hands/vm-hands-entry-lite-tdpqhm9j.js +529 -0
- package/bin/vm-hands/{vm-hands-entry-lite-xsq25kmd.js → vm-hands-entry-lite-v6tkjqb1.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-qssnr12b.js → vm-hands-entry-lite-vy57b2t2.js} +3 -3
- package/bin/vm-hands/{vm-hands-entry-lite-pf1ft65e.js → vm-hands-entry-lite-wh0qp1gf.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-bswnp5ve.js → vm-hands-entry-lite-xf6schkk.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-q2pb31vh.js → vm-hands-entry-lite-yhz6sv35.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-fws38v57.js → vm-hands-entry-lite-yxbbkre7.js} +2 -2
- package/bin/vm-hands/vm-hands-entry-lite.js +1 -1
- package/bin/vm-hands/{vm-hands-executor-rzz9q5jj.js → vm-hands-executor-9kr30sec.js} +1 -1
- package/bin/vm-hands/{vm-hands-op-runner-mwmgvdh0.js → vm-hands-op-runner-hxh21vsh.js} +1 -1
- package/bin/vm-hands/{vm-hands-runtime-rkpxmsd0.js → vm-hands-runtime-42gvm2xs.js} +3 -3
- package/bin/vm-hands/worker-sandbox-7zfttr2t.js +2 -0
- package/package.json +1 -1
- package/bin/vm-hands/connect-cli-edkrs4p6.js +0 -2
- package/bin/vm-hands/custom-endpoint-device-p2bvtf6p.js +0 -2
- package/bin/vm-hands/desktop-account-axaenf68.js +0 -2
- package/bin/vm-hands/local-automation-3tg97fb8.js +0 -2
- package/bin/vm-hands/local-capabilities-rb17efqw.js +0 -2
- package/bin/vm-hands/local-desktop-users-4756c92y.js +0 -2
- package/bin/vm-hands/local-display-mac-3zz66vzn.js +0 -2
- package/bin/vm-hands/local-display-session-4jnfvpv1.js +0 -2
- package/bin/vm-hands/package-s6y0j1as.js +0 -2
- package/bin/vm-hands/permissions-5kqh2dqz.js +0 -2
- package/bin/vm-hands/version-jp149s8j.js +0 -2
- package/bin/vm-hands/vm-hands-entry-lite-0ergg2ky.js +0 -3
- package/bin/vm-hands/vm-hands-entry-lite-8st97h7b.js +0 -42
- package/bin/vm-hands/vm-hands-entry-lite-abfcsza2.js +0 -529
- package/bin/vm-hands/worker-sandbox-snmfpfax.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{ch as J}from"./vm-hands-entry-lite-cp1wqjs5.js";import{readFileSync as L}from"fs";import{isAbsolute as M,normalize as Q}from"path";var W="REASON_WORKER_DESKTOP_USER",G=null;function X(q,B){for(let I of B.split(`
|
|
3
3
|
`)){let j=I.split(":");if(j.length<7||Number(j[2])!==q||!/^\d+$/.test(j[2])||!/^\d+$/.test(j[3]))continue;let x=j[5];if(!/^[a-z_][a-z0-9_-]*$/i.test(j[0])||!M(x)||Q(x)!==x||x==="/")return null;return{username:j[0],uid:q,gid:Number(j[3]),home:x}}return null}function b(q={}){let B="value"in q?q.value:process.env[W];if(G=null,B===void 0||B==="")return null;let I=q.platform??process.platform,j="euid"in q?q.euid:process.geteuid?.(),x=/^[1-9]\d{0,9}$/.test(B)?Number(B):NaN,C=I==="linux"&&j===0&&Number.isSafeInteger(x)?X(x,(q.passwd??(()=>L("/etc/passwd","utf8")))()):null;if(!C||C.gid===0)throw Error("worker_desktop_user_invalid");return G=C,C}function k(){return G}function y(){return G?.home??J()}
|
|
4
|
-
export{W as
|
|
4
|
+
export{W as Zg,X as _g,b as $g,k as ah,y as bh};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{ee as W}from"./vm-hands-entry-lite-kqn1bkrr.js";var E=W.string().max(201).regex(/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/).refine((Q)=>Q.split("/").every((Z)=>Z!=="."&&Z!=="..")),G=W.string().min(1).max(255).regex(/^[A-Za-z0-9_][A-Za-z0-9_./-]*$/).refine((Q)=>!Q.includes("..")&&!Q.includes("//")&&!Q.endsWith("/")&&!Q.endsWith(".lock")),g=W.string().regex(/^[a-f0-9]{40}$/),N=W.number().int().positive(),T=W.string().min(1).max(256),A=W.string().max(60000),q={version:W.literal(1),repoFullName:E},S=W.array(W.string().max(1024).regex(/^Co-authored-by: [^<>\r\n\x00]+ <[^<>\s]+@[^<>\s]+>$/)).max(500),y=W.strictObject({expectedTrailers:S,missingFromHead:S}),d=W.discriminatedUnion("action",[W.strictObject({action:W.literal("edit"),title:T.optional(),body:A.optional(),base:G.optional()}),W.strictObject({action:W.enum(["ready","draft","close"])}),W.strictObject({action:W.literal("metadata"),field:W.enum(["reviewer","assignee","label"]),change:W.enum(["add","remove"]),value:W.string().min(1).max(100).refine((Q)=>!/[\r\n\0]/.test(Q))})]),a=W.discriminatedUnion("kind",[W.strictObject({...q,kind:W.literal("read"),path:W.string().min(1).max(2048),accept:W.enum(["application/vnd.github+json","application/vnd.github.full+json","application/vnd.github.v3.diff"]).optional()}),W.strictObject({...q,kind:W.literal("pr_review_context"),number:N,after:W.string().min(1).max(1024).optional()}),W.strictObject({...q,kind:W.literal("prepare"),branch:G,baseSha:g,defaultBranch:G}),W.strictObject({...q,kind:W.literal("publish"),branch:G,defaultBranch:G,baseSha:g,remoteHeadSha:g.nullable(),contributorTrailers:S.optional()}),W.strictObject({...q,kind:W.literal("pr_create"),head:G,base:G,title:T,body:A,draft:W.boolean()}),W.strictObject({...q,kind:W.literal("pr_mutation"),number:N,mutation:d}),W.strictObject({...q,kind:W.literal("pr_merge"),number:N,expectedHeadSha:g,expectedBaseRef:G,method:W.enum(["merge","squash","rebase"]),commitBody:W.string().max(65536).optional()})]),I=245760,e=W.discriminatedUnion("kind",[W.strictObject({kind:W.literal("pr_review_context"),body:W.string().max(I)}),W.strictObject({kind:W.literal("prepare"),headSha:g}),W.strictObject({kind:W.literal("read"),status:W.number().int().min(200).max(599),headers:W.record(W.string(),W.string().max(8192)).refine((Q)=>Object.keys(Q).every((Z)=>Z==="link"||Z==="content-type")),body:W.string().max(I)}),W.strictObject({kind:W.literal("publish"),headSha:g,scannedObjectCount:W.number().int().min(0).max(5000),attribution:y.optional()}),W.strictObject({kind:W.literal("pr_create"),url:W.string().max(1024).regex(/^https:\/\/github\.com\/[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+\/pull\/[1-9][0-9]*$/)}),W.strictObject({kind:W.literal("pr_mutation"),number:N,applied:W.literal(!0)}),W.strictObject({kind:W.literal("pr_merge"),number:N,merged:W.literal(!0)})]).refine((Q)=>new TextEncoder().encode(JSON.stringify(Q)).byteLength<=I,"local_device_gh_result_too_large"),O=W.strictObject({source:W.enum(["agent","human"]),operationId:W.uuid()}),j=W.strictObject({version:W.literal(1),userId:W.guid(),deviceId:W.guid(),rootId:W.guid(),runId:W.guid(),merge:O.optional(),contributorRefresh:W.guid().optional(),repoFullName:E.nullable(),rootRevision:W.string().regex(/^[1-9][0-9]*$/),readOnly:W.boolean(),generation:W.number().int().positive().nullable(),fenceId:W.guid().nullable()}).refine((Q)=>Q.generation===null===(Q.fenceId===null));function C(Q){return/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/.test(Q)&&Q.split("/").every((Z)=>Z!=="."&&Z!=="..")}function QQ(Q,Z,$={},H="read"){if(C(Q)&&(Z==="/search/issues"||Z.startsWith("/search/issues?")))return z(Q,Z,$);if(!C(Q)||!Z.startsWith(`/repos/${Q}/`)&&Z!==`/repos/${Q}`)throw Error("local_device_gh_repository_mismatch");if(/[\\#\u0000-\u001f]/.test(Z)||/%(?:2e|5c|00)/i.test(Z))throw Error("local_device_gh_path_denied");let V=new URL(Z,"https://api.github.com");if(V.pathname!==Z.split("?")[0]||V.username||V.password)throw Error("local_device_gh_path_denied");let Y;try{Y=decodeURIComponent(V.pathname.slice(`/repos/${Q}`.length))}catch{throw Error("local_device_gh_path_denied")}if(Y.includes("%")||Y.split("/").some((K)=>K==="."||K===".."))throw Error("local_device_gh_path_denied");if(($.method??"GET").toUpperCase()!=="GET"||$.body!=null)throw Error("local_device_gh_mutation_not_admitted");if(![/^$/,/^\/commits$/,/^\/pulls$/,/^\/pulls\/[1-9][0-9]*(?:\/(?:commits|files|reviews|comments))?$/,/^\/issues\/[1-9][0-9]*(?:\/comments)?$/,/^\/issues\/comments\/[1-9][0-9]*\/reactions$/,/^\/commits\/[A-Za-z0-9_./-]+(?:\/(?:check-runs|status))?$/,/^\/check-runs\/[1-9][0-9]*(?:\/annotations)?$/,/^\/branches\/[A-Za-z0-9_./-]+$/,/^\/git\/ref\/heads\/[A-Za-z0-9_./-]+$/,/^\/compare\/[A-Za-z0-9_./-]+\.\.\.[A-Za-z0-9_./-]+$/].some((K)=>K.test(Y)))throw Error("local_device_gh_path_denied");if(V.searchParams.forEach((K,B)=>{if(B==="per_page"&&/^[1-9][0-9]*$/.test(K)&&Number(K)<=100)return;if(B==="page"&&/^[1-9][0-9]*$/.test(K)&&Number(K)<=100)return;if(Y==="/pulls"&&B==="state"&&["open","closed","all"].includes(K))return;if(Y==="/pulls"&&B==="sort"&&K==="updated")return;if(Y==="/pulls"&&B==="direction"&&K==="desc")return;if(Y==="/pulls"&&["head","base"].includes(B)&&/^[A-Za-z0-9_./:-]{1,255}$/.test(K))return;throw Error("local_device_gh_query_denied")}),$.headers)new Headers($.headers).forEach((B,c)=>{if(c!=="accept"||!["application/vnd.github+json","application/vnd.github.full+json","application/vnd.github.v3.diff"].includes(B))throw Error("local_device_gh_header_denied")})}function z(Q,Z,$){if(/[\\#\u0000-\u001f]/.test(Z))throw Error("local_device_gh_path_denied");let H=new URL(Z,"https://api.github.com");if(H.pathname!=="/search/issues"||H.username||H.password)throw Error("local_device_gh_path_denied");if(($.method??"GET").toUpperCase()!=="GET"||$.body!=null)throw Error("local_device_gh_mutation_not_admitted");let V=null;H.searchParams.forEach((X,K)=>{if(K==="q"&&V===null){V=X;return}if(K==="per_page"&&/^[1-9][0-9]*$/.test(X)&&Number(X)<=100)return;if(K==="page"&&/^[1-9][0-9]*$/.test(X)&&Number(X)<=100)return;throw Error("local_device_gh_query_denied")});let Y=`repo:${Q.toLowerCase()} `,U=V?.toLowerCase()??"";if(U.length>512||!(U+" ").startsWith(Y)||/(?:^|\s)(?:repo|org|user):/.test(U.slice(Y.length)))throw Error("local_device_gh_query_denied");if($.headers)new Headers($.headers).forEach((X,K)=>{if(K!=="accept"||X!=="application/vnd.github+json")throw Error("local_device_gh_header_denied")})}var WQ=`query PullRequestReviewContext($owner: String!, $repo: String!, $number: Int!, $after: String) {
|
|
3
|
+
repository(owner: $owner, name: $repo) {
|
|
4
|
+
nameWithOwner
|
|
5
|
+
pullRequest(number: $number) {
|
|
6
|
+
number
|
|
7
|
+
reviewDecision
|
|
8
|
+
headRefOid
|
|
9
|
+
baseRefOid
|
|
10
|
+
baseRef {
|
|
11
|
+
branchProtectionRule {
|
|
12
|
+
requiresApprovingReviews
|
|
13
|
+
requiredApprovingReviewCount
|
|
14
|
+
requiresStatusChecks
|
|
15
|
+
requiredStatusCheckContexts
|
|
16
|
+
requiresConversationResolution
|
|
17
|
+
dismissesStaleReviews
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
reviewThreads(first: 100, after: $after) {
|
|
21
|
+
nodes {
|
|
22
|
+
id isResolved isOutdated viewerCanResolve viewerCanUnresolve
|
|
23
|
+
path line originalLine startLine originalStartLine diffSide startDiffSide
|
|
24
|
+
comments(first: 100) {
|
|
25
|
+
nodes {
|
|
26
|
+
id databaseId body createdAt updatedAt url
|
|
27
|
+
author { __typename login }
|
|
28
|
+
replyTo { databaseId }
|
|
29
|
+
}
|
|
30
|
+
pageInfo { hasNextPage }
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
pageInfo { hasNextPage endCursor }
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}`;function ZQ(Q){return Q.kind==="read"||Q.kind==="pr_review_context"}var k=["inspect_project","fs.read","fs.write","fs.search","fs.watch","fs.upload","fs.export","fs.import","fs.download","exec.run","exec.full","process.run.v1","process.full.v1","pty.start","pty.input","pty.resize","pty.close","git.run","process.list","process.signal","ports.list","tunnel.open","tunnel.close","env.discover","setup.run","mcp.discover","mcp.start","mcp.proxy","browser.snapshot","browser.navigate","browser.act","computer.snapshot","computer.act","computer.use","browser.use","browser.recording.v1","browser.pr-proof.v1","hands.connect","jobs.control","environment.install","github.local.v1","inference.ollama.v1","inference.custom.v1","delegate.devin.copy.v1","delegate.cursor.copy.v1","display.stream.v1","automation.call.v1","preview.serve.v1","workspace.setup.v1","simulator.call.v1","simulator.stream.v1"];var x=2,P="/app/local-runtime",R=262144,wQ="x-reason-relay-host-alias",HQ="v1";function F(Q,Z){return{path:`${P}${Q}`,routerPath:Q,auth:Z}}function M(Q,Z){return{...F(Q,"device_proof"),forOperation($){return F(`/operations/${encodeURIComponent($)}${Z}`,"device_proof")}}}var VQ={register:F("/register","registration_bearer"),enroll:F("/enroll","none"),authChallenge:F("/auth/challenge","none"),identity:F("/identity","device_proof"),heartbeat:F("/heartbeat","device_proof"),rootsSync:F("/roots/sync","device_proof"),disconnect:F("/disconnect","device_proof"),lifecycle:F("/lifecycle","device_proof"),localSubscription:F("/local-subscription","device_proof"),ownerWorkspaces:F("/owner-workspaces","device_proof"),ownerWorkspaceEnrollment:F("/owner-workspaces/enrollment","device_proof"),sessionWorktrees:F("/session-worktrees","device_proof"),operationClaim:F("/operations/claim","device_proof"),operationHeartbeat:M("/operations/:operationId/heartbeat","/heartbeat"),operationEvents:M("/operations/:operationId/events","/events"),operationComplete:M("/operations/:operationId/complete","/complete"),operationEnvironment:M("/operations/:operationId/environment","/environment"),operationEnvironmentAck:M("/operations/:operationId/environment-ack","/environment-ack"),operationCustomEndpointCredential:M("/operations/:operationId/custom-endpoint-credential","/custom-endpoint-credential")},YQ=`${P}/session`,XQ=4096,BQ=5000,h=[/^\/app\/local-runtime\/heartbeat$/,/^\/app\/local-runtime\/operations\/claim$/,/^\/app\/local-runtime\/operations\/[0-9a-fA-F-]{36}\/(?:heartbeat|events|complete|environment|environment-ack)$/];function GQ(Q){return h.some((Z)=>Z.test(Q))}var qQ="vm_hands_v1",gQ=60000,MQ={unauthenticated:4401,unavailable:4404,overloaded:4429,serviceRestart:1012},NQ="hands_control_v1",UQ="environment.deliver",jQ="claim_v1",JQ="environment_at_claim",xQ="rebind_v1",IQ="resident_rebind",SQ="hands.rebind",mQ="snapshot_v1",PQ="cloud_access",CQ="playwright_v1",EQ="headless_browser",TQ="v1",AQ="job_env_large_values",kQ="srt_root_v1",LQ="hands_confinement",_Q="gid_v1",fQ="model_jobs_egress",bQ="setpriv_v1",cQ="jobs_user",yQ="spawning_attempt_v1",dQ="hands_session_group",OQ="same_launch_v1",zQ="exit_v1",RQ="start_wait",hQ="user_chrome",pQ="cloud_sessions";function m(Q){if(!D(Q)||Object.keys(Q).length!==5||Q.version!==1)return!1;let Z=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;return["boot_generation","recording_operation_id","recording_attempt_id"].every(($)=>typeof Q[$]==="string"&&Z.test(Q[$]))&&typeof Q.root_version==="string"&&/^[0-9]{1,20}(?:\.[0-9]{1,6})?$/.test(Q.root_version)}function J(Q){if(!D(Q)||Object.keys(Q).length!==6)return!1;let Z=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;return typeof Q.device_id==="string"&&Z.test(Q.device_id)&&(Q.binding==="workspace_source"||Q.binding==="mcp_control")&&Number.isSafeInteger(Q.target_revision)&&Number(Q.target_revision)>=0&&Number.isSafeInteger(Q.root_grant_revision)&&Number(Q.root_grant_revision)>0&&Number.isSafeInteger(Q.target_generation)&&Number(Q.target_generation)>0&&typeof Q.target_fence_id==="string"&&Z.test(Q.target_fence_id)}var rQ=86400000,nQ=["service.install_started","service.install_completed","service.install_failed","service.launcher_adopted","service.launcher_conflict","service.started","service.reconnecting","service.reconnected","service.idle_sleep_held","service.idle_sleep_released","service.idle_sleep_failed","service.start_failed","service.stopped","service.exit_failed","service.singleton_rejected","credential.migration_started","credential.migration_completed","credential.migration_failed","credential.store_started","credential.store_completed","credential.store_failed","credential.delete_started","credential.delete_completed","credential.delete_failed","update.check_started","update.not_available","update.download_started","update.downloaded","update.verified","update.activated","update.rollback","update.failed","executor.update.check_started","executor.update.not_available","executor.update.download_started","executor.update.downloaded","executor.update.verified","executor.update.activated","executor.update.rollback","executor.update.failed","identity.refresh_completed","identity.refresh_failed","update.device_moved","update.components_installed","update.deferred","update.deferral_expired","worker.previous_exit","worker.capabilities_withheld","identity.computer_use_unavailable"],p=["production","staging"];function L(Q){if(!D(Q)||Object.keys(Q).length!==3)return!1;let Z=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;return["organization_id","user_id","device_id"].every(($)=>Object.hasOwn(Q,$)&&typeof Q[$]==="string"&&Z.test(Q[$])&&Q[$]!=="00000000-0000-0000-0000-000000000000")}var r="DEVICE-PROOF-V2",sQ="ARA-DEVICE-V1";function oQ(Q,Z=r){let $=Q.method.toUpperCase();if(!/^[A-Z]+$/.test($)||!Q.pathAndQuery.startsWith(`${P}/`)||Q.pathAndQuery.includes(`
|
|
38
|
+
`)||!/^[0-9]{1,20}$/.test(Q.timestamp)||!/^[A-Za-z0-9_-]{22,43}$/.test(Q.nonce)||Q.challenge.length<16||Q.challenge.length>1024||Q.challenge.includes(`
|
|
39
|
+
`)||!/^[a-f0-9]{64}$/.test(Q.bodySha256))throw Error("Invalid Reason Device proof input.");return Buffer.from([Z,$,Q.pathAndQuery,Q.timestamp,Q.nonce,Q.challenge,Q.bodySha256].join(`
|
|
40
|
+
`),"utf8")}function D(Q){return Boolean(Q)&&typeof Q==="object"&&!Array.isArray(Q)}function n(Q,Z){return typeof Q==="string"&&Z.some(($)=>$===Q)}function _(Q){return D(Q)&&typeof Q.id==="string"&&typeof Q.label==="string"&&typeof Q.path_fingerprint==="string"}function s(Q){return D(Q)&&Number.isInteger(Q.seq)&&Number(Q.seq)>=0&&typeof Q.kind==="string"&&/^[A-Za-z0-9._:-]{1,64}$/.test(Q.kind)&&D(Q.payload)}function w(Q){throw Error(Q)}function iQ(Q,Z){let $=D(Q)?Q:{},H=typeof $.error==="string"?$.error:`http_${Z}`,V=typeof $.detail==="string"?$.detail:typeof $.message==="string"?$.message:`Reason Device request failed (${Z})`;return{code:H,message:V}}function o(Q){if(!D(Q)||typeof Q.challenge!=="string"||Q.challenge.length<16||Q.challenge.length>1024||Q.challenge.includes(`
|
|
41
|
+
`)||typeof Q.expires_at!=="string"||!Number.isFinite(Date.parse(Q.expires_at)))w("Reason returned an invalid Device proof challenge.");return{challenge:Q.challenge,expires_at:Q.expires_at}}function f(Q,Z){if(!D(Q)||typeof Q.device_id!=="string"||Q.auth_scheme!=="p256"||Q.organization_id!==void 0&&typeof Q.organization_id!=="string"||Q.protocol_version!==x||!Array.isArray(Q.roots)||!Q.roots.every(_)||Z&&typeof Q.organization_id!=="string"||Q.device_credential!==void 0)w(Z?"Reason returned an invalid Device enrollment.":"Reason returned an invalid Device registration.");return{...{device_id:Q.device_id,...typeof Q.organization_id==="string"?{organization_id:Q.organization_id}:{},protocol_version:x,roots:Q.roots},auth_scheme:"p256"}}function tQ(Q){return f(Q,!1)}function vQ(Q){let Z=f(Q,!0);if(typeof Z.organization_id!=="string")return w("Reason returned an invalid Device enrollment.");return{...Z,organization_id:Z.organization_id}}function lQ(Q){if(!D(Q)||typeof Q.server_time!=="string"||typeof Q.drain!=="boolean")return w("Reason returned an invalid Device heartbeat.");return{server_time:Q.server_time,drain:Q.drain,...b(Q),...typeof Q.update_policy==="string"||Q.update_policy===null?{update_policy:Q.update_policy}:{},...typeof Q.supported_protocol_version==="number"?{supported_protocol_version:Q.supported_protocol_version}:{},...t(Q.latest_cli_versions),...Q.hands_prespawn===!0?{hands_prespawn:!0}:{}}}var i=["account_root_metadata_supported","workspace_root_metadata_supported","account_root_path_supported","home_contained_roots_supported","root_paths_supported","startup_supported"];function b(Q){return Object.fromEntries(i.filter((Z)=>Q[Z]===!0).map((Z)=>[Z,!0]))}function uQ(Q){if(!D(Q))return;try{return{...o(Q),...b(Q)}}catch{return}}function t(Q){if(!D(Q))return{};let Z={};for(let $ of p){let H=Q[$];if(typeof H==="string"&&/^(0|[1-9][0-9]{0,5})\.(0|[1-9][0-9]{0,5})\.(0|[1-9][0-9]{0,5})$/.test(H))Z[$]=H}return Object.keys(Z).length>0?{latest_cli_versions:Z}:{}}function aQ(Q){if(!D(Q)||!Array.isArray(Q.roots)||!Q.roots.every(_))return w("Reason returned an invalid Device root sync.");return{roots:Q.roots}}function eQ(Q){if(!D(Q)||Q.user_id!==void 0&&typeof Q.user_id!=="string"||typeof Q.organization_id!=="string"||typeof Q.organization_name!=="string"||typeof Q.organization_slug!=="string")return w("Reason returned an invalid Device identity.");return{...typeof Q.user_id==="string"?{user_id:Q.user_id}:{},organization_id:Q.organization_id,organization_name:Q.organization_name,organization_slug:Q.organization_slug}}function QW(Q){if(!D(Q)||Q.disconnected!==!0)return w("Reason did not disconnect this Device.");let Z=Q.sessions_moved;return typeof Z==="number"&&Number.isSafeInteger(Z)&&Z>=0?{disconnected:!0,sessions_moved:Z}:{disconnected:!0}}function WW(Q){if(D(Q)&&Q.ok===!0&&typeof Q.expires==="number")return{ok:!0,expires:Q.expires};if(D(Q)&&Q.ok===!1&&typeof Q.error==="string")return{ok:!1,error:Q.error};return w("Reason did not answer the local login hand-over.")}function ZW(Q){if(!D(Q)||Q.accepted!==!0)return w("Reason did not accept the Device lifecycle event.");return{accepted:!0}}function v(Q){return Buffer.byteLength(JSON.stringify(Q),"utf8")}function $W(Q,Z=k){if(!D(Q)||typeof Q.operation_id!=="string"||typeof Q.attempt_id!=="string"||typeof Q.attempt_token!=="string"||!/^(?:reason|ara)_attempt_/.test(Q.attempt_token)||typeof Q.lease_until!=="string"||typeof Q.run_id!=="string"||typeof Q.root_id!=="string"||Q.owner!==void 0&&!L(Q.owner)||!n(Q.capability,Z)||!D(Q.payload)||Q.protocol_version!==x||v(Q.payload)>R||Q.authority!==void 0&&!J(Q.authority)||Q.local_github_authority!==void 0&&!j.safeParse(Q.local_github_authority).success||Q.capability==="github.local.v1"&&!j.safeParse(Q.local_github_authority).success||Q.recording_authority!==void 0&&!m(Q.recording_authority)||Q.capability==="browser.recording.v1"&&(!m(Q.recording_authority)||!L(Q.owner))||Q.capability!=="browser.recording.v1"&&Q.recording_authority!==void 0)return w("Reason returned an invalid Device operation claim.");let $={operation_id:Q.operation_id,attempt_id:Q.attempt_id,attempt_token:Q.attempt_token,lease_until:Q.lease_until,run_id:Q.run_id,root_id:Q.root_id,capability:Q.capability,payload:Q.payload,...J(Q.authority)?{authority:Q.authority}:{},...m(Q.recording_authority)?{recording_authority:Object.freeze({...Q.recording_authority})}:{},...Q.local_github_authority!==void 0?{local_github_authority:j.parse(Q.local_github_authority)}:{},...Q.capability==="hands.connect"&&D(Q.environment)&&D(Q.environment.payload)&&J(Q.environment.authority)?{environment:{payload:Q.environment.payload,authority:Q.environment.authority}}:{},protocol_version:x};if(Q.owner!==void 0)$.owner=Object.freeze({...Q.owner});return $}function DW(Q){if(!D(Q)||typeof Q.lease_until!=="string"||!Array.isArray(Q.controls)||!Q.controls.every(s)||!Number.isInteger(Q.next_control_seq)||Number(Q.next_control_seq)<0)return w("Reason returned an invalid Device operation heartbeat.");return{lease_until:Q.lease_until,controls:Q.controls,next_control_seq:Number(Q.next_control_seq)}}function KW(Q){if(!D(Q)||!Number.isInteger(Q.next_event_seq)||Number(Q.next_event_seq)<0||typeof Q.duplicate!=="boolean"||!Number.isInteger(Q.accepted_count)||Number(Q.accepted_count)<0)return w("Reason returned an invalid Device operation event result.");return{next_event_seq:Number(Q.next_event_seq),duplicate:Q.duplicate,accepted_count:Number(Q.accepted_count)}}function FW(Q){if(!D(Q)||!D(Q.payload)||!J(Q.authority))return w("Reason returned an invalid Device environment delivery.");return{payload:Q.payload,authority:Q.authority}}function l(Q){return Q==="succeeded"||Q==="failed"||Q==="cancelled"||Q==="expired"}function wW(Q){if(!D(Q)||!l(Q.status)||typeof Q.idempotent!=="boolean")return w("Reason returned an invalid Device operation completion.");return{status:Q.status,idempotent:Q.idempotent}}
|
|
42
|
+
export{a as Sc,I as Tc,e as Uc,j as Vc,QQ as Wc,WQ as Xc,ZQ as Yc,k as Zc,x as _c,P as $c,R as ad,wQ as bd,HQ as cd,VQ as dd,YQ as ed,XQ as fd,BQ as gd,GQ as hd,qQ as id,gQ as jd,MQ as kd,NQ as ld,UQ as md,jQ as nd,JQ as od,xQ as pd,IQ as qd,SQ as rd,mQ as sd,PQ as td,CQ as ud,EQ as vd,TQ as wd,AQ as xd,kQ as yd,LQ as zd,_Q as Ad,fQ as Bd,bQ as Cd,cQ as Dd,yQ as Ed,dQ as Fd,OQ as Gd,zQ as Hd,RQ as Id,hQ as Jd,pQ as Kd,rQ as Ld,nQ as Md,r as Nd,sQ as Od,oQ as Pd,iQ as Qd,o as Rd,tQ as Sd,vQ as Td,lQ as Ud,uQ as Vd,aQ as Wd,eQ as Xd,QW as Yd,WW as Zd,ZW as _d,$W as $d,DW as ae,KW as be,FW as ce,wW as de};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var U=".reason/workspace",T="workspace_base",y="sessions",W="workspace_layout",g=".reason/workspace/sessions",B=/^[0-9a-f]{8}$/;function C(j){if(!J(j))return!1;let q=".reason/workspace/sessions/";if(!j.startsWith(q))return!1;let z=j.slice(q.length).split("/");return z.length===2&&B.test(z[0])}var G=4096,X="workspaces/pi";function J(j){if(typeof j!=="string"||!j||j.length>G)return!1;if(j.startsWith("/")||j.includes("\x00")||j.includes("\\"))return!1;return j.split("/").every((q)=>q!==""&&q!=="."&&q!=="..")}function Z(j){if(j.kind==="root"){if(j.path===void 0)return".";if(!J(j.path))throw Error("invalid_device_workspace_identity");return j.path}if(!/^[A-Za-z0-9][A-Za-z0-9._:-]{0,159}$/.test(j.workspaceId)||j.workspaceId==="."||j.workspaceId==="..")throw Error("invalid_device_workspace_identity");let q=j.layout==="sessions"?"sessions":X;return`${j.base?`${j.base}/`:""}${q}/${j.workspaceId}/repo`}function L(j){if(!j||typeof j!=="object"||Array.isArray(j))return null;let q=j;if(q.kind==="root"&&Object.keys(q).length===1)return{kind:"root"};if(q.kind==="root"&&Object.keys(q).length===2&&J(q.path))return{kind:"root",path:q.path};if(q.kind!=="managed"||typeof q.workspaceId!=="string"||Object.keys(q).length!==2+(q.base===void 0?0:1)+(q.layout===void 0?0:1)||q.base!==void 0&&q.base!==".reason/workspace"||q.layout!==void 0&&q.layout!=="sessions")return null;let z={kind:"managed",workspaceId:q.workspaceId,...q.base===".reason/workspace"?{base:".reason/workspace"}:{},...q.layout==="sessions"?{layout:"sessions"}:{}};try{return Z(z),z}catch{return null}}var b="/home/runner",P=10001,x="/run/reason/sessions",f=/^(?:\/[A-Za-z0-9._-]+)+$/,M=/-sidechat-([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$/,H=/^(.+)-repository-[a-z0-9][a-z0-9._-]*-[0-9a-f]{12}$/;function K(j){return M.exec(j)?.[1]??H.exec(j)?.[1]??j}var $=/^((?:\/[A-Za-z0-9._-]+)+)\/\.reason\/workspace\/(workspaces\/pi|sessions)\/([^/]+)$/,A="*/.reason/workspace/workspaces/pi/*|*/.reason/workspace/sessions/*";function N(j,q=b,z="sessions"){if(!f.test(q)||q.split("/").some((V)=>V==="."||V===".."))throw Error("invalid_cloud_payload_home");let Q=`${q}/${Z({kind:"managed",workspaceId:j,base:".reason/workspace",...z?{layout:z}:{}})}`,F=`${x}/${K(j)}`;return{home:q,root:Q.slice(0,-5),checkout:Q,control:F,jobEnv:`${F}/job.env`,cloudAccess:`${F}/cloud-access`,logs:`${F}/logs`,pin:`${F}/ws`}}function Y(j){return $.exec(j.replace(/\/+$/,""))?.[2]==="sessions"?"sessions":null}function D(j){return{kind:"managed",workspaceId:j,layout:"sessions"}}function R(j){let q=$.exec(j.replace(/\/+$/,""));if(!q)return null;try{let z=N(q[3],q[1],Y(j));return z.root===j.replace(/\/+$/,"")?z:null}catch{return null}}
|
|
3
|
-
export{U as
|
|
3
|
+
export{U as hh,T as ih,y as jh,W as kh,g as lh,B as mh,C as nh,J as oh,Z as ph,L as qh,b as rh,P as sh,x as th,M as uh,H as vh,$ as wh,A as xh,N as yh,Y as zh,D as Ah,R as Bh};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Vb as i,Wb as l,Xb as g,Yb as y}from"./vm-hands-entry-lite-n07kxrd1.js";import{
|
|
2
|
+
import{Vb as i,Wb as l,Xb as g,Yb as y}from"./vm-hands-entry-lite-n07kxrd1.js";import{Bf as S,Cf as _,Ef as P,Ff as C,Gf as I,If as O,Lf as A,lf as Q,mf as J,nf as z,of as Z,pf as K,qf as $,rf as k,tf as G,vf as X,wf as M,xf as Y,yf as H,zf as V}from"./vm-hands-entry-lite-yhz6sv35.js";import{th as L,uh as W,vh as F,wh as j}from"./vm-hands-entry-lite-ne8kkvk4.js";var d=["cgroup_membership_read_failed","cgroup_v2_membership_absent","cgroup_scope_invalid","cgroup_root_unavailable","cgroup_directory_unavailable","cgroup_limit_read_failed","cgroup_events_read_failed","cgroup_current_read_failed","cgroup_stat_read_failed","boot_id_read_failed","boot_id_invalid","guest_meminfo_read_failed","guest_vmstat_read_failed","memory_counter_invalid","memory_field_missing","memory_capacity_invalid"];var a=String.raw`(function(fs, path) {
|
|
3
3
|
const fail = (message, reasonCode) => { throw Object.assign(Error(message), {reasonCode}); };
|
|
4
4
|
const read = (p, reasonCode, trim=true) => { try { const text=fs.readFileSync(p, "utf8"); return trim?text.trim():text; }
|
|
5
5
|
catch { fail("memory_read", reasonCode); } };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var j=Object.create;var{getPrototypeOf:k,defineProperty:f,getOwnPropertyNames:l}=Object;var m=Object.prototype.hasOwnProperty;function n(a){return this[a]}var o,p,s=(a,b,c)=>{var g=a!=null&&typeof a==="object";if(g){var h=b?o??=new WeakMap:p??=new WeakMap,i=h.get(a);if(i)return i}c=a!=null?j(k(a)):{};let d=b||!a||!a.__esModule?f(c,"default",{value:a,enumerable:!0}):c;for(let e of l(a))if(!m.call(d,e))f(d,e,{get:n.bind(a,e),enumerable:!0});if(g)h.set(a,d);return d};var t=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports);var q=(a)=>a;function r(a,b){this[a]=q.bind(null,b)}var u=(a,b)=>{for(var c in b)f(a,c,{get:b[c],enumerable:!0,configurable:!0,set:r.bind(b,c)})};var v=import.meta.require;
|
|
3
|
-
export{s as
|
|
3
|
+
export{s as Ph,t as Qh,u as Rh,v as Sh};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Qh as e}from"./vm-hands-entry-lite-t3gpbwqp.js";var i=e((o,t)=>{t.exports={name:"playwright-core",version:"1.60.0",description:"A high-level API to automate web browsers",repository:{type:"git",url:"git+https://github.com/microsoft/playwright.git"},homepage:"https://playwright.dev",engines:{node:">=18"},author:{name:"Microsoft Corporation"},license:"Apache-2.0",exports:{".":{types:"./index.d.ts",import:"./index.mjs",require:"./index.js",default:"./index.js"},"./package.json":"./package.json","./lib/bootstrap":"./lib/bootstrap.js","./lib/coreBundle":"./lib/coreBundle.js","./lib/utilsBundle":"./lib/utilsBundle.js","./lib/tools/cli-client/program":"./lib/tools/cli-client/program.js"},bin:{"playwright-core":"cli.js"},types:"types/types.d.ts"}});
|
|
3
3
|
export{i as x};
|