@runweave/server-linux-x64 0.1.11 → 0.1.12
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/manifest.json +10 -10
- package/native.tar.gz +0 -0
- package/package.json +1 -1
- package/payload/app-server/build-info.json +3 -3
- package/payload/app-server/index.cjs +1 -1
- package/payload/backend/build-info.json +4 -4
- package/payload/backend/index.cjs +88 -31
- package/payload/frontend/dist/build-info.json +3 -3
- package/payload/frontend/dist/companion.html +1 -1
- package/payload/frontend/dist/index.html +1 -1
package/manifest.json
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
"protocolVersion": 1,
|
|
7
7
|
"entry": "pty-host/index.cjs"
|
|
8
8
|
},
|
|
9
|
-
"version": "0.1.
|
|
10
|
-
"sourceRevision": "
|
|
9
|
+
"version": "0.1.12",
|
|
10
|
+
"sourceRevision": "2137d8fa9eae70d0ab4070212c1cb4e8bb9e2fa6",
|
|
11
11
|
"platform": "linux",
|
|
12
12
|
"arch": "x64",
|
|
13
13
|
"nodeModuleAbi": "127",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
{
|
|
31
31
|
"path": "app-server/build-info.json",
|
|
32
32
|
"size": 286,
|
|
33
|
-
"sha256": "
|
|
33
|
+
"sha256": "c702c8fd4632749a3ce27aa0f7e3a66fb0129017b37f7876efb37665551c461e"
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
36
|
"path": "app-server/configuration-compatibility.json",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
{
|
|
41
41
|
"path": "app-server/index.cjs",
|
|
42
42
|
"size": 1991601,
|
|
43
|
-
"sha256": "
|
|
43
|
+
"sha256": "64e03d0435f018c50d94975eb46713c1540f79581dd26e0a0cb759a9511dccd6"
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
"path": "app-server/index.cjs.map",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
{
|
|
56
56
|
"path": "backend/build-info.json",
|
|
57
57
|
"size": 286,
|
|
58
|
-
"sha256": "
|
|
58
|
+
"sha256": "3511fdc3647f318b6400f7e9e2292da567fa5ea5df89ce6b66f4a89ec9d4264b"
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
61
|
"path": "backend/dev-resources/control.cjs",
|
|
@@ -69,8 +69,8 @@
|
|
|
69
69
|
},
|
|
70
70
|
{
|
|
71
71
|
"path": "backend/index.cjs",
|
|
72
|
-
"size":
|
|
73
|
-
"sha256": "
|
|
72
|
+
"size": 5748904,
|
|
73
|
+
"sha256": "b77195be61f40ef783fea4f7a1d5553b87a6d4866734b1af3b9e7485308f2f33"
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
76
|
"path": "backend/ios-simulators/device_shutdown.py",
|
|
@@ -505,12 +505,12 @@
|
|
|
505
505
|
{
|
|
506
506
|
"path": "frontend/dist/build-info.json",
|
|
507
507
|
"size": 286,
|
|
508
|
-
"sha256": "
|
|
508
|
+
"sha256": "01065e5cb1381b3ea289e128d9d1e23da843832590bd950451b1a7e21f19ef35"
|
|
509
509
|
},
|
|
510
510
|
{
|
|
511
511
|
"path": "frontend/dist/companion.html",
|
|
512
512
|
"size": 822,
|
|
513
|
-
"sha256": "
|
|
513
|
+
"sha256": "19a85b076b2a17d4ecfe30606c44b8338e9197f96bb0bfb576097cb4fb9c0233"
|
|
514
514
|
},
|
|
515
515
|
{
|
|
516
516
|
"path": "frontend/dist/icons/apple-touch-icon.png",
|
|
@@ -535,7 +535,7 @@
|
|
|
535
535
|
{
|
|
536
536
|
"path": "frontend/dist/index.html",
|
|
537
537
|
"size": 1028,
|
|
538
|
-
"sha256": "
|
|
538
|
+
"sha256": "61ba75aadb6b23c6440af75d9875adee493fda7ea166bfb435ba9b215c50e360"
|
|
539
539
|
},
|
|
540
540
|
{
|
|
541
541
|
"path": "frontend/dist/manifest.webmanifest",
|
package/native.tar.gz
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "0.1.0",
|
|
3
|
-
"buildId": "
|
|
4
|
-
"sourceRevision": "
|
|
3
|
+
"buildId": "20261109T114447447Z-2137d8fa",
|
|
4
|
+
"sourceRevision": "2137d8fa9eae70d0ab4070212c1cb4e8bb9e2fa6",
|
|
5
5
|
"sourceDirty": false,
|
|
6
|
-
"builtAt": "2026-11-
|
|
6
|
+
"builtAt": "2026-11-09T11:44:47.447Z",
|
|
7
7
|
"contentSha256": "ee24c2adfe7a38b0f7698d68d8493b560042b699baba92c63e79961518d9a9af"
|
|
8
8
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* runweave:build-info */var __RUNWEAVE_BUILD_INFO__={"version":"0.1.0","buildId":"
|
|
1
|
+
/* runweave:build-info */var __RUNWEAVE_BUILD_INFO__={"version":"0.1.0","buildId":"20261109T114447447Z-2137d8fa","sourceRevision":"2137d8fa9eae70d0ab4070212c1cb4e8bb9e2fa6","sourceDirty":false,"builtAt":"2026-11-09T11:44:47.447Z","contentSha256":"ee24c2adfe7a38b0f7698d68d8493b560042b699baba92c63e79961518d9a9af"};
|
|
2
2
|
const __IMPORT_META_URL__ = require('url').pathToFileURL(__filename).href;
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "0.1.0",
|
|
3
|
-
"buildId": "
|
|
4
|
-
"sourceRevision": "
|
|
3
|
+
"buildId": "20261109T114446842Z-2137d8fa",
|
|
4
|
+
"sourceRevision": "2137d8fa9eae70d0ab4070212c1cb4e8bb9e2fa6",
|
|
5
5
|
"sourceDirty": false,
|
|
6
|
-
"builtAt": "2026-11-
|
|
7
|
-
"contentSha256": "
|
|
6
|
+
"builtAt": "2026-11-09T11:44:46.842Z",
|
|
7
|
+
"contentSha256": "170984239a9c787cca301a61b3656704c8500945c978db6f3b97a5f716b40682"
|
|
8
8
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* runweave:build-info */var __RUNWEAVE_BUILD_INFO__={"version":"0.1.0","buildId":"
|
|
1
|
+
/* runweave:build-info */var __RUNWEAVE_BUILD_INFO__={"version":"0.1.0","buildId":"20261109T114446842Z-2137d8fa","sourceRevision":"2137d8fa9eae70d0ab4070212c1cb4e8bb9e2fa6","sourceDirty":false,"builtAt":"2026-11-09T11:44:46.842Z","contentSha256":"170984239a9c787cca301a61b3656704c8500945c978db6f3b97a5f716b40682"};
|
|
2
2
|
const __IMPORT_META_URL__ = require('url').pathToFileURL(__filename).href;
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -71985,10 +71985,7 @@ var PtyHostClient = class _PtyHostClient {
|
|
|
71985
71985
|
});
|
|
71986
71986
|
this.socket.on("close", () => {
|
|
71987
71987
|
this.connected = false;
|
|
71988
|
-
for (const request2 of this.pending.values())
|
|
71989
|
-
clearTimeout(request2.timer);
|
|
71990
|
-
request2.reject(new Error("HOST_CONNECTION_LOST"));
|
|
71991
|
-
}
|
|
71988
|
+
for (const request2 of this.pending.values()) request2.reject(new Error("HOST_CONNECTION_LOST"));
|
|
71992
71989
|
this.pending.clear();
|
|
71993
71990
|
for (const listener of this.disconnected) listener();
|
|
71994
71991
|
});
|
|
@@ -71997,8 +71994,6 @@ var PtyHostClient = class _PtyHostClient {
|
|
|
71997
71994
|
if (message2.requestId) {
|
|
71998
71995
|
const request2 = this.pending.get(message2.requestId);
|
|
71999
71996
|
if (!request2) return;
|
|
72000
|
-
clearTimeout(request2.timer);
|
|
72001
|
-
this.pending.delete(message2.requestId);
|
|
72002
71997
|
if (message2.error) request2.reject(new Error(message2.error));
|
|
72003
71998
|
else request2.resolve(message2.result);
|
|
72004
71999
|
} else if (message2.type) for (const listener of this.events) listener(value);
|
|
@@ -72030,16 +72025,38 @@ var PtyHostClient = class _PtyHostClient {
|
|
|
72030
72025
|
throw error2;
|
|
72031
72026
|
}
|
|
72032
72027
|
}
|
|
72033
|
-
|
|
72028
|
+
/** Aborting only releases this caller's wait; it does not cancel or replay Host operations. */
|
|
72029
|
+
request(action, body2 = {}, signal) {
|
|
72030
|
+
if (signal?.aborted) return Promise.reject(new Error("HOST_REQUEST_ABORTED"));
|
|
72034
72031
|
if (!this.connected) return Promise.reject(new Error("HOST_CONNECTION_LOST"));
|
|
72035
72032
|
const requestId = (0, import_node_crypto14.randomUUID)();
|
|
72036
72033
|
return new Promise((resolve, reject) => {
|
|
72037
|
-
const
|
|
72034
|
+
const cleanup = () => {
|
|
72035
|
+
clearTimeout(timer);
|
|
72036
|
+
signal?.removeEventListener("abort", abort);
|
|
72038
72037
|
this.pending.delete(requestId);
|
|
72039
|
-
|
|
72040
|
-
|
|
72041
|
-
|
|
72042
|
-
|
|
72038
|
+
};
|
|
72039
|
+
const request2 = {
|
|
72040
|
+
resolve: (value) => {
|
|
72041
|
+
cleanup();
|
|
72042
|
+
resolve(value);
|
|
72043
|
+
},
|
|
72044
|
+
reject: (error2) => {
|
|
72045
|
+
cleanup();
|
|
72046
|
+
reject(error2);
|
|
72047
|
+
}
|
|
72048
|
+
};
|
|
72049
|
+
const abort = () => request2.reject(new Error("HOST_REQUEST_ABORTED"));
|
|
72050
|
+
const timer = setTimeout(() => request2.reject(new Error("HOST_REQUEST_UNCERTAIN")), 15e3);
|
|
72051
|
+
this.pending.set(requestId, request2);
|
|
72052
|
+
signal?.addEventListener("abort", abort, { once: true });
|
|
72053
|
+
try {
|
|
72054
|
+
if (!sendJson(this.socket, { requestId, token: this.token, hostInstanceId: this.descriptor.hostInstanceId, action, body: body2 })) {
|
|
72055
|
+
request2.reject(new Error("HOST_CONNECTION_LOST"));
|
|
72056
|
+
}
|
|
72057
|
+
} catch (error2) {
|
|
72058
|
+
request2.reject(error2);
|
|
72059
|
+
}
|
|
72043
72060
|
});
|
|
72044
72061
|
}
|
|
72045
72062
|
close() {
|
|
@@ -112240,9 +112257,6 @@ function registerDesktopNetworkRoutes(app, requireAuth) {
|
|
|
112240
112257
|
});
|
|
112241
112258
|
}
|
|
112242
112259
|
|
|
112243
|
-
// backend/src/remote/routes.ts
|
|
112244
|
-
var import_node_crypto57 = require("node:crypto");
|
|
112245
|
-
|
|
112246
112260
|
// packages/shared/src/remote/index.ts
|
|
112247
112261
|
function isRemoteBrowserProfileState(value) {
|
|
112248
112262
|
if (!value || typeof value !== "object") return false;
|
|
@@ -112569,13 +112583,63 @@ function registerRemoteCapabilitiesRoute(app, requireTunnelAuth, requireAuth, br
|
|
|
112569
112583
|
});
|
|
112570
112584
|
}
|
|
112571
112585
|
|
|
112572
|
-
// backend/src/remote/
|
|
112573
|
-
|
|
112574
|
-
|
|
112586
|
+
// backend/src/remote/terminal-hook-auth.ts
|
|
112587
|
+
var import_node_crypto57 = require("node:crypto");
|
|
112588
|
+
function matchesToken2(value, expected) {
|
|
112589
|
+
if (!expected) return false;
|
|
112575
112590
|
const supplied = Buffer.from(value);
|
|
112576
112591
|
const actual = Buffer.from(expected);
|
|
112577
112592
|
return supplied.length === actual.length && (0, import_node_crypto57.timingSafeEqual)(supplied, actual);
|
|
112578
112593
|
}
|
|
112594
|
+
async function authenticatesTerminal(value, terminalId, sessions, signal) {
|
|
112595
|
+
signal.throwIfAborted();
|
|
112596
|
+
if (typeof value !== "string" || !value) return false;
|
|
112597
|
+
if (matchesToken2(value, process.env.RUNWEAVE_HOOK_TOKEN)) return true;
|
|
112598
|
+
if (!usesPtyHost()) return false;
|
|
112599
|
+
const session = sessions.getSession(terminalId);
|
|
112600
|
+
const binding = session?.ptyHost;
|
|
112601
|
+
if (!binding || session.status !== "running") return false;
|
|
112602
|
+
const host = await getPtyHost();
|
|
112603
|
+
signal.throwIfAborted();
|
|
112604
|
+
if (host.descriptor.hostInstanceId !== binding.hostInstanceId) return false;
|
|
112605
|
+
const hosted = (await host.request("listSessions", {}, signal)).find(
|
|
112606
|
+
(item) => item.terminalSessionId === terminalId && item.hostInstanceId === binding.hostInstanceId && item.sessionInstanceId === binding.sessionInstanceId
|
|
112607
|
+
);
|
|
112608
|
+
return hosted?.status === "running" && matchesToken2(value, hosted.gatewayToken);
|
|
112609
|
+
}
|
|
112610
|
+
function createRequireTerminalHook(sessions) {
|
|
112611
|
+
return async (req, res, next) => {
|
|
112612
|
+
if (res.destroyed) return;
|
|
112613
|
+
const controller = new AbortController();
|
|
112614
|
+
const cancel = () => controller.abort();
|
|
112615
|
+
const aborted2 = new Promise((_resolve, reject) => {
|
|
112616
|
+
controller.signal.onabort = () => reject(new Error("Terminal authentication aborted"));
|
|
112617
|
+
});
|
|
112618
|
+
const timeout = setTimeout(cancel, 4e3);
|
|
112619
|
+
res.once("close", cancel);
|
|
112620
|
+
try {
|
|
112621
|
+
const authenticated = await Promise.race([
|
|
112622
|
+
authenticatesTerminal(req.headers["x-runweave-hook-token"], String(req.params.id), sessions, controller.signal),
|
|
112623
|
+
aborted2
|
|
112624
|
+
]);
|
|
112625
|
+
controller.signal.throwIfAborted();
|
|
112626
|
+
if (res.destroyed) return;
|
|
112627
|
+
if (!authenticated) {
|
|
112628
|
+
res.sendStatus(401);
|
|
112629
|
+
return;
|
|
112630
|
+
}
|
|
112631
|
+
next();
|
|
112632
|
+
} catch {
|
|
112633
|
+
if (!res.destroyed) res.status(503).json({ code: "DESKTOP_UNAVAILABLE", message: "Terminal runtime authentication is unavailable" });
|
|
112634
|
+
} finally {
|
|
112635
|
+
clearTimeout(timeout);
|
|
112636
|
+
res.off("close", cancel);
|
|
112637
|
+
controller.signal.onabort = null;
|
|
112638
|
+
}
|
|
112639
|
+
};
|
|
112640
|
+
}
|
|
112641
|
+
|
|
112642
|
+
// backend/src/remote/routes.ts
|
|
112579
112643
|
function sendError(res, error2) {
|
|
112580
112644
|
if (error2 instanceof RemoteBrowserError) {
|
|
112581
112645
|
res.status(error2.status).json({ code: error2.code, message: error2.message });
|
|
@@ -112586,14 +112650,11 @@ function sendError(res, error2) {
|
|
|
112586
112650
|
function registerRemoteBrowserRoutes(app, auth, sessions, requireTunnelAuth, browserProfileDir, backendId) {
|
|
112587
112651
|
const bindings = new DesktopBrowserBindings(sessions);
|
|
112588
112652
|
const requireAuth = createRequireAuth(auth);
|
|
112653
|
+
const requireTerminalHook = createRequireTerminalHook(sessions);
|
|
112589
112654
|
registerDesktopNetworkRoutes(app, requireAuth);
|
|
112590
112655
|
registerRemoteCapabilitiesRoute(app, requireTunnelAuth, requireAuth, browserProfileDir, backendId);
|
|
112591
|
-
app.get("/api/terminal/session/:id/runtime-identity", (req, res) => {
|
|
112592
|
-
|
|
112593
|
-
res.sendStatus(401);
|
|
112594
|
-
return;
|
|
112595
|
-
}
|
|
112596
|
-
const session = sessions.getSession(req.params.id);
|
|
112656
|
+
app.get("/api/terminal/session/:id/runtime-identity", requireTerminalHook, (req, res) => {
|
|
112657
|
+
const session = sessions.getSession(String(req.params.id));
|
|
112597
112658
|
if (!session) {
|
|
112598
112659
|
res.status(404).json({ code: "terminal_session_not_found" });
|
|
112599
112660
|
return;
|
|
@@ -112650,18 +112711,14 @@ function registerRemoteBrowserRoutes(app, auth, sessions, requireTunnelAuth, bro
|
|
|
112650
112711
|
sendError(res, error2);
|
|
112651
112712
|
}
|
|
112652
112713
|
});
|
|
112653
|
-
app.post("/api/terminal/session/:id/browser/capability", (req, res) => {
|
|
112654
|
-
if (!matchesHookToken(req.headers["x-runweave-hook-token"], process.env.RUNWEAVE_HOOK_TOKEN)) {
|
|
112655
|
-
res.sendStatus(401);
|
|
112656
|
-
return;
|
|
112657
|
-
}
|
|
112714
|
+
app.post("/api/terminal/session/:id/browser/capability", requireTerminalHook, (req, res) => {
|
|
112658
112715
|
const projectId = req.body?.projectId;
|
|
112659
112716
|
if (typeof projectId !== "string") {
|
|
112660
112717
|
res.sendStatus(400);
|
|
112661
112718
|
return;
|
|
112662
112719
|
}
|
|
112663
112720
|
try {
|
|
112664
|
-
res.json({ capability: bindings.issueCapability(req.params.id, projectId), expiresIn: 3600 });
|
|
112721
|
+
res.json({ capability: bindings.issueCapability(String(req.params.id), projectId), expiresIn: 3600 });
|
|
112665
112722
|
} catch (error2) {
|
|
112666
112723
|
sendError(res, error2);
|
|
112667
112724
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "0.1.0",
|
|
3
|
-
"buildId": "
|
|
4
|
-
"sourceRevision": "
|
|
3
|
+
"buildId": "20261109T114445902Z-2137d8fa",
|
|
4
|
+
"sourceRevision": "2137d8fa9eae70d0ab4070212c1cb4e8bb9e2fa6",
|
|
5
5
|
"sourceDirty": false,
|
|
6
|
-
"builtAt": "2026-11-
|
|
6
|
+
"builtAt": "2026-11-09T11:44:45.902Z",
|
|
7
7
|
"contentSha256": "d88edba1ac622f799a43f96f04cacdfb2052f2b959dae733f3feb164b615427b"
|
|
8
8
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<!doctype html>
|
|
2
2
|
<html lang="zh-CN">
|
|
3
|
-
<head><script data-runweave-build-info>var __RUNWEAVE_BUILD_INFO__={"version":"0.1.0","buildId":"
|
|
3
|
+
<head><script data-runweave-build-info>var __RUNWEAVE_BUILD_INFO__={"version":"0.1.0","buildId":"20261109T114445902Z-2137d8fa","sourceRevision":"2137d8fa9eae70d0ab4070212c1cb4e8bb9e2fa6","sourceDirty":false,"builtAt":"2026-11-09T11:44:45.902Z","contentSha256":"d88edba1ac622f799a43f96f04cacdfb2052f2b959dae733f3feb164b615427b"};</script>
|
|
4
4
|
|
|
5
5
|
<meta charset="UTF-8" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<!doctype html>
|
|
2
2
|
<html lang="en">
|
|
3
|
-
<head><script data-runweave-build-info>var __RUNWEAVE_BUILD_INFO__={"version":"0.1.0","buildId":"
|
|
3
|
+
<head><script data-runweave-build-info>var __RUNWEAVE_BUILD_INFO__={"version":"0.1.0","buildId":"20261109T114445902Z-2137d8fa","sourceRevision":"2137d8fa9eae70d0ab4070212c1cb4e8bb9e2fa6","sourceDirty":false,"builtAt":"2026-11-09T11:44:45.902Z","contentSha256":"d88edba1ac622f799a43f96f04cacdfb2052f2b959dae733f3feb164b615427b"};</script>
|
|
4
4
|
|
|
5
5
|
<meta charset="UTF-8" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|