shellway 0.8.6 → 0.8.7
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/package.json +1 -1
- package/shellway.js +4 -2
package/package.json
CHANGED
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.
|
|
13
|
+
const AGENT_VERSION = '0.8.7'; // 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);
|
|
@@ -1003,11 +1003,13 @@ const NATIVE_NAME = 'com.getshellway.agent';
|
|
|
1003
1003
|
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
|
+
'kleaokcionmcpjbblalbhkleljimjjmc', // 0.8.7: the Chrome Web Store version (item ID, 27 Nov 2026)
|
|
1006
1007
|
];
|
|
1007
1008
|
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
1009
|
// 0.8.6 (27 Nov 2026, beta): one link per browser (e.g. Edge and Chrome at the same time). The browser tools use the
|
|
1009
1010
|
// current one: the browser the AI chose with browser_use, otherwise the one that connected last (as before).
|
|
1010
1011
|
const STORE_EDGE = 'jaebfnkgmaopbkikeigclembnhbdlldc';
|
|
1012
|
+
const STORE_CHROME = 'kleaokcionmcpjbblalbhkleljimjjmc'; // 0.8.7
|
|
1011
1013
|
const NO_PENDING = new Map();
|
|
1012
1014
|
const ext = { seq: 0, links: new Map(), cur: null, pinned: '',
|
|
1013
1015
|
get sock() { return this.cur ? this.cur.sock : null; },
|
|
@@ -1018,7 +1020,7 @@ const browserLabel = (b) => ({ edge: 'Edge', chrome: 'Chrome', brave: 'Brave', o
|
|
|
1018
1020
|
function extUse(L) { if (ext.cur !== L) { ext.cur = L; try { activeTarget = null; } catch {} } }
|
|
1019
1021
|
function extAttach(sock, rest, hello = {}) {
|
|
1020
1022
|
let name = String(hello.browser || '').toLowerCase().replace(/[^a-z0-9-]/g, '').slice(0, 20);
|
|
1021
|
-
if (!name)
|
|
1023
|
+
if (!name) { const o = String(hello.origin || ''); name = o.includes(STORE_EDGE) ? 'edge' : o.includes(STORE_CHROME) ? 'chrome' : 'browser'; }
|
|
1022
1024
|
const old = ext.links.get(name);
|
|
1023
1025
|
if (old && old.sock !== sock) { try { old.sock.destroy(); } catch {} }
|
|
1024
1026
|
const L = { sock, browser: name, version: '', pending: new Map(), since: Date.now() };
|