@cello-protocol/daemon 0.0.52 → 0.0.54
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/dist/agent-handlers.d.ts +57 -0
- package/dist/agent-handlers.d.ts.map +1 -0
- package/dist/agent-handlers.js +360 -0
- package/dist/agent-handlers.js.map +1 -0
- package/dist/agent-id-migration.d.ts.map +1 -1
- package/dist/agent-id-migration.js +1 -0
- package/dist/agent-id-migration.js.map +1 -1
- package/dist/agent-loader.d.ts +3 -4
- package/dist/agent-loader.d.ts.map +1 -1
- package/dist/agent-loader.js +3 -4
- package/dist/agent-loader.js.map +1 -1
- package/dist/cbor-blob-migration.d.ts +8 -0
- package/dist/cbor-blob-migration.d.ts.map +1 -0
- package/dist/cbor-blob-migration.js +115 -0
- package/dist/cbor-blob-migration.js.map +1 -0
- package/dist/close-session-handler.d.ts +41 -0
- package/dist/close-session-handler.d.ts.map +1 -0
- package/dist/close-session-handler.js +399 -0
- package/dist/close-session-handler.js.map +1 -0
- package/dist/consortium-bootstrap.d.ts +83 -0
- package/dist/consortium-bootstrap.d.ts.map +1 -0
- package/dist/consortium-bootstrap.js +120 -0
- package/dist/consortium-bootstrap.js.map +1 -0
- package/dist/contact-handlers.d.ts +56 -0
- package/dist/contact-handlers.d.ts.map +1 -0
- package/dist/contact-handlers.js +303 -0
- package/dist/contact-handlers.js.map +1 -0
- package/dist/content-park-client.d.ts.map +1 -1
- package/dist/content-park-client.js +7 -7
- package/dist/content-park-client.js.map +1 -1
- package/dist/content-park.d.ts +15 -0
- package/dist/content-park.d.ts.map +1 -0
- package/dist/content-park.js +227 -0
- package/dist/content-park.js.map +1 -0
- package/dist/daemon.d.ts +0 -11
- package/dist/daemon.d.ts.map +1 -1
- package/dist/daemon.js +407 -4552
- package/dist/daemon.js.map +1 -1
- package/dist/db-identity-store.d.ts +31 -35
- package/dist/db-identity-store.d.ts.map +1 -1
- package/dist/db-identity-store.js +62 -66
- package/dist/db-identity-store.js.map +1 -1
- package/dist/directory-bootstrap.d.ts +27 -31
- package/dist/directory-bootstrap.d.ts.map +1 -1
- package/dist/directory-bootstrap.js +18 -21
- package/dist/directory-bootstrap.js.map +1 -1
- package/dist/frame-values.d.ts +3 -0
- package/dist/frame-values.d.ts.map +1 -0
- package/dist/frame-values.js +73 -0
- package/dist/frame-values.js.map +1 -0
- package/dist/identity-migration.d.ts +8 -8
- package/dist/identity-migration.d.ts.map +1 -1
- package/dist/identity-migration.js +30 -31
- package/dist/identity-migration.js.map +1 -1
- package/dist/inbound-seal-request.d.ts +17 -0
- package/dist/inbound-seal-request.d.ts.map +1 -0
- package/dist/inbound-seal-request.js +155 -0
- package/dist/inbound-seal-request.js.map +1 -0
- package/dist/inbound-sessions.d.ts +54 -0
- package/dist/inbound-sessions.d.ts.map +1 -0
- package/dist/inbound-sessions.js +603 -0
- package/dist/inbound-sessions.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -10
- package/dist/index.js.map +1 -1
- package/dist/initiate-session-handler.d.ts +22 -0
- package/dist/initiate-session-handler.d.ts.map +1 -0
- package/dist/initiate-session-handler.js +150 -0
- package/dist/initiate-session-handler.js.map +1 -0
- package/dist/network-directory-node.d.ts +6 -6
- package/dist/network-directory-node.d.ts.map +1 -1
- package/dist/network-directory-node.js +29 -28
- package/dist/network-directory-node.js.map +1 -1
- package/dist/notification-handlers.d.ts +32 -0
- package/dist/notification-handlers.d.ts.map +1 -0
- package/dist/notification-handlers.js +73 -0
- package/dist/notification-handlers.js.map +1 -0
- package/dist/outbound-sessions.d.ts +54 -0
- package/dist/outbound-sessions.d.ts.map +1 -0
- package/dist/outbound-sessions.js +429 -0
- package/dist/outbound-sessions.js.map +1 -0
- package/dist/park-envelope.d.ts.map +1 -1
- package/dist/park-envelope.js +3 -2
- package/dist/park-envelope.js.map +1 -1
- package/dist/register-handler.d.ts +35 -0
- package/dist/register-handler.d.ts.map +1 -0
- package/dist/register-handler.js +179 -0
- package/dist/register-handler.js.map +1 -0
- package/dist/registration-manager.d.ts.map +1 -1
- package/dist/registration-manager.js +3 -6
- package/dist/registration-manager.js.map +1 -1
- package/dist/relay-receipt-store.d.ts.map +1 -1
- package/dist/relay-receipt-store.js +1 -2
- package/dist/relay-receipt-store.js.map +1 -1
- package/dist/retry-queue.d.ts +18 -60
- package/dist/retry-queue.d.ts.map +1 -1
- package/dist/retry-queue.js +46 -97
- package/dist/retry-queue.js.map +1 -1
- package/dist/seal-coordinator.d.ts +47 -0
- package/dist/seal-coordinator.d.ts.map +1 -0
- package/dist/seal-coordinator.js +551 -0
- package/dist/seal-coordinator.js.map +1 -0
- package/dist/seal-flows.d.ts +50 -0
- package/dist/seal-flows.d.ts.map +1 -0
- package/dist/seal-flows.js +454 -0
- package/dist/seal-flows.js.map +1 -0
- package/dist/seal-frontier-verify.d.ts +9 -9
- package/dist/seal-frontier-verify.d.ts.map +1 -1
- package/dist/seal-frontier-verify.js +11 -12
- package/dist/seal-frontier-verify.js.map +1 -1
- package/dist/seal-leaf.d.ts +58 -0
- package/dist/seal-leaf.d.ts.map +1 -0
- package/dist/seal-leaf.js +111 -0
- package/dist/seal-leaf.js.map +1 -0
- package/dist/seal-receipt-upgrade.d.ts +1 -1
- package/dist/seal-receipt-upgrade.js +1 -1
- package/dist/seal-upgrade.d.ts +10 -10
- package/dist/seal-upgrade.d.ts.map +1 -1
- package/dist/seal-upgrade.js +23 -24
- package/dist/seal-upgrade.js.map +1 -1
- package/dist/session-assignment-parser.d.ts +16 -19
- package/dist/session-assignment-parser.d.ts.map +1 -1
- package/dist/session-assignment-parser.js +30 -29
- package/dist/session-assignment-parser.js.map +1 -1
- package/dist/session-ceremony.d.ts +3 -6
- package/dist/session-ceremony.d.ts.map +1 -1
- package/dist/session-ceremony.js +7 -9
- package/dist/session-ceremony.js.map +1 -1
- package/dist/session-content-handlers.d.ts +25 -0
- package/dist/session-content-handlers.d.ts.map +1 -0
- package/dist/session-content-handlers.js +436 -0
- package/dist/session-content-handlers.js.map +1 -0
- package/dist/session-name.d.ts +35 -0
- package/dist/session-name.d.ts.map +1 -0
- package/dist/session-name.js +60 -0
- package/dist/session-name.js.map +1 -0
- package/dist/session-node-manager.d.ts +26 -62
- package/dist/session-node-manager.d.ts.map +1 -1
- package/dist/session-node-manager.js +115 -92
- package/dist/session-node-manager.js.map +1 -1
- package/dist/session-read-handlers.d.ts +38 -0
- package/dist/session-read-handlers.d.ts.map +1 -0
- package/dist/session-read-handlers.js +233 -0
- package/dist/session-read-handlers.js.map +1 -0
- package/dist/session-relay-client.d.ts +8 -8
- package/dist/session-relay-client.d.ts.map +1 -1
- package/dist/session-relay-client.js +44 -46
- package/dist/session-relay-client.js.map +1 -1
- package/dist/session-tree.d.ts +11 -23
- package/dist/session-tree.d.ts.map +1 -1
- package/dist/session-tree.js +14 -26
- package/dist/session-tree.js.map +1 -1
- package/dist/signaling-connect.d.ts +2 -5
- package/dist/signaling-connect.d.ts.map +1 -1
- package/dist/signaling-connect.js +7 -12
- package/dist/signaling-connect.js.map +1 -1
- package/dist/sqlcipher-db.d.ts +18 -19
- package/dist/sqlcipher-db.d.ts.map +1 -1
- package/dist/sqlcipher-db.js +30 -30
- package/dist/sqlcipher-db.js.map +1 -1
- package/dist/telegram-doorbell.d.ts +38 -0
- package/dist/telegram-doorbell.d.ts.map +1 -0
- package/dist/telegram-doorbell.js +139 -0
- package/dist/telegram-doorbell.js.map +1 -0
- package/dist/types.d.ts +86 -79
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +0 -1
- package/dist/types.js.map +1 -1
- package/dist/vocabulary.d.ts +30 -30
- package/dist/vocabulary.d.ts.map +1 -1
- package/dist/vocabulary.js +41 -49
- package/dist/vocabulary.js.map +1 -1
- package/package.json +5 -5
|
@@ -8,59 +8,11 @@
|
|
|
8
8
|
* 2. Standing receiver node: pre-created, open gater, kept alive at all times.
|
|
9
9
|
* Handed to the first inbound session; immediately replaced.
|
|
10
10
|
* 3. 32-node cap: enforced before any new node is created.
|
|
11
|
-
* 4. Session status in
|
|
11
|
+
* 4. Session status in the DB: active → sealed (on close) or interrupted
|
|
12
12
|
* (on graceful shutdown or SIGKILL-restart detection).
|
|
13
13
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* initialize():
|
|
17
|
-
* 1. Open SQLite (node:sqlite), create sessions table if not exists
|
|
18
|
-
* 2. Detect interrupted sessions: SELECT * FROM sessions WHERE status='active'
|
|
19
|
-
* → batch-update to 'interrupted', log session.interrupted.detected for each
|
|
20
|
-
* (source: 'daemon_restart') — runs before IPC socket opens so no race
|
|
21
|
-
* 3. Create standing receiver node (fresh libp2p, open gater, sentinel agentName)
|
|
22
|
-
* 4. Start standing receiver, set standingReceiverReady=true
|
|
23
|
-
* 5. Log session.node.created for the standing receiver
|
|
24
|
-
*
|
|
25
|
-
* createSessionNode(sessionId, agentName, counterpartyPubkey, counterpartyPeerId, correlationId):
|
|
26
|
-
* Pseudocode:
|
|
27
|
-
* 1. Check activeNodes.size >= MAX_SESSION_NODES → log cap.reached, return error
|
|
28
|
-
* 2. Create SessionConnectionGater(counterpartyPeerId) — restricted from birth
|
|
29
|
-
* 3. nodeFactory.createNode({gater}) → fresh libp2p node
|
|
30
|
-
* 4. node.start() — bind TCP ephemeral port
|
|
31
|
-
* 5. Insert SQLite row status='active'
|
|
32
|
-
* 6. Log session.node.created
|
|
33
|
-
* 7. Add to activeNodes map
|
|
34
|
-
* 8. Return {ok:true, peerId, addrs}
|
|
35
|
-
* On libp2p error: extract error.message (never ${error}), log create.failed, return error
|
|
36
|
-
*
|
|
37
|
-
* acceptSession(sessionId, agentName, counterpartyPubkey, initiatorPeerId, correlationId):
|
|
38
|
-
* Pseudocode:
|
|
39
|
-
* 1. If !standingReceiverReady → return standing_receiver_unavailable
|
|
40
|
-
* 2. Take standing receiver from slot (clear slot atomically)
|
|
41
|
-
* 3. gater.setAllowedPeer(initiatorPeerId) ← BEFORE returning multiaddr (AC-015)
|
|
42
|
-
* 4. Insert SQLite row status='active'
|
|
43
|
-
* 5. Log session.node.created
|
|
44
|
-
* 6. Add to activeNodes map
|
|
45
|
-
* 7. Trigger async replacement of standing receiver (do NOT await)
|
|
46
|
-
* 8. Return {ok:true, peerId, addrs}
|
|
47
|
-
*
|
|
48
|
-
* destroySessionNode(sessionId, reason):
|
|
49
|
-
* Pseudocode:
|
|
50
|
-
* 1. Find node in activeNodes
|
|
51
|
-
* 2. stop node
|
|
52
|
-
* 3. Update SQLite status to sealed/interrupted/error
|
|
53
|
-
* 4. Remove from activeNodes
|
|
54
|
-
* 5. Log session.node.destroyed
|
|
55
|
-
*
|
|
56
|
-
* gracefulShutdown():
|
|
57
|
-
* Pseudocode:
|
|
58
|
-
* 1. Get all activeNodes
|
|
59
|
-
* 2. For each: update SQLite 'interrupted', log destroyed(reason:'interrupted')
|
|
60
|
-
* 3. Stop all nodes
|
|
61
|
-
* 4. Stop standing receiver
|
|
62
|
-
*
|
|
63
|
-
* getStatus(): { standingReceiverReady: boolean }
|
|
14
|
+
* Interrupted-session detection runs BEFORE the IPC socket opens, so a client cannot observe a
|
|
15
|
+
* stale 'active' row from a previous process.
|
|
64
16
|
*/
|
|
65
17
|
import { type DaemonDatabase } from "./sqlcipher-db.js";
|
|
66
18
|
import type { Stream } from "@libp2p/interface";
|
|
@@ -234,7 +186,7 @@ export declare class SessionNodeManager {
|
|
|
234
186
|
/**
|
|
235
187
|
* DOD-LOG-1 / PERSIST-002 (AC-010): append one readable message to the durable transcript, keyed
|
|
236
188
|
* by the canonical leaf `sequence` so it joins to the committed hash chain. The blob is stored as
|
|
237
|
-
* plaintext bytes
|
|
189
|
+
* plaintext bytes: the whole DB is SQLCipher-encrypted at rest, so there is no per-column cipher.
|
|
238
190
|
* Idempotent on replay (INSERT OR IGNORE). Never throws into the caller's content path: a
|
|
239
191
|
* transcript-write failure is logged, not fatal.
|
|
240
192
|
*/
|
|
@@ -654,6 +606,20 @@ export declare class SessionNodeManager {
|
|
|
654
606
|
* Used by cello_close_session to inspect session state.
|
|
655
607
|
*/
|
|
656
608
|
getSessionRecord(agentName: string, sessionId: string): SessionRecord | null;
|
|
609
|
+
/**
|
|
610
|
+
* DOD-SESSION-NAME-1: set (string) or clear (null) THIS agent's name for a session.
|
|
611
|
+
*
|
|
612
|
+
* Returns false when the (agent_id, session_id) row does not exist — i.e. the session is not this
|
|
613
|
+
* agent's — so the caller refuses with session_not_found rather than reporting a silent success on
|
|
614
|
+
* a write that landed nowhere. Same contract as setContactMoniker.
|
|
615
|
+
*
|
|
616
|
+
* Ownership is the ONLY scope: the composite key IS the ownership check, and status is deliberately
|
|
617
|
+
* not consulted. A sealed session can be named — naming one long after the fact is the point — and
|
|
618
|
+
* a name is a local column, so writing it cannot touch the seal, a Merkle leaf, or the wire.
|
|
619
|
+
*
|
|
620
|
+
* The caller validates (validateSessionName) before calling; this stores what it is given.
|
|
621
|
+
*/
|
|
622
|
+
setSessionName(agentName: string, sessionId: string, sessionName: string | null): boolean;
|
|
657
623
|
/**
|
|
658
624
|
* MSG-2 startup-flush: the persisted relay endpoint for a session, or null if none was
|
|
659
625
|
* recorded. Used by the crash-backstop flush, which runs at startup BEFORE the in-memory
|
|
@@ -708,10 +674,9 @@ export declare class SessionNodeManager {
|
|
|
708
674
|
error: string;
|
|
709
675
|
}>;
|
|
710
676
|
/**
|
|
711
|
-
*
|
|
712
|
-
* On a dead/missing stream this returns a NAMED, diagnosable failure — never a
|
|
713
|
-
*
|
|
714
|
-
* content catch in the retired in-process client send path).
|
|
677
|
+
* Send content over the session node's direct P2P content stream.
|
|
678
|
+
* On a dead/missing stream this returns a NAMED, diagnosable failure — never a silent success
|
|
679
|
+
* (which desyncs the two sides). Do not swallow a send error here.
|
|
715
680
|
*
|
|
716
681
|
* SCOPE / findings #3 + #4 — what this send path does and does NOT do today:
|
|
717
682
|
* - #4: it delivers the content over the direct /cello/content/1.0.0 P2P
|
|
@@ -862,12 +827,11 @@ export declare class SessionNodeManager {
|
|
|
862
827
|
/**
|
|
863
828
|
* SEC-1 — THE ONLY WAY PARKED CONTENT ENTERS THE TRANSCRIPT.
|
|
864
829
|
*
|
|
865
|
-
* Authentication and ingest are
|
|
866
|
-
*
|
|
867
|
-
*
|
|
868
|
-
*
|
|
869
|
-
*
|
|
870
|
-
* without passing the signature gate, because there is no other entry point.
|
|
830
|
+
* Authentication and ingest are FUSED here on purpose, and must stay fused. A caller cannot ingest
|
|
831
|
+
* parked content without passing the signature gate, because this is the only entry point. Exposing
|
|
832
|
+
* a separate `decode → ingest` path — with the signature check as its own optional step — is a
|
|
833
|
+
* downgrade attack: an attacker omits the thing that triggers the check, and the check never runs.
|
|
834
|
+
* A gate the caller can skip by leaving a field out is not a gate.
|
|
871
835
|
*
|
|
872
836
|
* FAILS CLOSED. No signature / bad signature / signer is not this session's counterparty / no
|
|
873
837
|
* session at all → REFUSED, nothing is appended, nothing is written, and the caller MUST NOT
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-node-manager.d.ts","sourceRoot":"","sources":["../src/session-node-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AAMH,OAAO,EACL,KAAK,cAAc,EAIpB,MAAM,mBAAmB,CAAC;AAS3B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAExD,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAiD,KAAK,SAAS,EAAE,KAAK,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAChI,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAG1D,OAAO,EAAiE,KAAK,YAAY,EAAwB,MAAM,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,IAAI,CAAC;IA0DtE;;4FAEwF;IACxF,qBAAqB,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM;IAQnE;;;;6FAIyF;IACnF,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAkC7E"}
|
|
@@ -8,73 +8,26 @@
|
|
|
8
8
|
* 2. Standing receiver node: pre-created, open gater, kept alive at all times.
|
|
9
9
|
* Handed to the first inbound session; immediately replaced.
|
|
10
10
|
* 3. 32-node cap: enforced before any new node is created.
|
|
11
|
-
* 4. Session status in
|
|
11
|
+
* 4. Session status in the DB: active → sealed (on close) or interrupted
|
|
12
12
|
* (on graceful shutdown or SIGKILL-restart detection).
|
|
13
13
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* initialize():
|
|
17
|
-
* 1. Open SQLite (node:sqlite), create sessions table if not exists
|
|
18
|
-
* 2. Detect interrupted sessions: SELECT * FROM sessions WHERE status='active'
|
|
19
|
-
* → batch-update to 'interrupted', log session.interrupted.detected for each
|
|
20
|
-
* (source: 'daemon_restart') — runs before IPC socket opens so no race
|
|
21
|
-
* 3. Create standing receiver node (fresh libp2p, open gater, sentinel agentName)
|
|
22
|
-
* 4. Start standing receiver, set standingReceiverReady=true
|
|
23
|
-
* 5. Log session.node.created for the standing receiver
|
|
24
|
-
*
|
|
25
|
-
* createSessionNode(sessionId, agentName, counterpartyPubkey, counterpartyPeerId, correlationId):
|
|
26
|
-
* Pseudocode:
|
|
27
|
-
* 1. Check activeNodes.size >= MAX_SESSION_NODES → log cap.reached, return error
|
|
28
|
-
* 2. Create SessionConnectionGater(counterpartyPeerId) — restricted from birth
|
|
29
|
-
* 3. nodeFactory.createNode({gater}) → fresh libp2p node
|
|
30
|
-
* 4. node.start() — bind TCP ephemeral port
|
|
31
|
-
* 5. Insert SQLite row status='active'
|
|
32
|
-
* 6. Log session.node.created
|
|
33
|
-
* 7. Add to activeNodes map
|
|
34
|
-
* 8. Return {ok:true, peerId, addrs}
|
|
35
|
-
* On libp2p error: extract error.message (never ${error}), log create.failed, return error
|
|
36
|
-
*
|
|
37
|
-
* acceptSession(sessionId, agentName, counterpartyPubkey, initiatorPeerId, correlationId):
|
|
38
|
-
* Pseudocode:
|
|
39
|
-
* 1. If !standingReceiverReady → return standing_receiver_unavailable
|
|
40
|
-
* 2. Take standing receiver from slot (clear slot atomically)
|
|
41
|
-
* 3. gater.setAllowedPeer(initiatorPeerId) ← BEFORE returning multiaddr (AC-015)
|
|
42
|
-
* 4. Insert SQLite row status='active'
|
|
43
|
-
* 5. Log session.node.created
|
|
44
|
-
* 6. Add to activeNodes map
|
|
45
|
-
* 7. Trigger async replacement of standing receiver (do NOT await)
|
|
46
|
-
* 8. Return {ok:true, peerId, addrs}
|
|
47
|
-
*
|
|
48
|
-
* destroySessionNode(sessionId, reason):
|
|
49
|
-
* Pseudocode:
|
|
50
|
-
* 1. Find node in activeNodes
|
|
51
|
-
* 2. stop node
|
|
52
|
-
* 3. Update SQLite status to sealed/interrupted/error
|
|
53
|
-
* 4. Remove from activeNodes
|
|
54
|
-
* 5. Log session.node.destroyed
|
|
55
|
-
*
|
|
56
|
-
* gracefulShutdown():
|
|
57
|
-
* Pseudocode:
|
|
58
|
-
* 1. Get all activeNodes
|
|
59
|
-
* 2. For each: update SQLite 'interrupted', log destroyed(reason:'interrupted')
|
|
60
|
-
* 3. Stop all nodes
|
|
61
|
-
* 4. Stop standing receiver
|
|
62
|
-
*
|
|
63
|
-
* getStatus(): { standingReceiverReady: boolean }
|
|
14
|
+
* Interrupted-session detection runs BEFORE the IPC socket opens, so a client cannot observe a
|
|
15
|
+
* stale 'active' row from a previous process.
|
|
64
16
|
*/
|
|
65
|
-
//
|
|
66
|
-
//
|
|
67
|
-
//
|
|
68
|
-
// supersedes the old per-column transcript cipher (AC-010).
|
|
17
|
+
// The daemon DB is SQLCipher (whole-file AES-256 at rest), never `node:sqlite`. `DaemonDatabase` is
|
|
18
|
+
// the thin varargs surface; `openEncryptedDatabase` opens with a PRAGMA key and `resolveDbKey`
|
|
19
|
+
// manages the single plaintext key file.
|
|
69
20
|
import { openEncryptedDatabase, resolveDbKey, dbKeyPathFor, } from "./sqlcipher-db.js";
|
|
70
21
|
import { migrateToEncryptedIfNeeded } from "./identity-migration.js";
|
|
71
22
|
import { ensureIdentitySchema } from "./db-identity-store.js";
|
|
72
23
|
import { migrateSessionTablesToAgentId } from "./agent-id-migration.js";
|
|
73
24
|
import { TIER, normalizeTier, isKnownTierValue, tierBoundsFor, DEFAULT_TIER_BOUNDS, migrateContactsAddTierMetadata } from "./contacts-tier-migration.js";
|
|
25
|
+
import { migrateCborBlobsToCanonical } from "./cbor-blob-migration.js";
|
|
74
26
|
import { boundSettingKey, settableTierName, isValidSettingKey, awayTierSettingKey, AWAY_DEFAULT_KEY } from "./agent-settings-keys.js";
|
|
75
27
|
import { randomUUID, createHash } from "node:crypto";
|
|
76
28
|
import * as lp from "it-length-prefixed";
|
|
77
|
-
import { decode
|
|
29
|
+
import { decode } from "cbor-x";
|
|
30
|
+
import { encodeCbor } from "@cello-protocol/protocol-types";
|
|
78
31
|
import { MAX_SESSION_NODES, STANDING_RECEIVER_AGENT_NAME } from "./types.js";
|
|
79
32
|
import { SessionConnectionGater } from "./session-connection-gater.js";
|
|
80
33
|
import { SessionTree } from "./session-tree.js";
|
|
@@ -86,13 +39,11 @@ import { AgentRelayClient, LEAF_KIND_CTRL } from "./session-relay-client.js";
|
|
|
86
39
|
import { RelayReceiptStore } from "./relay-receipt-store.js";
|
|
87
40
|
import { SessionSealLeafStore } from "./session-seal-leaf-store.js";
|
|
88
41
|
import { PassthroughGatewayClient, GATEWAY_UNAVAILABLE, GOVERNANCE_TIMEOUT, } from "@cello-protocol/gateway";
|
|
89
|
-
const CBOR_ENC = new Encoder({ tagUint8Array: false });
|
|
90
42
|
/** SEC-1 / review M4: cap on the refused-parked-entry memo (remote-fed → must be bounded). */
|
|
91
43
|
const MAX_REFUSED_PARKED_ENTRIES = 512;
|
|
92
|
-
//
|
|
93
|
-
//
|
|
94
|
-
//
|
|
95
|
-
// the grid is the single source (DOD-TIER-2 AC4), so these can never drift from it.
|
|
44
|
+
// Persistence bounds are TIER-GRADUATED via DEFAULT_TIER_BOUNDS (contacts-tier-migration). The two
|
|
45
|
+
// consts below DERIVE from the grid's UNKNOWN row rather than restating it — the grid is the single
|
|
46
|
+
// source (DOD-TIER-2 AC4), so these can never drift from it.
|
|
96
47
|
/** Anti-drip-feed: cumulative RECEIVED bytes per session at the UNKNOWN tier (= the grid's UNKNOWN
|
|
97
48
|
* byte cap). Higher tiers get more (DEFAULT_TIER_BOUNDS); no tier is unbounded (INV-TIER-BOUND). */
|
|
98
49
|
export const ABUSE_MAX_SESSION_RECEIVED_BYTES = DEFAULT_TIER_BOUNDS[TIER.UNKNOWN].maxBytesPerSession; // 25 MB
|
|
@@ -212,12 +163,11 @@ export class SessionNodeManager {
|
|
|
212
163
|
// daemon.ts (depends on the notification dispatcher). Content-free by signature — carries only
|
|
213
164
|
// agent / session / senderPubkey, NEVER the plaintext (INV-CONTENTFREE).
|
|
214
165
|
#onContentArrived = null;
|
|
215
|
-
//
|
|
216
|
-
//
|
|
217
|
-
//
|
|
218
|
-
// delivery
|
|
219
|
-
//
|
|
220
|
-
// backstop. Keyed sessionId → contentHashHex → entry.
|
|
166
|
+
// A send is NOT fire-and-forget. After a content_frame is delivered over the direct session
|
|
167
|
+
// channel, the sender arms a TTF timer and waits for an unsigned, transport-authenticated
|
|
168
|
+
// `persisted` delivery ACK on the same /cello/content/1.0.0 protocol. A persisted ACK cancels the
|
|
169
|
+
// timer (content.delivery.acked); TTF expiry hands the content to the park backstop.
|
|
170
|
+
// Keyed sessionId → contentHashHex → entry.
|
|
221
171
|
#awaitingAck = new Map();
|
|
222
172
|
// TTF (time-to-flush) for an un-acked content entry. Injectable so tests can drive
|
|
223
173
|
// expiry deterministically; production default sits in the Part-4 proposed 10–30s band.
|
|
@@ -384,6 +334,14 @@ export class SessionNodeManager {
|
|
|
384
334
|
// it to VERIFY the bilateral seal signature locally (the seal is signed by the initiator's
|
|
385
335
|
// primary), not just accept it. NULL when this party initiated (it uses its own primary).
|
|
386
336
|
"ALTER TABLE sessions ADD COLUMN counterparty_primary_pubkey TEXT",
|
|
337
|
+
// DOD-SESSION-NAME-1: the operator's own human-readable label for this session. LOCAL AND
|
|
338
|
+
// COSMETIC — it is never sent to the relay or directory, never in a wire frame, never in the
|
|
339
|
+
// transcript, never in the seal or a Merkle leaf, and the counterparty never sees it. It
|
|
340
|
+
// cannot influence protocol behaviour.
|
|
341
|
+
// NULL MEANS SOMETHING: a session closed through an agent usually carries a name, so an
|
|
342
|
+
// unnamed closed session is a hint it did not close cleanly. Never auto-generate a default —
|
|
343
|
+
// a fabricated name destroys that signal.
|
|
344
|
+
"ALTER TABLE sessions ADD COLUMN session_name TEXT",
|
|
387
345
|
]) {
|
|
388
346
|
try {
|
|
389
347
|
this.#db.exec(ddl);
|
|
@@ -496,6 +454,14 @@ export class SessionNodeManager {
|
|
|
496
454
|
// agent-id re-key above (it never needs to appear in that migration's pinned DDL) and BEFORE any
|
|
497
455
|
// read below. Idempotent, no column DEFAULT, grandfathers existing contacts to WHITELISTED once.
|
|
498
456
|
migrateContactsAddTierMetadata(this.#db, this.#logger);
|
|
457
|
+
// §1.1: normalize frost_commitments / frost_verifying_shares to ONE CBOR encoding. Registration
|
|
458
|
+
// wrote them with the shared encoder; the refresh path wrote them with cbor-x's bare `encode`,
|
|
459
|
+
// so an agent's share blobs changed format the first time it ran `cello_refresh_shares` and both
|
|
460
|
+
// formats are on disk. Both producers now use encodeCbor; this rewrites what is already stored.
|
|
461
|
+
// Idempotent (a canonical blob re-encodes to itself and is skipped) and per-row fail-safe (an
|
|
462
|
+
// undecodable share is LEFT ALONE, never dropped — losing key material is worse than an old
|
|
463
|
+
// encoding cbor-x still reads).
|
|
464
|
+
migrateCborBlobsToCanonical(this.#db, this.#logger);
|
|
499
465
|
// M8C-TGDOOR-1: daemon-wide Telegram settings (bot token + allowlisted operator chat). A
|
|
500
466
|
// NEW dedicated table — NOT folded into the parked M9-CFG-001 config store, because a bot
|
|
501
467
|
// token has no sensible default (a required credential, unlike AWAY/TTL/CONTACT's real
|
|
@@ -625,7 +591,7 @@ export class SessionNodeManager {
|
|
|
625
591
|
/**
|
|
626
592
|
* DOD-LOG-1 / PERSIST-002 (AC-010): append one readable message to the durable transcript, keyed
|
|
627
593
|
* by the canonical leaf `sequence` so it joins to the committed hash chain. The blob is stored as
|
|
628
|
-
* plaintext bytes
|
|
594
|
+
* plaintext bytes: the whole DB is SQLCipher-encrypted at rest, so there is no per-column cipher.
|
|
629
595
|
* Idempotent on replay (INSERT OR IGNORE). Never throws into the caller's content path: a
|
|
630
596
|
* transcript-write failure is logged, not fatal.
|
|
631
597
|
*/
|
|
@@ -763,7 +729,11 @@ export class SessionNodeManager {
|
|
|
763
729
|
AND t.session_id = ?
|
|
764
730
|
AND ${SessionNodeManager.#UNREAD_RECEIVED_WHERE}`)
|
|
765
731
|
.get(this.#requireAgentId(agentName), sessionId);
|
|
766
|
-
|
|
732
|
+
// Absent row → "I cannot count", which is NOT "you are caught up". Answer the same way the
|
|
733
|
+
// #db guard above does. Unreachable today (SELECT COUNT(*) with no GROUP BY always yields a
|
|
734
|
+
// row), but a fail-OPEN default inside a fail-CLOSED gate is a defect that only needs the query
|
|
735
|
+
// to change once. The two branches must never disagree about what "unknown" means.
|
|
736
|
+
return row ? row.unread_count : 1;
|
|
767
737
|
}
|
|
768
738
|
/** M8C-CONTACT-1: is this pubkey a known contact of this agent? */
|
|
769
739
|
isContact(agentName, pubkey) {
|
|
@@ -2330,6 +2300,27 @@ export class SessionNodeManager {
|
|
|
2330
2300
|
// agent_id scoped this lookup (~50 daemon call sites read `record.agent_name`).
|
|
2331
2301
|
return row ? { ...row, agent_name: agentName } : null;
|
|
2332
2302
|
}
|
|
2303
|
+
/**
|
|
2304
|
+
* DOD-SESSION-NAME-1: set (string) or clear (null) THIS agent's name for a session.
|
|
2305
|
+
*
|
|
2306
|
+
* Returns false when the (agent_id, session_id) row does not exist — i.e. the session is not this
|
|
2307
|
+
* agent's — so the caller refuses with session_not_found rather than reporting a silent success on
|
|
2308
|
+
* a write that landed nowhere. Same contract as setContactMoniker.
|
|
2309
|
+
*
|
|
2310
|
+
* Ownership is the ONLY scope: the composite key IS the ownership check, and status is deliberately
|
|
2311
|
+
* not consulted. A sealed session can be named — naming one long after the fact is the point — and
|
|
2312
|
+
* a name is a local column, so writing it cannot touch the seal, a Merkle leaf, or the wire.
|
|
2313
|
+
*
|
|
2314
|
+
* The caller validates (validateSessionName) before calling; this stores what it is given.
|
|
2315
|
+
*/
|
|
2316
|
+
setSessionName(agentName, sessionId, sessionName) {
|
|
2317
|
+
if (!this.#db)
|
|
2318
|
+
throw new Error(`setSessionName('${agentName}'): database not initialized`);
|
|
2319
|
+
const res = this.#db
|
|
2320
|
+
.prepare("UPDATE sessions SET session_name = ? WHERE agent_id = ? AND session_id = ?")
|
|
2321
|
+
.run(sessionName, this.#requireAgentId(agentName), sessionId);
|
|
2322
|
+
return res.changes > 0;
|
|
2323
|
+
}
|
|
2333
2324
|
/**
|
|
2334
2325
|
* MSG-2 startup-flush: the persisted relay endpoint for a session, or null if none was
|
|
2335
2326
|
* recorded. Used by the crash-backstop flush, which runs at startup BEFORE the in-memory
|
|
@@ -2489,10 +2480,9 @@ export class SessionNodeManager {
|
|
|
2489
2480
|
return { ok: false, reason: "counterparty_dial_failed", error: lastError };
|
|
2490
2481
|
}
|
|
2491
2482
|
/**
|
|
2492
|
-
*
|
|
2493
|
-
* On a dead/missing stream this returns a NAMED, diagnosable failure — never a
|
|
2494
|
-
*
|
|
2495
|
-
* content catch in the retired in-process client send path).
|
|
2483
|
+
* Send content over the session node's direct P2P content stream.
|
|
2484
|
+
* On a dead/missing stream this returns a NAMED, diagnosable failure — never a silent success
|
|
2485
|
+
* (which desyncs the two sides). Do not swallow a send error here.
|
|
2496
2486
|
*
|
|
2497
2487
|
* SCOPE / findings #3 + #4 — what this send path does and does NOT do today:
|
|
2498
2488
|
* - #4: it delivers the content over the direct /cello/content/1.0.0 P2P
|
|
@@ -2517,9 +2507,11 @@ export class SessionNodeManager {
|
|
|
2517
2507
|
// canonical sequence from the hash whether or not the counterparty is reachable for direct
|
|
2518
2508
|
// content. So an OFFLINE recipient still gets a sequence, and the parked content is later
|
|
2519
2509
|
// recovered AT that sequence (DOD-MSG-4 recovery-not-desync). The relay only ever sees the
|
|
2520
|
-
// hash (INV-3). Best-effort: a relay miss degrades to local-only sequencing.
|
|
2521
|
-
//
|
|
2522
|
-
//
|
|
2510
|
+
// hash (INV-3). Best-effort: a relay miss degrades to local-only sequencing.
|
|
2511
|
+
//
|
|
2512
|
+
// This MUST run BEFORE the direct send, not after it: an offline recipient never completes a
|
|
2513
|
+
// direct send, and sequencing after it would leave their content with no sequence at all.
|
|
2514
|
+
//
|
|
2523
2515
|
// DOD-MSG-4 (self-ordering content frame): the relay's committed ordering record for this leaf,
|
|
2524
2516
|
// captured from the hash submit so it can be stamped into the content frame (and the parked
|
|
2525
2517
|
// entry). Undefined if the relay is unreachable / an old relay — the receiver then falls back to
|
|
@@ -2569,7 +2561,7 @@ export class SessionNodeManager {
|
|
|
2569
2561
|
// backstop. The correlationId rides in the frame so the receiver's
|
|
2570
2562
|
// session.content.received shares ONE flow id with the sender.
|
|
2571
2563
|
this.#trackAwaitingAck(agentName, sessionId, content, contentHash, correlationId, orderingS1, orderingS2);
|
|
2572
|
-
const frame =
|
|
2564
|
+
const frame = encodeCbor({
|
|
2573
2565
|
type: "content_frame",
|
|
2574
2566
|
session_id: sessionId,
|
|
2575
2567
|
content_hash: contentHash,
|
|
@@ -3010,14 +3002,15 @@ export class SessionNodeManager {
|
|
|
3010
3002
|
const deliverContent = inboundVerdict.disposition === "redact" && inboundVerdict.content !== undefined
|
|
3011
3003
|
? inboundVerdict.content
|
|
3012
3004
|
: content;
|
|
3013
|
-
//
|
|
3014
|
-
//
|
|
3015
|
-
//
|
|
3016
|
-
//
|
|
3017
|
-
//
|
|
3018
|
-
//
|
|
3019
|
-
//
|
|
3020
|
-
//
|
|
3005
|
+
// screenInbound above is the ONLY suspension point in this method, and it splits the dedup check
|
|
3006
|
+
// (indexOfHash, above) from the leaf append (below). Across that await, two concurrent ingests of
|
|
3007
|
+
// the SAME content hash — e.g. a direct retry and a park-recovery racing on reconnect — can BOTH
|
|
3008
|
+
// pass the first dedup check before either appends, producing two leaves for one hash
|
|
3009
|
+
// (DOD-MSG-5 break → leafIndex≠canonicalSeq → root divergence). So re-check dedup on resume.
|
|
3010
|
+
// Everything from here to the append is synchronous (atomic under Node's single thread): the
|
|
3011
|
+
// first to resume appends, and the second sees its leaf and dedups.
|
|
3012
|
+
//
|
|
3013
|
+
// Adding any further await between here and the append reopens the window.
|
|
3021
3014
|
const dedupAfterScreen = this.getSessionTree(agentName, sessionId).indexOfHash(contentHashHex);
|
|
3022
3015
|
if (dedupAfterScreen >= 0) {
|
|
3023
3016
|
this.#logger.info("session.content.deduplicated", {
|
|
@@ -3115,6 +3108,37 @@ export class SessionNodeManager {
|
|
|
3115
3108
|
const leafIndex = terminalBlock
|
|
3116
3109
|
? this.appendSessionLeaf(agentName, sessionId, "msg", contentHashHex, correlationId).leafIndex
|
|
3117
3110
|
: this.#appendVerifiedContent(agentName, sessionId, deliverContent, contentHashHex, senderPubkey, correlationId).leafIndex;
|
|
3111
|
+
// NO relay witness for this hash. We appended it anyway — refusing would make the relay a hard
|
|
3112
|
+
// precondition for reading mail, so a relay outage would render the inbox unreadable, and the
|
|
3113
|
+
// direct path and park backstop exist precisely to survive that. But this append is a WEAKER
|
|
3114
|
+
// guarantee and must not masquerade as the stronger one: with a witness, the received content is
|
|
3115
|
+
// checked against a hash the sender committed to a third party; without one, the only available
|
|
3116
|
+
// hash rode in the same frame as the content, so the check is the sender's claim against the
|
|
3117
|
+
// sender's own claim. Say so. A sender who simply never submits to the relay is otherwise
|
|
3118
|
+
// indistinguishable from one the relay merely has not witnessed YET.
|
|
3119
|
+
// The relay witness is an INDEPENDENT attestation: a (content_hash → sequence) binding derived
|
|
3120
|
+
// from the sender's own signed leaf. Holding one, we check received content against a hash the
|
|
3121
|
+
// sender committed to a THIRD PARTY. Holding none, the only hash available rode in the same frame
|
|
3122
|
+
// as the content — the sender's claim checked against the sender's claim.
|
|
3123
|
+
//
|
|
3124
|
+
// Unwitnessed content is still ingested. Refusing it would make the relay a precondition for
|
|
3125
|
+
// READING mail, so a relay outage would render the inbox unreadable — the redundancy the direct
|
|
3126
|
+
// path and the park backstop exist to provide.
|
|
3127
|
+
//
|
|
3128
|
+
// Warn ONLY when a witness was EXPECTED. A session with no relay attached has no witness BY
|
|
3129
|
+
// DESIGN, and warning on every message there would bury the one case that means something —
|
|
3130
|
+
// a relay IS attached, so the sender's leaf should have been submitted and witnessed, and it
|
|
3131
|
+
// was not. A signal that fires on the normal case is not a signal.
|
|
3132
|
+
if (canonicalSeq === undefined && this.#activeNodes.get(key)?.relayClient) {
|
|
3133
|
+
this.#logger.warn("session.content.unwitnessed", {
|
|
3134
|
+
agentName,
|
|
3135
|
+
sessionId,
|
|
3136
|
+
leafIndex,
|
|
3137
|
+
contentHash: contentHashHex,
|
|
3138
|
+
correlationId,
|
|
3139
|
+
guidance: "a relay is attached to this session but no witness bound this content hash — it was ingested with no independent commitment from the sender",
|
|
3140
|
+
});
|
|
3141
|
+
}
|
|
3118
3142
|
// A just-appended leaf may unblock held out-of-order arrivals whose turn is now next.
|
|
3119
3143
|
// appendedCount = this leaf + any held leaves released by it, so a caller (recover) can tally the
|
|
3120
3144
|
// leaves ACTUALLY written, not just the directly-ingested one (review #3).
|
|
@@ -3380,7 +3404,7 @@ export class SessionNodeManager {
|
|
|
3380
3404
|
return;
|
|
3381
3405
|
try {
|
|
3382
3406
|
const stream = await entry.node.newStream(entry.counterpartySessionPeerId, CELLO_CONTENT_PROTOCOL_ID);
|
|
3383
|
-
const frame =
|
|
3407
|
+
const frame = encodeCbor({
|
|
3384
3408
|
type: "content_delivery_ack",
|
|
3385
3409
|
session_id: sessionId,
|
|
3386
3410
|
content_hash: contentHash,
|
|
@@ -3486,12 +3510,11 @@ export class SessionNodeManager {
|
|
|
3486
3510
|
/**
|
|
3487
3511
|
* SEC-1 — THE ONLY WAY PARKED CONTENT ENTERS THE TRANSCRIPT.
|
|
3488
3512
|
*
|
|
3489
|
-
* Authentication and ingest are
|
|
3490
|
-
*
|
|
3491
|
-
*
|
|
3492
|
-
*
|
|
3493
|
-
*
|
|
3494
|
-
* without passing the signature gate, because there is no other entry point.
|
|
3513
|
+
* Authentication and ingest are FUSED here on purpose, and must stay fused. A caller cannot ingest
|
|
3514
|
+
* parked content without passing the signature gate, because this is the only entry point. Exposing
|
|
3515
|
+
* a separate `decode → ingest` path — with the signature check as its own optional step — is a
|
|
3516
|
+
* downgrade attack: an attacker omits the thing that triggers the check, and the check never runs.
|
|
3517
|
+
* A gate the caller can skip by leaving a field out is not a gate.
|
|
3495
3518
|
*
|
|
3496
3519
|
* FAILS CLOSED. No signature / bad signature / signer is not this session's counterparty / no
|
|
3497
3520
|
* session at all → REFUSED, nothing is appended, nothing is written, and the caller MUST NOT
|