@cello-protocol/daemon 0.0.168 → 0.0.170
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-id-migration.d.ts.map +1 -1
- package/dist/agent-id-migration.js +16 -0
- package/dist/agent-id-migration.js.map +1 -1
- package/dist/away-detection.d.ts +62 -15
- package/dist/away-detection.d.ts.map +1 -1
- package/dist/away-detection.js +77 -20
- package/dist/away-detection.js.map +1 -1
- package/dist/close-session-handler.d.ts.map +1 -1
- package/dist/close-session-handler.js +69 -3
- package/dist/close-session-handler.js.map +1 -1
- package/dist/daemon.d.ts.map +1 -1
- package/dist/daemon.js +406 -303
- package/dist/daemon.js.map +1 -1
- package/dist/delivery-open-registry.d.ts +92 -0
- package/dist/delivery-open-registry.d.ts.map +1 -0
- package/dist/delivery-open-registry.js +121 -0
- package/dist/delivery-open-registry.js.map +1 -0
- package/dist/document-amendment-store.d.ts +94 -46
- package/dist/document-amendment-store.d.ts.map +1 -1
- package/dist/document-amendment-store.js +217 -102
- package/dist/document-amendment-store.js.map +1 -1
- package/dist/document-delivery-transport.d.ts +51 -53
- package/dist/document-delivery-transport.d.ts.map +1 -1
- package/dist/document-delivery-transport.js +16 -157
- package/dist/document-delivery-transport.js.map +1 -1
- package/dist/document-frame-router.d.ts +13 -17
- package/dist/document-frame-router.d.ts.map +1 -1
- package/dist/document-frame-router.js +21 -93
- package/dist/document-frame-router.js.map +1 -1
- package/dist/document-handlers.d.ts +1 -1
- package/dist/document-handlers.d.ts.map +1 -1
- package/dist/document-handlers.js +462 -511
- package/dist/document-handlers.js.map +1 -1
- package/dist/document-handshake.d.ts +4 -1
- package/dist/document-handshake.d.ts.map +1 -1
- package/dist/document-handshake.js +3 -1
- package/dist/document-handshake.js.map +1 -1
- package/dist/document-inbound.d.ts +18 -5
- package/dist/document-inbound.d.ts.map +1 -1
- package/dist/document-inbound.js +94 -110
- package/dist/document-inbound.js.map +1 -1
- package/dist/document-layer.d.ts +49 -67
- package/dist/document-layer.d.ts.map +1 -1
- package/dist/document-layer.js +688 -565
- package/dist/document-layer.js.map +1 -1
- package/dist/document-lifecycle.d.ts +11 -157
- package/dist/document-lifecycle.d.ts.map +1 -1
- package/dist/document-lifecycle.js +26 -568
- package/dist/document-lifecycle.js.map +1 -1
- package/dist/document-publish.d.ts +13 -0
- package/dist/document-publish.d.ts.map +1 -1
- package/dist/document-publish.js +19 -11
- package/dist/document-publish.js.map +1 -1
- package/dist/document-reconcile-engine.d.ts +66 -0
- package/dist/document-reconcile-engine.d.ts.map +1 -0
- package/dist/document-reconcile-engine.js +225 -0
- package/dist/document-reconcile-engine.js.map +1 -0
- package/dist/document-reconcile-scheduler.d.ts +124 -0
- package/dist/document-reconcile-scheduler.d.ts.map +1 -0
- package/dist/document-reconcile-scheduler.js +226 -0
- package/dist/document-reconcile-scheduler.js.map +1 -0
- package/dist/document-rejection.d.ts +2 -0
- package/dist/document-rejection.d.ts.map +1 -1
- package/dist/document-rejection.js +5 -1
- package/dist/document-rejection.js.map +1 -1
- package/dist/document-store.d.ts +18 -247
- package/dist/document-store.d.ts.map +1 -1
- package/dist/document-store.js +95 -827
- package/dist/document-store.js.map +1 -1
- package/dist/inbound-sessions.d.ts +7 -0
- package/dist/inbound-sessions.d.ts.map +1 -1
- package/dist/inbound-sessions.js +27 -6
- package/dist/inbound-sessions.js.map +1 -1
- package/dist/initiate-session-handler.d.ts +5 -0
- package/dist/initiate-session-handler.d.ts.map +1 -1
- package/dist/initiate-session-handler.js +1 -0
- package/dist/initiate-session-handler.js.map +1 -1
- package/dist/notification-handlers.d.ts.map +1 -1
- package/dist/notification-handlers.js +39 -2
- package/dist/notification-handlers.js.map +1 -1
- package/dist/session-content-handlers.d.ts.map +1 -1
- package/dist/session-content-handlers.js +134 -8
- package/dist/session-content-handlers.js.map +1 -1
- package/dist/session-node-manager.d.ts +153 -8
- package/dist/session-node-manager.d.ts.map +1 -1
- package/dist/session-node-manager.js +1376 -35
- package/dist/session-node-manager.js.map +1 -1
- package/dist/types.d.ts +64 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +5 -5
- package/dist/delivery-sweep-bound.d.ts +0 -79
- package/dist/delivery-sweep-bound.d.ts.map +0 -1
- package/dist/delivery-sweep-bound.js +0 -109
- package/dist/delivery-sweep-bound.js.map +0 -1
- package/dist/document-ack-inbound.d.ts +0 -71
- package/dist/document-ack-inbound.d.ts.map +0 -1
- package/dist/document-ack-inbound.js +0 -210
- package/dist/document-ack-inbound.js.map +0 -1
- package/dist/document-control-notifier.d.ts +0 -124
- package/dist/document-control-notifier.d.ts.map +0 -1
- package/dist/document-control-notifier.js +0 -176
- package/dist/document-control-notifier.js.map +0 -1
- package/dist/document-delivery.d.ts +0 -250
- package/dist/document-delivery.d.ts.map +0 -1
- package/dist/document-delivery.js +0 -608
- package/dist/document-delivery.js.map +0 -1
- package/dist/document-join-store.d.ts +0 -80
- package/dist/document-join-store.d.ts.map +0 -1
- package/dist/document-join-store.js +0 -197
- package/dist/document-join-store.js.map +0 -1
|
@@ -12,12 +12,8 @@
|
|
|
12
12
|
* because opening is the expensive half — a directory negotiation, a dial, and a seal — and a
|
|
13
13
|
* backlog of pending envelopes for one peer would otherwise pay it per envelope. It is also the
|
|
14
14
|
* behaviour an operator expects when they are mid-conversation about the document: the change lands
|
|
15
|
-
* in the same sealed record as the discussion
|
|
16
|
-
*
|
|
17
|
-
* An explicit `sessionHint` overrides the choice but NOT the validation — a hint naming a session
|
|
18
|
-
* that is not active with this peer is refused rather than silently replaced by the daemon's own
|
|
19
|
-
* pick, because the one reason to pass a hint is to control which sealed record the change lands
|
|
20
|
-
* in, and quietly choosing a different one defeats exactly that.
|
|
15
|
+
* in the same sealed record as the discussion. (SYNC-D10: the explicit session hint is deleted —
|
|
16
|
+
* the daemon's reuse-most-recent choice is the whole rule.)
|
|
21
17
|
*
|
|
22
18
|
* ── WHAT AN ACK IS HERE, AND WHAT IT IS NOT ───────────────────────────────────────────────────
|
|
23
19
|
*
|
|
@@ -37,15 +33,6 @@ import { wireContentHash } from "./wire-content-hash.js";
|
|
|
37
33
|
import { reachabilityFromDiscovery, DiscoveryUnavailableError } from "./document-reachability.js";
|
|
38
34
|
import { LEAF_KIND_DOC } from "./session-relay-client.js";
|
|
39
35
|
import { createSessionSuspects, TERMINAL_ISH_REFUSALS } from "./delivery-session-suspects.js";
|
|
40
|
-
/**
|
|
41
|
-
* How long a session WE opened stays up waiting for the peer's answer.
|
|
42
|
-
*
|
|
43
|
-
* Sized against the observed round trip, not guessed: on a live cross-region session the ack was
|
|
44
|
-
* on the wire ~375ms after the frame landed, and the seal ceremony itself takes ~3s. Ten seconds
|
|
45
|
-
* covers a slow relay and a park-and-recover round without keeping an autonomous session alive
|
|
46
|
-
* long enough to be mistaken for a conversation.
|
|
47
|
-
*/
|
|
48
|
-
export const DELIVERY_ACK_GRACE_MS = 10_000;
|
|
49
36
|
/**
|
|
50
37
|
* Everything this transport sends is document-domain traffic, so 0x04 is the default rather than
|
|
51
38
|
* something each call site remembers. A refusal overrides it with 0x05 — the two are distinguished
|
|
@@ -85,40 +72,14 @@ export function createDocumentDeliveryTransport(deps) {
|
|
|
85
72
|
suspects.noteSuccess(sessionId);
|
|
86
73
|
}
|
|
87
74
|
/**
|
|
88
|
-
* Acquire a session with the peer — the
|
|
75
|
+
* Acquire a session with the peer — the most recent active one, else a fresh dial (SYNC-D10).
|
|
89
76
|
*
|
|
90
77
|
* ONE implementation for every document frame kind. A proposal that opened its own session by a
|
|
91
78
|
* separate code path would drift on which session gets reused and on whether a session this
|
|
92
79
|
* daemon opened is sealed, and both are unrecoverable after the fact.
|
|
93
80
|
*/
|
|
94
|
-
async function acquireSession(peerAgentId,
|
|
81
|
+
async function acquireSession(peerAgentId, correlationId) {
|
|
95
82
|
const active = deps.activeSessionsWith(deps.agentName, peerAgentId);
|
|
96
|
-
if (sessionHint !== undefined) {
|
|
97
|
-
if (!active.includes(sessionHint)) {
|
|
98
|
-
// Refused, not replaced. The only reason to pass a hint is to control which sealed record
|
|
99
|
-
// the change lands in; quietly substituting the daemon's own pick would defeat exactly
|
|
100
|
-
// that, and it would do so silently.
|
|
101
|
-
return {
|
|
102
|
-
ok: false,
|
|
103
|
-
reason: "document_session_hint_invalid",
|
|
104
|
-
detail: `session ${sessionHint.slice(0, 16)}… is not an active session with ${peerAgentId}, ` +
|
|
105
|
-
`so the change cannot be placed in that record`,
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
if (suspects.isSuspect(sessionHint)) {
|
|
109
|
-
// HONOURED, NOT SUBSTITUTED — the only reason to pass a hint is to control which sealed
|
|
110
|
-
// record the change lands in, and quietly picking another session would defeat exactly
|
|
111
|
-
// that. But a caller aiming at a session whose record is gone should be told.
|
|
112
|
-
deps.logger.warn("document.delivery.session.hint_suspect", {
|
|
113
|
-
peerAgentId,
|
|
114
|
-
sessionId: sessionHint,
|
|
115
|
-
correlationId,
|
|
116
|
-
impact: "this session has answered terminally more than once — the change is being placed in " +
|
|
117
|
-
"it as asked, and its record may no longer be growing",
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
return { ok: true, sessionId: sessionHint, sessionOpened: false };
|
|
121
|
-
}
|
|
122
83
|
// Most recent LAST — activeSessionsWith is ordered oldest-first by the daemon's adapter.
|
|
123
84
|
//
|
|
124
85
|
// DOD-MP-SESSION-RETIRE-1 — a session that has answered terminally more than once is skipped
|
|
@@ -160,8 +121,8 @@ export function createDocumentDeliveryTransport(deps) {
|
|
|
160
121
|
return reachabilityFromDiscovery(outcome);
|
|
161
122
|
},
|
|
162
123
|
async sendBytes(input) {
|
|
163
|
-
const { peerAgentId, documentId, bytes,
|
|
164
|
-
const session = await acquireSession(peerAgentId,
|
|
124
|
+
const { peerAgentId, documentId, bytes, correlationId } = input;
|
|
125
|
+
const session = await acquireSession(peerAgentId, correlationId);
|
|
165
126
|
if (!session.ok)
|
|
166
127
|
return session;
|
|
167
128
|
// THE WIRE HASH, domain-separated. This was `sha256(bytes)`, and the receiver recomputes
|
|
@@ -199,9 +160,18 @@ export function createDocumentDeliveryTransport(deps) {
|
|
|
199
160
|
// document frame in a fresh session arrives and everything after it does not. Adding one
|
|
200
161
|
// ordinary message before the exchange moved the failure earlier, which is what named the
|
|
201
162
|
// cause.
|
|
202
|
-
|
|
163
|
+
// THE FRAME BYTES, not the hash. When the leaf cannot be placed yet the bytes are held, and a
|
|
164
|
+
// hold is released by writing its content to the transcript — so handing this the hash would
|
|
165
|
+
// put 32 bytes of digest in the operator's transcript as a message they sent, and annex the
|
|
166
|
+
// same 32 bytes into the sealed record.
|
|
167
|
+
const placed = deps.appendLeaf(deps.agentName, session.sessionId, hash, bytes, correlationId, sent.sequenceNumber);
|
|
203
168
|
deps.logger.info("document.frame.sent", {
|
|
204
169
|
documentId,
|
|
170
|
+
// Whether the leaf is IN the chain yet. This hook is delivery-critical — a sender that skips
|
|
171
|
+
// its leaf falls one behind per frame and the peer silently drops what it has already
|
|
172
|
+
// consumed — so "sent" must not read the same when the leaf is merely held.
|
|
173
|
+
leafCommitted: placed.placed,
|
|
174
|
+
leafIndex: placed.leafIndex,
|
|
205
175
|
sessionId: session.sessionId,
|
|
206
176
|
sessionOpened: session.sessionOpened,
|
|
207
177
|
bytes: bytes.length,
|
|
@@ -222,117 +192,6 @@ export function createDocumentDeliveryTransport(deps) {
|
|
|
222
192
|
parked: sent.delivered === false,
|
|
223
193
|
};
|
|
224
194
|
},
|
|
225
|
-
async deliver(input) {
|
|
226
|
-
const { peerAgentId, documentId, envelope, sessionHint, correlationId } = input;
|
|
227
|
-
const session = await acquireSession(peerAgentId, sessionHint, correlationId);
|
|
228
|
-
if (!session.ok)
|
|
229
|
-
return session;
|
|
230
|
-
const { sessionId, sessionOpened } = session;
|
|
231
|
-
const { bytes, hash } = deps.encodeEnvelope(envelope);
|
|
232
|
-
const sent = await deps.sendContent(deps.agentName, sessionId, bytes, hash, correlationId, DOCUMENT_LEAF_KIND);
|
|
233
|
-
// DOD-MP-SESSION-RETIRE-1 — same accounting on the envelope path. Both paths acquire through
|
|
234
|
-
// `acquireSession`, so a session judged on one is skipped by the other; splitting the record
|
|
235
|
-
// would let a session that keeps refusing envelopes still be picked for the next frame.
|
|
236
|
-
noteSendOutcome(sessionId, sent);
|
|
237
|
-
if (sent.ok)
|
|
238
|
-
deps.appendLeaf(deps.agentName, sessionId, hash, correlationId);
|
|
239
|
-
if (!sent.ok) {
|
|
240
|
-
// SEAL WHAT WE OPENED, on the failure path too. This branch walked away from a session it
|
|
241
|
-
// had just dialled — a live node the operator never started, with no sealed record, which
|
|
242
|
-
// is precisely what the rule twenty lines below says the seal exists to prevent. A failed
|
|
243
|
-
// send is when it is most likely to happen, not least.
|
|
244
|
-
if (sessionOpened)
|
|
245
|
-
await deps.sealSession(deps.agentName, sessionId, correlationId);
|
|
246
|
-
return { ok: false, reason: sent.reason, detail: sent.error };
|
|
247
|
-
}
|
|
248
|
-
deps.logger.info("document.delivery.sent", {
|
|
249
|
-
documentId,
|
|
250
|
-
sessionId,
|
|
251
|
-
sessionOpened,
|
|
252
|
-
parked: sent.delivered === false,
|
|
253
|
-
correlationId,
|
|
254
|
-
});
|
|
255
|
-
// SEAL what we opened. §16.4: the autonomous session still happens because it carries
|
|
256
|
-
// signing, encryption and the seal — the ceremony goes to zero, the seal does not. A session
|
|
257
|
-
// this adapter opened and walked away from is a live node the operator never started, and
|
|
258
|
-
// the sealed record the design exists to produce is never produced. A session we REUSED is
|
|
259
|
-
// not ours to close: its owner decides when that conversation ends.
|
|
260
|
-
// PARKED CONTENT CANNOT BE ACKED, so waiting for one is spending the pass budget on a
|
|
261
|
-
// certainty. `delivered: false` means the peer was offline and the relay took the frame; the
|
|
262
|
-
// ack comes whenever they next come online, which is not within any grace. Waiting here also
|
|
263
|
-
// fired `ack_grace_expired` on a designed, benign state — a warning on the normal case.
|
|
264
|
-
const answerPossible = sent.delivered !== false;
|
|
265
|
-
// The peer's ANSWER, when one arrives inside the grace. Reported back as `admitted` so the
|
|
266
|
-
// worker records a settled delivery instead of an in-flight one.
|
|
267
|
-
let settlement = null;
|
|
268
|
-
if (sessionOpened && answerPossible && input.ackGraceMs > 0) {
|
|
269
|
-
// WAIT FOR THE ANSWER BEFORE TEARING DOWN THE CHANNEL IT COMES BACK ON.
|
|
270
|
-
//
|
|
271
|
-
// The seal destroys the session, and the teardown drops content still held for ordering.
|
|
272
|
-
// Sealing straight after the send therefore raced the peer's ack and, on a real network,
|
|
273
|
-
// lost: 90 re-sends of one envelope against a ceiling of 5.
|
|
274
|
-
//
|
|
275
|
-
// A REUSED session is untouched by this — it is not ours to close, so its owner keeps it
|
|
276
|
-
// alive and the ack has all the time it needs. That asymmetry is exactly why every spine
|
|
277
|
-
// enforcer passed: they open a conversation first, so the worker always reused one.
|
|
278
|
-
// The SMALLER of this envelope's share and the standard grace. The caller spends a budget
|
|
279
|
-
// across the whole sweep pass; see DELIVERY_ACK_GRACE_BUDGET_MS.
|
|
280
|
-
const graceMs = Math.min(DELIVERY_ACK_GRACE_MS, input.ackGraceMs);
|
|
281
|
-
// UNSTICK BEFORE WAITING. If the ack is already sitting in the hold buffer, no amount of
|
|
282
|
-
// waiting produces it — the release is driven by the missing sequence arriving, not by
|
|
283
|
-
// time. Ordering-complete sessions return immediately.
|
|
284
|
-
// CONTAINED. A drain failure must not fail a delivery whose content has already left — the
|
|
285
|
-
// same contract the ack itself has. Uncontained, a relay hiccup during the drain would
|
|
286
|
-
// surface as `document_delivery_threw` and re-send content the peer already holds.
|
|
287
|
-
await deps.drainHeld(sessionId, correlationId).catch((err) => {
|
|
288
|
-
deps.logger.warn("document.delivery.drain_threw", {
|
|
289
|
-
documentId,
|
|
290
|
-
sessionId,
|
|
291
|
-
correlationId,
|
|
292
|
-
reason: err instanceof Error ? err.message : String(err),
|
|
293
|
-
});
|
|
294
|
-
});
|
|
295
|
-
settlement = await deps.awaitAck(envelope.envelopeHash, input.peerAgentId, graceMs);
|
|
296
|
-
if (!settlement) {
|
|
297
|
-
// NOT a failure of the send — the content left and the peer may still answer later. Said
|
|
298
|
-
// out loud because a seal that discards a held ack is otherwise invisible, and this is
|
|
299
|
-
// the only moment anything knows it is about to happen.
|
|
300
|
-
deps.logger.warn("document.delivery.ack_grace_expired", {
|
|
301
|
-
documentId,
|
|
302
|
-
envelopeHash: envelope.envelopeHash,
|
|
303
|
-
sessionId,
|
|
304
|
-
graceMs,
|
|
305
|
-
correlationId,
|
|
306
|
-
});
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
// SEAL WHAT WE OPENED — unconditionally, whether or not we waited. The wait is about giving
|
|
310
|
-
// an answer time to arrive; the seal is about never leaving an autonomous session running.
|
|
311
|
-
// Making the seal conditional on the wait would trade one defect for a worse one.
|
|
312
|
-
if (sessionOpened) {
|
|
313
|
-
await deps.sealSession(deps.agentName, sessionId, correlationId);
|
|
314
|
-
}
|
|
315
|
-
// SENT, NOT ACKED — `admitted: null`. The content left (or was parked for an offline peer),
|
|
316
|
-
// which is a transport fact; the DoD's ack is the peer's daemon confirming admission, and
|
|
317
|
-
// that answer comes from the inbound document handler, which is its own line.
|
|
318
|
-
//
|
|
319
|
-
// Neither of the two-valued answers is available honestly. `true` would mark the envelope
|
|
320
|
-
// acknowledged in the log while the peer may never have applied it — and the log being right
|
|
321
|
-
// about what the peer holds is the entire reason pending is derived from it. `false` would
|
|
322
|
-
// count a send that WORKED as a failure and re-send content already in flight, which is the
|
|
323
|
-
// permanent-redelivery shape this milestone already fixed once.
|
|
324
|
-
// THE ANSWER IF WE HAVE IT. `null` still means "left, unanswered" — the honest third state —
|
|
325
|
-
// but an ack that landed inside the grace is no longer thrown away as if it had not.
|
|
326
|
-
return {
|
|
327
|
-
ok: true,
|
|
328
|
-
sessionId,
|
|
329
|
-
sessionOpened,
|
|
330
|
-
admitted: settlement ? settlement.admitted : null,
|
|
331
|
-
// PARKED, reported rather than inferred. The worker cannot tell it from an ordinary
|
|
332
|
-
// awaiting-answer send otherwise, and the two need different retry schedules.
|
|
333
|
-
parked: sent.delivered === false,
|
|
334
|
-
};
|
|
335
|
-
},
|
|
336
195
|
};
|
|
337
196
|
}
|
|
338
197
|
export { DiscoveryUnavailableError };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document-delivery-transport.js","sourceRoot":"","sources":["../src/document-delivery-transport.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"document-delivery-transport.js","sourceRoot":"","sources":["../src/document-delivery-transport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,yBAAyB,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAElG,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAoD9F;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,aAAa,CAAC;AAoChD,MAAM,UAAU,+BAA+B,CAC7C,IAA2B;IAE3B,8FAA8F;IAC9F,6FAA6F;IAC7F,iGAAiG;IACjG,MAAM,QAAQ,GAAG,qBAAqB,EAAE,CAAC;IAEzC;;;;;;;OAOG;IACH,SAAS,eAAe,CACtB,SAAiB,EACjB,IAEiD;QAEjD,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC;YACb,IAAI,qBAAqB,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC;gBAAE,QAAQ,CAAC,WAAW,CAAC,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;YACzF,OAAO;QACT,CAAC;QACD,IAAI,IAAI,CAAC,YAAY,KAAK,SAAS,IAAI,qBAAqB,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC;YACpF,QAAQ,CAAC,WAAW,CAAC,SAAS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SAAS,EAAE,aAAa,CAAC,CAAC;YACpG,8FAA8F;YAC9F,6FAA6F;YAC7F,8FAA8F;YAC9F,8FAA8F;YAC9F,wCAAwC;YACxC,OAAO;gBACL,EAAE,EAAE,IAAI;gBACR,SAAS,EAAE,OAAO,CAAC,SAAS;gBAC5B,aAAa,EAAE,OAAO,CAAC,aAAa;gBACpC,MAAM,EAAE,IAAI,CAAC,SAAS,KAAK,KAAK;aACjC,CAAC;QACJ,CAAC;KAEF,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,yBAAyB,EAAE,CAAC"}
|
|
@@ -67,7 +67,6 @@
|
|
|
67
67
|
* The guard must never again be described as what makes hostile input safe. It was, and it was not.
|
|
68
68
|
*/
|
|
69
69
|
import type { DocumentInbound } from "./document-inbound.js";
|
|
70
|
-
import type { DocumentAckInbound } from "./document-ack-inbound.js";
|
|
71
70
|
import type { Logger } from "./types.js";
|
|
72
71
|
/**
|
|
73
72
|
* What the session layer should do with the frame.
|
|
@@ -76,7 +75,7 @@ import type { Logger } from "./types.js";
|
|
|
76
75
|
* message and fires the doorbell exactly as before. Nothing about the conversation path changes.
|
|
77
76
|
*/
|
|
78
77
|
/** Every document frame kind that can arrive on the session channel. */
|
|
79
|
-
export type DocumentFrameKind = "update" | "
|
|
78
|
+
export type DocumentFrameKind = "update" | "proposal" | "rejection" | "proposal_ack" | "amendment" | "reconcile";
|
|
80
79
|
export type FrameRouting = {
|
|
81
80
|
consumed: false;
|
|
82
81
|
} | {
|
|
@@ -101,7 +100,6 @@ export type FrameClassification = {
|
|
|
101
100
|
};
|
|
102
101
|
export interface DocumentFrameRouterDeps {
|
|
103
102
|
inbound: DocumentInbound;
|
|
104
|
-
ackInbound: DocumentAckInbound;
|
|
105
103
|
/**
|
|
106
104
|
* Record an arriving PROPOSAL. Without this a proposal frame is not document traffic as far as
|
|
107
105
|
* the router is concerned, so it falls through to the conversation path and lands in the
|
|
@@ -121,14 +119,10 @@ export interface DocumentFrameRouterDeps {
|
|
|
121
119
|
* conversation path and the operator keeps publishing into a document that will never answer,
|
|
122
120
|
* with nothing on their screen explaining why.
|
|
123
121
|
*/
|
|
124
|
-
recordControl(ownerAgentId: string, wire: Uint8Array, nowMs: number): void;
|
|
125
122
|
/**
|
|
126
123
|
* M14B / DOD-MP-JOIN-1 — an admin's offer to a third party. Validated (the invitee REPLAYS the
|
|
127
124
|
* carried bytes) and recorded — pending or refused-with-reason, never dropped.
|
|
128
125
|
*/
|
|
129
|
-
recordJoinOffer(ownerAgentId: string, wire: Uint8Array, nowMs: number): void;
|
|
130
|
-
/** The invitee's signed answer to an offer we authored. Settle-once. */
|
|
131
|
-
recordJoinAnswer(ownerAgentId: string, wire: Uint8Array, nowMs: number): void;
|
|
132
126
|
/**
|
|
133
127
|
* An amendment reaching an EXISTING holder — validated against our own chain
|
|
134
128
|
* (validate-before-append) and appended, so our derived participant set does not silently
|
|
@@ -136,6 +130,16 @@ export interface DocumentFrameRouterDeps {
|
|
|
136
130
|
* gate makes a missed one loud.
|
|
137
131
|
*/
|
|
138
132
|
recordAmendment(ownerAgentId: string, wire: Uint8Array, nowMs: number): void;
|
|
133
|
+
/**
|
|
134
|
+
* SYNC-P3 — answer (or absorb) a reconcile exchange. Needs the SESSION's authenticated sender:
|
|
135
|
+
* the frame is unsigned by design, and entitlement (R17/R18) is a question about who is
|
|
136
|
+
* ASKING, which only the transport identity can answer. Everything the frame carries is still
|
|
137
|
+
* individually signed and verified on apply.
|
|
138
|
+
*/
|
|
139
|
+
handleReconcile(ownerAgentId: string, wire: Uint8Array, senderAgentId: string, nowMs: number, correlationId: string): Promise<{
|
|
140
|
+
ok: boolean;
|
|
141
|
+
reason?: string;
|
|
142
|
+
}>;
|
|
139
143
|
/**
|
|
140
144
|
* Tell the sender what happened to their envelope — admitted or refused, both of which SETTLE it.
|
|
141
145
|
*
|
|
@@ -163,14 +167,6 @@ export interface DocumentFrameRouterDeps {
|
|
|
163
167
|
noticeInboundUpdate(ownerAgentId: string, inResponseTo: Uint8Array): void;
|
|
164
168
|
/** Put an already-signed frame on the wire to whoever authored `wire` — the rejection, today. */
|
|
165
169
|
sendFrameToPeer(ownerAgentId: string, inResponseTo: Uint8Array, bytes: Uint8Array): Promise<void>;
|
|
166
|
-
sendAck(ownerAgentId: string,
|
|
167
|
-
/** The envelope as it arrived — the document id and the party to answer are both inside it. */
|
|
168
|
-
wire: Uint8Array, outcome: {
|
|
169
|
-
envelopeHash: string;
|
|
170
|
-
admitted: boolean;
|
|
171
|
-
rejectionReason?: string;
|
|
172
|
-
correlationId: string;
|
|
173
|
-
}): Promise<void>;
|
|
174
170
|
/**
|
|
175
171
|
* Map the daemon's AGENT NAME — the only identifier the session content path carries — to the
|
|
176
172
|
* stable owner key every document row is scoped by (M14-D5: our own K_local pubkey hex).
|
|
@@ -209,9 +205,9 @@ export declare class DocumentFrameRouter {
|
|
|
209
205
|
* a per-document queue — see `#handle` — so the caller never waits and frames for one document
|
|
210
206
|
* never overtake each other.
|
|
211
207
|
*/
|
|
212
|
-
routeSync(agentName: string, content: Uint8Array, nowMs: number, correlationId: string): FrameClassification;
|
|
208
|
+
routeSync(agentName: string, content: Uint8Array, nowMs: number, correlationId: string, senderAgentId?: string): FrameClassification;
|
|
213
209
|
/** Classify and handle, awaiting the outcome. The path a caller takes when it wants the verdict. */
|
|
214
|
-
route(ownerAgentId: string, content: Uint8Array, nowMs: number, correlationId: string): Promise<FrameRouting>;
|
|
210
|
+
route(ownerAgentId: string, content: Uint8Array, nowMs: number, correlationId: string, senderAgentId?: string): Promise<FrameRouting>;
|
|
215
211
|
}
|
|
216
212
|
/**
|
|
217
213
|
* The largest field count a document frame can declare. The update envelope has 10 fields and the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document-frame-router.d.ts","sourceRoot":"","sources":["../src/document-frame-router.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG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AAM,EACrB,aAAa,SAAK,GACjB,OAAO,CAAC,YAAY,CAAC;CA2GzB;AAED;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,KAAK,CAAC;AAE5C;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,wBAAwB,QAAkB,CAAC"}
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
*
|
|
67
67
|
* The guard must never again be described as what makes hostile input safe. It was, and it was not.
|
|
68
68
|
*/
|
|
69
|
-
import { decodeCbor,
|
|
69
|
+
import { decodeCbor, decodeDocumentReconcile, decodeDocumentUpdateEnvelope, decodeDocumentProposal, decodeDocumentRejection, decodeDocumentProposalAck, decodeDocumentAmendment, } from "@cello-protocol/protocol-types";
|
|
70
70
|
export class DocumentFrameRouter {
|
|
71
71
|
#d;
|
|
72
72
|
/** One promise chain per owning agent — the serialization point. See `#enqueue`. */
|
|
@@ -89,7 +89,7 @@ export class DocumentFrameRouter {
|
|
|
89
89
|
* a per-document queue — see `#handle` — so the caller never waits and frames for one document
|
|
90
90
|
* never overtake each other.
|
|
91
91
|
*/
|
|
92
|
-
routeSync(agentName, content, nowMs, correlationId) {
|
|
92
|
+
routeSync(agentName, content, nowMs, correlationId, senderAgentId = "") {
|
|
93
93
|
const kind = classify(content);
|
|
94
94
|
if (kind === "unshaped")
|
|
95
95
|
return { consumed: false };
|
|
@@ -120,7 +120,7 @@ export class DocumentFrameRouter {
|
|
|
120
120
|
// which would hand an operator's agent a CBOR envelope as something a person said.
|
|
121
121
|
return { consumed: true, kind };
|
|
122
122
|
}
|
|
123
|
-
void this.#enqueue(ownerAgentId, content, nowMs, correlationId, kind);
|
|
123
|
+
void this.#enqueue(ownerAgentId, content, nowMs, correlationId, kind, senderAgentId);
|
|
124
124
|
return { consumed: true, kind };
|
|
125
125
|
}
|
|
126
126
|
/**
|
|
@@ -132,7 +132,7 @@ export class DocumentFrameRouter {
|
|
|
132
132
|
* Keyed by owner rather than by document: the document id is inside the frame, and reading it
|
|
133
133
|
* requires the decode this queue exists to schedule.
|
|
134
134
|
*/
|
|
135
|
-
#enqueue(ownerAgentId, content, nowMs, correlationId, kind) {
|
|
135
|
+
#enqueue(ownerAgentId, content, nowMs, correlationId, kind, senderAgentId) {
|
|
136
136
|
const previous = this.#queues.get(ownerAgentId) ?? Promise.resolve();
|
|
137
137
|
const next = previous
|
|
138
138
|
.catch(() => {
|
|
@@ -141,7 +141,7 @@ export class DocumentFrameRouter {
|
|
|
141
141
|
.then(async () => {
|
|
142
142
|
// `kind` is passed through rather than re-derived: `classify` does up to two full CBOR
|
|
143
143
|
// decodes, and this runs on every inbound frame.
|
|
144
|
-
const outcome = await this.#dispatch(ownerAgentId, content, nowMs, correlationId, kind);
|
|
144
|
+
const outcome = await this.#dispatch(ownerAgentId, content, nowMs, correlationId, kind, senderAgentId);
|
|
145
145
|
if (outcome.consumed && !outcome.ok) {
|
|
146
146
|
this.#d.logger.warn("document.frame.refused", {
|
|
147
147
|
kind: outcome.kind,
|
|
@@ -159,15 +159,15 @@ export class DocumentFrameRouter {
|
|
|
159
159
|
return next;
|
|
160
160
|
}
|
|
161
161
|
/** Classify and handle, awaiting the outcome. The path a caller takes when it wants the verdict. */
|
|
162
|
-
async route(ownerAgentId, content, nowMs, correlationId) {
|
|
162
|
+
async route(ownerAgentId, content, nowMs, correlationId, senderAgentId = "") {
|
|
163
163
|
const kind = classify(content);
|
|
164
164
|
// Both non-kinds mean "not ours" to this async entry point. `routeSync` is the path that
|
|
165
165
|
// distinguishes them, because it is the one that decides what the session does with the frame.
|
|
166
166
|
if (kind === "unshaped" || kind === "undecodable")
|
|
167
167
|
return { consumed: false };
|
|
168
|
-
return this.#dispatch(ownerAgentId, content, nowMs, correlationId, kind);
|
|
168
|
+
return this.#dispatch(ownerAgentId, content, nowMs, correlationId, kind, senderAgentId);
|
|
169
169
|
}
|
|
170
|
-
async #dispatch(ownerAgentId, content, nowMs, correlationId, kind) {
|
|
170
|
+
async #dispatch(ownerAgentId, content, nowMs, correlationId, kind, senderAgentId) {
|
|
171
171
|
try {
|
|
172
172
|
if (kind === "update") {
|
|
173
173
|
const res = await this.#d.inbound.receive(ownerAgentId, content, nowMs, correlationId);
|
|
@@ -201,31 +201,7 @@ export class DocumentFrameRouter {
|
|
|
201
201
|
});
|
|
202
202
|
}
|
|
203
203
|
if (res.ok) {
|
|
204
|
-
//
|
|
205
|
-
// — the frame type, the preimage and the receiving half all existed and no code path ever
|
|
206
|
-
// produced one. The layer's own header names this as a distinct silent failure: an
|
|
207
|
-
// inbound path with no ack producer leaves the peer retrying until their document stalls
|
|
208
|
-
// at the unacked ceiling, and every redelivery re-triggers their gate.
|
|
209
|
-
//
|
|
210
|
-
// A REJECTION IS AN ACK. `admitted: false` says the peer has decided, so the sender stops
|
|
211
|
-
// retrying and supersedes instead — modelling it as "no ack" is what makes a refused
|
|
212
|
-
// envelope redeliver forever.
|
|
213
|
-
//
|
|
214
|
-
// A DUPLICATE IS ACKED TOO, and that is the case that matters most here: a redelivery is
|
|
215
|
-
// usually evidence the first ack was lost, so staying silent about it guarantees the loop
|
|
216
|
-
// never ends.
|
|
217
|
-
// NOT AWAITED, deliberately. This runs inside the per-owner queue, and that queue exists
|
|
218
|
-
// to serialize the CHAIN CHECK — an envelope's predecessor must be stored before the next
|
|
219
|
-
// is examined. It does not exist to serialize network I/O. Awaiting a dial here means one
|
|
220
|
-
// slow or unreachable peer stalls every subsequent inbound frame for that agent, and the
|
|
221
|
-
// symptom is not "the ack was slow": it is documents failing to converge, minutes later,
|
|
222
|
-
// for no reason visible at the point of failure. Measured — it turned a 7-second live run
|
|
223
|
-
// into a 124-second timeout.
|
|
224
|
-
//
|
|
225
|
-
// The ack is best-effort by contract anyway: it cannot fail the content we have already
|
|
226
|
-
// admitted, and a lost one is recovered by the sender's redelivery, which is acked in
|
|
227
|
-
// turn.
|
|
228
|
-
// THE SIGNED REFUSAL ITSELF, when there is one. The ack says "refused"; this frame is what
|
|
204
|
+
// THE SIGNED REFUSAL ITSELF, when there is one. This frame is what
|
|
229
205
|
// advances the SENDER's retry round, and their entire supersede-then-stall protocol is
|
|
230
206
|
// driven by receiving it. Without it their counter never leaves zero and a peer whose
|
|
231
207
|
// every update is refused republishes forever, with its own surface reporting `active`.
|
|
@@ -242,41 +218,10 @@ export class DocumentFrameRouter {
|
|
|
242
218
|
});
|
|
243
219
|
});
|
|
244
220
|
}
|
|
245
|
-
void this.#d.sendAck(ownerAgentId, content, {
|
|
246
|
-
envelopeHash: res.envelopeHash,
|
|
247
|
-
admitted: res.admitted,
|
|
248
|
-
...(res.admitted ? {} : { rejectionReason: res.rejectionReason }),
|
|
249
|
-
correlationId,
|
|
250
|
-
}).catch((err) => {
|
|
251
|
-
// Contained: an unhandled rejection out of a fire-and-forget send takes the daemon down,
|
|
252
|
-
// and the one thing an ack must never do is cost us content we already hold.
|
|
253
|
-
this.#d.logger.warn("document.ack.send_threw", {
|
|
254
|
-
correlationId,
|
|
255
|
-
reason: err instanceof Error ? err.message : String(err),
|
|
256
|
-
});
|
|
257
|
-
});
|
|
258
|
-
}
|
|
259
|
-
// A TERMINAL REFUSAL IS ALSO AN ANSWER. Everything above hangs off `res.ok`, and that was
|
|
260
|
-
// the whole bug: a refusal the sender can never fix produced no ack at all, so their
|
|
261
|
-
// delivery never settled and the worker redelivered it on every tick, forever. The comment
|
|
262
|
-
// twenty lines up already named this failure mode and the code only covered the ok path.
|
|
263
|
-
//
|
|
264
|
-
// `terminal` is set exactly where redelivery cannot change the outcome AND the sender was
|
|
265
|
-
// authenticated first — see InboundResult. A non-terminal refusal deliberately stays
|
|
266
|
-
// silent, because there the retry IS the recovery path.
|
|
267
|
-
if (!res.ok && res.terminal === true && res.envelopeHash !== undefined) {
|
|
268
|
-
void this.#d.sendAck(ownerAgentId, content, {
|
|
269
|
-
envelopeHash: res.envelopeHash,
|
|
270
|
-
admitted: false,
|
|
271
|
-
rejectionReason: res.reason,
|
|
272
|
-
correlationId,
|
|
273
|
-
}).catch((err) => {
|
|
274
|
-
this.#d.logger.warn("document.ack.send_threw", {
|
|
275
|
-
correlationId,
|
|
276
|
-
reason: err instanceof Error ? err.message : String(err),
|
|
277
|
-
});
|
|
278
|
-
});
|
|
279
221
|
}
|
|
222
|
+
// SYNC-P4 (D4): no ack frame answers content anymore. An admitted envelope shows up in
|
|
223
|
+
// this holder's position at the next exchange — that IS the confirmation. A signed
|
|
224
|
+
// rejection (above) still travels, because it carries a decision, not a receipt.
|
|
280
225
|
return { consumed: true, kind, ok: res.ok, reason: res.ok ? undefined : res.reason };
|
|
281
226
|
}
|
|
282
227
|
if (kind === "proposal") {
|
|
@@ -291,24 +236,16 @@ export class DocumentFrameRouter {
|
|
|
291
236
|
this.#d.recordProposalAck(ownerAgentId, content, nowMs);
|
|
292
237
|
return { consumed: true, kind, ok: true };
|
|
293
238
|
}
|
|
294
|
-
if (kind === "control") {
|
|
295
|
-
this.#d.recordControl(ownerAgentId, content, nowMs);
|
|
296
|
-
return { consumed: true, kind, ok: true };
|
|
297
|
-
}
|
|
298
|
-
if (kind === "join_offer") {
|
|
299
|
-
this.#d.recordJoinOffer(ownerAgentId, content, nowMs);
|
|
300
|
-
return { consumed: true, kind, ok: true };
|
|
301
|
-
}
|
|
302
|
-
if (kind === "join_answer") {
|
|
303
|
-
this.#d.recordJoinAnswer(ownerAgentId, content, nowMs);
|
|
304
|
-
return { consumed: true, kind, ok: true };
|
|
305
|
-
}
|
|
306
239
|
if (kind === "amendment") {
|
|
307
240
|
this.#d.recordAmendment(ownerAgentId, content, nowMs);
|
|
308
241
|
return { consumed: true, kind, ok: true };
|
|
309
242
|
}
|
|
310
|
-
|
|
311
|
-
|
|
243
|
+
if (kind === "reconcile") {
|
|
244
|
+
const rec = await this.#d.handleReconcile(ownerAgentId, content, senderAgentId, nowMs, correlationId);
|
|
245
|
+
return { consumed: true, kind, ok: rec.ok, reason: rec.reason };
|
|
246
|
+
}
|
|
247
|
+
// Exhaustive over the kind union — reaching here is a programming fault the catch reports.
|
|
248
|
+
throw new Error(`document_frame_unrouted: ${kind}`);
|
|
312
249
|
}
|
|
313
250
|
catch (err) {
|
|
314
251
|
// Contained deliberately. The document layer refuses by returning a verdict, so reaching here
|
|
@@ -412,9 +349,6 @@ function classify(content) {
|
|
|
412
349
|
case "document_update":
|
|
413
350
|
decodeDocumentUpdateEnvelope(content);
|
|
414
351
|
return "update";
|
|
415
|
-
case "document_ack":
|
|
416
|
-
decodeDocumentAck(content);
|
|
417
|
-
return "ack";
|
|
418
352
|
case "document_proposal":
|
|
419
353
|
decodeDocumentProposal(content);
|
|
420
354
|
return "proposal";
|
|
@@ -424,18 +358,12 @@ function classify(content) {
|
|
|
424
358
|
case "document_proposal_ack":
|
|
425
359
|
decodeDocumentProposalAck(content);
|
|
426
360
|
return "proposal_ack";
|
|
427
|
-
case "document_control":
|
|
428
|
-
decodeDocumentControl(content);
|
|
429
|
-
return "control";
|
|
430
|
-
case "document_join_offer":
|
|
431
|
-
decodeDocumentJoinOffer(content);
|
|
432
|
-
return "join_offer";
|
|
433
|
-
case "document_join_answer":
|
|
434
|
-
decodeDocumentJoinAnswer(content);
|
|
435
|
-
return "join_answer";
|
|
436
361
|
case "document_amendment":
|
|
437
362
|
decodeDocumentAmendment(content);
|
|
438
363
|
return "amendment";
|
|
364
|
+
case "document_reconcile":
|
|
365
|
+
decodeDocumentReconcile(content);
|
|
366
|
+
return "reconcile";
|
|
439
367
|
default:
|
|
440
368
|
// A frame type this build does not know. Reported by the caller rather than silently
|
|
441
369
|
// treated as conversation — see `routeSync`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document-frame-router.js","sourceRoot":"","sources":["../src/document-frame-router.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AAEH,OAAO,EACL,UAAU,EACV,4BAA4B,EAC5B,iBAAiB,EACjB,sBAAsB,EACtB,uBAAuB,EACvB,yBAAyB,EACzB,qBAA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ACf,KAAK,mBAAmB;gBACtB,sBAAsB,CAAC,OAAO,CAAC,CAAC;gBAChC,OAAO,UAAU,CAAC;YACpB,KAAK,oBAAoB;gBACvB,uBAAuB,CAAC,OAAO,CAAC,CAAC;gBACjC,OAAO,WAAW,CAAC;YACrB,KAAK,uBAAuB;gBAC1B,yBAAyB,CAAC,OAAO,CAAC,CAAC;gBACnC,OAAO,cAAc,CAAC;YACxB,KAAK,kBAAkB;gBACrB,qBAAqB,CAAC,OAAO,CAAC,CAAC;gBAC/B,OAAO,SAAS,CAAC;YACnB,KAAK,qBAAqB;gBACxB,uBAAuB,CAAC,OAAO,CAAC,CAAC;gBACjC,OAAO,YAAY,CAAC;YACtB,KAAK,sBAAsB;gBACzB,wBAAwB,CAAC,OAAO,CAAC,CAAC;gBAClC,OAAO,aAAa,CAAC;YACvB,KAAK,oBAAoB;gBACvB,uBAAuB,CAAC,OAAO,CAAC,CAAC;gBACjC,OAAO,WAAW,CAAC;YACrB;gBACE,qFAAqF;gBACrF,6CAA6C;gBAC7C,OAAO,aAAa,CAAC;QACzB,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,0FAA0F;QAC1F,yDAAyD;QACzD,OAAO,aAAa,CAAC;IACvB,CAAC;AACH,CAAC"}
|
|
1
|
+
{"version":3,"file":"document-frame-router.js","sourceRoot":"","sources":["../src/document-frame-router.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AAEH,OAAO,EACL,UAAU,EACV,uBAAuB,EACvB,4BAA4B,EAC5B,sBAAsB,EACtB,uBAAuB,EACvB,yBAAyB,EACzB,uBAAuB,GACxB,MAAM,gCAAgC,CAAC;AAgIxC,MAAM,OAAO,mBAAmB;IACrB,EAAE,CAA0B;IACrC,oFAAoF;IAC3E,OAAO,GAAG,IAAI,GAAG,EAAyB,CAAC;IAEpD,YAAY,IAA6B;QACvC,IAAI,CAA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B,sBAAsB,CAAC,OAAO,CAAC,CAAC;gBAChC,OAAO,UAAU,CAAC;YACpB,KAAK,oBAAoB;gBACvB,uBAAuB,CAAC,OAAO,CAAC,CAAC;gBACjC,OAAO,WAAW,CAAC;YACrB,KAAK,uBAAuB;gBAC1B,yBAAyB,CAAC,OAAO,CAAC,CAAC;gBACnC,OAAO,cAAc,CAAC;YACxB,KAAK,oBAAoB;gBACvB,uBAAuB,CAAC,OAAO,CAAC,CAAC;gBACjC,OAAO,WAAW,CAAC;YACrB,KAAK,oBAAoB;gBACvB,uBAAuB,CAAC,OAAO,CAAC,CAAC;gBACjC,OAAO,WAAW,CAAC;YACrB;gBACE,qFAAqF;gBACrF,6CAA6C;gBAC7C,OAAO,aAAa,CAAC;QACzB,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,0FAA0F;QAC1F,yDAAyD;QACzD,OAAO,aAAa,CAAC;IACvB,CAAC;AACH,CAAC"}
|
|
@@ -27,7 +27,7 @@ import type { IpcHandler } from "./ipc-server.js";
|
|
|
27
27
|
import type { Logger } from "./types.js";
|
|
28
28
|
import type { DocumentLayer } from "./document-layer.js";
|
|
29
29
|
import type { DocumentPublish } from "./document-publish.js";
|
|
30
|
-
import type { DocumentDeliveryTransport } from "./document-delivery.js";
|
|
30
|
+
import type { DocumentDeliveryTransport } from "./document-delivery-transport.js";
|
|
31
31
|
export interface DocumentHandlerDeps {
|
|
32
32
|
handlers: Map<string, IpcHandler>;
|
|
33
33
|
logger: Logger;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document-handlers.d.ts","sourceRoot":"","sources":["../src/document-handlers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;
|
|
1
|
+
{"version":3,"file":"document-handlers.d.ts","sourceRoot":"","sources":["../src/document-handlers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AA2BH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAYlF,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,aAAa,CAAC;IACrB,OAAO,EAAE,eAAe,CAAC;IACzB,qFAAqF;IACrF,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,yBAAyB,CAAC;IAC3D,uFAAuF;IACvF,YAAY,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IACrE,mFAAmF;IACnF,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAC9C,+BAA+B;IAC/B,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAC9D,GAAG,IAAI,MAAM,CAAC;CACf;AAYD,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,mBAAmB,GAAG,IAAI,CA0mExE"}
|