@omercnet/paseo-shared-browser 1.0.0 → 1.0.1-next.173.1
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/README.md +5 -1
- package/package.json +3 -2
- package/paseo-plugin.json +1 -1
- package/scripts/prepare-runtime.mjs +3 -13
- package/scripts/replace-runtime.mjs +25 -0
package/README.md
CHANGED
|
@@ -10,6 +10,10 @@ eligible workspace agent acts on the same running page, DOM, navigation state, a
|
|
|
10
10
|
Many viewers can watch; human control remains server-authoritative and takes priority over agent
|
|
11
11
|
input.
|
|
12
12
|
|
|
13
|
+
## Demo
|
|
14
|
+
|
|
15
|
+
https://github.com/user-attachments/assets/37d09fff-0750-440d-983d-426150b0724d
|
|
16
|
+
|
|
13
17
|
## Screenshots
|
|
14
18
|
|
|
15
19
|
Both PNGs show the same isolated Chromium session from a dedicated Paseo test daemon. They were
|
|
@@ -176,5 +180,5 @@ persistence, and archive teardown.
|
|
|
176
180
|
Release Please maintains the version, changelog, component tag, and GitHub release from
|
|
177
181
|
Conventional Commits in the monorepo.
|
|
178
182
|
|
|
179
|
-
Both the Paseo daemon and app must satisfy `^0.9.0`. The client surface uses React Native primitives
|
|
183
|
+
Both the Paseo daemon and app must satisfy `^0.9.0 || ^0.10.0-beta.1`. The client surface uses React Native primitives
|
|
180
184
|
and works in desktop, web, iOS, and Android Paseo clients.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omercnet/paseo-shared-browser",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1-next.173.1",
|
|
4
4
|
"description": "One real Chromium session per Paseo workspace, shared live across every connected client.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"browser",
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"client",
|
|
30
30
|
"scripts/prepare-dependencies.mjs",
|
|
31
31
|
"scripts/prepare-runtime.mjs",
|
|
32
|
+
"scripts/replace-runtime.mjs",
|
|
32
33
|
"server",
|
|
33
34
|
"shared",
|
|
34
35
|
"paseo-plugin.json"
|
|
@@ -47,7 +48,7 @@
|
|
|
47
48
|
"test:smoke": "vitest run tests/browser.smoke.test.ts --testTimeout=30000"
|
|
48
49
|
},
|
|
49
50
|
"dependencies": {
|
|
50
|
-
"@getpaseo/plugin": "0.9.
|
|
51
|
+
"@getpaseo/plugin": "0.9.2",
|
|
51
52
|
"@modelcontextprotocol/sdk": "1.30.0",
|
|
52
53
|
"agent-browser": "0.37.1",
|
|
53
54
|
"esbuild": "0.28.2",
|
package/paseo-plugin.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "shared-browser",
|
|
3
3
|
"description": "One real Chromium session per Paseo workspace, shared live across every connected client.",
|
|
4
|
-
"requirements": { "paseo": "^0.9.0" },
|
|
4
|
+
"requirements": { "paseo": "^0.9.0 || ^0.10.0-beta.1" },
|
|
5
5
|
"build": [["node", "scripts/prepare-dependencies.mjs"], ["npm", "run", "prepare:runtime"]]
|
|
6
6
|
}
|
|
@@ -1,23 +1,13 @@
|
|
|
1
1
|
import { execFile } from "node:child_process";
|
|
2
2
|
import { constants } from "node:fs";
|
|
3
|
-
import {
|
|
4
|
-
access,
|
|
5
|
-
chmod,
|
|
6
|
-
cp,
|
|
7
|
-
lstat,
|
|
8
|
-
mkdir,
|
|
9
|
-
readdir,
|
|
10
|
-
rename,
|
|
11
|
-
rm,
|
|
12
|
-
symlink,
|
|
13
|
-
writeFile,
|
|
14
|
-
} from "node:fs/promises";
|
|
3
|
+
import { access, chmod, cp, lstat, mkdir, readdir, rm, symlink, writeFile } from "node:fs/promises";
|
|
15
4
|
import { createRequire } from "node:module";
|
|
16
5
|
import { arch, homedir, platform, userInfo } from "node:os";
|
|
17
6
|
import { dirname, join, resolve } from "node:path";
|
|
18
7
|
import { fileURLToPath } from "node:url";
|
|
19
8
|
import { promisify } from "node:util";
|
|
20
9
|
import { build } from "esbuild";
|
|
10
|
+
import { replaceRuntime } from "./replace-runtime.mjs";
|
|
21
11
|
|
|
22
12
|
const require = createRequire(import.meta.url);
|
|
23
13
|
|
|
@@ -257,6 +247,6 @@ await applyPrivatePermissions(stagingRoot);
|
|
|
257
247
|
if (hostPlatform !== "win32") {
|
|
258
248
|
await validateChromium(await requireExecutable(chromiumEntry, "Staged Chromium executable"));
|
|
259
249
|
}
|
|
260
|
-
await
|
|
250
|
+
await replaceRuntime(stagingRoot, runtimeRoot);
|
|
261
251
|
|
|
262
252
|
console.log(`Prepared immutable Shared Browser runtime assets in ${runtimeRoot}`);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { rename, rm } from "node:fs/promises";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
|
|
4
|
+
export async function replaceRuntime(stagingRoot, runtimeRoot) {
|
|
5
|
+
const previousRuntimeRoot = join(runtimeRoot, "..", `.runtime-previous-${process.pid}`);
|
|
6
|
+
await rm(previousRuntimeRoot, { recursive: true, force: true });
|
|
7
|
+
let replacedExistingRuntime = false;
|
|
8
|
+
try {
|
|
9
|
+
await rename(runtimeRoot, previousRuntimeRoot);
|
|
10
|
+
replacedExistingRuntime = true;
|
|
11
|
+
} catch (error) {
|
|
12
|
+
if (error?.code !== "ENOENT") throw error;
|
|
13
|
+
}
|
|
14
|
+
try {
|
|
15
|
+
await rename(stagingRoot, runtimeRoot);
|
|
16
|
+
} catch (error) {
|
|
17
|
+
if (replacedExistingRuntime) await rename(previousRuntimeRoot, runtimeRoot);
|
|
18
|
+
throw error;
|
|
19
|
+
}
|
|
20
|
+
if (replacedExistingRuntime) {
|
|
21
|
+
await rm(previousRuntimeRoot, { recursive: true, force: true }).catch((error) => {
|
|
22
|
+
console.warn(`Could not remove previous Shared Browser runtime: ${error}`);
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
}
|