@vaernjs/vaern 0.0.2 → 0.0.3
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 +30 -68
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,73 +1,41 @@
|
|
|
1
1
|
# vaern
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
An agent-native JavaScript and TypeScript runtime. Vaern runs TypeScript directly, with `fetch` and an HTTP server built in, on an embedded QuickJS-ng engine driven by Rust and Tokio. It is being built so that capability sandboxing, replayable runs and sovereignty enforcement live in the engine instead of in libraries.
|
|
4
4
|
|
|
5
|
-
A DevLogix project
|
|
5
|
+
A DevLogix project, licensed MIT.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## Status
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
>
|
|
11
|
-
> This version reserves the name and provides a working CLI entry point.
|
|
12
|
-
>
|
|
13
|
-
> Running `vaern` today prints the roadmap. That is expected, not a bug. Run `vaern doctor` for install diagnostics.
|
|
14
|
-
|
|
15
|
-
---
|
|
9
|
+
v0.0.3, the first native runtime. `vaern run <file>` executes JavaScript and TypeScript with types stripped at load time, and provides relative ES module imports, `console`, `setTimeout`, `setInterval`, `queueMicrotask`, `fetch`, `serve()` from `vaern:http`, `process.argv`, `process.env` and `process.exit()`. This npm package carries the JavaScript CLI only, so the native binary is built from source. Not in this version: capability sandboxing (`vaern.toml`), `agent()` and `tool()`, and `node:*` modules.
|
|
16
10
|
|
|
17
11
|
## Install
|
|
18
12
|
|
|
19
13
|
```bash
|
|
20
|
-
npm install -g @vaernjs/vaern
|
|
21
|
-
|
|
14
|
+
npm install -g @vaernjs/vaern
|
|
15
|
+
git clone https://github.com/vaernjs/vaern.git && cd vaern
|
|
16
|
+
cargo build --release
|
|
17
|
+
export VAERN_BINARY="$PWD/target/release/vaern"
|
|
18
|
+
vaern --version
|
|
22
19
|
```
|
|
23
20
|
|
|
24
|
-
|
|
25
|
-
`optionalDependencies`, the same way `bun` and `esbuild` do. Nothing is
|
|
26
|
-
downloaded in a `postinstall` script; the platform packages are ordinary npm
|
|
27
|
-
packages gated by `os` and `cpu`.
|
|
28
|
-
|
|
29
|
-
Supported platforms (v0.1.0+):
|
|
21
|
+
With `VAERN_BINARY` set, the `vaern` command runs the native binary. Without it, the command answers `--version`, `--help` and `doctor` only.
|
|
30
22
|
|
|
31
|
-
|
|
32
|
-
|---|---|
|
|
33
|
-
| Linux x86_64 | `vaern-linux-x64` |
|
|
34
|
-
| Linux arm64 | `vaern-linux-arm64` |
|
|
35
|
-
| macOS arm64 | `vaern-darwin-arm64` |
|
|
36
|
-
| macOS x86_64 | `vaern-darwin-x64` |
|
|
37
|
-
| Windows x86_64 | `vaern-win32-x64` |
|
|
38
|
-
|
|
39
|
-
Install with `--no-optional` or on an unsupported platform and you get the JS
|
|
40
|
-
fallback, which explains itself instead of failing silently.
|
|
41
|
-
|
|
42
|
-
## What vaern will do
|
|
23
|
+
## Example
|
|
43
24
|
|
|
44
25
|
```ts
|
|
45
|
-
//
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
const courier = agent({
|
|
56
|
-
name: "courier-copilot",
|
|
57
|
-
model: "any-openai-compatible-endpoint",
|
|
58
|
-
tools: [traffic],
|
|
59
|
-
sandbox: "vaern.toml", // capability policy, enforced by the engine
|
|
60
|
-
replay: "deterministic", // every effect journalled at the engine boundary
|
|
61
|
-
budget: { tokens: 250_000, usd: 5 }, // hard stop — not an alert
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
console.log(await courier.run("Reroute today's Lahore deliveries around the fog."));
|
|
26
|
+
// latest.ts
|
|
27
|
+
interface Manifest {
|
|
28
|
+
name: string;
|
|
29
|
+
version: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const res = await fetch("https://registry.npmjs.org/@vaernjs/vaern/latest");
|
|
33
|
+
const pkg = (await res.json()) as Manifest;
|
|
34
|
+
console.log(`${pkg.name} ${pkg.version}, HTTP ${res.status}`);
|
|
65
35
|
```
|
|
66
36
|
|
|
67
37
|
```bash
|
|
68
|
-
vaern run
|
|
69
|
-
vaern audit export --run 7f3a --format sbp --sign
|
|
70
|
-
vaern replay 7f3a --diff
|
|
38
|
+
vaern run latest.ts
|
|
71
39
|
```
|
|
72
40
|
|
|
73
41
|
## Programmatic use
|
|
@@ -78,30 +46,24 @@ const { binaryPath, hasNativeBinary, vaern } = require("@vaernjs/vaern");
|
|
|
78
46
|
if (hasNativeBinary()) vaern(["run", "app.ts"]);
|
|
79
47
|
```
|
|
80
48
|
|
|
81
|
-
## Roadmap
|
|
82
|
-
|
|
83
|
-
| | Milestone |
|
|
84
|
-
|---|---|
|
|
85
|
-
| **M1** | `vaern run hello.ts` — TypeScript, `fetch`, timers, `console`, HTTP server |
|
|
86
|
-
| **M2** | capability enforcer + `vaern.toml`; `node:fs` / `node:http` / `node:path` subset |
|
|
87
|
-
| **M3** | `agent()`, `tool()`, MCP client/server, budgets, effect journal, `vaern replay` |
|
|
88
|
-
| **M4** | residency egress guard, hash-chained audit, PK-PKI signing, `ur-PK` i18n |
|
|
89
|
-
| **M5** | honest public benchmarks (including losses), docs site, external production users |
|
|
90
|
-
|
|
91
|
-
We publish benchmarks we lose. A runtime that hides a benchmark is hiding something else.
|
|
92
|
-
|
|
93
49
|
## Licence
|
|
94
50
|
|
|
95
51
|
MIT License. Copyright (c) 2026 DEVLOGIX TECHNOLOGY (PRIVATE) LIMITED.
|
|
96
52
|
See [`LICENSE`](./LICENSE).
|
|
97
53
|
|
|
54
|
+
## Links
|
|
55
|
+
|
|
56
|
+
- Website: <a href="https://vaernjs.tech">vaernjs.tech</a>
|
|
57
|
+
- DevLogix: <a href="https://devlogix.com.pk">devlogix.com.pk</a>
|
|
58
|
+
- Repository: <a href="https://github.com/vaernjs/vaern">github.com/vaernjs/vaern</a>
|
|
59
|
+
- Issues: <a href="https://github.com/vaernjs/vaern/issues">github.com/vaernjs/vaern/issues</a>
|
|
60
|
+
- npm: <a href="https://www.npmjs.com/package/@vaernjs/vaern">@vaernjs/vaern</a>
|
|
61
|
+
|
|
98
62
|
## Development
|
|
99
63
|
|
|
100
64
|
```bash
|
|
101
65
|
git clone https://github.com/vaernjs/vaern.git && cd vaern
|
|
102
|
-
|
|
66
|
+
cargo build --release
|
|
103
67
|
npm run check # pre-publish validation
|
|
104
68
|
npm run pack:dry # inspect exactly what would be published
|
|
105
69
|
```
|
|
106
|
-
|
|
107
|
-
Issues and pull requests welcome — we would rather be corrected now than wrong later.
|
package/package.json
CHANGED