shellway 0.7.9 → 0.8.0
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/extension/manifest.json +1 -1
- package/package.json +1 -1
- package/shellway.js +17 -2
package/extension/manifest.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifest_version": 3,
|
|
3
3
|
"name": "Shellway",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.8.0",
|
|
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
package/shellway.js
CHANGED
|
@@ -9,7 +9,7 @@ import { readFile, writeFile, appendFile, readdir, stat, lstat, mkdir, rename, c
|
|
|
9
9
|
import { createServer as netServer, connect as netConnect } from 'node:net';
|
|
10
10
|
import { randomBytes, timingSafeEqual, createHash } from 'node:crypto';
|
|
11
11
|
|
|
12
|
-
const AGENT_VERSION = '0.
|
|
12
|
+
const AGENT_VERSION = '0.8.0'; // keep equal to agent/package.json
|
|
13
13
|
if (Number(process.versions.node.split('.')[0]) < 22) {
|
|
14
14
|
console.error(`Shellway needs Node.js 22 or newer (you have ${process.versions.node}). Get it at https://nodejs.org`);
|
|
15
15
|
process.exit(1);
|
|
@@ -1637,6 +1637,21 @@ export class PollLink {
|
|
|
1637
1637
|
}
|
|
1638
1638
|
|
|
1639
1639
|
function start() {
|
|
1640
|
+
// 0.8.0 (customer 10396, 22 Nov): on Windows a program's output pipe can fail ("read ENOTCONN") right as it is
|
|
1641
|
+
// started; Node raised that as an unhandled error and the whole agent stopped. Pipe errors like this only affect that
|
|
1642
|
+
// one program, so log them and keep running; anything else still stops the agent (the service restarts it).
|
|
1643
|
+
if (!process.__swPipeGuard) {
|
|
1644
|
+
process.__swPipeGuard = true;
|
|
1645
|
+
process.on('uncaughtException', (e) => {
|
|
1646
|
+
const code = e && e.code, stack = String((e && e.stack) || '');
|
|
1647
|
+
if (['ENOTCONN', 'EPIPE', 'ECONNRESET', 'EBADF'].includes(code) && /child_process|tryReadStart|Socket\._read|spawn/.test(stack)) {
|
|
1648
|
+
console.error(`A program's output pipe failed (${code}); Shellway keeps running.`);
|
|
1649
|
+
return;
|
|
1650
|
+
}
|
|
1651
|
+
console.error(stack || e);
|
|
1652
|
+
process.exit(1);
|
|
1653
|
+
});
|
|
1654
|
+
}
|
|
1640
1655
|
const conf = loadConf();
|
|
1641
1656
|
startExtBridge();
|
|
1642
1657
|
keepAwakeTick();
|
|
@@ -1784,7 +1799,7 @@ function start() {
|
|
|
1784
1799
|
const wait = Math.round(delay * (1 + Math.random() * 0.3));
|
|
1785
1800
|
console.log(`Disconnected (code ${lastClose.code}${lastClose.why ? ' "' + lastClose.why + '"' : ''}, ${lastClose.clean ? 'clean' : 'not clean'}${opened ? `, lived ${lastClose.secs}s, ${lastClose.rx} messages / ${lastClose.ka} keepalive answers from Shellway, last one ${lastClose.quiet}s ago` : ', never opened'}${lastClose.err ? ', error: ' + lastClose.err : ''}). Retrying in ${Math.round(wait / 1000)}s…`);
|
|
1786
1801
|
conn = null;
|
|
1787
|
-
setTimeout(connect, wait); delay = Math.min(delay * 2, 30_000);
|
|
1802
|
+
setTimeout(connect, wait); delay = Math.min(delay * 2, transport === 'poll' ? 5_000 : 30_000); // 0.8.0: HTTPS fallback retries within 5 s
|
|
1788
1803
|
};
|
|
1789
1804
|
ws.onerror = (ev) => { const e = clean((ev && (ev.message || (ev.error && (ev.error.code || ev.error.message)))) || 'error'); if (conn && current === ws) conn.err = e; else console.error(`Connection error: ${e}`); };
|
|
1790
1805
|
};
|