@reason-machines/cli-linux-arm64-musl 0.2.278 → 0.2.280
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 +1 -1
- package/bin/vm-hands/{connect-cli-qphdm1f1.js → connect-cli-pey653vs.js} +1 -1
- package/bin/vm-hands/{local-automation-tvf2dbfq.js → local-automation-060ebgph.js} +1 -1
- package/bin/vm-hands/{local-capabilities-p579j21r.js → local-capabilities-rnfywakv.js} +1 -1
- package/bin/vm-hands/{local-display-session-jwdq3jb4.js → local-display-session-be5b20wr.js} +1 -1
- package/bin/vm-hands/{permissions-2s0qyrg0.js → permissions-5rk1x31r.js} +1 -1
- package/bin/vm-hands/status-a22h186h.js +96 -0
- package/bin/vm-hands/{version-1qgvgegp.js → version-nahw41t6.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-y4sjgfqz.js → vm-hands-entry-lite-1ke1jfwg.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-8wyfep1z.js → vm-hands-entry-lite-6v546v08.js} +83 -83
- package/bin/vm-hands/{vm-hands-entry-lite-2xas56hm.js → vm-hands-entry-lite-8e4r3b6x.js} +2 -2
- package/bin/vm-hands/{vm-hands-entry-lite-51hcyapr.js → vm-hands-entry-lite-fapp2ksb.js} +1 -1
- package/bin/vm-hands/vm-hands-entry-lite-g0g75c3y.js +181 -0
- package/bin/vm-hands/{vm-hands-entry-lite-jwqqfjba.js → vm-hands-entry-lite-q863th71.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-htn1genx.js → vm-hands-entry-lite-tnqv3xzm.js} +1 -1
- package/bin/vm-hands/{vm-hands-entry-lite-1bvbhwbb.js → vm-hands-entry-lite-zpcr7myv.js} +1 -1
- package/bin/vm-hands/vm-hands-entry-lite.js +1 -1
- package/bin/vm-hands/{vm-hands-executor-v2qjnrb5.js → vm-hands-executor-p9h31r85.js} +1 -1
- package/bin/vm-hands/{vm-hands-op-runner-ej1c20a6.js → vm-hands-op-runner-3exdfqwf.js} +1 -1
- package/bin/vm-hands/{vm-hands-runtime-yyy4ad4z.js → vm-hands-runtime-64eyw5ke.js} +2 -2
- package/package.json +1 -1
- package/bin/vm-hands/status-2d21kwsn.js +0 -96
- package/bin/vm-hands/vm-hands-entry-lite-5pxbx31d.js +0 -179
package/bin/ara
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
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-
|
|
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-6v546v08.js";import"./vm-hands-entry-lite-k4c504n7.js";import"./vm-hands-entry-lite-fapp2ksb.js";import"./vm-hands-entry-lite-tnqv3xzm.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"./vm-hands-entry-lite-q863th71.js";import"./vm-hands-entry-lite-gqncr2j0.js";import"./vm-hands-entry-lite-sv6xwe0h.js";import"./vm-hands-entry-lite-g0g75c3y.js";import"./vm-hands-entry-lite-bfwf82rw.js";import"./vm-hands-entry-lite-ptmqg51y.js";import"./vm-hands-entry-lite-8e4r3b6x.js";import"./vm-hands-entry-lite-s2xydt0n.js";import"./vm-hands-entry-lite-s5qn1k80.js";import"./vm-hands-entry-lite-9pmag2qk.js";import"./vm-hands-entry-lite-84aq8d12.js";import"./vm-hands-entry-lite-1ke1jfwg.js";import"./vm-hands-entry-lite-zpcr7myv.js";import"./vm-hands-entry-lite-anaydk9m.js";import"./vm-hands-entry-lite-ffg7rf02.js";import"./vm-hands-entry-lite-7gh1rbn7.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{Ac as a,Bc as b,Cc as c,Dc as d,Ec as e,Fc as f,Gc as g,Hc as h,Ic as i,Jc as j,Kc as k,Lc as l}from"./vm-hands-entry-lite-
|
|
2
|
+
import{Ac as a,Bc as b,Cc as c,Dc as d,Ec as e,Fc as f,Gc as g,Hc as h,Ic as i,Jc as j,Kc as k,Lc as l}from"./vm-hands-entry-lite-q863th71.js";import"./vm-hands-entry-lite-gqncr2j0.js";import"./vm-hands-entry-lite-sv6xwe0h.js";import"./vm-hands-entry-lite-g0g75c3y.js";import"./vm-hands-entry-lite-bfwf82rw.js";import"./vm-hands-entry-lite-ptmqg51y.js";import"./vm-hands-entry-lite-8e4r3b6x.js";import"./vm-hands-entry-lite-s2xydt0n.js";import"./vm-hands-entry-lite-s5qn1k80.js";import"./vm-hands-entry-lite-9pmag2qk.js";import"./vm-hands-entry-lite-84aq8d12.js";import"./vm-hands-entry-lite-1ke1jfwg.js";import"./vm-hands-entry-lite-zpcr7myv.js";import"./vm-hands-entry-lite-anaydk9m.js";import"./vm-hands-entry-lite-ffg7rf02.js";import"./vm-hands-entry-lite-7gh1rbn7.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};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
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-
|
|
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-fapp2ksb.js";import"./vm-hands-entry-lite-tnqv3xzm.js";import"./vm-hands-entry-lite-c2nrar90.js";import"./vm-hands-entry-lite-65pbrs1x.js";import"./vm-hands-entry-lite-qvrnx0vk.js";import{Zb as b}from"./vm-hands-entry-lite-n07kxrd1.js";import"./vm-hands-entry-lite-1hwdab4e.js";import"./vm-hands-entry-lite-q863th71.js";import"./vm-hands-entry-lite-gqncr2j0.js";import"./vm-hands-entry-lite-sv6xwe0h.js";import"./vm-hands-entry-lite-g0g75c3y.js";import"./vm-hands-entry-lite-bfwf82rw.js";import"./vm-hands-entry-lite-ptmqg51y.js";import"./vm-hands-entry-lite-8e4r3b6x.js";import"./vm-hands-entry-lite-s2xydt0n.js";import"./vm-hands-entry-lite-s5qn1k80.js";import"./vm-hands-entry-lite-9pmag2qk.js";import"./vm-hands-entry-lite-84aq8d12.js";import"./vm-hands-entry-lite-1ke1jfwg.js";import"./vm-hands-entry-lite-zpcr7myv.js";import"./vm-hands-entry-lite-anaydk9m.js";import{Gh as a}from"./vm-hands-entry-lite-ffg7rf02.js";import"./vm-hands-entry-lite-7gh1rbn7.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};
|
package/bin/vm-hands/{local-display-session-jwdq3jb4.js → local-display-session-be5b20wr.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{re as a,se as b,te as c,ue as d,ve as e,we as f,xe as g,ye as h}from"./vm-hands-entry-lite-
|
|
2
|
+
import{re as a,se as b,te as c,ue as d,ve as e,we as f,xe as g,ye as h}from"./vm-hands-entry-lite-g0g75c3y.js";import"./vm-hands-entry-lite-bfwf82rw.js";import"./vm-hands-entry-lite-ptmqg51y.js";import"./vm-hands-entry-lite-8e4r3b6x.js";import"./vm-hands-entry-lite-s2xydt0n.js";import"./vm-hands-entry-lite-s5qn1k80.js";import"./vm-hands-entry-lite-9pmag2qk.js";import"./vm-hands-entry-lite-84aq8d12.js";import"./vm-hands-entry-lite-1ke1jfwg.js";import"./vm-hands-entry-lite-zpcr7myv.js";import"./vm-hands-entry-lite-anaydk9m.js";import"./vm-hands-entry-lite-ffg7rf02.js";import"./vm-hands-entry-lite-7gh1rbn7.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{og as a,pg as b,qg as c,rg as d,sg as e,tg as f,ug as g,vg as h,wg as i,xg as j}from"./vm-hands-entry-lite-
|
|
2
|
+
import{og as a,pg as b,qg as c,rg as d,sg as e,tg as f,ug as g,vg as h,wg as i,xg as j}from"./vm-hands-entry-lite-8e4r3b6x.js";import"./vm-hands-entry-lite-s2xydt0n.js";import"./vm-hands-entry-lite-9pmag2qk.js";import"./vm-hands-entry-lite-84aq8d12.js";import"./vm-hands-entry-lite-1ke1jfwg.js";import"./vm-hands-entry-lite-zpcr7myv.js";import"./vm-hands-entry-lite-ffg7rf02.js";import"./vm-hands-entry-lite-7gh1rbn7.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};
|
|
@@ -0,0 +1,96 @@
|
|
|
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-6v546v08.js";import"./vm-hands-entry-lite-k4c504n7.js";import"./vm-hands-entry-lite-fapp2ksb.js";import"./vm-hands-entry-lite-tnqv3xzm.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-q863th71.js";import"./vm-hands-entry-lite-gqncr2j0.js";import{_d as G}from"./vm-hands-entry-lite-sv6xwe0h.js";import"./vm-hands-entry-lite-g0g75c3y.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-8e4r3b6x.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-1ke1jfwg.js";import"./vm-hands-entry-lite-zpcr7myv.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=`---
|
|
3
|
+
name: reason
|
|
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
|
+
---
|
|
6
|
+
|
|
7
|
+
# Reason API
|
|
8
|
+
|
|
9
|
+
Reason integrations use the public REST API. Public customer MCP is retired.
|
|
10
|
+
|
|
11
|
+
Base URL: \`https://api.reasonmachines.com/v3\`
|
|
12
|
+
|
|
13
|
+
- API quickstart: \`https://docs.reasonmachines.com/api-quickstart\`
|
|
14
|
+
- Endpoint reference: \`https://docs.reasonmachines.com/api-reference\`
|
|
15
|
+
|
|
16
|
+
## Authentication and scope
|
|
17
|
+
|
|
18
|
+
1. Create a least-privilege \`ara_\` key in Reason Settings \u2192 Developers (the Code
|
|
19
|
+
/ API keys picker) and keep it only in the calling service or CI secret
|
|
20
|
+
manager. Never
|
|
21
|
+
put it in source, prompts, logs, generated files, or a repository
|
|
22
|
+
environment file. A new key from that picker includes the ordinary public
|
|
23
|
+
scopes for session, skill, repo, and org reads.
|
|
24
|
+
2. Send it as \`Authorization: Bearer <api-key>\`. Call \`GET /v3/self\` first
|
|
25
|
+
to resolve the key's organization before reading or mutating resources.
|
|
26
|
+
3. Request only the scopes needed by the integration. Treat secret values as
|
|
27
|
+
write-only and never expose them in API responses or diagnostics.
|
|
28
|
+
4. Use the endpoint reference as the source of truth for request/response
|
|
29
|
+
shapes, pagination, and error handling. Do not recreate an old MCP client,
|
|
30
|
+
route, OAuth flow, or plugin configuration. Do not connect to the retired
|
|
31
|
+
public MCP transport.
|
|
32
|
+
|
|
33
|
+
## Session automation
|
|
34
|
+
|
|
35
|
+
- Create and monitor sessions through the documented \`/v3/organizations/:orgId/
|
|
36
|
+
sessions\` endpoints. Return the session URL or identifier to the caller, then
|
|
37
|
+
poll or stream only as the API reference specifies.
|
|
38
|
+
- Omit \`hands_mode\` for adaptive lazy Hands, or set it to \`brain_only\` when
|
|
39
|
+
physical execution must remain permanently disabled for that Conversation.
|
|
40
|
+
- Keep API work idempotent where the endpoint supports it, and surface failed
|
|
41
|
+
mutations rather than retrying destructive operations blindly.
|
|
42
|
+
- Scope every request to the intended organization and repository. Do not infer
|
|
43
|
+
authority from a repository name or an untrusted task payload.
|
|
44
|
+
`;function m(q){return vq(q,".agents","skills","ara","SKILL.md")}function i(q){let J=m(q);return Tq(J)&&Uq(J,"utf8")===Eq}var p=["codex","claude","cursor"],r={codex:"Codex",claude:"Claude Code",cursor:"Cursor"};function pq(q,J=process.env){let x=J.PATH??"";for(let Y of x.split(gq)){if(!Y)continue;try{return _q(T(Y,q),wq.X_OK),!0}catch{}}return!1}function dq(){return{exists:pq,run(q,J,x={}){let Y=x.interactive===!0,X=Mq(q,J,{encoding:"utf8",env:process.env,stdio:Y?"inherit":"pipe"});return{status:X.status??1,stdout:Y?"":X.stdout??"",stderr:Y?X.error?.message??"":`${X.stderr??""}${X.error?`${X.error.message}
|
|
45
|
+
`:""}`}}}}function O(q){return`${q.stdout}
|
|
46
|
+
${q.stderr}`}function k(q){return q.status===0}function I(q,J,x,Y={}){let X=q.run(J,x,Y);if(k(X))return X;let $=O(X).trim();throw Error(`${J} ${x.join(" ")} failed${$?`: ${$}`:` with exit code ${X.status}`}`)}function uq(q=process.env){return s(H({env:q}))}function d(q,J){return q.split(/\s+/).some((x)=>e(x,J))}function w(q){return T(q,".cursor","mcp.json")}function t(q){if(!L(q))return{};try{let J=JSON.parse(fq(q,"utf8"));if(!J||typeof J!=="object"||Array.isArray(J))throw Error("top-level value must be an object");return J}catch(J){let x=J instanceof Error?J.message:String(J);throw Error(`Cursor MCP config at ${q} is invalid; refusing to overwrite it (${x})`)}}function lq(q,J){Lq(mq(q),{recursive:!0,mode:448});let x=`${q}.ara-${process.pid}.tmp`;hq(x,`${JSON.stringify(J,null,2)}
|
|
47
|
+
`,{mode:384}),Sq(x,q)}function e(q,J){if(typeof q!=="string")return!1;if(q===J)return!0;try{let x=new URL(q);return["https://api.ara.so","https://api-staging.ara.so","https://api.reasonmachines.ai","https://staging-api.reasonmachines.ai","https://api.reasonmachines.com","https://staging-api.reasonmachines.com"].includes(x.origin)&&!x.username&&!x.password&&x.pathname==="/mcp/ara"&&!x.search&&!x.hash}catch{return!1}}function oq(q,J){let x=q.mcpServers?.ara;return Boolean(x&&typeof x==="object"&&!Array.isArray(x)&&e(x.url,J))}class f{runner;home;mcpUrl;constructor(q=dq(),J=Cq(),x=uq()){this.runner=q;this.home=J;this.mcpUrl=x}isAvailable(q){if(q==="codex")return this.runner.exists("codex");if(q==="claude")return this.runner.exists("claude");return this.runner.exists("cursor")||L("/Applications/Cursor.app")||L(T(this.home,"Applications","Cursor.app"))||L(w(this.home))}availableClients(){return p.filter((q)=>this.isAvailable(q))}installationPath(q){if(q==="cursor")return w(this.home);if(q==="codex")return T(this.home,".codex","plugins","cache","ara");return T(this.home,".claude","plugins","cache","ara")}sharedSkillStatus(){return{installed:i(this.home),path:m(this.home)}}status(q){let J=r[q];if(!this.isAvailable(q))return{id:q,label:J,available:!1,installed:!1,connection:null,detail:"Client not detected",legacyInstallations:[]};if(q==="cursor"){let W=w(this.home),D=oq(t(W),this.mcpUrl);return{id:q,label:J,available:!0,installed:D,connection:D?"configured":null,detail:D?`Retired Reason MCP configuration in ${W}`:`No retired Reason MCP configuration in ${W}`,legacyInstallations:[]}}if(q==="codex"){let W=this.runner.run("codex",["plugin","list"]);if(!(k(W)&&O(W).includes("ara@ara")))return{id:q,label:J,available:!0,installed:!1,connection:null,detail:"No retired Reason plugin installed",legacyInstallations:[]};let P=this.runner.run("codex",["mcp","list"]),Q=O(P).split(/\r?\n/).find((E)=>E.trimStart().startsWith("ara ")&&d(E,this.mcpUrl)),h=k(P)&&Boolean(Q),v=!k(P)?"error":Q?.includes("Not logged in")?"not_logged_in":Q?.includes("OAuth")?"oauth":Q?"configured":"unknown";return{id:q,label:J,available:!0,installed:h,connection:v,detail:Q?.trim()||"The retired Reason plugin is installed but has no verified retired MCP registration",legacyInstallations:[]}}let x=this.runner.run("claude",["plugin","list"]),Y=O(x),X=k(x)&&Y.includes("ara@ara"),$=k(x)&&Y.includes("ara-handoff@ara");if(!X&&!$)return{id:q,label:J,available:!0,installed:!1,connection:null,detail:"No retired Reason plugin installed",legacyInstallations:[]};let B=this.runner.run("claude",["mcp","list"]),K=O(B),j=K.split(/\r?\n/).find((W)=>W.includes("plugin:ara:ara")&&d(W,this.mcpUrl)),z=K.split(/\r?\n/).find((W)=>W.includes("plugin:ara-handoff:ara")&&d(W,this.mcpUrl)),U=k(B)&&Boolean(j),F=k(B)&&z?["ara-handoff@ara"]:[],S=!k(B)?"error":j?.includes("Connected")?"connected":j?.includes("Failed")?"error":j?"configured":"unknown";return{id:q,label:J,available:!0,installed:U,connection:S,detail:j?.trim()||"The retired Reason plugin is installed but has no verified retired MCP registration",legacyInstallations:F}}statuses(){return p.map((q)=>this.status(q))}logout(q){let J=this.status(q);if(!J.available||!J.installed)return`${J.label}: not connected`;if(q==="cursor")return this.uninstall("cursor").replace("removed retired Reason","signed out and removed retired Reason");if(q==="codex")return I(this.runner,"codex",["mcp","logout","ara"]),"Codex: signed out of Reason";return I(this.runner,"claude",["mcp","logout","plugin:ara:ara"]),"Claude Code: signed out of Reason"}uninstall(q){let J=this.status(q);if(!J.available||!J.installed)return`${J.label}: Reason is not installed`;if(q==="cursor"){let x=w(this.home),Y=t(x),X={...Y.mcpServers??{}};return delete X.ara,Y.mcpServers=X,lq(x,Y),`Cursor: removed retired Reason MCP from ${x}`}if(q==="codex")return I(this.runner,"codex",["plugin","remove","ara@ara"]),"Codex: removed retired ara@ara";return I(this.runner,"claude",["plugin","uninstall","ara@ara","--scope","user"]),"Claude Code: removed retired ara@ara"}removeLegacyClaudePlugin(){if(!this.runner.exists("claude"))return"Claude Code: not installed";if(!this.status("claude").legacyInstallations.includes("ara-handoff@ara"))return"Claude Code: no legacy Reason plugin found";return I(this.runner,"claude",["plugin","uninstall","ara-handoff@ara","--scope","user"]),"Claude Code: removed obsolete ara-handoff@ara"}removeRetiredInstallations(){let q=[],J=[];for(let x of p){let Y;try{Y=this.status(x)}catch(X){J.push(`${r[x]}: ${X instanceof Error?X.message:String(X)}`);continue}if(Y.installed){if(x!=="cursor")try{q.push(this.logout(x))}catch(X){J.push(`${Y.label}: ${X instanceof Error?X.message:String(X)}`)}try{q.push(this.uninstall(x))}catch(X){J.push(`${Y.label}: ${X instanceof Error?X.message:String(X)}`)}}if(x==="claude"&&Y.legacyInstallations.includes("ara-handoff@ara"))try{q.push(this.removeLegacyClaudePlugin())}catch(X){J.push(`${Y.label}: ${X instanceof Error?X.message:String(X)}`)}}if(q.length===0&&J.length===0)q.push("No retired Reason MCP configuration found.");return{messages:q,failures:J}}}function a(q){return`claude mcp add --transport http reason ${q}`}function n(q){return`codex mcp add reason --url ${q}
|
|
48
|
+
codex mcp login reason`}var P3=a("https://mcp.reasonmachines.com/mcp"),y3=n("https://mcp.reasonmachines.com/mcp"),R3=`https://claude.ai/settings/connectors?add=custom&url=${encodeURIComponent("https://mcp.reasonmachines.com/mcp")}`,N3=`https://cursor.com/install-mcp?name=reason&config=${encodeURIComponent(btoa(JSON.stringify({url:"https://mcp.reasonmachines.com/mcp"})))}`;var cq="https://github.com/reason-machines/reason-plugins",E3=`Connect a coding agent to Reason over MCP
|
|
49
|
+
|
|
50
|
+
Usage:
|
|
51
|
+
reason mcp Show how to connect Claude Code, Codex, or another MCP client
|
|
52
|
+
reason mcp uninstall Remove only this machine's registrations of the earlier, retired server
|
|
53
|
+
|
|
54
|
+
Plugins for Claude Code and Codex: ${cq}
|
|
55
|
+
`;function qq(q){if(!q.available)return"not detected";if(q.installed||q.legacyInstallations.length>0)return"retired configuration";return"not installed"}function iq(q,J){let x=J.toLowerCase();if(q==="codex")return x.includes("codex");if(q==="claude")return x.includes("claude");return x.includes("cursor")}function xq(q,J){return(J.mcp_connections??[]).filter((Y)=>iq(q.id,Y.client_name)).flatMap((Y)=>Y.last_used_at?[Y.last_used_at]:[]).sort().at(-1)??null}function Jq(q,J=new Date){if(!q)return"never";let x=Date.parse(q);if(!Number.isFinite(x))return"never";let Y=Math.max(0,Math.floor((J.getTime()-x)/1000));if(Y<45)return"just now";let X=Math.floor(Y/60);if(X<60)return`${X} ${X===1?"minute":"minutes"} ago`;let $=Math.floor(X/60);if($<24)return`${$} ${$===1?"hour":"hours"} ago`;let B=Math.floor($/24);return`${B} ${B===1?"day":"days"} ago`}function Xq(q){let J=q.name?.trim(),x=q.email?.trim();if(J&&x)return`${J} (${x})`;return J||x||q.id||"Reason user"}function Yq(q){let J=q.name?.trim(),x=q.slug?.trim();if(J&&x)return`${J} (${x})`;return J||x||q.id}var rq=G.enum(["granted","not_granted","unknown"]),Zq=G.object({status:rq,checkedAt:G.number().finite(),executablePath:G.string().min(1)});var J3=`Reason status
|
|
56
|
+
|
|
57
|
+
Usage:
|
|
58
|
+
reason status [--json]
|
|
59
|
+
|
|
60
|
+
Show the installed version, signed-in account and organization, this
|
|
61
|
+
computer's connection (\`reason connect\`) and the workspaces it serves, any
|
|
62
|
+
retired MCP configuration that can be cleaned up, and automatic updates.
|
|
63
|
+
`,X3=5000,Y3=300000,Z3=G.object({version:G.literal(1),key:G.string(),at:G.number(),self:G.object({principal_type:G.string(),user_id:G.string().optional(),user_name:G.string().nullish(),email:G.string().nullish(),org_id:G.string(),organization_name:G.string().nullish(),organization_slug:G.string().nullish(),mcp_connections:G.array(G.object({client_id:G.string(),client_name:G.string(),last_used_at:G.string().nullable()})).optional()})}),Pq=(q)=>`${q.apiOrigin}
|
|
64
|
+
${tq("sha256").update(q.accessToken).digest("hex")}`;function $3(q,J,x){try{let Y=Z3.safeParse(JSON.parse(eq(q,"utf8")));if(!Y.success||Y.data.key!==Pq(J))return null;let X=x-Y.data.at;return X>=0&&X<Y3?Y.data.self:null}catch{return null}}function G3(q,J,x,Y){let X=`${q}.${process.pid}.${sq(6).toString("hex")}.tmp`;try{let $={version:1,key:Pq(J),at:Y,self:x};q3(X,`${JSON.stringify($)}
|
|
65
|
+
`,{mode:384,flag:"wx"}),aq(X,q)}catch{try{nq(X)}catch{}}}var Q3=30000;function W3(q,J=Date.now()){let x=Qq(q),Y=(()=>{if(x?.state!=="connected"&&x?.state!=="starting")return!1;try{return process.kill(x.pid,0),!0}catch{return!1}})(),X=Y&&x?.state==="connected",$=(K)=>X&&J-K>=0&&J-K<Q3,B=Zq.safeParse(x?.fullDiskAccess);return{full_disk_access:B.success&&$(B.data.checkedAt)?B.data.status:"unknown",keep_awake:{enabled:Dq(q)==="battery_and_ac",holding:x?.idleSleepHold===!0&&$(Date.parse(x.lastHeartbeatAt??""))},executable:Y&&B.success?B.data.executablePath:null}}function B3(q=H()){if(process.platform!=="darwin")return null;let J=kq(zq(Kq(Aq(l()),q),"worker.json"));return J?W3(Fq(J).daemon):null}var Gq={connected:"connected",starting:"starting",reconnecting:"reconnecting",stopping:"stopping",not_running:"not running",removed:"removed from Reason (run `reason connect` to connect it again)"};async function x1(q,J={}){let x=J.io??{stdout:process.stdout,stderr:process.stderr};if(q.includes("--help")||q.includes("-h"))return x.stdout.write(J3),0;if(q.some(($)=>$!=="--json"))return x.stderr.write(`Usage: reason status [--json]
|
|
66
|
+
`),1;let Y=new AbortController,X=setTimeout(()=>Y.abort(Error("timed out reading the account")),X3);try{let $=J.now?.()??new Date,B=performance.now(),K=B,j=()=>{let Z=performance.now(),V=Math.round(Z-K);return K=Z,V},z=null,U=(Z)=>{return z=Z instanceof Error?Z.message:String(Z),null},F=await bq(J,Y.signal).catch(U),S=j(),W=F?.credentialKind==="api_key",D=F&&!W?zq(x3(Wq(J.env??process.env)),"status-account.json"):null,P=F&&D&&q.includes("--json")?$3(D,F,$.getTime()):null,Q=P??(F?await(J.getSelf??((Z,V)=>new Bq(Z).self(V)))(F,Y.signal).catch(U):null);if(F&&Q&&!P&&D)G3(D,F,Q,$.getTime());let h=j(),v=J.manager??new f,E=v.statuses(),M=(J.loadReceipt??jq)(),_=await(J.readConnection??(()=>Hq({channel:J.channel})))().catch(()=>null),A=null;try{if(_)A=(J.readConnectionMacState??(()=>B3(J.channel??H())))()}catch{}let b=_&&A?{..._,...A}:_,C=(()=>{try{return(J.readDisconnected??(()=>Vq(Aq(l()),J.channel??H())))()}catch{return!1}})(),yq=j(),o=Q?{id:Q.org_id,name:Q.organization_name??null,slug:Q.organization_slug??null}:null,N=Q?{id:Q.user_id??null,name:(W?Q.service_user_name:Q.user_name)??null,email:Q.email??null,credential:W?"api_key":"login"}:null,g=J.channel??H(),y={version:R,channel:g,api_origin:F?.apiOrigin??u(g),account:N,account_error:z,organization:o,mcp:E.map((Z)=>({client:Z.id,label:Z.label,status:qq(Z),installed_at:Z.installed?v.installationPath(Z.id):null,last_used_at:Q?xq(Z,Q):null})),connection:b,disconnected:C,installation:M?{background_mode:M.background_mode,automatic_updates:M.background_mode!=="cli_only",future_device_consent:M.device_consent?.decision??"disabled"}:null,timings_ms:{credentials:S,account:h,local:yq,total:Math.round(performance.now()-B)}};if(q.includes("--json"))return x.stdout.write(`${JSON.stringify(y,null,2)}
|
|
67
|
+
`),0;if(g==="staging")x.stdout.write(`Reason ${R} \xB7 channel: STAGING
|
|
68
|
+
`),x.stdout.write(`API: ${y.api_origin}
|
|
69
|
+
`);else x.stdout.write(`Reason ${R}
|
|
70
|
+
`);if(N)x.stdout.write(W?`Account: API key (REASON_API_KEY)${N.name?`: ${N.name}`:""}
|
|
71
|
+
`:`Account: ${Xq(N)}
|
|
72
|
+
`),x.stdout.write(`Organization: ${Yq(o)}
|
|
73
|
+
`);else if(z)x.stdout.write(`Account: unavailable (${z})
|
|
74
|
+
`);else x.stdout.write(`Account: signed out
|
|
75
|
+
`),x.stdout.write(`Organization: none
|
|
76
|
+
`);if(x.stdout.write(`
|
|
77
|
+
This computer
|
|
78
|
+
`),!b)x.stdout.write(C?"Disconnected. Run `reason connect` to connect it again.\n":"Not connected. Run `reason connect` to run your Sessions here.\n");else{if(x.stdout.write(`Connection: ${Gq[b.state]} (${b.name})${C?", disconnected (run `reason connect` to connect it again)":""}
|
|
79
|
+
`),b.version)x.stdout.write(`Version: ${b.version}${b.version===R?"":` (${R} is installed; \`reason connect\` restarts it on that)`}
|
|
80
|
+
`);if(x.stdout.write(`Folder: ${b.folder}
|
|
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-5rk1x31r.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}
|
|
83
|
+
`);x.stdout.write(`Keep awake: ${A.keep_awake.enabled?"on":"off"}${A.keep_awake.holding?" (holding)":""}
|
|
84
|
+
`)}if(b.service)x.stdout.write(`Logs: ${b.service.logs}
|
|
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}
|
|
86
|
+
`)}if(b.workspaces_off==="sign_in")x.stdout.write("Other workspaces: off. This computer's sign-in is not one the Reason app or the setup command\n Reason shows you made for it (or that sign-in ended, or it is in use on another computer), so it is\n connected in one workspace only. Run the setup command from Reason here (it ends in --pair CODE);\n if this computer was connected before that, run `reason disconnect` and `reason connect` once.\n")}let c=y.mcp.filter((Z)=>Z.installed_at||Z.status!=="not installed");if(c.length>0)x.stdout.write(`
|
|
87
|
+
Retired MCP configuration
|
|
88
|
+
`);for(let Z of c)if(x.stdout.write(`${Z.label}: ${Z.status}
|
|
89
|
+
`),Z.installed_at)x.stdout.write(` Installed: ${Z.installed_at}
|
|
90
|
+
`),x.stdout.write(` Last used: ${Jq(Z.last_used_at,$)}
|
|
91
|
+
`);if(y.mcp.some((Z)=>Z.status==="retired configuration"))x.stdout.write("Run `reason mcp uninstall` to remove only the retired Reason MCP registrations.\n");if(x.stdout.write(`
|
|
92
|
+
Background access
|
|
93
|
+
`),!y.installation)x.stdout.write(`Not managed by the Reason installer
|
|
94
|
+
`);else x.stdout.write(`Automatic updates: ${y.installation.automatic_updates?"enabled":"disabled"}
|
|
95
|
+
`);return 0}catch($){return x.stderr.write(`Reason status: ${$ instanceof Error?$.message:String($)}
|
|
96
|
+
`),1}finally{clearTimeout(X)}}export{W3 as workerMacState,x1 as runStatusCli,B3 as connectionMacState,J3 as STATUS_HELP};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{uh as a,vh as b,wh as c,xh as d}from"./vm-hands-entry-lite-
|
|
2
|
+
import{uh as a,vh as b,wh as c,xh as d}from"./vm-hands-entry-lite-1ke1jfwg.js";import"./vm-hands-entry-lite-zpcr7myv.js";import"./vm-hands-entry-lite-7gh1rbn7.js";export{c as compareCliVersions,d as cliAndAgentVersion,b as CLI_VERSION_PATTERN,a as CLI_VERSION};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{yh as $}from"./vm-hands-entry-lite-
|
|
2
|
+
import{yh as $}from"./vm-hands-entry-lite-zpcr7myv.js";var O=$.version,Z=/^\d+\.\d+\.\d+(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/;function S(B,D){if(!Z.test(B)||!Z.test(D))throw Error("cannot compare invalid CLI versions");let J=(q)=>{let y=q.indexOf("-");return y===-1?[q,void 0]:[q.slice(0,y),q.slice(y+1)]},[j,F]=J(B),[w,G]=J(D),K=j.split(".").map(BigInt),M=w.split(".").map(BigInt);for(let q=0;q<3;q+=1){if(K[q]===M[q])continue;return K[q]<M[q]?-1:1}if(F===void 0||G===void 0){if(F===G)return 0;return F===void 0?1:-1}let Q=F.split("."),U=G.split("."),A=Math.max(Q.length,U.length);for(let q=0;q<A;q+=1){let y=Q[q],z=U[q];if(y===void 0||z===void 0){if(y===z)return 0;return y===void 0?-1:1}if(y===z)continue;let H=/^\d+$/.test(y),W=/^\d+$/.test(z);if(H&&W){let X=BigInt(y),Y=BigInt(z);if(X===Y)continue;return X<Y?-1:1}if(H!==W)return H?-1:1;return y<z?-1:1}return 0}function k(B,D){return D?`cli ${B} \xB7 agent ${D}`:`cli ${B}`}
|
|
3
3
|
export{O as uh,Z as vh,S as wh,k as xh};
|