@reason-machines/cli-linux-x64 0.2.517 → 0.2.518

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 (73) hide show
  1. package/bin/reason +1 -1
  2. package/bin/vm-hands/{api-383vq85h.js → api-apavfrnk.js} +1 -1
  3. package/bin/vm-hands/{api-credentials-vgwmvese.js → api-credentials-s1jn2jfp.js} +1 -1
  4. package/bin/vm-hands/connect-cli-15fpx2j9.js +2 -0
  5. package/bin/vm-hands/{credentials-pgsb4v9j.js → credentials-yf556ykn.js} +1 -1
  6. package/bin/vm-hands/{custom-endpoint-device-57hkdy1z.js → custom-endpoint-device-vbct7bj9.js} +1 -1
  7. package/bin/vm-hands/{hands-worker-source-xjbrgfar.js → hands-worker-source-h0qmr1jt.js} +1 -1
  8. package/bin/vm-hands/{install-receipt-y7exc4wh.js → install-receipt-gwv1qv2m.js} +1 -1
  9. package/bin/vm-hands/local-automation-5e3cmtqd.js +2 -0
  10. package/bin/vm-hands/local-capabilities-pmm1ghsh.js +2 -0
  11. package/bin/vm-hands/{local-desktop-users-q0391ha1.js → local-desktop-users-4hc6jysa.js} +1 -1
  12. package/bin/vm-hands/local-display-mac-fjeyb4h9.js +2 -0
  13. package/bin/vm-hands/local-display-session-g7s5xwc9.js +2 -0
  14. package/bin/vm-hands/local-display-video-qcht7g9p.js +2 -0
  15. package/bin/vm-hands/local-managed-process-qkagbzkt.js +2 -0
  16. package/bin/vm-hands/{local-pty-session-q06ff8yk.js → local-pty-session-4h4ekakp.js} +1 -1
  17. package/bin/vm-hands/{managed-runtime-dr9f7vhq.js → managed-runtime-awrj7d2k.js} +1 -1
  18. package/bin/vm-hands/{network-contract-6mkf58vs.js → network-contract-4wew8f21.js} +1 -1
  19. package/bin/vm-hands/permissions-derwytwg.js +2 -0
  20. package/bin/vm-hands/{reason-hands-protocol-zf7bpqwe.js → reason-hands-protocol-6fxcbhzd.js} +1 -1
  21. package/bin/vm-hands/{serve-service-t4pqj1sr.js → serve-service-1wbw4rh3.js} +1 -1
  22. package/bin/vm-hands/{status-6s5f56hk.js → status-6n9wbsps.js} +2 -2
  23. package/bin/vm-hands/version-yp27t0ew.js +2 -0
  24. package/bin/vm-hands/{vm-hands-entry-lite-024t90qh.js → vm-hands-entry-lite-148nz8be.js} +2 -2
  25. package/bin/vm-hands/{vm-hands-entry-lite-vs47bs09.js → vm-hands-entry-lite-19dpjtpb.js} +1 -1
  26. package/bin/vm-hands/{vm-hands-entry-lite-k1wghndy.js → vm-hands-entry-lite-1nrxnm0y.js} +3 -3
  27. package/bin/vm-hands/{vm-hands-entry-lite-k9sekkb8.js → vm-hands-entry-lite-2r36xj58.js} +2 -2
  28. package/bin/vm-hands/{vm-hands-entry-lite-wp0d65yx.js → vm-hands-entry-lite-5eg3tgdq.js} +2 -2
  29. package/bin/vm-hands/{vm-hands-entry-lite-tz7a7s9b.js → vm-hands-entry-lite-5jvnyk8s.js} +2 -2
  30. package/bin/vm-hands/{vm-hands-entry-lite-tqyq1mxn.js → vm-hands-entry-lite-66tve5yn.js} +1 -1
  31. package/bin/vm-hands/{vm-hands-entry-lite-vqdsqcwr.js → vm-hands-entry-lite-6en938c0.js} +1 -1
  32. package/bin/vm-hands/{vm-hands-entry-lite-qzcac2mf.js → vm-hands-entry-lite-70x16hkx.js} +3 -3
  33. package/bin/vm-hands/{vm-hands-entry-lite-ecpw35ja.js → vm-hands-entry-lite-8hqx9acp.js} +1 -1
  34. package/bin/vm-hands/{vm-hands-entry-lite-psjcmgj8.js → vm-hands-entry-lite-90y6pf98.js} +2 -2
  35. package/bin/vm-hands/{vm-hands-entry-lite-qkcs9aeg.js → vm-hands-entry-lite-9nsyy6zm.js} +1 -1
  36. package/bin/vm-hands/vm-hands-entry-lite-a8bacdvh.js +2 -0
  37. package/bin/vm-hands/{vm-hands-entry-lite-dj0mgwbh.js → vm-hands-entry-lite-bqdjvwgc.js} +2 -2
  38. package/bin/vm-hands/{vm-hands-entry-lite-p2zrb900.js → vm-hands-entry-lite-exgpf39d.js} +4 -4
  39. package/bin/vm-hands/{vm-hands-entry-lite-1ek3r3w9.js → vm-hands-entry-lite-fgppp6x9.js} +1 -1
  40. package/bin/vm-hands/vm-hands-entry-lite-g87ma08p.js +3 -0
  41. package/bin/vm-hands/{vm-hands-entry-lite-eed0esxe.js → vm-hands-entry-lite-gd692vfb.js} +3 -3
  42. package/bin/vm-hands/{vm-hands-entry-lite-3p7zk3yt.js → vm-hands-entry-lite-gh0yjzye.js} +3 -3
  43. package/bin/vm-hands/{vm-hands-entry-lite-kwcyzhvd.js → vm-hands-entry-lite-j93dy26a.js} +1 -1
  44. package/bin/vm-hands/{vm-hands-entry-lite-64b6nx6h.js → vm-hands-entry-lite-mma9qt5r.js} +1 -1
  45. package/bin/vm-hands/{vm-hands-entry-lite-f558n9yv.js → vm-hands-entry-lite-mxdqbds1.js} +12 -12
  46. package/bin/vm-hands/{vm-hands-entry-lite-0gj3p9tg.js → vm-hands-entry-lite-ndhspax6.js} +2 -2
  47. package/bin/vm-hands/{vm-hands-entry-lite-1zd088yv.js → vm-hands-entry-lite-q80xmhrx.js} +5 -5
  48. package/bin/vm-hands/{vm-hands-entry-lite-m7pkmatv.js → vm-hands-entry-lite-qxeegp2n.js} +1 -1
  49. package/bin/vm-hands/{vm-hands-entry-lite-kc2y7q8f.js → vm-hands-entry-lite-r27j00db.js} +2 -2
  50. package/bin/vm-hands/{vm-hands-entry-lite-pwmvq53c.js → vm-hands-entry-lite-v0zva5nj.js} +1 -1
  51. package/bin/vm-hands/{vm-hands-entry-lite-rsr3f75h.js → vm-hands-entry-lite-wbtkvxs6.js} +17 -17
  52. package/bin/vm-hands/{vm-hands-entry-lite-7p4qsm5s.js → vm-hands-entry-lite-wzq3qsh1.js} +1 -1
  53. package/bin/vm-hands/{vm-hands-entry-lite-k11ns9qs.js → vm-hands-entry-lite-y1p3s68r.js} +4 -4
  54. package/bin/vm-hands/{vm-hands-entry-lite-vwxg4fhe.js → vm-hands-entry-lite-ydgedg8n.js} +4 -4
  55. package/bin/vm-hands/vm-hands-entry-lite.js +2 -2
  56. package/bin/vm-hands/{vm-hands-executor-1k2mys87.js → vm-hands-executor-nhnq0d9p.js} +3 -3
  57. package/bin/vm-hands/vm-hands-op-runner-3k3hs6mn.js +2 -0
  58. package/bin/vm-hands/{vm-hands-runtime-cvkyeepf.js → vm-hands-runtime-2reypgfn.js} +3 -3
  59. package/bin/vm-hands/worker-preview-readiness-ye6cvg3k.js +2 -0
  60. package/package.json +1 -1
  61. package/bin/vm-hands/connect-cli-9d1rygxb.js +0 -2
  62. package/bin/vm-hands/local-automation-m6sft3re.js +0 -2
  63. package/bin/vm-hands/local-capabilities-p9q439fd.js +0 -2
  64. package/bin/vm-hands/local-display-mac-7pg0n3zs.js +0 -2
  65. package/bin/vm-hands/local-display-session-vpb49cqa.js +0 -2
  66. package/bin/vm-hands/local-display-video-hwyrvtgb.js +0 -2
  67. package/bin/vm-hands/local-managed-process-wrs4aaxd.js +0 -2
  68. package/bin/vm-hands/permissions-5y8cvehe.js +0 -2
  69. package/bin/vm-hands/version-c4rfp8yd.js +0 -2
  70. package/bin/vm-hands/vm-hands-entry-lite-82cys43x.js +0 -2
  71. package/bin/vm-hands/vm-hands-entry-lite-xb73ps42.js +0 -3
  72. package/bin/vm-hands/vm-hands-op-runner-z9vf56kj.js +0 -2
  73. package/bin/vm-hands/worker-preview-readiness-6kk98y4k.js +0 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reason-machines/cli-linux-x64",
3
- "version": "0.2.517",
3
+ "version": "0.2.518",
4
4
  "description": "Reason CLI native binary for linux-x64",
5
5
  "os": [
6
6
  "linux"
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{it,ys,bs,vs}from"./vm-hands-entry-lite-p2zrb900.js";import"./vm-hands-entry-lite-60pnam39.js";import"./vm-hands-entry-lite-7p4qsm5s.js";import"./vm-hands-entry-lite-qkcs9aeg.js";import"./vm-hands-entry-lite-xb73ps42.js";import"./vm-hands-entry-lite-pwmvq53c.js";import"./vm-hands-entry-lite-dj0mgwbh.js";import"./vm-hands-entry-lite-rsr3f75h.js";import"./vm-hands-entry-lite-5np5k3wb.js";import"./vm-hands-entry-lite-eed0esxe.js";import"./vm-hands-entry-lite-f558n9yv.js";import"./vm-hands-entry-lite-dcrz19xf.js";import"./vm-hands-entry-lite-1zd088yv.js";import"./vm-hands-entry-lite-psjcmgj8.js";import"./vm-hands-entry-lite-ymqb2927.js";import"./vm-hands-entry-lite-tz7a7s9b.js";import"./vm-hands-entry-lite-kc2y7q8f.js";import"./vm-hands-entry-lite-kwcyzhvd.js";import"./vm-hands-entry-lite-wx1fmrbs.js";import"./vm-hands-entry-lite-tqyq1mxn.js";import"./vm-hands-entry-lite-k1wghndy.js";import"./vm-hands-entry-lite-m7pkmatv.js";import"./vm-hands-entry-lite-3p7zk3yt.js";import"./vm-hands-entry-lite-td73npv3.js";import"./vm-hands-entry-lite-1ek3r3w9.js";import"./vm-hands-entry-lite-ecpw35ja.js";import"./vm-hands-entry-lite-k11ns9qs.js";import"./vm-hands-entry-lite-82cys43x.js";import"./vm-hands-entry-lite-vs47bs09.js";import"./vm-hands-entry-lite-wp0d65yx.js";import"./vm-hands-entry-lite-fcvf8md1.js";import"./vm-hands-entry-lite-0sh835na.js";import"./vm-hands-entry-lite-39qv4sqt.js";import"./vm-hands-entry-lite-vwxg4fhe.js";import"./vm-hands-entry-lite-64b6nx6h.js";import"./vm-hands-entry-lite-024t90qh.js";import"./vm-hands-entry-lite-qz74j563.js";import"./vm-hands-entry-lite-s85p7tqp.js";export{ys as computerDisconnected,it as connectionDirectory,bs as connectionReport,vs as restartConnection};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Pn,Fs,js,Us,Hs,Tn}from"./vm-hands-entry-lite-tz7a7s9b.js";import"./vm-hands-entry-lite-kc2y7q8f.js";import"./vm-hands-entry-lite-kwcyzhvd.js";import"./vm-hands-entry-lite-wx1fmrbs.js";import"./vm-hands-entry-lite-tqyq1mxn.js";import"./vm-hands-entry-lite-k1wghndy.js";import"./vm-hands-entry-lite-m7pkmatv.js";import"./vm-hands-entry-lite-3p7zk3yt.js";import"./vm-hands-entry-lite-td73npv3.js";import"./vm-hands-entry-lite-1ek3r3w9.js";import"./vm-hands-entry-lite-ecpw35ja.js";import"./vm-hands-entry-lite-k11ns9qs.js";import"./vm-hands-entry-lite-82cys43x.js";import"./vm-hands-entry-lite-vs47bs09.js";import"./vm-hands-entry-lite-wp0d65yx.js";import"./vm-hands-entry-lite-fcvf8md1.js";import"./vm-hands-entry-lite-0sh835na.js";import"./vm-hands-entry-lite-39qv4sqt.js";import"./vm-hands-entry-lite-vwxg4fhe.js";import"./vm-hands-entry-lite-64b6nx6h.js";import"./vm-hands-entry-lite-024t90qh.js";import"./vm-hands-entry-lite-qz74j563.js";import"./vm-hands-entry-lite-s85p7tqp.js";export{js as ensureLocalBrowser,Pn as localAutomationAvailable,Us as localBrowserProfile,Fs as localUserChromeHost,Hs as runAutomationCallLocally,Tn as runLocalAutomation};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{es,qi,mn,ts,rs,ns,is,Ds,Ns,Ls,Ms}from"./vm-hands-entry-lite-rsr3f75h.js";import"./vm-hands-entry-lite-5np5k3wb.js";import"./vm-hands-entry-lite-eed0esxe.js";import"./vm-hands-entry-lite-f558n9yv.js";import"./vm-hands-entry-lite-dcrz19xf.js";import"./vm-hands-entry-lite-1zd088yv.js";import"./vm-hands-entry-lite-psjcmgj8.js";import"./vm-hands-entry-lite-ymqb2927.js";import"./vm-hands-entry-lite-tz7a7s9b.js";import"./vm-hands-entry-lite-kc2y7q8f.js";import"./vm-hands-entry-lite-kwcyzhvd.js";import"./vm-hands-entry-lite-wx1fmrbs.js";import"./vm-hands-entry-lite-tqyq1mxn.js";import"./vm-hands-entry-lite-k1wghndy.js";import"./vm-hands-entry-lite-m7pkmatv.js";import"./vm-hands-entry-lite-3p7zk3yt.js";import"./vm-hands-entry-lite-td73npv3.js";import"./vm-hands-entry-lite-1ek3r3w9.js";import"./vm-hands-entry-lite-ecpw35ja.js";import"./vm-hands-entry-lite-k11ns9qs.js";import"./vm-hands-entry-lite-82cys43x.js";import"./vm-hands-entry-lite-vs47bs09.js";import"./vm-hands-entry-lite-wp0d65yx.js";import"./vm-hands-entry-lite-fcvf8md1.js";import"./vm-hands-entry-lite-0sh835na.js";import"./vm-hands-entry-lite-39qv4sqt.js";import"./vm-hands-entry-lite-vwxg4fhe.js";import"./vm-hands-entry-lite-64b6nx6h.js";import"./vm-hands-entry-lite-024t90qh.js";import{r}from"./vm-hands-entry-lite-qy9xg6em.js";import"./vm-hands-entry-lite-qz74j563.js";import"./vm-hands-entry-lite-s85p7tqp.js";export{r as LocalCapabilityError,es as SHORT_REQUEST_CAPABILITIES,Ds as capabilityInventoryForRoots,qi as confinedExecutionShell,ts as defaultLocalCommandRunner,Ns as deliverLocalHandsEnvironment,is as enrolledRootPaths,Ms as executeLocalOperation,Ls as rebindLocalHandsControl,rs as runFileCapability,ns as runTransferCapability,mn as spawnCaptured};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Ge,dt,Bn,Fn}from"./vm-hands-entry-lite-k1wghndy.js";export{Ge as macScreenStatus,Fn as openMacInput,Bn as openMacWindowBounds,dt as requestMacScreenAccess};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Ft,zs,G,qe,jt}from"./vm-hands-entry-lite-kc2y7q8f.js";import"./vm-hands-entry-lite-kwcyzhvd.js";import"./vm-hands-entry-lite-wx1fmrbs.js";import"./vm-hands-entry-lite-tqyq1mxn.js";import"./vm-hands-entry-lite-k1wghndy.js";import"./vm-hands-entry-lite-m7pkmatv.js";import"./vm-hands-entry-lite-3p7zk3yt.js";import"./vm-hands-entry-lite-td73npv3.js";import"./vm-hands-entry-lite-1ek3r3w9.js";import"./vm-hands-entry-lite-k11ns9qs.js";import"./vm-hands-entry-lite-82cys43x.js";import"./vm-hands-entry-lite-wp0d65yx.js";import"./vm-hands-entry-lite-fcvf8md1.js";import"./vm-hands-entry-lite-0sh835na.js";import"./vm-hands-entry-lite-39qv4sqt.js";import"./vm-hands-entry-lite-024t90qh.js";import"./vm-hands-entry-lite-qz74j563.js";import"./vm-hands-entry-lite-s85p7tqp.js";export{qe as ensureLinuxDesktop,Ft as localDisplayAvailable,zs as localDisplayReady,G as privateDirectory,jt as runLocalDisplayStream};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{On,In,Dn,Nn,Tr}from"./vm-hands-entry-lite-kwcyzhvd.js";import"./vm-hands-entry-lite-wx1fmrbs.js";import"./vm-hands-entry-lite-tqyq1mxn.js";import"./vm-hands-entry-lite-k1wghndy.js";import"./vm-hands-entry-lite-k11ns9qs.js";import"./vm-hands-entry-lite-82cys43x.js";import"./vm-hands-entry-lite-0sh835na.js";import"./vm-hands-entry-lite-39qv4sqt.js";export{On as MAC_SCREEN,In as WINDOWS_SCREEN,Dn as createDisplayVideoLane,Tr as localDisplayVideoAvailable,Nn as simulatorVideoFfmpeg};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ot,fr,$s,Bs}from"./vm-hands-entry-lite-eed0esxe.js";import"./vm-hands-entry-lite-f558n9yv.js";import"./vm-hands-entry-lite-dcrz19xf.js";import"./vm-hands-entry-lite-1zd088yv.js";import"./vm-hands-entry-lite-psjcmgj8.js";import"./vm-hands-entry-lite-ymqb2927.js";import"./vm-hands-entry-lite-wx1fmrbs.js";import"./vm-hands-entry-lite-3p7zk3yt.js";import"./vm-hands-entry-lite-td73npv3.js";import"./vm-hands-entry-lite-1ek3r3w9.js";import"./vm-hands-entry-lite-wp0d65yx.js";import"./vm-hands-entry-lite-fcvf8md1.js";import"./vm-hands-entry-lite-0sh835na.js";import"./vm-hands-entry-lite-39qv4sqt.js";import"./vm-hands-entry-lite-vwxg4fhe.js";import"./vm-hands-entry-lite-64b6nx6h.js";import"./vm-hands-entry-lite-024t90qh.js";import"./vm-hands-entry-lite-qz74j563.js";import"./vm-hands-entry-lite-s85p7tqp.js";export{ot as ManagedProcessStoppedError,$s as controlManagedDeviceProcess,Bs as retireManagedDeviceProcess,fr as runManagedDeviceProcess};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ss,as,Ws,Vs}from"./vm-hands-entry-lite-tqyq1mxn.js";import"./vm-hands-entry-lite-k1wghndy.js";import"./vm-hands-entry-lite-k11ns9qs.js";import"./vm-hands-entry-lite-82cys43x.js";import"./vm-hands-entry-lite-0sh835na.js";import"./vm-hands-entry-lite-39qv4sqt.js";export{Vs as allowMacPermissions,Ws as permissionsSummary,as as readMacPermissions,ss as reasonIdentity};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Qe,Yn}from"./vm-hands-entry-lite-82cys43x.js";export{Yn as CLI_USER_AGENT,Qe as CLI_VERSION};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{tr}from"./vm-hands-entry-lite-vqdsqcwr.js";var Qe=tr.version,Yn=`reason-cli/${Qe}`;export{Qe,Yn};
@@ -1,3 +0,0 @@
1
- // @bun
2
- import{T}from"./vm-hands-entry-lite-fcvf8md1.js";import{Mo}from"./vm-hands-entry-lite-wp0d65yx.js";import{Fe,un,It,dn}from"./vm-hands-entry-lite-pwmvq53c.js";import{Yn}from"./vm-hands-entry-lite-82cys43x.js";import{t,o,d,u,i,hs,W,g,s,n}from"./vm-hands-entry-lite-qzcac2mf.js";var E=/^(0|[1-9][0-9]{0,5})\.(0|[1-9][0-9]{0,5})$/;function k(e){let r=typeof e==="string"?E.exec(e):null;return r?{major:Number(r[1]),minor:Number(r[2])}:null}var j=25,v=1e5,L=/^[0-9a-f]{64}$/,N=i({day:t().regex(/^\d{4}-\d{2}-\d{2}$/),sent:o().int().min(0).max(v),received:o().int().min(0).max(v)}),Ue=i({machine:t().min(1).max(200),person:t().min(1).max(200),team:t().min(1).max(200),team_id:t().min(1).max(200).optional(),workspace:d().optional(),version:t().max(64).optional(),wait_seconds:o().int().min(0).max(j).optional(),message_counts:u(N).max(14).optional().catch(void 0),endpoint:t().regex(L).optional().catch(void 0)}),D=g("kind",[i({id:t(),kind:n("who"),all:d().optional()}),i({id:t(),kind:n("send"),to:t(),body:t(),from_name:t(),from_agent:t(),wake:d(),reply_to:t().max(100).optional(),notify:d().optional()})]),x=i({job:D.nullable(),retry_after_seconds:o().optional()}),H=i({address:t(),person:t(),machine:t(),agent:t(),repo:t().nullable(),branch:t().nullable(),status:t(),since:o().nullable(),doing:t().nullable(),worker:d(),tier:t().max(10).optional()}),F=i({person:t(),machine:t(),online:d()}),B=i({team:t().nullable(),sessions:u(H).max(2000),machines:u(F).max(500),all:d().optional()}),G=i({address:t().max(300),state:t().max(40),note:t().max(500)}),Oe=W([i({who:B}),i({sent:i({ids:u(t().max(100)).max(500),recipients:u(t().max(300)).max(500),from:t().max(300),deliveries:u(G).max(500).optional()})}),i({error:t().min(1).max(2000)})]),J=i({id:t().max(100),from:t().max(300),from_agent:t().max(100).nullable(),to:t().max(300),reply_to:t().max(100).nullable(),body:t().max(64000),sent_at:o()}),Me=i({messages:u(J).max(100),team:t().min(1).max(200).optional(),team_id:t().min(1).max(200).optional(),workspace:d().optional()});var P=["run","mcp:read","mcp:write","secrets:read","secrets:write","sessions:read","sessions:debug","devices:read","devices:write","devices:use","ssh:write","knowledge:read","memory:read","memory:write","skills:read","skills:write","repos:read","repos:write","reviews:read","reviews:write","deployment:read","analytics:read","org:read","org:write","attachments:read","attachments:write","guardrails:read","guardrails:write","network:read","network:write","automations:read","automations:write","agent_auth:read"];var Ve=P.filter((e)=>e!=="network:read"&&e!=="network:write");class R extends Error{oauthCode;constructor(e,r=null){super(e);this.oauthCode=r;this.name="LoginError"}}function Q(e,r){let a=typeof e.error==="string"?e.error:null,l=typeof e.error_description==="string"?e.error_description:a?a:r;return new R(l,a)}async function K(e,r,a,l){let c=await a(`${e}/mcp/oauth/token`,{method:"POST",redirect:"error",headers:{"content-type":"application/x-www-form-urlencoded"},body:r,signal:l}),m=await c.json().catch(()=>({}));if(!c.ok)throw Q(m,`OAuth token request failed (${c.status})`);return m}var V=1e4;async function Y(e,r={}){let a=r.fetchImpl??fetch,l=await K(e.apiOrigin,new URLSearchParams({grant_type:"refresh_token",client_id:e.clientId,refresh_token:e.refreshToken}),a,AbortSignal.timeout(V)).catch((m)=>{if(m instanceof Error&&m.name==="TimeoutError")throw new R("Reason did not answer the login refresh in time. Check the network and retry.");throw m});if(typeof l.access_token!=="string"||typeof l.refresh_token!=="string"||typeof l.expires_in!=="number")throw new R("Reason returned an incomplete refreshed login.");let c={...e,accessToken:l.access_token,refreshToken:l.refresh_token,expiresAt:new Date(Date.now()+l.expires_in*1000).toISOString(),scopes:typeof l.scope==="string"?l.scope.split(/\s+/).filter(Boolean):e.scopes};return un(c,r.path??Fe()),c}var b=new Map,X=2000,Z=100;function C(e,r){if(!r)return e;if(r.aborted)return Promise.reject(r.reason);return new Promise((a,l)=>{let c=()=>l(r.reason);r.addEventListener("abort",c,{once:!0}),e.then(a,l).finally(()=>r.removeEventListener("abort",c))})}async function Ot(e={}){let r=e.path??Fe(),a=It(r);if(!a)return null;let l=e.apiOrigin??T(process.env,"REASON_API_URL")?.trim();if(l&&!Mo(a.apiOrigin,new URL(l).origin))return null;if(!(Date.parse(a.expiresAt)<=Date.now()+60000)&&(!e.forceRefresh||e.refused!==void 0&&a.accessToken!==e.refused))return a;let m=[r,a.apiOrigin,a.clientId,a.refreshToken].join("\x00"),p=b.get(m);if(p)return C(p,e.signal);let f;return f=Y(a,{fetchImpl:e.fetchImpl,path:r}).catch(async(y)=>{if(!(y instanceof R)||y.oauthCode!=="invalid_grant"&&y.oauthCode!=="invalid_client")throw y;let S=(_)=>_!==null&&(y.oauthCode==="invalid_client"?_.clientId!==a.clientId:_.refreshToken!==a.refreshToken),q=Date.now()+X;while(!S(It(r))&&Date.now()<q)await new Promise((_)=>setTimeout(_,Z));if(S(It(r)))return Ot({fetchImpl:e.fetchImpl,path:r});return dn(r),null}).finally(()=>{if(b.get(m)===f)b.delete(m)}),b.set(m,f),C(f,e.signal)}var ee=i({label:t(),used_percent:o().min(0).max(100).nullable(),resets_at:t().nullable(),exhausted:d().nullable()}),ne=i({groups:u(i({selectable:d().optional(),accounts:u(i({source_id:t().min(1),model_ids:u(t().min(1)).optional()}))}))});function te(e){let r=ne.safeParse(e);if(!r.success)return;return r.data.groups.some((a)=>a.selectable!==!1&&a.accounts.some((l)=>l.model_ids===void 0||l.model_ids.length>0))}class I extends Error{status;code;suggestedModel;retryAfterMs;resolutionReason;refusal;constructor(e,r,a,l,c,m,p){super(a);this.status=e;this.code=r;this.suggestedModel=l;this.retryAfterMs=c;this.resolutionReason=m;this.refusal=p;this.name="ApiError"}static rateLimitDelayMs(e,r){if(!(e instanceof I)||e.status!==429)return null;return Math.min(60000,Math.max(r,e.retryAfterMs??0))}}var se=["minimal","low","medium","high","xhigh","max"],oe=i({id:t().min(1),kind:t(),name:t(),custom_name:t().nullish(),status:t(),online:d(),compatible:d().optional(),compatibility_reason:t().nullish(),folder_lane_of:t().nullish(),roots:u(i({id:t().min(1),label:t()}))}),re=i({devices:u(oe),end_cursor:t().nullish(),has_next_page:d().optional()}),ie=i({id:t().min(1),name:t()}),ae=i({items:u(ie)}),le=i({id:t().min(1),name:t(),main:d(),mine:d(),session_id:t().nullish(),appearance:i({color:t().nullish()}).nullish().catch(null)}),ce=i({items:u(le)}),de=i({skill_id:t().min(1),name:t(),description:t().nullish(),activation_keywords:u(t()).default([]),is_enabled:d().default(!0)}),me=i({items:u(de).default([])}),ue=i({id:t().min(1),kind:t(),enabled:d(),schedule:i({expression:t().nullish(),every_seconds:o().nullish(),next_run_at:t().nullish()}).nullish(),github:i({event:t().nullish(),action:t().nullish(),repo:t().nullish()}).nullish(),last_fired_at:t().nullish()}),U=i({id:t().min(1),name:t().nullish(),instructions:t().nullish(),enabled:d(),triggers:u(ue).default([])}),ge=i({items:u(U).default([]),end_cursor:t().nullish(),has_next_page:d().optional()}),he=i({id:t().min(1),slug:t().nullish(),name:t(),description:t().nullish(),transport:t().nullish(),url:t().nullish(),enabled:d()}),pe=i({items:u(he).default([])}),fe=i({status:t(),summary:t().nullish(),category:t().nullish(),outcome:t().nullish(),message_count:o().nullish(),pr_url:t().nullish(),cost_usd:o().nullish(),generated_at:t().nullish()}),A=i({tags:u(t()).default([])}),ye=s(["linux","macos"]),O=i({id:t().min(1),name:t().min(1),platform:ye.nullable(),workers:i({total:o().int(),online:o().int(),busy:o().int(),idle:o().int()}),sessions:i({queued:o().int(),running:o().int()})}),_e=i({machines:u(O)}),Re=i({machine:O}),be=i({deleted:n(!0),revoked_workers:o().int(),revoked_tokens:o().int()}),we=i({token:i({id:t().min(1),machine_id:t().min(1),token_prefix:t()}),secret:t().startsWith("rmt_")}),M=hs({machine_id:t().min(1),machine_name:t().min(1)}),Se=M.extend({organization_id:t().min(1)}),an=i({id:t().min(1),name:t().min(1),state:s(["waiting","placed"]),queue_position:o().int().nullable()});var ln=W([i({kind:n("cloud")}),i({kind:s(["mac","headless"]),device_id:t().min(1),root_id:t().min(1)})]);function h(e,r,a){let l=e.safeParse(r);if(!l.success)throw new I(502,a,"Reason returned an unexpected response.");return l.data}var ke=i({error:i({type:t(),message:t()})});function w(e,r,a){let l=ke.safeParse(r),c=typeof r.error==="string"?r.error:l.success?l.data.error.type:`http_${e}`,m=typeof r.detail==="string"?r.detail:typeof r.message==="string"?r.message:l.success?l.data.error.message:`Reason request failed (${e}${typeof r.error==="string"?` ${r.error}`:""})`,p=c==="github_connection_required"&&typeof r.connect_url==="string"&&/^https?:\/\//.test(r.connect_url)?` Connect it at ${r.connect_url}`:"",f=a===null||a.trim()===""?NaN:Number(a);return new I(e,c,`${m}${p}`,typeof r.suggested_model==="string"?r.suggested_model:void 0,Number.isFinite(f)&&f>=0?f*1000:void 0,typeof r.resolution_reason==="string"?r.resolution_reason:void 0,typeof r.code==="string"?{code:r.code,...typeof r.billing_path==="string"&&/^\/(?![/\\])/.test(r.billing_path)?{billingPath:r.billing_path}:{}}:void 0)}async function ks(e){let r=await(e.fetchImpl??fetch)(`${e.apiOrigin}/v3/machines/enrollment-tickets`,{method:"POST",headers:{authorization:`Bearer ${e.token}`,accept:"application/json","content-type":"application/json"},body:JSON.stringify(e.body),signal:AbortSignal.timeout(30000),redirect:"error"}),a=await r.json().catch(()=>({}));if(!r.ok)throw w(r.status,a,r.headers.get("retry-after"));return h(Se,a,"invalid_machine_ticket")}var ve=i({items:u(i({name:t()}))}),xe=i({name:t(),scope:t(),result:s(["created","updated"]).optional(),warning:i({message:t()}).optional()});class Qo{options;credentials;constructor(e,r={}){this.options=r;this.credentials=e}trackEvent(e,r={}){}async request(e,r={}){let{status:a,headers:l,json:c}=await this.exchange(e,r);if(a<200||a>299)throw w(a,c,l.get("retry-after"));return c}async exchange(e,r={},a=!1){let l=this.options.fetchImpl??fetch,c=await l(`${this.credentials.apiOrigin}/v3${e}`,{method:r.method??"GET",headers:{authorization:`Bearer ${this.credentials.accessToken}`,accept:"application/json","user-agent":Yn,"x-reason-agent":"Reason CLI","x-client-surface":this.options.clientSurface??"direct_cli",...r.raw?{"content-type":r.raw.contentType}:r.body===void 0?{}:{"content-type":"application/json"},...r.headers,...r.ifNoneMatch?{"if-none-match":r.ifNoneMatch}:{}},body:r.raw?r.raw.bytes:r.body===void 0?void 0:JSON.stringify(r.body),signal:r.signal,redirect:r.ifNoneMatch?"manual":"error"}),m=await c.json().catch(()=>({}));if(c.status===401&&!a&&r.retryUnauthorized!==!1&&this.credentials.credentialKind!=="api_key"){let p=await Ot({fetchImpl:l,path:this.options.credentialsPath,forceRefresh:!0,refused:this.credentials.accessToken,signal:r.signal});if(p)return this.credentials=p,this.exchange(e,r,!0)}return{status:c.status,headers:c.headers,json:m}}createHeadlessDeviceEnrollmentTicket(e){return this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/devices/enrollment-tickets`,{method:"POST",body:e,signal:AbortSignal.timeout(30000),retryUnauthorized:!1})}async enrollHeadlessDevice(e){try{return await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/devices/enrollments`,{method:"POST",body:e,signal:AbortSignal.timeout(30000),retryUnauthorized:!1})}catch(r){if(r instanceof I&&(r.status===404||r.status===405||r.status===403&&r.code==="endpoint_not_available"))return null;throw r}}addDeviceRoot(e,r){return this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/devices/${encodeURIComponent(e)}/roots`,{method:"POST",body:r,signal:AbortSignal.timeout(30000)})}removeDeviceRoot(e,r){return this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/devices/${encodeURIComponent(e)}/roots/${encodeURIComponent(r)}`,{method:"DELETE",signal:AbortSignal.timeout(30000)})}machinePath(e,r=""){let a=`/organizations/${encodeURIComponent(this.credentials.orgId)}/machines`;return e===void 0?a:`${a}/${encodeURIComponent(e)}${r}`}async listMachines(){return h(_e,await this.request(this.machinePath()),"invalid_machine_list").machines}async createMachine(e){let r=await this.request(this.machinePath(),{method:"POST",body:{name:e.name,...e.platform?{platform:e.platform}:{}}});return h(Re,r,"invalid_machine").machine}async deleteMachine(e){let r=await this.request(this.machinePath(e),{method:"DELETE"});return h(be,r,"invalid_machine_deletion")}async listSecretNames(e){let r=await this.request(`${this.secretsPath()}?scope=${e}`);return h(ve,r,"invalid_secret_list").items.map((a)=>a.name)}async setSecret(e){let r=await this.request(this.secretsPath(),{method:"POST",body:e});return h(xe,r,"invalid_secret_write")}secretsPath(){return`/organizations/${encodeURIComponent(this.credentials.orgId)}/secrets`}async createMachineToken(e){let r=await this.request(this.machinePath(e,"/tokens"),{method:"POST",body:{}});return h(we,r,"invalid_machine_token")}async createMachineEnrollmentTicket(e,r){let a=await this.request(this.machinePath(e,"/enrollment-tickets"),{method:"POST",body:r,signal:AbortSignal.timeout(30000),retryUnauthorized:!1});return h(M,a,"invalid_machine_ticket")}self(e){return this.request("/self",{signal:e})}submitFeedback(e){return this.request("/feedback",{method:"POST",body:e,signal:AbortSignal.timeout(30000)})}agentNetwork(){return this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/agent-network`,{signal:AbortSignal.timeout(30000)})}startAgentNetwork(e){return this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/agent-network`,{method:"POST",body:e,signal:AbortSignal.timeout(30000)})}rotateAgentNetwork(e){return this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/agent-network`,{method:"PUT",body:e,signal:AbortSignal.timeout(30000)})}async claimAgentNetworkRelayJob(e,r){let a=await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/agent-network/relay/claim`,{method:"POST",body:e,signal:r});return h(x,a,"invalid_agent_network_job")}async completeAgentNetworkRelayJob(e,r){await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/agent-network/relay/jobs/${encodeURIComponent(e)}`,{method:"POST",body:r,signal:AbortSignal.timeout(30000)})}async recordAgentNetworkRelayReplies(e){await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/agent-network/relay/replies`,{method:"POST",body:e,signal:AbortSignal.timeout(30000)})}async workspaceMembers(){return((await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/members/users`,{signal:AbortSignal.timeout(30000)})).items??[]).flatMap((r)=>typeof r.email==="string"?[{email:r.email,role:typeof r.role==="string"?r.role:"member"}]:[])}claimExistingCliPairing(e){return this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/onboarding/import/pairing/claim-existing`,{method:"POST",body:{pairing_code:e}})}async claudeCodeSignIn(e){return(await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/provider-credentials`,{retryUnauthorized:!1,signal:e?AbortSignal.any([e,AbortSignal.timeout(15000)]):AbortSignal.timeout(15000)})).claude_code_sign_in===!0}connectAnthropicProvider(e,r,a={}){let l=e.kind==="setup_token"?{setup_token:e.token}:{access_token:e.credential.access,refresh_token:e.credential.refresh,expires_at:new Date(e.credential.expires).toISOString()};return this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/provider-credentials/anthropic`,{method:"POST",retryUnauthorized:a.retryUnauthorized,signal:a.signal,body:{...l,...r?{account_key:r}:{}}})}async listRepositories(){return((await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/repositories`)).items??[]).flatMap((r)=>{let a=typeof r.full_name==="string"?r.full_name:typeof r.repo_full_name==="string"?r.repo_full_name:null;if(!a)return[];return[{repo_id:typeof r.repo_id==="string"?r.repo_id:void 0,full_name:a,provider:r.provider==="gitlab"?"gitlab":"github",default_branch:typeof r.default_branch==="string"?r.default_branch:null,private:typeof r.private==="boolean"?r.private:void 0}]})}async listProjects(){let e=await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/projects`),r=ae.safeParse(e);if(!r.success)throw new I(502,"invalid_project_list","Reason returned an unexpected project list.");return r.data.items}async listReasons(){let e=await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/reasons`);return h(ce,e,"invalid_reason_list").items}async openReasonConversation(e){let r=await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/reasons/${encodeURIComponent(e)}/conversation`,{method:"POST"});return h(i({session_id:t().min(1)}),r,"invalid_reason_conversation").session_id}async listSkills(){try{let e=await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/skills`);return h(me,e,"invalid_skill_list").items}catch(e){if(e instanceof I&&(e.status===403||e.status===404))return[];throw e}}async listDevices(){let e=[],r=null;for(let a=0;a<50;a+=1){let l=await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/devices${r?`?after=${encodeURIComponent(r)}`:""}`),c=re.safeParse(l);if(!c.success)throw new I(502,"invalid_device_list","Reason returned an unexpected machine list.");if(e.push(...c.data.devices),r=c.data.has_next_page?c.data.end_cursor??null:null,!r)break}return e}async listModels(){try{let r=((await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/agent-auth/models`)).models??[]).filter((c)=>c.hidden!==!0),a=r.filter((c)=>c.available!==!1).map(({reasoning_efforts:c,hidden:m,available:p,...f})=>({...f,...Array.isArray(c)?{reasoning_efforts:se.filter((y)=>c.includes(y))}:{}})),l=new Set(a.map((c)=>c.detail));return{models:a.length>1&&l.size===1?a.map(({detail:c,...m})=>m):a,runnable:a.length>0||r.length===0}}catch(e){if(e instanceof I&&(e.status===403||e.status===404))return{models:[],runnable:!0};throw e}}async getAgentVersion(e){try{let r=await this.request("/deployment",{signal:e,retryUnauthorized:!1});return k(r.reason_version)?r.reason_version:null}catch{return null}}async getUsageQuota(){try{let e=ee.safeParse(await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/usage/quota`));if(!e.success)return null;let r;try{r=te(await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/agent-auth/models`))}catch{}return{...e.data,own_inference:r}}catch(e){if(e instanceof I&&(e.status===403||e.status===404))return null;throw e}}async listSessionFields(e){let r=new URLSearchParams({first:String(Math.min(Math.max(e.first,1),200)),status:e.status??"active"});if(e.origin)r.set("origin",e.origin);r.set("fields",e.fields.join(","));let a=`/organizations/${encodeURIComponent(this.credentials.orgId)}/sessions?${r.toString()}`,{status:l,headers:c,json:m}=await this.exchange(a,e.etag?{ifNoneMatch:e.etag}:{});if(l===304)return null;if(l<200||l>299)throw w(l,m,c.get("retry-after"));return{items:Array.isArray(m.items)?m.items:[],etag:c.get("etag")}}async listSessions(e=50,r,a={}){let l=new URLSearchParams({first:String(Math.min(Math.max(e,1),200)),status:a.status??"active"});if(r)l.set("project_id",r);if(a.origin)l.set("origin",a.origin);return(await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/sessions?${l.toString()}`)).items??[]}getSession(e,r){let a=r?.fields.length?`?fields=${encodeURIComponent(r.fields.join(","))}`:"";return this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/sessions/${encodeURIComponent(e)}${a}`)}async prestartSession(e){let r=await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/sessions/prestart`,{method:"POST",body:{client_session_id:e}});return r?.status==="starting"||r?.status==="ready"}async createSession(e){let r=e.mode==="ephemeral"||e.workspaceOwnership==="externally-managed";if(e.attachments?.length)await this.requireSessionAttachments();if(r||e.runtimeProfile){let c=await this.request("/deployment");if(r&&(!Array.isArray(c.session_modes)||!c.session_modes.includes(e.mode??"standard")||!Array.isArray(c.workspace_ownerships)||!c.workspace_ownerships.includes(e.workspaceOwnership??"managed")))throw Error("Deployment does not support the requested Session policy; refusing to create a Session.");if(e.runtimeProfile&&(!Array.isArray(c.experimental_runtime_profiles)||!c.experimental_runtime_profiles.includes(e.runtimeProfile)))throw Error("Deployment does not support the requested runtime profile; refusing to create a Session.")}let a=await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/sessions`,{method:"POST",body:{prompt:e.prompt,...e.attachments?.length?{attachments:e.attachments}:{},...e.mode?{mode:e.mode}:{},...e.workspaceOwnership?{workspace_ownership:e.workspaceOwnership}:{},...e.target?{target:e.target}:{},...e.repo?{repo:e.repo}:{},...e.provider?{provider:e.provider}:{},...e.model?{model:e.model}:{},...e.reasoningEffort?{reasoning_effort:e.reasoningEffort}:{},...e.runtimeProfile?{experimental_runtime_profile:e.runtimeProfile}:{},...e.ref?{ref:e.ref}:{},...e.branch?{branch:e.branch}:{},...e.completionMode?{completion_mode:e.completionMode}:{},...e.env&&Object.keys(e.env).length>0?{env:e.env}:{},...e.clientSessionId?{client_session_id:e.clientSessionId}:{},...e.longRunning?{long_running:{enabled:!0}}:{},...e.spendLimitRcu?{spend_limit_rcu:e.spendLimitRcu}:{},idempotency_key:`cli-${crypto.randomUUID()}`}}),l=await this.getSession(a.session_id);if(r){let c=l.session_policy,m=["memoryRead","memoryWrite","skills","inheritedInstructions","integrations","secretInjection"];if(!c||c.version!==1||c.mode!==(e.mode??"standard")||c.workspaceOwnership!==(e.workspaceOwnership??"managed")||!c.components||m.some((p)=>c.components[p]!==!0))throw await this.cancelSession(a.session_id),Error("Server did not attest the requested Session policy; cancellation requested.")}if(e.runtimeProfile&&l.experimental_runtime_profile!==e.runtimeProfile)throw await this.cancelSession(a.session_id),Error("Server did not attest the requested runtime profile; cancellation requested.");return l}async getEvents(e,r=-1,a={}){try{return await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/sessions/${encodeURIComponent(e)}/events?after_seq=${r}&limit=500${a.waitMs?`&wait_ms=${a.waitMs}`:""}`,a.signal?{signal:a.signal}:{})}catch(l){if(!(l instanceof I)||l.status!==403&&l.status!==404)throw l;return{session:await this.getSession(e),items:[],next_seq:r}}}async getMessages(e,r){return this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/sessions/${encodeURIComponent(e)}/messages?first=500${r===void 0?"":`&after_seq=${r}`}`)}async getAttachments(e,r){try{return(await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/sessions/${encodeURIComponent(e)}/attachments${r?`?view=${r}`:""}`)).items??[]}catch(a){if(a instanceof I&&(a.status===403||a.status===404))return[];throw a}}async requireSessionAttachments(){let e=await this.request("/deployment",{headers:{"cache-control":"no-cache"}});if(e.session_attachments!==!0){let r=typeof e.reason_version==="string"&&/^\d+\.\d+(?:\.\d+)?$/.test(e.reason_version)?`Agent ${e.reason_version}`:null,a=typeof e.commit_sha==="string"&&/^[a-f0-9]{40,64}$/i.test(e.commit_sha)?`server ${e.commit_sha.slice(0,12)}`:null,l=[r,a].filter(Boolean).join(", ");throw Error(`This server does not support Session image attachments: ${new URL(this.credentials.apiOrigin).host}${l?` (${l})`:""}. The API server needs an attachment-capable deployment; updating the Agent version alone is not enough. Your image was not sent; retry after the server update.`)}}async sendMessage(e,r,a={}){if(a.attachments?.length)await this.requireSessionAttachments();return this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/sessions/${encodeURIComponent(e)}/messages`,{method:"POST",body:{message:r,...a.attachments?.length?{attachments:a.attachments}:{},...a.model?{model:a.model}:{},...a.reasoningEffort?{reasoning_effort:a.reasoningEffort}:{},...a.target?{target:a.target}:{},...a.delivery?{delivery:a.delivery}:{}}})}async steerQueuedMessage(e,r){await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/sessions/${encodeURIComponent(e)}/messages/${encodeURIComponent(r)}/steer`,{method:"POST",body:{}})}async withdrawQueuedMessage(e,r){await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/sessions/${encodeURIComponent(e)}/messages/${encodeURIComponent(r)}/queued`,{method:"DELETE"})}async getConversation(e){let r=[],a=null;for(let l=0;l<50;l+=1){let c=await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/sessions/${encodeURIComponent(e)}/conversation${a?`?after=${encodeURIComponent(a)}`:""}`);if(r.push(...c.items??[]),!c.has_next_page||!c.end_cursor)break;a=c.end_cursor}return r}createSharedLink(e,r){return this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/sessions/${encodeURIComponent(e)}/shared-links`,{method:"POST",body:{url:r.url,...r.label?{label:r.label}:{},...r.expiresInSeconds!==void 0?{expires_in_seconds:r.expiresInSeconds}:{}}})}sessionAction(e,r,a={}){return this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/sessions/${encodeURIComponent(e)}/${r}`,{method:"POST",body:a})}renameSession(e,r){return this.sessionAction(e,"rename",{title:r||null})}moveSessionToProject(e,r){return this.sessionAction(e,"project",{project_id:r})}compactSession(e){return this.sessionAction(e,"compact")}retrySession(e){return this.sessionAction(e,"retry")}rewindSession(e,r){return this.sessionAction(e,"rewind",{message_id:r.messageId,content:r.content,request_id:r.requestId})}forkSession(e,r){return this.sessionAction(e,"fork",{...r.message?{message:r.message}:{},client_session_id:r.clientSessionId})}cancelSession(e,r={}){return this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/sessions/${encodeURIComponent(e)}/cancel`,{method:"POST",body:r.mode==="hard"?{mode:"hard"}:{}})}sessionPath(e,r=""){return`/organizations/${encodeURIComponent(this.credentials.orgId)}/sessions/${encodeURIComponent(e)}${r}`}async archiveSession(e){await this.request(this.sessionPath(e,"/archive"),{method:"POST",body:{}})}async unarchiveSession(e){await this.request(this.sessionPath(e,"/unarchive"),{method:"POST",body:{}})}async deleteSession(e){await this.request(this.sessionPath(e),{method:"DELETE"})}async listSessionTags(e){return h(A,await this.request(this.sessionPath(e,"/tags")),"invalid_session_tags").tags}async appendSessionTags(e,r){let a=await this.request(this.sessionPath(e,"/tags"),{method:"POST",body:{tags:r}});return h(A,a,"invalid_session_tags").tags}async sessionInsight(e,r=!1){let a=await this.request(this.sessionPath(e,r?"/insights/generate":"/insights"),r?{method:"POST",body:{}}:{});return h(fe,a,"invalid_session_insight")}async listAutomations(){let e=[],r=null;for(let a=0;a<20;a+=1){let l=await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/automations?first=100${r?`&after=${encodeURIComponent(r)}`:""}`),c=h(ge,l,"invalid_automation_list");if(e.push(...c.items),r=c.has_next_page?c.end_cursor??null:null,!r)break}return e}async createScheduledAutomation(e,r){let a=`/organizations/${encodeURIComponent(this.credentials.orgId)}/automations`,l=h(U,await this.request(a,{method:"POST",body:{name:e.name,instructions:e.instructions,...e.repo?{repo:e.repo.full_name,provider:e.repo.provider}:{}}}),"invalid_automation");try{await this.request(`${a}/${encodeURIComponent(l.id)}/triggers`,{method:"POST",body:r})}catch(c){throw await this.deleteAutomation(l.id).catch(()=>{return}),c}return l}async setAutomationEnabled(e,r){await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/automations/${encodeURIComponent(e)}`,{method:"PATCH",body:{enabled:r}})}async deleteAutomation(e){await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/automations/${encodeURIComponent(e)}`,{method:"DELETE"})}async transcribe(e,r){let a=await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/transcribe`,{method:"POST",raw:{bytes:e,contentType:r}});return h(i({transcript:t()}),a,"invalid_transcript").transcript}async listMcpServers(){let e=await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/mcp-servers`);return h(pe,e,"invalid_mcp_server_list").items}async setSkillEnabled(e,r){await this.request(`/organizations/${encodeURIComponent(this.credentials.orgId)}/skills/${encodeURIComponent(e)}`,{method:"PUT",body:{is_enabled:r}})}}
3
- export{Ot,I,ks,Qo};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ur,dr,Pt,Tt,Rt,_s}from"./vm-hands-entry-lite-k9sekkb8.js";export{ur as VM_HANDS_OP_RUNNER_PERSON_ARG,dr as VM_HANDS_OP_RUNNER_SURFACE_ARG,Tt as VM_HANDS_SURFACE_DIRECTORY_ARG,Rt as VM_HANDS_SURFACE_OPS,Pt as VM_HANDS_SURFACE_UID_ARG,_s as runVmHandsOpRunner};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Es}from"./vm-hands-entry-lite-7p4qsm5s.js";import"./vm-hands-entry-lite-psjcmgj8.js";import"./vm-hands-entry-lite-qz74j563.js";import"./vm-hands-entry-lite-s85p7tqp.js";export{Es as probeWorkerPreview};