shellway 0.8.3 → 0.8.4

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "manifest_version": 3,
3
3
  "name": "Shellway",
4
- "version": "0.8.3",
4
+ "version": "0.8.4",
5
5
  "description": "Lets your AI (ChatGPT, Claude) use this browser through the Shellway app on your computer. Off until you turn it on.",
6
6
  "key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnZWALJr6dwkQu7eX3reFbtgMAErsCyODHKnwz97XMKpR9bAz4+irBlJ2KEXD6ERZFjuKYqNZ2HLe0eQp5y9fWscyWeTUXNTstsFaymsb5C0aRcpW/dXRl2Dy9vQ7y7+ATH4SCxcckncfmEXt4GFQ6TtyPsctuQfYez6o9MHmwGaKwpCPaWmqfYqomy0yjzMCbCg2b0aP2+hDmOhc0KARhGVnzlZBIBSybtkpAmzXfUxMJHDD5ly3g6ScCcR+3Zf7SKyCfLMGSkwYwiJvvS4sNCtBzwKdDdbEh865T7H5NCS8GOhSt0hxkPPxpbTlXrWXINDiSkF00/b7ZToBRTmK4QIDAQAB",
7
7
  "minimum_chrome_version": "116",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shellway",
3
- "version": "0.8.3",
3
+ "version": "0.8.4",
4
4
  "description": "Shellway agent: lets ChatGPT, Claude and Cursor work on this computer through the Shellway relay.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -29,5 +29,5 @@
29
29
  },
30
30
  "author": "Sandeep Kumar Saini",
31
31
  "license": "UNLICENSED",
32
- "shellwayStable": "0.8.2"
32
+ "shellwayStable": "0.8.3"
33
33
  }
package/shellway.js CHANGED
@@ -10,7 +10,7 @@ import { readFile, writeFile, appendFile, readdir, stat, lstat, mkdir, rename, c
10
10
  import { createServer as netServer, connect as netConnect } from 'node:net';
11
11
  import { randomBytes, timingSafeEqual, createHash } from 'node:crypto';
12
12
 
13
- const AGENT_VERSION = '0.8.3'; // keep equal to agent/package.json
13
+ const AGENT_VERSION = '0.8.4'; // keep equal to agent/package.json
14
14
  if (Number(process.versions.node.split('.')[0]) < 22) {
15
15
  console.error(`Shellway needs Node.js 22 or newer (you have ${process.versions.node}). Get it at https://nodejs.org`);
16
16
  process.exit(1);
@@ -685,12 +685,12 @@ function policyCli() {
685
685
  p.browser = 'extension';
686
686
  const r = installExtensionHost();
687
687
  console.log(`Browser control ON, in YOUR OWN Edge/Chrome through the Shellway extension (your sign-ins are used; banking, trading,
688
- payment and password sites are blocked in the extension).${r.agentFile.includes('_npx') ? '\nNote: run "npx shellway@beta service install" first so the extension can always reach Shellway.' : ''}
688
+ payment and password sites are blocked in the extension).${r.agentFile.includes('_npx') ? '\nNote: run "npx shellway@latest service install" first so the extension can always reach Shellway.' : ''}
689
689
  One-time setup in the browser:
690
- 1. Open edge://extensions (Edge) or chrome://extensions (Chrome)
691
- 2. Turn on "Developer mode"
692
- 3. Click "Load unpacked" and choose the folder: ${r.extDest || '(extension folder missing in this package)'}
693
- 4. Click the Shellway icon in the toolbar (puzzle piece -> pin it) and turn it on.
690
+ Edge: install "Shellway" from the Edge Add-ons store: https://microsoftedge.microsoft.com/addons/detail/jaebfnkgmaopbkikeigclembnhbdlldc
691
+ Chrome: open chrome://extensions, turn on "Developer mode", click "Load unpacked" and choose the folder:
692
+ ${r.extDest || '(extension folder missing in this package)'}
693
+ Then click the Shellway icon in the toolbar (puzzle piece -> pin it) and turn it on.
694
694
  To stop at any time: turn it off in the Shellway icon, press Cancel on the "debugging this browser" bar, or: shellway policy browser off`);
695
695
  }
696
696
  else if (sub === 'browser' && (val === 'on' || val === 'off')) {
@@ -1004,7 +1004,7 @@ const EXT_IDS = [
1004
1004
  'cepfcfgajaghchkamfmnhgcelblihndk', // the unpacked extension (fixed by the key in its manifest)
1005
1005
  'jaebfnkgmaopbkikeigclembnhbdlldc', // 0.7.4: the Edge Add-ons store version (Partner Center CRX ID, 21 Nov 2026)
1006
1006
  ];
1007
- const EXT_OFF = 'The Shellway extension is not connected. On that computer: open Edge or Chrome, click the Shellway extension icon and turn it on. (First time: npx shellway@beta policy browser extension, then load the extension as shown.)';
1007
+ const EXT_OFF = 'The Shellway extension is not connected. On that computer: open Edge or Chrome, click the Shellway extension icon and turn it on. (First time: npx shellway@latest policy browser extension; on Edge install Shellway from the Edge Add-ons store: https://microsoftedge.microsoft.com/addons/detail/jaebfnkgmaopbkikeigclembnhbdlldc)';
1008
1008
  const ext = { sock: null, seq: 0, pending: new Map(), version: '' };
1009
1009
  const extMode = () => { const p = loadPolicy(); return !!p && p.browser === 'extension'; };
1010
1010
  function extAttach(sock, rest) {
@@ -1662,6 +1662,7 @@ async function tokenValid(conf) {
1662
1662
  // keepalives, receipts and reconnects work the same. Messages from Shellway carry a number and are acknowledged on the
1663
1663
  // next poll, so an answer lost on the way is sent again and a repeat is ignored.
1664
1664
  const POLL_SEND_MS = Number(process.env.SHELLWAY_POLL_SEND_MS) || 10_000;
1665
+ const POLL_GRACE_MS = Number(process.env.SHELLWAY_POLL_GRACE_MS) || 5_000;
1665
1666
  export class PollLink {
1666
1667
  constructor(base, token, version) {
1667
1668
  this.base = base; this.h = { authorization: `Bearer ${token}`, 'x-shellway-version': version };
@@ -1692,7 +1693,9 @@ export class PollLink {
1692
1693
  let fails = 0;
1693
1694
  while (this.readyState === 1) {
1694
1695
  try {
1695
- const r = await this._req(`/agent/poll?sid=${this.sid}&ack=${this.ack}`, { method: 'GET' }, this.wait + 15_000);
1696
+ // 0.8.4 (26 Nov 2026): on networks that need this fallback about 1 request in 20 stalls on the way (relay nginx 499).
1697
+ // A poll held by Shellway for `wait` ms is given up 5 s after that (was 15 s), so a stalled one is re-sent ~10 s sooner.
1698
+ const r = await this._req(`/agent/poll?sid=${this.sid}&ack=${this.ack}`, { method: 'GET' }, this.wait + POLL_GRACE_MS);
1696
1699
  if (r.status === 410) return this._end(1006, 'closed by Shellway');
1697
1700
  if (!r.ok) throw new Error(`HTTP ${r.status}`);
1698
1701
  const j = await r.json(); fails = 0;