@cello-protocol/daemon 0.0.33 → 0.0.34
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/daemon.d.ts.map +1 -1
- package/dist/daemon.js +10 -5
- package/dist/daemon.js.map +1 -1
- package/dist/session-node-manager.d.ts +14 -1
- package/dist/session-node-manager.d.ts.map +1 -1
- package/dist/session-node-manager.js +21 -1
- package/dist/session-node-manager.js.map +1 -1
- package/package.json +3 -3
package/dist/daemon.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daemon.d.ts","sourceRoot":"","sources":["../src/daemon.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAKH,OAAO,KAAK,EACV,YAAY,EACZ,oBAAoB,EASrB,MAAM,YAAY,CAAC;AAIpB,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAQ/D,OAAO,EAAoD,KAAK,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAsB7G,OAAO,KAAK,EAAE,kBAAkB,EAA+C,MAAM,yBAAyB,CAAC;AAO/G,OAAO,EAAoB,KAAK,eAAe,EAAE,MAAM,2BAA2B,CAAC;AA0InF,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpC,SAAS,IAAI,oBAAoB,CAAC;IAClC;;;;OAIG;IACH,qBAAqB,IAAI,kBAAkB,CAAC;IAC5C;;;;;;;;OAQG;IACH,gBAAgB,IAAI,SAAS,GAAG,IAAI,CAAC;IACrC;;;;OAIG;IACH,oBAAoB,IAAI,kBAAkB,CAAC;IAC3C;;;OAGG;IACH,iBAAiB,IAAI,eAAe,CAAC;CACtC;AA2CD,eAAO,MAAM,sBAAsB,QAAsB,CAAC;AAE1D,wBAAsB,WAAW,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC,
|
|
1
|
+
{"version":3,"file":"daemon.d.ts","sourceRoot":"","sources":["../src/daemon.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAKH,OAAO,KAAK,EACV,YAAY,EACZ,oBAAoB,EASrB,MAAM,YAAY,CAAC;AAIpB,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAQ/D,OAAO,EAAoD,KAAK,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAsB7G,OAAO,KAAK,EAAE,kBAAkB,EAA+C,MAAM,yBAAyB,CAAC;AAO/G,OAAO,EAAoB,KAAK,eAAe,EAAE,MAAM,2BAA2B,CAAC;AA0InF,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpC,SAAS,IAAI,oBAAoB,CAAC;IAClC;;;;OAIG;IACH,qBAAqB,IAAI,kBAAkB,CAAC;IAC5C;;;;;;;;OAQG;IACH,gBAAgB,IAAI,SAAS,GAAG,IAAI,CAAC;IACrC;;;;OAIG;IACH,oBAAoB,IAAI,kBAAkB,CAAC;IAC3C;;;OAGG;IACH,iBAAiB,IAAI,eAAe,CAAC;CACtC;AA2CD,eAAO,MAAM,sBAAsB,QAAsB,CAAC;AAE1D,wBAAsB,WAAW,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC,CA01K7E"}
|
package/dist/daemon.js
CHANGED
|
@@ -1391,8 +1391,13 @@ export async function startDaemon(config) {
|
|
|
1391
1391
|
sessionNodeManager.setContentParkHook(async ({ sessionId, recipientPubkeyHex, relayPeerId, relayAddrs, contentHashHex, content, structure1Cbor, structure2Cbor }) => {
|
|
1392
1392
|
const node = sessionNodeManager.getStandingReceiverNode();
|
|
1393
1393
|
if (!node) {
|
|
1394
|
-
|
|
1395
|
-
|
|
1394
|
+
const reason = "standing_receiver_unavailable";
|
|
1395
|
+
logger.warn("content.park.deposit.failed", { sessionId, contentHash: contentHashHex, reason });
|
|
1396
|
+
// DOD-LEAVEMSG-1 (reviewer HIGH fix): return the typed failure, never resolve as if this
|
|
1397
|
+
// were a success — #parkContent's caller (sendContent) shapes a live "dispatched to relay"
|
|
1398
|
+
// response from this, and a silently-resolved void here would report a message as safely
|
|
1399
|
+
// parked when nothing was ever deposited.
|
|
1400
|
+
return { ok: false, reason };
|
|
1396
1401
|
}
|
|
1397
1402
|
const recipientPubkey = Buffer.from(recipientPubkeyHex, "hex");
|
|
1398
1403
|
// DOD-MSG-4 (2b): seal the ORDERING ENVELOPE (content + the relay's signed Structure2), not bare
|
|
@@ -1407,10 +1412,10 @@ export async function startDaemon(config) {
|
|
|
1407
1412
|
});
|
|
1408
1413
|
if (res.ok) {
|
|
1409
1414
|
logger.info("content.park.deposited", { sessionId, contentHash: contentHashHex, recipientPubkey: recipientPubkeyHex.slice(0, 16) });
|
|
1415
|
+
return { ok: true };
|
|
1410
1416
|
}
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
}
|
|
1417
|
+
logger.warn("content.park.deposit.failed", { sessionId, contentHash: contentHashHex, reason: res.reason });
|
|
1418
|
+
return { ok: false, reason: res.reason ?? "relay_deposit_failed" };
|
|
1414
1419
|
});
|
|
1415
1420
|
// CELLO-M7-MSG-001 (AC-004/AC-005, D-d): startup flush of locally-persisted un-acked
|
|
1416
1421
|
// content (the crash backstop). Runs HERE — before the IPC socket opens, consistent
|