sigelo-contact 0.1.13 → 0.1.20
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 +13 -10
- package/call.mjs +727 -0
- package/carrier.mjs +1204 -137
- package/control.mjs +81 -22
- package/device.mjs +1 -1
- package/enrol.mjs +239 -43
- package/gen-carrier.mjs +4 -4
- package/gen-device.mjs +2 -2
- package/gen-envelope.mjs +3 -3
- package/gen-invite.mjs +3 -3
- package/gen-short.mjs +3 -3
- package/group.mjs +616 -0
- package/invite.mjs +63 -13
- package/kdf.mjs +1 -1
- package/link.mjs +24 -16
- package/package.json +49 -7
- package/page.mjs +1172 -70
- package/photo.mjs +37 -0
- package/platform-node.mjs +125 -18
- package/prekeys.mjs +10 -2
- package/public.mjs +93 -0
- package/relays.mjs +1 -1
- package/restore.mjs +3 -3
- package/rtc-web.mjs +95 -0
- package/short.mjs +31 -3
- package/store.mjs +147 -12
- package/test-carrier.mjs +138 -21
- package/test-device.mjs +1 -1
- package/test-enrol.mjs +157 -8
- package/test-envelope.mjs +16 -3
- package/test-file.mjs +5 -5
- package/test-group.mjs +413 -0
- package/test-invite.mjs +15 -2
- package/test-link.mjs +11 -8
- package/test-platform.mjs +5 -5
- package/test-presence.mjs +169 -0
- package/test-push.mjs +136 -0
- package/test-relay-lane.mjs +248 -0
- package/test-short.mjs +38 -12
- package/test-tier.mjs +6 -6
- package/test-transfer-web.mjs +246 -0
- package/test-transfer.mjs +463 -0
- package/test-voice.mjs +158 -0
- package/test-ws.mjs +5 -5
- package/transfer-engine.mjs +800 -0
- package/transfer-node.mjs +449 -0
- package/transfer-web.mjs +80 -0
- package/transfer.mjs +388 -0
- package/voice-web.mjs +113 -0
- package/voice.mjs +65 -0
- package/words-lock.mjs +115 -0
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ the other's sigelo chain offline; a key rotation keeps the contact. MIT; the rel
|
|
|
7
7
|
[sigelo-relay](https://github.com/csigelo/sigelo-relay), is AGPL-3.0.
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
|
-
sigelo-agent invite --name bob # alice: K7F3-Q9ZP, once, 10 minutes
|
|
10
|
+
sigelo-agent invite --name bob # alice: K7F3-Q9ZP, once, 10 minutes (--ttl: up to 1h)
|
|
11
11
|
sigelo-agent accept <code> --name alice # bob: checks alice offline, pairs
|
|
12
12
|
sigelo-agent send bob "hello" # sent, or queued for bob
|
|
13
13
|
seq 3 | sigelo-agent send bob - --lines # one message a line, one login
|
|
@@ -16,14 +16,15 @@ sigelo-agent history --since 3600 # again, no relay
|
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
Also `contacts`, `forget <did>`; all as MCP tools
|
|
19
|
-
([`integrations/mcp/contact.mjs`](../integrations/mcp/contact.mjs)).
|
|
19
|
+
([`apps/integrations/mcp/contact.mjs`](../integrations/mcp/contact.mjs)).
|
|
20
20
|
Each verb logs in once, never beside `watch` or `ui`
|
|
21
|
-
([one owner](../
|
|
22
|
-
The first login proves work (
|
|
21
|
+
([one owner](../agent/WATCH.md)).
|
|
22
|
+
The first login proves work (Argon2id, ~30 s on phones). `SIGELO_RELAY` names the relay for new codes;
|
|
23
23
|
a Pro reader sets `SIGELO_RELAY_RETENTION_DAYS=90`. State sits
|
|
24
24
|
beside the identity file (0600), plaintext: messages until `inbox` takes them, then the last 500
|
|
25
25
|
in `<identity>.inbox.log`.
|
|
26
|
-
`carrier.mjs`'s header is its API
|
|
26
|
+
`carrier.mjs`'s header is its API: `invite({ ttl })` (a short code 60 s to 1 h), each message's `id`,
|
|
27
|
+
`reply(id, …)` and `replyStatus(id)`.
|
|
27
28
|
|
|
28
29
|
**Short codes.** `K7F3-Q9ZP` lives at `relay.sigelo.ai`; another relay's adds its tag:
|
|
29
30
|
`K7F3-Q9ZP-FNK5`, 20 bits of SHA-256(`sigelo-relay-tag/0` ‖ host). `accept` finds it among known
|
|
@@ -39,8 +40,8 @@ Allow it on 443.
|
|
|
39
40
|
|
|
40
41
|
```sh
|
|
41
42
|
node test-invite.mjs && node test-envelope.mjs
|
|
42
|
-
node test-carrier.mjs && node test-ws.mjs #
|
|
43
|
-
sh
|
|
43
|
+
node test-carrier.mjs && node test-ws.mjs # ../../relay, loopback
|
|
44
|
+
sh ../../tools/demo/two-machines.sh
|
|
44
45
|
```
|
|
45
46
|
|
|
46
47
|
## Contracts
|
|
@@ -65,7 +66,9 @@ Each regenerates byte for byte from seeds (`gen-*.mjs`).
|
|
|
65
66
|
4. **Envelope**: signed by the identity key, encrypted (XChaCha20-Poly1305) under a chain from
|
|
66
67
|
a single-use prekey, padded to 256-byte blocks. Until the sender
|
|
67
68
|
reads a reply, each envelope repeats the encapsulation: a reader offline past retention loses
|
|
68
|
-
those messages, not the epoch. Prekeys travel under `K`, replaced weekly
|
|
69
|
+
those messages, not the epoch. Prekeys travel under `K`, replaced weekly or every
|
|
70
|
+
`SIGELO_PREKEY_DAYS` days (1 to 7, local, not on the wire): a stolen state file reads incoming
|
|
71
|
+
messages only until the next replacement reaches the contact.
|
|
69
72
|
5. **Rotation**: the rotated agent sends each contact its chain under `K`, proven by its new key,
|
|
70
73
|
until the contact confirms it, so recovery beats a thief (SPEC §7.1). After a recovery both
|
|
71
74
|
mark the pairing `re_pair`: only that notice goes under `K` until a new code replaces it.
|
|
@@ -76,8 +79,8 @@ Key agreement: hybrid post-quantum (X25519 + ML-KEM-768).
|
|
|
76
79
|
|
|
77
80
|
- Find anyone (codes travel out of band), hide who talks to whom, or deny.
|
|
78
81
|
- Heal inside an epoch after a key theft (no double ratchet): a stolen state file reads what
|
|
79
|
-
contacts write until the
|
|
80
|
-
- Confirm delivery (the relay acknowledges
|
|
82
|
+
contacts write until the next prekey replacement.
|
|
83
|
+
- Confirm delivery (the relay acknowledges; seen receipts: `seen()`): a relay withholding an epoch's key
|
|
81
84
|
agreement loses what follows until prekeys restart it.
|
|
82
85
|
- Check where a stranger's relay resolves.
|
|
83
86
|
- Push, groups, direct delivery, unsend.
|