@cello-protocol/daemon 0.0.211 → 0.0.213
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-admin-handlers.d.ts.map +1 -1
- package/dist/agent-admin-handlers.js +3 -0
- package/dist/agent-admin-handlers.js.map +1 -1
- package/dist/agent-handlers.d.ts.map +1 -1
- package/dist/agent-handlers.js +44 -0
- package/dist/agent-handlers.js.map +1 -1
- package/dist/agent-id-migration.d.ts.map +1 -1
- package/dist/agent-id-migration.js +11 -2
- package/dist/agent-id-migration.js.map +1 -1
- package/dist/assignment-verify.d.ts.map +1 -1
- package/dist/assignment-verify.js +2 -2
- package/dist/assignment-verify.js.map +1 -1
- package/dist/attendance-wiring.d.ts +2 -21
- package/dist/attendance-wiring.d.ts.map +1 -1
- package/dist/attendance-wiring.js +57 -251
- package/dist/attendance-wiring.js.map +1 -1
- package/dist/away-detection.d.ts +16 -21
- package/dist/away-detection.d.ts.map +1 -1
- package/dist/away-detection.js +34 -23
- package/dist/away-detection.js.map +1 -1
- package/dist/boot-agents.d.ts.map +1 -1
- package/dist/close-session-handler.d.ts.map +1 -1
- package/dist/close-session-handler.js +79 -6
- package/dist/close-session-handler.js.map +1 -1
- package/dist/co-attendance.d.ts +1 -1
- package/dist/co-attendance.js +1 -1
- package/dist/consortium-fingerprint.d.ts +115 -0
- package/dist/consortium-fingerprint.d.ts.map +1 -0
- package/dist/consortium-fingerprint.js +175 -0
- package/dist/consortium-fingerprint.js.map +1 -0
- package/dist/content-park.d.ts.map +1 -1
- package/dist/content-park.js +80 -0
- package/dist/content-park.js.map +1 -1
- package/dist/daemon-handle.d.ts +1 -1
- package/dist/daemon-handle.d.ts.map +1 -1
- package/dist/daemon-status-report.d.ts +10 -2
- package/dist/daemon-status-report.d.ts.map +1 -1
- package/dist/daemon-status-report.js +6 -3
- package/dist/daemon-status-report.js.map +1 -1
- package/dist/daemon.d.ts.map +1 -1
- package/dist/daemon.js +57 -27
- package/dist/daemon.js.map +1 -1
- package/dist/directory-bootstrap.d.ts +3 -1
- package/dist/directory-bootstrap.d.ts.map +1 -1
- package/dist/directory-bootstrap.js +3 -1
- package/dist/directory-bootstrap.js.map +1 -1
- package/dist/directory-connect.d.ts.map +1 -1
- package/dist/directory-connect.js +10 -2
- package/dist/directory-connect.js.map +1 -1
- package/dist/disconnect-cleanup.d.ts +7 -0
- package/dist/disconnect-cleanup.d.ts.map +1 -1
- package/dist/disconnect-cleanup.js +16 -1
- package/dist/disconnect-cleanup.js.map +1 -1
- package/dist/document-flag.d.ts +58 -0
- package/dist/document-flag.d.ts.map +1 -0
- package/dist/document-flag.js +70 -0
- package/dist/document-flag.js.map +1 -0
- package/dist/document-gate-wiring.d.ts +61 -0
- package/dist/document-gate-wiring.d.ts.map +1 -0
- package/dist/document-gate-wiring.js +119 -0
- package/dist/document-gate-wiring.js.map +1 -0
- package/dist/document-notify.d.ts +0 -1
- package/dist/document-notify.d.ts.map +1 -1
- package/dist/document-notify.js +0 -1
- package/dist/document-notify.js.map +1 -1
- package/dist/document-store.d.ts +0 -1
- package/dist/document-store.d.ts.map +1 -1
- package/dist/document-store.js +0 -1
- package/dist/document-store.js.map +1 -1
- package/dist/document-write-path.d.ts.map +1 -1
- package/dist/document-write-path.js +2 -9
- package/dist/document-write-path.js.map +1 -1
- package/dist/inbound-sessions.d.ts +3 -1
- package/dist/inbound-sessions.d.ts.map +1 -1
- package/dist/inbound-sessions.js +12 -4
- package/dist/inbound-sessions.js.map +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/dist/initiate-session-handler.d.ts.map +1 -1
- package/dist/initiate-session-handler.js +5 -1
- package/dist/initiate-session-handler.js.map +1 -1
- package/dist/ipc-server.d.ts.map +1 -1
- package/dist/ipc-server.js +52 -2
- package/dist/ipc-server.js.map +1 -1
- package/dist/park-envelope.d.ts +68 -0
- package/dist/park-envelope.d.ts.map +1 -1
- package/dist/park-envelope.js +86 -1
- package/dist/park-envelope.js.map +1 -1
- package/dist/park-recovery.d.ts +46 -0
- package/dist/park-recovery.d.ts.map +1 -1
- package/dist/park-recovery.js +100 -1
- package/dist/park-recovery.js.map +1 -1
- package/dist/relay-only.d.ts.map +1 -1
- package/dist/relay-only.js +7 -4
- package/dist/relay-only.js.map +1 -1
- package/dist/relay-receipt-store.d.ts +75 -17
- package/dist/relay-receipt-store.d.ts.map +1 -1
- package/dist/relay-receipt-store.js +109 -27
- package/dist/relay-receipt-store.js.map +1 -1
- package/dist/seal-carried-close.d.ts +37 -0
- package/dist/seal-carried-close.d.ts.map +1 -0
- package/dist/seal-carried-close.js +179 -0
- package/dist/seal-carried-close.js.map +1 -0
- package/dist/seal-certified-root-check.d.ts +37 -0
- package/dist/seal-certified-root-check.d.ts.map +1 -0
- package/dist/seal-certified-root-check.js +127 -0
- package/dist/seal-certified-root-check.js.map +1 -0
- package/dist/seal-coordinator.d.ts +6 -1
- package/dist/seal-coordinator.d.ts.map +1 -1
- package/dist/seal-coordinator.js +2 -1
- package/dist/seal-coordinator.js.map +1 -1
- package/dist/seal-escalation.d.ts.map +1 -1
- package/dist/seal-escalation.js +54 -0
- package/dist/seal-escalation.js.map +1 -1
- package/dist/seal-local-terminus.d.ts +41 -0
- package/dist/seal-local-terminus.d.ts.map +1 -0
- package/dist/seal-local-terminus.js +170 -0
- package/dist/seal-local-terminus.js.map +1 -0
- package/dist/seal-relay-silence.d.ts +51 -0
- package/dist/seal-relay-silence.d.ts.map +1 -0
- package/dist/seal-relay-silence.js +76 -0
- package/dist/seal-relay-silence.js.map +1 -0
- package/dist/seal-settle.d.ts +38 -0
- package/dist/seal-settle.d.ts.map +1 -0
- package/dist/seal-settle.js +33 -0
- package/dist/seal-settle.js.map +1 -0
- package/dist/session-assignment-parser.d.ts.map +1 -1
- package/dist/session-assignment-parser.js +5 -0
- package/dist/session-assignment-parser.js.map +1 -1
- package/dist/session-ceremony.d.ts +21 -14
- package/dist/session-ceremony.d.ts.map +1 -1
- package/dist/session-ceremony.js +25 -15
- package/dist/session-ceremony.js.map +1 -1
- package/dist/session-content-context.d.ts +11 -2
- package/dist/session-content-context.d.ts.map +1 -1
- package/dist/session-content-ingest.d.ts +0 -3
- package/dist/session-content-ingest.d.ts.map +1 -1
- package/dist/session-content-ingest.js +18 -111
- package/dist/session-content-ingest.js.map +1 -1
- package/dist/session-content-send.d.ts +5 -0
- package/dist/session-content-send.d.ts.map +1 -1
- package/dist/session-content-send.js +58 -0
- package/dist/session-content-send.js.map +1 -1
- package/dist/session-delivery-acks.d.ts +195 -0
- package/dist/session-delivery-acks.d.ts.map +1 -0
- package/dist/session-delivery-acks.js +674 -0
- package/dist/session-delivery-acks.js.map +1 -0
- package/dist/session-leaf-records.d.ts +28 -1
- package/dist/session-leaf-records.d.ts.map +1 -1
- package/dist/session-leaf-records.js +86 -1
- package/dist/session-leaf-records.js.map +1 -1
- package/dist/session-lifecycle.js +12 -12
- package/dist/session-lifecycle.js.map +1 -1
- package/dist/session-node-manager.d.ts +49 -22
- package/dist/session-node-manager.d.ts.map +1 -1
- package/dist/session-node-manager.js +113 -42
- package/dist/session-node-manager.js.map +1 -1
- package/dist/session-node-types.d.ts +18 -12
- package/dist/session-node-types.d.ts.map +1 -1
- package/dist/session-node-types.js +1 -9
- package/dist/session-node-types.js.map +1 -1
- package/dist/session-read-handlers.d.ts.map +1 -1
- package/dist/session-read-handlers.js +125 -4
- package/dist/session-read-handlers.js.map +1 -1
- package/dist/session-records.d.ts +17 -0
- package/dist/session-records.d.ts.map +1 -1
- package/dist/session-records.js +32 -0
- package/dist/session-records.js.map +1 -1
- package/dist/session-relay-client.d.ts +103 -6
- package/dist/session-relay-client.d.ts.map +1 -1
- package/dist/session-relay-client.js +380 -41
- package/dist/session-relay-client.js.map +1 -1
- package/dist/session-relay.d.ts +24 -2
- package/dist/session-relay.d.ts.map +1 -1
- package/dist/session-relay.js +23 -8
- package/dist/session-relay.js.map +1 -1
- package/dist/session-schema.d.ts.map +1 -1
- package/dist/session-schema.js +43 -0
- package/dist/session-schema.js.map +1 -1
- package/dist/session-seal-leaf-store.d.ts +6 -0
- package/dist/session-seal-leaf-store.d.ts.map +1 -1
- package/dist/session-seal-leaf-store.js +21 -4
- package/dist/session-seal-leaf-store.js.map +1 -1
- package/dist/session-seal.d.ts +30 -32
- package/dist/session-seal.d.ts.map +1 -1
- package/dist/session-seal.js +145 -116
- package/dist/session-seal.js.map +1 -1
- package/dist/session-views.d.ts +1 -0
- package/dist/session-views.d.ts.map +1 -1
- package/dist/session-views.js +81 -1
- package/dist/session-views.js.map +1 -1
- package/dist/signaling-connect.d.ts +1 -0
- package/dist/signaling-connect.d.ts.map +1 -1
- package/dist/signaling-connect.js +0 -1
- package/dist/signaling-connect.js.map +1 -1
- package/dist/status-handler.d.ts +9 -1
- package/dist/status-handler.d.ts.map +1 -1
- package/dist/status-handler.js +5 -2
- package/dist/status-handler.js.map +1 -1
- package/dist/test-handlers.js +4 -3
- package/dist/test-handlers.js.map +1 -1
- package/dist/trust-signal-store.d.ts +4 -2
- package/dist/trust-signal-store.d.ts.map +1 -1
- package/dist/trust-signal-store.js +4 -2
- package/dist/trust-signal-store.js.map +1 -1
- package/dist/types.d.ts +64 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/vocabulary.d.ts +22 -4
- package/dist/vocabulary.d.ts.map +1 -1
- package/dist/vocabulary.js +66 -21
- package/dist/vocabulary.js.map +1 -1
- package/package.json +5 -5
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DOD-M15-DELIVERYACK-1 — the delivery acknowledgement, both directions.
|
|
3
|
+
*
|
|
4
|
+
* Split out of `session-content-ingest.ts` rather than added to it. The acknowledgement is now a
|
|
5
|
+
* signed artifact with its own five rules and its own evidence store, which is a subject of its
|
|
6
|
+
* own — and the ingest file sits on a `max-lines` ratchet whose whole purpose is that a feature
|
|
7
|
+
* lands as a module instead of as growth in a file nobody can read.
|
|
8
|
+
*
|
|
9
|
+
* ⚠️ NOTHING HERE TOUCHES THE TAMPER-EVIDENT RECORD. An acknowledgement takes no chain leaf, is
|
|
10
|
+
* never itself acknowledged, and its absence proves nothing. The evidence it produces is read by
|
|
11
|
+
* the sealed-receipt surface and by nothing else.
|
|
12
|
+
*/
|
|
13
|
+
import type { SessionContentPipelineContext } from "./session-content-context.js";
|
|
14
|
+
import { type ParkedDeliveryAck } from "./park-envelope.js";
|
|
15
|
+
import type { DaemonDatabase } from "./sqlcipher-db.js";
|
|
16
|
+
import type { Logger } from "./types.js";
|
|
17
|
+
/**
|
|
18
|
+
* Send a SIGNED `persisted` delivery ACK back to the sender over the same
|
|
19
|
+
* /cello/content/1.0.0 protocol (AC-001).
|
|
20
|
+
*
|
|
21
|
+
* ⚠️ IT USED TO BE UNSIGNED, and the comment here used to justify that: "authentication is the
|
|
22
|
+
* Noise session channel, so the ACK carries no signature". That is true of the HOP and it dies
|
|
23
|
+
* with the connection — it left the sender holding nothing it could show a third party, which is
|
|
24
|
+
* what `DOD-M15-DELIVERYACK-1` exists to fix. Rewritten rather than deleted, because the old
|
|
25
|
+
* sentence is exactly why an auditor would conclude the frame is unsigned by design.
|
|
26
|
+
*
|
|
27
|
+
* What is signed says only *this machine received these bytes in this session*. Signed on INGEST,
|
|
28
|
+
* so it asserts nothing about attention and nothing about agreement.
|
|
29
|
+
*
|
|
30
|
+
* Still best-effort in the SEND: a failed ACK send is logged and the sender recovers via its
|
|
31
|
+
* TTF/recovery path rather than a thrown error here.
|
|
32
|
+
*/
|
|
33
|
+
export declare function sendDeliveryAck(ctx: SessionContentPipelineContext, agentName: string, sessionId: string, contentHash: Uint8Array, correlationId?: string): Promise<void>;
|
|
34
|
+
/**
|
|
35
|
+
* DOD-M15-DELIVERYACK-1 — AN INBOUND ACKNOWLEDGEMENT IS ATTACKER-CONTROLLED INPUT.
|
|
36
|
+
*
|
|
37
|
+
* The client is open source and runs on the counterparty's machine, so they can send whatever
|
|
38
|
+
* they like here. Five properties, and all five are load-bearing:
|
|
39
|
+
*
|
|
40
|
+
* 1. **Verified against the session's RECORDED counterparty key**, never a key in the frame. The
|
|
41
|
+
* recorded key comes from what the operator asked for (initiator) or the directory-attested
|
|
42
|
+
* offer (responder) — `entry.counterpartyPubkey`. Checking a signature against a key carried
|
|
43
|
+
* inside its own frame proves only that somebody owns a keypair.
|
|
44
|
+
* ⚠️ Deliberately NARROWER than "either participant". The clause says an ack verifying under
|
|
45
|
+
* neither participant key is discarded; ours additionally discards one signed by US, which is
|
|
46
|
+
* the self-referential case — our own signature on our own message, stored in our own
|
|
47
|
+
* database, constrains nobody.
|
|
48
|
+
* 2. **Bound** — it must name a hash this side actually sent in this session and is still
|
|
49
|
+
* awaiting. The session is already pinned by the shared frame gate above.
|
|
50
|
+
* 3. **Inert** — it records evidence and resolves the sender's own fallback timer. It advances no
|
|
51
|
+
* sequence, touches no tree, takes no leaf, closes nothing, seals nothing.
|
|
52
|
+
* 4. **Idempotent and bounded** — the awaiting entry is consumed on the first accepted ack, so a
|
|
53
|
+
* duplicate finds nothing and does nothing, and the number of acks that can ever be recorded
|
|
54
|
+
* for a session is the number of messages this side sent in it. There is no counter an
|
|
55
|
+
* attacker can inflate because there is no per-ack allocation at all.
|
|
56
|
+
* 5. **Malformed fails exactly as missing does.** Both take this one discard path: the timer stays
|
|
57
|
+
* armed, no `content.delivery.acked` fires, nothing is recorded, and the message parks on TTF
|
|
58
|
+
* expiry exactly as it would have with no acknowledgement at all.
|
|
59
|
+
*
|
|
60
|
+
* 🚨 AND A DISCARD IS NOT A SECURITY EVENT. It does not freeze the session and must never feed a
|
|
61
|
+
* trust signal. A missing acknowledgement is usually innocent — the relay parked the content, the
|
|
62
|
+
* far daemon died between ordering and pull, a bounded queue dropped its oldest frame, a screener
|
|
63
|
+
* refused it. Reading absence as evasion is the defect, not the fix.
|
|
64
|
+
*/
|
|
65
|
+
export declare function onDeliveryAck(ctx: SessionContentPipelineContext, resolveAwaitingAck: (agentName: string, sessionId: string, contentHash: Uint8Array) => void, agentName: string, sessionId: string, contentHash: Uint8Array, rawSig: unknown, correlationId?: string): void;
|
|
66
|
+
/**
|
|
67
|
+
* DOD-M15-DELIVERYACK-1 — keep the counterparty's signature that their machine received a message.
|
|
68
|
+
*
|
|
69
|
+
* Called ONLY after `verifyDeliveryAck` succeeded against the session's recorded counterparty key.
|
|
70
|
+
* `INSERT OR IGNORE` is the idempotence: the first acknowledgement recorded for a (session, hash)
|
|
71
|
+
* stands and a replay changes nothing.
|
|
72
|
+
*
|
|
73
|
+
* A write failure is LOUD and it is not fatal. The message was delivered; what is lost is this
|
|
74
|
+
* side's ability to prove it later, and the operator is the only one who can act on that.
|
|
75
|
+
*/
|
|
76
|
+
export declare function storeDeliveryAck(db: DaemonDatabase, logger: Logger, a: {
|
|
77
|
+
agentId: string;
|
|
78
|
+
agentName: string;
|
|
79
|
+
sessionId: string;
|
|
80
|
+
contentHashHex: string;
|
|
81
|
+
signerPubkeyHex: string;
|
|
82
|
+
signature: Uint8Array;
|
|
83
|
+
correlationId?: string;
|
|
84
|
+
}): boolean;
|
|
85
|
+
/**
|
|
86
|
+
* DOD-M15-DELIVERYACK-1 rule 2, at the database — did this side put these exact bytes on the wire in
|
|
87
|
+
* this session?
|
|
88
|
+
*
|
|
89
|
+
* The durable bind, reachable from both routes: the live inbound handler asks through
|
|
90
|
+
* `SessionRecords`, and the mailbox drain asks here directly because it holds a database handle and
|
|
91
|
+
* no manager. A sent-direction transcript row joined to its leaf is written by our own send path and
|
|
92
|
+
* survives the fallback timer and a restart, which is what lets an acknowledgement for a message
|
|
93
|
+
* that had to be parked and recovered still count. Nothing a counterparty sends creates a row here.
|
|
94
|
+
*/
|
|
95
|
+
export declare function sentContentHashExists(db: DaemonDatabase, agentId: string, sessionId: string, contentHashHex: string): boolean;
|
|
96
|
+
/**
|
|
97
|
+
* DOD-M15-DELIVERYACK-1 unit 1 — ACCEPT AN ACKNOWLEDGEMENT THAT CAME BACK THROUGH THE RELAY'S
|
|
98
|
+
* MAILBOX.
|
|
99
|
+
*
|
|
100
|
+
* This is the offline route: the counterparty read the message while this daemon was down, could not
|
|
101
|
+
* reach it directly, and parked the acknowledgement. It is held to the SAME five rules the live
|
|
102
|
+
* route is, because it is the same attacker-controlled input arriving by a different road — and to
|
|
103
|
+
* one more check the live route does not need, which has already run before this is called: the park
|
|
104
|
+
* envelope's own SEC-1 gate proved the DEPOSITOR is this session's counterparty.
|
|
105
|
+
*
|
|
106
|
+
* ⚠️ THE TWO CHECKS ARE INDEPENDENT AND BOTH ARE REQUIRED. The envelope gate says who put it in the
|
|
107
|
+
* mailbox; the signature below says who acknowledged the message. A relay holding the recipient's
|
|
108
|
+
* public key can deposit anything, and the envelope gate is what stops that — but a counterparty who
|
|
109
|
+
* rewrote their own daemon passes the envelope gate by construction, and only the signature check
|
|
110
|
+
* catches an acknowledgement they did not actually sign for this message.
|
|
111
|
+
*
|
|
112
|
+
* 🚨 INERT, exactly as the live route is. It records evidence. It appends no leaf, advances no
|
|
113
|
+
* sequence, touches no tree, and nothing about a refusal here says anything about the counterparty.
|
|
114
|
+
*
|
|
115
|
+
* ─── RULE 4's "rate-limited", on THIS route, and why there is no memo here ─────────────────────
|
|
116
|
+
*
|
|
117
|
+
* A refused entry is deliberately NOT confirm-deleted — a forgery must never be able to evict
|
|
118
|
+
* itself — so a bad acknowledgement is re-pulled on every drain, forever. The content path answers
|
|
119
|
+
* that with a bounded in-memory memo of what it already refused. This route does not need one, and
|
|
120
|
+
* the reason is three enforced bounds rather than an argument:
|
|
121
|
+
*
|
|
122
|
+
* 1. Only the COUNTERPARTY can put an entry here at all. The park envelope's SEC-1 gate runs
|
|
123
|
+
* first and refuses anyone else, the relay included.
|
|
124
|
+
* 2. The relay caps each recipient's mailbox — `#maxRecipientEntries` / `#maxRecipientBytes` in
|
|
125
|
+
* `file-content-store.ts`, with FIFO eviction inside the quota. So the number of entries that
|
|
126
|
+
* can be waiting is bounded by the operator's own mailbox size, not by the counterparty's
|
|
127
|
+
* patience.
|
|
128
|
+
* 3. The slot check above runs BEFORE any cryptography, so the cheap forgery — an entry filed
|
|
129
|
+
* anywhere but the derived slot — costs one SHA-256 and no signature verification.
|
|
130
|
+
*
|
|
131
|
+
* What is left is one Ed25519 verify per correctly-slotted, wrongly-signed entry per drain,
|
|
132
|
+
* multiplied by a mailbox the relay already bounds. That is a cost, and it is a bounded one; a memo
|
|
133
|
+
* would shave it at the price of a second piece of state whose key a counterparty influences.
|
|
134
|
+
*/
|
|
135
|
+
export declare function acceptParkedDeliveryAck(a: {
|
|
136
|
+
db: DaemonDatabase;
|
|
137
|
+
logger: Logger;
|
|
138
|
+
agentId: string;
|
|
139
|
+
agentName: string;
|
|
140
|
+
/** The session the RELAY filed this entry under. */
|
|
141
|
+
sessionId: string;
|
|
142
|
+
/** The mailbox slot the entry was pulled from — what the relay files it by. */
|
|
143
|
+
mailboxSlotHex: string;
|
|
144
|
+
/** The session's RECORDED counterparty key. Never a key carried in the payload. */
|
|
145
|
+
counterpartyPubkeyHex: string | undefined;
|
|
146
|
+
ack: ParkedDeliveryAck;
|
|
147
|
+
correlationId?: string;
|
|
148
|
+
}): {
|
|
149
|
+
ok: true;
|
|
150
|
+
} | {
|
|
151
|
+
ok: false;
|
|
152
|
+
reason: string;
|
|
153
|
+
};
|
|
154
|
+
/**
|
|
155
|
+
* DOD-M15-DELIVERYACK-1 — the three facts, per message this side SENT, each standing alone.
|
|
156
|
+
*
|
|
157
|
+
* ⚠️ READ THE ASYMMETRY BEFORE USING THIS. Each fact is present or absent on its own and a
|
|
158
|
+
* missing one is reported as missing and NOTHING MORE. There is deliberately no combined status,
|
|
159
|
+
* no derived verdict, and no count — a message can be delivered, read and acted on with no
|
|
160
|
+
* acknowledgement recorded here, because the acknowledgement can be lost exactly as the message
|
|
161
|
+
* can. Anything that renders absence as fault is a defect, not a display choice.
|
|
162
|
+
*
|
|
163
|
+
* ordered — the RELAY assigned it a position. Read from `relay_ack_receipts`, which holds
|
|
164
|
+
* the relay's own countersignature, scoped to THIS agent's pubkey so a loopback
|
|
165
|
+
* session's two ends never read each other's.
|
|
166
|
+
* delivered — the RELAY handed the bytes over. **This side holds no such evidence for any
|
|
167
|
+
* message today, on either path**: the relay answers the RECIPIENT on pickup and
|
|
168
|
+
* never tells the depositor. It is reported absent with that reason named rather
|
|
169
|
+
* than fabricated from "our own send succeeded", which would be this machine
|
|
170
|
+
* asserting a relay fact about itself. `069-ORDERPROOF` plus a pickup notice to
|
|
171
|
+
* the depositor is what fills it.
|
|
172
|
+
* acknowledged — the RECIPIENT's own signature, from `delivery_acks`.
|
|
173
|
+
*/
|
|
174
|
+
export declare function readDeliveryFacts(db: DaemonDatabase, logger: Logger, agentId: string, sessionId: string): Array<{
|
|
175
|
+
seq: number | null;
|
|
176
|
+
content_hash: string;
|
|
177
|
+
ordered: {
|
|
178
|
+
asserted_by: "relay";
|
|
179
|
+
relay_id: string;
|
|
180
|
+
relay_timestamp: number;
|
|
181
|
+
signature: string;
|
|
182
|
+
} | null;
|
|
183
|
+
delivered: {
|
|
184
|
+
asserted_by: "relay";
|
|
185
|
+
held: false;
|
|
186
|
+
why_absent: string;
|
|
187
|
+
};
|
|
188
|
+
acknowledged: {
|
|
189
|
+
asserted_by: "recipient";
|
|
190
|
+
signer_pubkey: string;
|
|
191
|
+
signature: string;
|
|
192
|
+
recorded_at: number;
|
|
193
|
+
} | null;
|
|
194
|
+
}>;
|
|
195
|
+
//# sourceMappingURL=session-delivery-acks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-delivery-acks.d.ts","sourceRoot":"","sources":["../src/session-delivery-acks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,8BAA8B,CAAC;AAClF,OAAO,EAAyD,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAGnH,OAAO,KAA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