@allwright.dev/core 0.0.23 → 0.0.25

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 CHANGED
@@ -1,359 +1,12 @@
1
- # allwright
1
+ # @allwright.dev/core
2
2
 
3
- allwright is one automation engine for everything you test.
4
-
5
- The long-term direction is a single system that can cover web, mobile, desktop, and API automation without forcing teams to stitch together a different tool for every surface. The project is designed so automation can feel consistent across the whole product, not fragmented by platform.
6
-
7
- That direction also applies to extensibility: allwright should stay one engine at its core, while surface modules like `web`, `mobile-android`, `mobile-ios`, `desktop-mac`, `desktop-windows`, and `desktop-linux` can be installed separately as plugins instead of fragmenting the runtime into multiple engines.
8
-
9
- Right now, allwright is being built in public and the browser automation engine is the first active layer. The current implementation is focused on a driverless Chrome control path backed by CDP and Chromium BiDi, with high-level client libraries for Rust, Go, Java, Python, and TypeScript/JavaScript.
10
-
11
- ## Why allwright
12
-
13
- - One engine instead of a pile of disconnected tools
14
- - One automation model that can eventually span web, mobile, desktop, and API work
15
- - One extensibility model where surface plugins plug into the core engine
16
- - High-level browser and page APIs instead of raw transport plumbing
17
- - Driverless browser control built around CDP and Chromium BiDi
18
- - Shared contracts across the engine and all client stacks
19
-
20
- ## Current Status
21
-
22
- allwright is under active development and not positioned as a finished multi-surface platform yet.
23
-
24
- The current stage is:
25
-
26
- - the core product direction is broader than browser automation alone
27
- - the first shipped implementation work is centered on the browser engine and its future plugin boundary
28
- - the Rust workspace now separates a lightweight `allwright-core` from the installable `allwright` CLI and surface crates
29
- - the `web` surface now ships as a separately installable runtime plugin library
30
- - the other surface crates already exist as publishable boundaries, but only `web` is currently installable as a standalone runtime artifact
31
- - the public API and internal architecture are still evolving as the project grows toward wider surface coverage
32
-
33
- If you are evaluating the repo today, the clearest signal is the direction: allwright is aiming to become a unified automation engine, and browser automation is the first concrete step on that path.
34
-
35
- ## Direction
36
-
37
- allwright is being shaped around a simple idea: teams should not need one framework for web, another for mobile, another for desktop, and a separate story for API validation.
38
-
39
- The project direction is to make those surfaces feel like one automation system:
40
-
41
- - Web: real browser flows that click, type, and navigate like a person would
42
- - Mobile: the same test logic extended toward native and hybrid apps
43
- - Desktop: automation for full desktop application workflows
44
- - API: backend checks that stay aligned with the same user-facing flows and data
45
-
46
- That broader direction matters more than the current implementation footprint. The repo may be browser-first today, but the product purpose is cross-surface automation under one roof.
47
-
48
- ## Extensibility Direction
49
-
50
- allwright should remain a single engine, not a family of separate engines.
51
-
52
- As the project grows into more surfaces, extensibility should follow a plugin model:
53
-
54
- - the core engine stays responsible for lifecycle, sessions, transport, and the shared automation model
55
- - surface modules such as `web`, `mobile-android`, `mobile-ios`, `desktop-mac`, `desktop-windows`, and `desktop-linux` should be attachable as plugins
56
- - those plugins should be installable separately so users only take on the surfaces they need
57
- - plugin boundaries should extend the engine instead of forcing client libraries to learn different runtimes
58
-
59
- In practice, that means future architecture work should prefer a stable engine core with explicit extension points over splitting web, mobile, desktop, or API support into unrelated executables.
60
-
61
- ## Plugin Ecosystem
62
-
63
- For users, the intended install model is simple:
64
-
65
- - install `allwright` once to get the CLI plus the lightweight engine core
66
- - add only the surface plugins you need, starting with `web`
67
- - keep one command-line entrypoint and one engine lifecycle, even as more surfaces arrive
68
-
69
- Today, the plugin ecosystem looks like this:
70
-
71
- - `allwright`: installable CLI package that starts the engine server and manages plugin installation
72
- - `web`: the first installable runtime surface plugin today, loaded by the core at runtime
73
- - `mobile-android`, `mobile-ios`, `desktop-mac`, `desktop-windows`, and `desktop-linux`: planned surface plugins with publishable crate boundaries, but not yet installable runtime artifacts
74
-
75
- What `plugin install` means today:
76
-
77
- - for `web`, it downloads the matching platform archive from GitHub Releases into the local allwright plugin directory and records the installed plugin in the manifest
78
- - `allwright serve` always starts the engine server
79
- - when `web` is installed, the core engine loads the installed `web` plugin library at runtime for browser/web commands
80
- - when `web` is not installed, browser/web commands fail with a plugin-required error while the core server still runs
81
- - the non-web surface crates are still intentionally behind this installability switch until their runtime binaries are ready
82
-
83
- So the user-facing install model is now real for `web`, while the broader multi-surface plugin ecosystem is still being completed.
84
-
85
- Release automation today:
86
-
87
- - pushing a tag such as `vX.Y.Z` triggers the GitHub Actions release workflow
88
- - that workflow creates the Go submodule tag `go/vX.Y.Z`, verifies the Go client in `go/`, and warms the public Go proxy for `allwright.dev`
89
- - that workflow publishes the root TypeScript package to npm as `@allwright.dev/core` using npm Trusted Publishing via GitHub Actions OIDC
90
- - that workflow builds both the `allwright` CLI and `allwright-surface-web` plugin for the current release matrix and uploads the archives to the matching GitHub Release
91
- - `allwright plugin install web` resolves the local OS and architecture, then downloads the matching release asset
92
- - the release workflow syncs the Rust workspace version from the Git tag before building, so the tag is the release source of truth
93
-
94
- ## Quick Start
95
-
96
- Install the CLI:
97
-
98
- ```bash
99
- curl -fsSL https://raw.githubusercontent.com/allwright-dev/allwright/main/scripts/install.sh | bash
100
- ```
101
-
102
- or:
103
-
104
- ```bash
105
- wget -qO- https://raw.githubusercontent.com/allwright-dev/allwright/main/scripts/install.sh | bash
106
- ```
107
-
108
- If you already have the repo checked out:
109
-
110
- ```bash
111
- chmod +x ./scripts/install.sh
112
- ./scripts/install.sh
113
- ```
114
-
115
- The installer prefers a writable directory that is already on `PATH`. If your shell still says `command not found: allwright`, export the printed install directory into `PATH` for the current session.
116
-
117
- Windows PowerShell:
118
-
119
- ```powershell
120
- irm https://raw.githubusercontent.com/allwright-dev/allwright/main/scripts/install.ps1 | iex
121
- ```
122
-
123
- If you already have the repo checked out:
124
-
125
- ```powershell
126
- powershell -ExecutionPolicy Bypass -File .\scripts\install.ps1
127
- ```
128
-
129
- Start the engine core through the CLI:
130
-
131
- ```bash
132
- allwright serve --listen-addr 127.0.0.1:50051
133
- ```
134
-
135
- List or install plugins:
136
-
137
- ```bash
138
- allwright plugin list
139
- allwright plugin install web
140
- ```
141
-
142
- If you are working from the repo checkout instead:
143
-
144
- ```bash
145
- cargo run -p allwright -- serve --listen-addr 127.0.0.1:50051
146
- cargo run -p allwright -- plugin list
147
- cargo run -p allwright -- plugin install web
148
- ```
149
-
150
- Try the Rust playground against the running engine core:
151
-
152
- ```bash
153
- cargo run -p allwright-core --example playground -- --server-addr http://127.0.0.1:50051
154
- ```
155
-
156
- Open more tabs during the playground flow:
157
-
158
- ```bash
159
- cargo run -p allwright-core --example playground -- --server-addr http://127.0.0.1:50051 --tabs 3
160
- ```
161
-
162
- ## What You Can Try Today
163
-
164
- Today’s working path is browser-focused, with a Rust-powered engine and high-level client libraries layered on top.
165
-
166
- The practical path today is:
167
-
168
- - use the `allwright` CLI as the installable entrypoint
169
- - install the `web` plugin
170
- - use the Rust, Go, Java, Python, or TypeScript clients against the running engine server
171
-
172
- At the moment, the `web` runtime path is wired through the installable plugin model and loaded into the core at runtime. The other surface crates and split proto ownership are in place, while additional plugin runtime activation is still follow-up work.
173
-
174
- ## Client Experience
175
-
176
- allwright is designed around high-level browser objects rather than asking application code to manage raw gRPC connections.
177
-
178
- Rust example:
179
-
180
- ```rust
181
- let browser = allwright::launch_chrome(Default::default()).await?;
182
- let tab = browser.initial_tab()?;
183
- tab.navigate("https://example.com").await?;
184
- tab.click("a").await?;
185
- browser.close().await?;
186
- ```
187
-
188
- Go example:
189
-
190
- ```go
191
- browser, err := allwright.LaunchChrome(ctx, allwright.LaunchOptions{})
192
- tab := browser.InitialTab()
193
- _, err = tab.Navigate(ctx, "https://example.com")
194
- _, err = tab.Click(ctx, "a")
195
- err = browser.Close(ctx)
196
- ```
197
-
198
- TypeScript example:
3
+ High-level TypeScript client for the allwright automation engine.
199
4
 
200
5
  ```ts
201
- import { chromium } from "./src/index.js";
6
+ import { chromium } from "@allwright.dev/core";
202
7
 
203
- const browser = await chromium.launch({});
8
+ const browser = await chromium.launch();
204
9
  const page = browser.page();
205
10
  await page.goto("https://example.com");
206
- await page.click("a");
207
11
  await browser.close();
208
12
  ```
209
-
210
- ## Repository Guide
211
-
212
- - `rust/allwright`: lightweight `allwright-core` Rust package with the client API, proto bindings, and gRPC engine core
213
- - `rust/allwright-cli`: installable `allwright` CLI package that depends on `allwright-core` and installs supported plugins
214
- - `rust/allwright-plugin-sdk`: shared plugin traits and surface metadata
215
- - `rust/allwright-surface-web`: publishable `web` surface crate that ships the first standalone runtime plugin library
216
- - `rust/allwright-surface-mobile`: shared mobile surface abstractions
217
- - `rust/allwright-surface-mobile-android`: publishable `mobile-android` surface crate
218
- - `rust/allwright-surface-mobile-ios`: publishable `mobile-ios` surface crate
219
- - `rust/allwright-surface-desktop`: shared desktop surface abstractions
220
- - `rust/allwright-surface-desktop-mac`: publishable `desktop-mac` surface crate
221
- - `rust/allwright-surface-desktop-windows`: publishable `desktop-windows` surface crate
222
- - `rust/allwright-surface-desktop-linux`: publishable `desktop-linux` surface crate
223
- - `go/`: Go client and Go playground
224
- - `java/`: Java client project
225
- - `python/`: Python client package
226
- - `typescript/`: TypeScript/JavaScript client package and playground
227
- - `proto/`: shared protobuf and gRPC contracts
228
- The root service entrypoint remains `proto/engine/v1/engine.proto`, while shared core messages now live under `proto/core/v1/` and the web surface messages now live under `proto/surfaces/web/v1/`.
229
- - `allwright-dev/`: public website project for `allwright.dev`
230
-
231
- ## Development Notes
232
-
233
- - The engine currently runs as a gRPC server.
234
- - The current implementation focus is browser automation, but the product direction is wider.
235
- - Installing the `allwright` package is intended to deliver the CLI plus the lightweight engine core together.
236
- - The project should keep a single engine core even as surface modules become separately installable plugins.
237
- - The `web` surface plugin is now installable through the CLI via GitHub Release downloads and is loaded by the core engine at runtime.
238
- - The remaining surface plugins are still intentionally disabled as install targets until their runtime binaries exist.
239
- - The Rust workspace version is synced from the release tag during GitHub release builds.
240
- - The browser control path is intended to stay driverless.
241
- - The repo uses shared proto contracts across all supported client stacks.
242
- - Bun is the preferred local workflow for the TypeScript stack and the `allwright-dev/` site.
243
-
244
- ## Releasing Plugins
245
-
246
- Create and push a version tag:
247
-
248
- ```bash
249
- git tag vX.Y.Z
250
- git push origin vX.Y.Z
251
- ```
252
-
253
- That tag triggers `.github/workflows/release-surface-plugins.yml`, which builds and uploads the current web plugin archives for:
254
-
255
- - `allwright.dev` Go module publish by creating `go/vX.Y.Z`, verifying the `go/` module, and warming `proxy.golang.org`
256
- - `@allwright.dev/core` publish to npm after syncing `package.json` from the tag
257
- - `allwright` CLI archives for the current OS matrix
258
- - `allwright-surface-web` plugin archives for the current OS matrix
259
- - crates.io publish for the Rust `web` profile after syncing every crate version from the tag
260
-
261
- - Linux `x86_64-unknown-linux-gnu`
262
- - Windows `x86_64-pc-windows-msvc`
263
- - macOS `aarch64-apple-darwin`
264
-
265
- Configure the `CARGO_REGISTRY_TOKEN` repository secret before pushing a release tag if you want the crates.io publish job to succeed.
266
- The release workflow also sets `CARGO_PUBLISH_ALLOW_DIRTY=1` because it syncs crate versions from the tag inside CI before calling `cargo publish`.
267
- Configure npm Trusted Publishing for `@allwright.dev/core` on npmjs.com before pushing a release tag:
268
-
269
- - provider: `GitHub Actions`
270
- - organization or user: `allwright-dev`
271
- - repository: `allwright`
272
- - workflow filename: `release-surface-plugins.yml`
273
- - allowed action: `npm publish`
274
-
275
- The npm publish job uses GitHub-hosted runners and OIDC instead of an `NPM_TOKEN`, which avoids bypass-2FA tokens entirely.
276
-
277
- ## Publishing The Go Module
278
-
279
- The Go client is published as the vanity import path `allwright.dev`, backed by the `go/` subdirectory in this repository.
280
-
281
- You only create the root release tag manually:
282
-
283
- ```bash
284
- git tag vX.Y.Z
285
- git push origin vX.Y.Z
286
- ```
287
-
288
- The release workflow creates the Go-specific tag `go/vX.Y.Z` on the same commit, which is the format Go requires for a module rooted in the `go/` subdirectory. The workflow also runs `go mod tidy`, verifies `go.mod` and `go.sum` stay clean, runs `go test ./...`, and asks `proxy.golang.org` for `allwright.dev@vX.Y.Z` to help the new version show up faster.
289
-
290
- Consumers can then install or upgrade with:
291
-
292
- ```bash
293
- go get allwright.dev@vX.Y.Z
294
- ```
295
-
296
- The `allwright-dev/` site already serves the `go-import` metadata for `allwright.dev`, so `go get` can resolve the vanity import path back to this repository's `go/` subdirectory.
297
-
298
- ## Installer Scripts
299
-
300
- - `scripts/install.sh`: installs the latest or requested `allwright` CLI release on Linux and macOS
301
- - `scripts/install.ps1`: installs the latest or requested `allwright` CLI release on Windows PowerShell
302
- - `scripts/sync-version.sh`: syncs the Rust workspace and internal crate versions from a release version string such as `X.Y.Z`
303
- - `scripts/sync-npm-version.sh`: syncs the root npm package version from a release version string such as `X.Y.Z`
304
- - users do not need to clone the repo; both scripts can be run directly from GitHub with `curl`, `wget`, or PowerShell `irm`
305
-
306
- Both scripts support:
307
-
308
- - `ALLWRIGHT_VERSION` to pin a specific release tag such as `vX.Y.Z`
309
- - `ALLWRIGHT_INSTALL_DIR` to override the destination directory
310
- - `ALLWRIGHT_REPOSITORY` to target a fork or alternate GitHub repository
311
-
312
- For repo-specific contribution guidance, see [CONTRIBUTING.md](CONTRIBUTING.md).
313
-
314
- For AI handoff and deeper repo conventions, see [Codex.md](Codex.md).
315
-
316
- ## Running Other Stacks
317
-
318
- Go playground:
319
-
320
- ```bash
321
- cd go
322
- go run ./examples/playground --server-addr 127.0.0.1:50051
323
- ```
324
-
325
- TypeScript build:
326
-
327
- ```bash
328
- bun install
329
- npm run build
330
- ```
331
-
332
- TypeScript playground:
333
-
334
- ```bash
335
- bun run typescript/examples/playground.ts --server-addr 127.0.0.1:50051
336
- ```
337
-
338
- ## Testing
339
-
340
- Rust:
341
-
342
- ```bash
343
- cargo test
344
- ```
345
-
346
- Go:
347
-
348
- ```bash
349
- cd go
350
- go test ./...
351
- ```
352
-
353
- ## Contributing
354
-
355
- Contributions are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md).
356
-
357
- ## License
358
-
359
- This project is licensed under the MIT License. See [LICENSE](LICENSE).
@@ -6,9 +6,9 @@ const DEFAULT_SERVER_ADDR = "127.0.0.1:50051";
6
6
  const SERVER_ADDR_ENV_VAR = "ALLWRIGHT_SERVER_ADDR";
7
7
  const __filename = fileURLToPath(import.meta.url);
8
8
  const __dirname = path.dirname(__filename);
9
- const REPO_ROOT = path.resolve(__dirname, "..", "..");
10
- const PROTO_ROOT = path.join(REPO_ROOT, "proto");
11
- const ENGINE_PROTO_PATH = path.join(REPO_ROOT, "proto", "engine", "v1", "engine.proto");
9
+ const PACKAGE_ROOT = path.resolve(__dirname, "..");
10
+ const PROTO_ROOT = path.join(PACKAGE_ROOT, "proto");
11
+ const ENGINE_PROTO_PATH = path.join(PROTO_ROOT, "engine", "v1", "engine.proto");
12
12
  let runtimePromise = null;
13
13
  let serverAddrOverride = null;
14
14
  class EventQueue {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allwright.dev/core",
3
- "version": "0.0.23",
3
+ "version": "0.0.25",
4
4
  "description": "High-level TypeScript client for the allwright automation engine.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -19,27 +19,25 @@
19
19
  "testing",
20
20
  "typescript"
21
21
  ],
22
- "packageManager": "bun@1.2.20",
23
- "main": "./typescript/dist/index.js",
24
- "types": "./typescript/dist/index.d.ts",
22
+ "main": "./dist/index.js",
23
+ "types": "./dist/index.d.ts",
25
24
  "exports": {
26
25
  ".": {
27
- "types": "./typescript/dist/index.d.ts",
28
- "import": "./typescript/dist/index.js"
26
+ "types": "./dist/index.d.ts",
27
+ "import": "./dist/index.js"
29
28
  }
30
29
  },
31
30
  "files": [
32
- "typescript/dist",
31
+ "dist",
33
32
  "proto",
34
- "README.md",
35
- "LICENSE"
33
+ "README.md"
36
34
  ],
37
35
  "publishConfig": {
38
36
  "access": "public"
39
37
  },
40
38
  "scripts": {
41
- "build": "tsc -p typescript/tsconfig.json",
42
- "example:playground": "bun run typescript/examples/playground.ts",
39
+ "build": "tsc -p tsconfig.json",
40
+ "example:playground": "bun run examples/playground.ts",
43
41
  "prepublishOnly": "npm run build"
44
42
  },
45
43
  "dependencies": {
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 allwright contributors
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
File without changes