@openvole/volenet 1.0.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 OpenVole
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.
package/README.md ADDED
@@ -0,0 +1,75 @@
1
+ # @openvole/volenet
2
+
3
+ Signed, post-quantum-sealed messaging between agents and people across machines they do not share.
4
+ A library, not a framework: it runs a node, it does not run an agent.
5
+
6
+ ```bash
7
+ npm install @openvole/volenet
8
+ ```
9
+
10
+ ```ts
11
+ import { VoleNetManager, createEventBus, generateKeyPair } from '@openvole/volenet'
12
+
13
+ const bus = createEventBus()
14
+ bus.on('volenet:chat', (m) => console.log(`${m.fromName}: ${m.text}`))
15
+
16
+ const net = new VoleNetManager(
17
+ { enabled: true, instanceName: 'my-node', port: 9700, keyPath: './data/net/vole_key' },
18
+ './data',
19
+ )
20
+ await net.start(undefined, bus)
21
+ await net.sendChat('some-peer', 'hello')
22
+ ```
23
+
24
+ ## What it gives you
25
+
26
+ - **Identity that is a keypair, not an account.** Hybrid Ed25519 + ML-DSA-65 signatures, so a
27
+ message is provably from a peer and nobody can speak as them.
28
+ - **Envelopes sealed to the recipient.** Hybrid X25519 + ML-KEM-768, HKDF over both shared
29
+ secrets, AAD bound to the routing — confidentiality holds unless *both* KEMs break, which is
30
+ what closes the harvest-now-decrypt-later gap. Falls back to X25519-only for older peers, with
31
+ the scheme bound into the KDF so a downgrade fails the tag instead of weakening the envelope.
32
+ - **Blind relay hubs.** A hub forwards ciphertext for peers that cannot dial each other and keeps
33
+ none of it. An undelivered message waits in the *sender's* outbox; the hub keeps a notice — who
34
+ tried, how often, when — and nothing more.
35
+ - **Consent.** Nothing is trusted because it connected. A peer is paired directly, or consented to
36
+ through a hub, before it can say anything to you.
37
+ - **Intermittent peers as a supported shape.** Senders hold what they could not deliver and flush
38
+ on reconnect, so a phone or an editor session that comes and goes loses nothing.
39
+
40
+ ## What it does not assume about you
41
+
42
+ Three things a host may provide, and none of them are required:
43
+
44
+ | you pass | you get | without it |
45
+ |---|---|---|
46
+ | an `EventSink` to `start()` | every event this node raises | it runs silently; `createEventBus()` is there if you have no bus |
47
+ | a `ToolProvider` to `start()` | tools shareable with trusted peers | no tool sharing |
48
+ | `persistPeer` in the config | peers learned at runtime survive a restart | they are live-only |
49
+
50
+ `setLoggerFactory()` redirects the library's logging into your own logger. Left alone it writes to
51
+ `VOLE_LOG_FILE` when that is set, and is silent otherwise.
52
+
53
+ ## Who uses it
54
+
55
+ - [`openvole`](https://www.npmjs.com/package/openvole) — the agent framework this was extracted
56
+ from. Agents on a mesh, tool sharing, brain delegation.
57
+ - [`@openvole/volenet-mcp`](https://www.npmjs.com/package/@openvole/volenet-mcp) — an MCP server
58
+ that gives a Claude Code session its own identity on the mesh.
59
+ - The VoleNet phone app, whose Rust client speaks this protocol and is tested against this
60
+ implementation in both directions.
61
+
62
+ ## Protocol
63
+
64
+ The wire format is documented from a client's point of view in
65
+ [`PROTOCOL.md`](https://github.com/openvole/vole-chat/blob/main/PROTOCOL.md). Section numbers there
66
+ are referenced from the Rust client's source.
67
+
68
+ ## Test
69
+
70
+ ```bash
71
+ pnpm -C src/volenet test
72
+ ```
73
+
74
+ 204 tests, including end-to-end pairing, relay with consent, held messages, file transfer, and
75
+ byte-level interop with the Rust client.