@ibgib/core-gib 0.1.48 → 0.1.50

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.
Files changed (94) hide show
  1. package/dist/common/comment/comment-constants.d.mts +5 -0
  2. package/dist/common/comment/comment-constants.d.mts.map +1 -1
  3. package/dist/common/comment/comment-constants.mjs +5 -0
  4. package/dist/common/comment/comment-constants.mjs.map +1 -1
  5. package/dist/common/comment/comment-helper.d.mts +9 -1
  6. package/dist/common/comment/comment-helper.d.mts.map +1 -1
  7. package/dist/common/comment/comment-helper.mjs +7 -5
  8. package/dist/common/comment/comment-helper.mjs.map +1 -1
  9. package/dist/sync/sync-conflict-adv-multitimelines.respec.mjs +1 -1
  10. package/dist/sync/sync-conflict-adv-multitimelines.respec.mjs.map +1 -1
  11. package/dist/sync/sync-conflict-basic-divergence.respec.mjs +1 -1
  12. package/dist/sync/sync-conflict-basic-divergence.respec.mjs.map +1 -1
  13. package/dist/sync/sync-conflict-basic-multitimelines.respec.mjs +1 -1
  14. package/dist/sync/sync-conflict-basic-multitimelines.respec.mjs.map +1 -1
  15. package/dist/sync/sync-conflict-text-merge.respec.mjs +1 -1
  16. package/dist/sync/sync-conflict-text-merge.respec.mjs.map +1 -1
  17. package/dist/sync/sync-innerspace-constants.respec.mjs +1 -1
  18. package/dist/sync/sync-innerspace-constants.respec.mjs.map +1 -1
  19. package/dist/sync/sync-innerspace-deep-updates.respec.mjs +1 -1
  20. package/dist/sync/sync-innerspace-deep-updates.respec.mjs.map +1 -1
  21. package/dist/sync/sync-innerspace-dest-ahead-withid.respec.mjs +13 -13
  22. package/dist/sync/sync-innerspace-dest-ahead-withid.respec.mjs.map +1 -1
  23. package/dist/sync/sync-innerspace-dest-ahead.respec.mjs +1 -1
  24. package/dist/sync/sync-innerspace-dest-ahead.respec.mjs.map +1 -1
  25. package/dist/sync/sync-innerspace-multiple-timelines.respec.mjs +1 -1
  26. package/dist/sync/sync-innerspace-multiple-timelines.respec.mjs.map +1 -1
  27. package/dist/sync/sync-innerspace-partial-update.respec.mjs +1 -1
  28. package/dist/sync/sync-innerspace-partial-update.respec.mjs.map +1 -1
  29. package/dist/sync/sync-innerspace.respec.mjs +1 -1
  30. package/dist/sync/sync-innerspace.respec.mjs.map +1 -1
  31. package/dist/sync/sync-peer/sync-peer-http-receiver/sync-http-node-adapter.d.mts +57 -0
  32. package/dist/sync/sync-peer/sync-peer-http-receiver/sync-http-node-adapter.d.mts.map +1 -0
  33. package/dist/sync/sync-peer/sync-peer-http-receiver/sync-http-node-adapter.mjs +310 -0
  34. package/dist/sync/sync-peer/sync-peer-http-receiver/sync-http-node-adapter.mjs.map +1 -0
  35. package/dist/sync/sync-peer/sync-peer-http-receiver/sync-peer-http-receiver-types.d.mts +27 -0
  36. package/dist/sync/sync-peer/sync-peer-http-receiver/sync-peer-http-receiver-types.d.mts.map +1 -0
  37. package/dist/sync/sync-peer/sync-peer-http-receiver/sync-peer-http-receiver-types.mjs +2 -0
  38. package/dist/sync/sync-peer/sync-peer-http-receiver/sync-peer-http-receiver-types.mjs.map +1 -0
  39. package/dist/sync/sync-peer/sync-peer-http-receiver/sync-peer-http-receiver-v1.d.mts +29 -0
  40. package/dist/sync/sync-peer/sync-peer-http-receiver/sync-peer-http-receiver-v1.d.mts.map +1 -0
  41. package/dist/sync/sync-peer/sync-peer-http-receiver/sync-peer-http-receiver-v1.mjs +122 -0
  42. package/dist/sync/sync-peer/sync-peer-http-receiver/sync-peer-http-receiver-v1.mjs.map +1 -0
  43. package/dist/sync/sync-peer/sync-peer-http-sender/sync-peer-http-sender-types.d.mts +27 -0
  44. package/dist/sync/sync-peer/sync-peer-http-sender/sync-peer-http-sender-types.d.mts.map +1 -0
  45. package/dist/sync/sync-peer/sync-peer-http-sender/sync-peer-http-sender-types.mjs +2 -0
  46. package/dist/sync/sync-peer/sync-peer-http-sender/sync-peer-http-sender-types.mjs.map +1 -0
  47. package/dist/sync/sync-peer/sync-peer-http-sender/sync-peer-http-sender-v1.d.mts +24 -0
  48. package/dist/sync/sync-peer/sync-peer-http-sender/sync-peer-http-sender-v1.d.mts.map +1 -0
  49. package/dist/sync/sync-peer/sync-peer-http-sender/sync-peer-http-sender-v1.mjs +111 -0
  50. package/dist/sync/sync-peer/sync-peer-http-sender/sync-peer-http-sender-v1.mjs.map +1 -0
  51. package/dist/sync/sync-peer/sync-peer-http.respec.d.mts +8 -0
  52. package/dist/sync/sync-peer/sync-peer-http.respec.d.mts.map +1 -0
  53. package/dist/sync/sync-peer/sync-peer-http.respec.mjs +333 -0
  54. package/dist/sync/sync-peer/sync-peer-http.respec.mjs.map +1 -0
  55. package/dist/sync/sync-peer/sync-peer-innerspace/sync-peer-innerspace-v1.d.mts.map +1 -1
  56. package/dist/sync/sync-peer/sync-peer-innerspace/sync-peer-innerspace-v1.mjs +8 -7
  57. package/dist/sync/sync-peer/sync-peer-innerspace/sync-peer-innerspace-v1.mjs.map +1 -1
  58. package/dist/sync/sync-peer/sync-peer-types.d.mts +5 -5
  59. package/dist/sync/sync-peer/sync-peer-types.d.mts.map +1 -1
  60. package/dist/sync/sync-peer/sync-peer-v1.d.mts +0 -2
  61. package/dist/sync/sync-peer/sync-peer-v1.d.mts.map +1 -1
  62. package/dist/sync/sync-peer/sync-peer-v1.mjs +21 -5
  63. package/dist/sync/sync-peer/sync-peer-v1.mjs.map +1 -1
  64. package/dist/sync/sync-saga-coordinator.mjs +1 -1
  65. package/dist/sync/sync-saga-coordinator.mjs.map +1 -1
  66. package/ibgib-foundations.md +109 -89
  67. package/package.json +1 -1
  68. package/src/common/comment/comment-constants.mts +6 -0
  69. package/src/common/comment/comment-helper.mts +13 -4
  70. package/src/sync/sync-conflict-adv-multitimelines.respec.mts +1 -1
  71. package/src/sync/sync-conflict-basic-divergence.respec.mts +1 -1
  72. package/src/sync/sync-conflict-basic-multitimelines.respec.mts +1 -1
  73. package/src/sync/sync-conflict-text-merge.respec.mts +1 -1
  74. package/src/sync/sync-innerspace-constants.respec.mts +1 -1
  75. package/src/sync/sync-innerspace-deep-updates.respec.mts +1 -1
  76. package/src/sync/sync-innerspace-dest-ahead-withid.respec.mts +12 -12
  77. package/src/sync/sync-innerspace-dest-ahead.respec.mts +1 -1
  78. package/src/sync/sync-innerspace-multiple-timelines.respec.mts +1 -1
  79. package/src/sync/sync-innerspace-partial-update.respec.mts +1 -1
  80. package/src/sync/sync-innerspace.respec.mts +1 -1
  81. package/src/sync/sync-peer/sync-peer-http-receiver/sync-http-node-adapter.mts +319 -0
  82. package/src/sync/sync-peer/sync-peer-http-receiver/sync-http-node-adapter.mts.metadata.md +72 -0
  83. package/src/sync/sync-peer/sync-peer-http-receiver/sync-peer-http-receiver-types.mts +30 -0
  84. package/src/sync/sync-peer/sync-peer-http-receiver/sync-peer-http-receiver-v1.mts +146 -0
  85. package/src/sync/sync-peer/sync-peer-http-receiver/sync-peer-http-receiver-v1.mts.metadata.md +71 -0
  86. package/src/sync/sync-peer/sync-peer-http-sender/sync-peer-http-sender-types.mts +32 -0
  87. package/src/sync/sync-peer/sync-peer-http-sender/sync-peer-http-sender-v1.mts +129 -0
  88. package/src/sync/sync-peer/sync-peer-http.respec.mts +364 -0
  89. package/src/sync/sync-peer/sync-peer-innerspace/sync-peer-innerspace-types.mts +8 -8
  90. package/src/sync/sync-peer/sync-peer-innerspace/sync-peer-innerspace-v1.mts +10 -7
  91. package/src/sync/sync-peer/sync-peer-types.mts +11 -11
  92. package/src/sync/sync-peer/sync-peer-v1.mts +5 -7
  93. package/src/sync/sync-saga-coordinator.mts +1 -1
  94. package/tmp-certs/server.pfx +0 -0
@@ -0,0 +1,310 @@
1
+ import * as http2 from 'http2';
2
+ import { extractErrorMsg } from '@ibgib/helper-gib/dist/helpers/utils-helper.mjs';
3
+ import { GLOBAL_LOG_A_LOT } from '../../../core-constants.mjs';
4
+ const logalot = GLOBAL_LOG_A_LOT;
5
+ /**
6
+ * A basic Node HTTP adapter for the Symmetric Sync Protocol.
7
+ *
8
+ * Handles establishing the SSE EventSource stream (GET /sync/events)
9
+ * and receiving the Uplink (POST /sync/frame).
10
+ *
11
+ * NOTE: This is built using Node's standard `http` module. In a real
12
+ * production app (e.g. `node-gib` or a consumer app), you might adapt this
13
+ * to Express, Fastify, or directly to an HTTP/2 server.
14
+ */
15
+ export class SyncHttpNodeAdapter_V1 {
16
+ opts;
17
+ lc = `[${SyncHttpNodeAdapter_V1.name}]`;
18
+ server;
19
+ receiverPeer;
20
+ port;
21
+ basePath;
22
+ /**
23
+ * Map of clientId to their active Server-Sent Events HTTP Response streams.
24
+ */
25
+ activeSseStreams = new Map();
26
+ constructor(opts) {
27
+ this.opts = opts;
28
+ this.receiverPeer = opts.receiverPeer;
29
+ this.port = opts.port || 8080;
30
+ this.basePath = opts.basePath || '/sync';
31
+ }
32
+ /**
33
+ * Starts the HTTP Server listening on the configured port.
34
+ */
35
+ async start() {
36
+ const lc = `[${this.start.name}]`;
37
+ return new Promise((resolve, reject) => {
38
+ try {
39
+ if (logalot) {
40
+ console.log(`${lc} starting... (I: fc09bcef98bda9d91429161355c2e626)`);
41
+ }
42
+ const requestHandler = (req, res) => {
43
+ this.handleRequest(req, res).catch(e => {
44
+ console.error(`${lc} Uncaught request error: ${extractErrorMsg(e)}`);
45
+ if (!res.headersSent) {
46
+ res.writeHead(500);
47
+ res.end('Internal Server Error');
48
+ }
49
+ });
50
+ };
51
+ // Use Secure Server if TLS credentials are provided, otherwise fallback to unencrypted (h2c)
52
+ if ((this.opts.key && this.opts.cert) || this.opts.pfx) {
53
+ const secureOpts = {
54
+ allowHTTP1: true // Fallback to HTTP/1.1 for clients that don't support HTTP/2
55
+ };
56
+ if (this.opts.key)
57
+ secureOpts.key = this.opts.key;
58
+ if (this.opts.cert)
59
+ secureOpts.cert = this.opts.cert;
60
+ if (this.opts.pfx)
61
+ secureOpts.pfx = this.opts.pfx;
62
+ if (this.opts.passphrase)
63
+ secureOpts.passphrase = this.opts.passphrase;
64
+ this.server = http2.createSecureServer(secureOpts, requestHandler);
65
+ }
66
+ else {
67
+ this.server = http2.createServer({}, requestHandler);
68
+ }
69
+ this.server.listen(this.port, () => {
70
+ const protocol = ((this.opts.key && this.opts.cert) || this.opts.pfx) ? 'https/h2' : 'http/h2c';
71
+ if (logalot) {
72
+ console.log(`${lc} Server listening on port ${this.port} (${protocol}) (I: 67a5ce98074c5aaaff022f5b3804c226)`);
73
+ }
74
+ resolve();
75
+ });
76
+ }
77
+ catch (error) {
78
+ console.error(`${lc} ${extractErrorMsg(error)}`);
79
+ reject(error);
80
+ }
81
+ finally {
82
+ if (logalot) {
83
+ console.log(`${lc} complete. (I: 1d9e40501e6c191b186ae32edf151526)`);
84
+ }
85
+ }
86
+ });
87
+ }
88
+ /**
89
+ * Stops the HTTP Server and closes all active streams.
90
+ */
91
+ async stop() {
92
+ const lc = `[${this.stop.name}]`;
93
+ return new Promise((resolve, reject) => {
94
+ try {
95
+ if (logalot) {
96
+ console.log(`${lc} starting... (I: d7bca060bb02a9fa0cbd4fb65971fb26)`);
97
+ }
98
+ for (const res of this.activeSseStreams.values()) {
99
+ res.end(); // close all open streams
100
+ }
101
+ this.activeSseStreams.clear();
102
+ if (this.server) {
103
+ this.server.close((err) => {
104
+ if (err)
105
+ return reject(err);
106
+ resolve();
107
+ });
108
+ }
109
+ else {
110
+ resolve();
111
+ }
112
+ }
113
+ catch (error) {
114
+ console.error(`${lc} ${extractErrorMsg(error)}`);
115
+ reject(error);
116
+ }
117
+ finally {
118
+ if (logalot) {
119
+ console.log(`${lc} complete. (I: afa81c5b3a3f88fb6fe0066dd096ff26)`);
120
+ }
121
+ }
122
+ });
123
+ }
124
+ async handleRequest(req, res) {
125
+ const lc = `${this.lc}[${this.handleRequest.name}]`;
126
+ try {
127
+ if (logalot) {
128
+ console.log(`${lc} starting... (I: 286853cd380d13292d2d36171ca11a26)`);
129
+ }
130
+ // Set basic CORS headers for browser clients
131
+ res.setHeader('Access-Control-Allow-Origin', '*');
132
+ res.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS');
133
+ res.setHeader('Access-Control-Allow-Headers', 'Content-Type, Authorization');
134
+ if (req.method === 'OPTIONS') {
135
+ res.writeHead(204);
136
+ res.end();
137
+ return;
138
+ }
139
+ const url = new URL(req.url || '/', `http://${req.headers.host}`);
140
+ // Route: GET /sync/events
141
+ if (req.method === 'GET' && url.pathname.startsWith(`${this.basePath}/events`)) {
142
+ return this.handleSseStreamRequest(req, res, url);
143
+ }
144
+ // Route: POST /sync/frame
145
+ if (req.method === 'POST' && url.pathname.startsWith(`${this.basePath}/frame`)) {
146
+ return this.handleSyncFrameRequest(req, res, url);
147
+ }
148
+ res.writeHead(404);
149
+ res.end('Not Found');
150
+ }
151
+ catch (error) {
152
+ console.error(`${lc} ${extractErrorMsg(error)}`);
153
+ throw error;
154
+ }
155
+ finally {
156
+ if (logalot) {
157
+ console.log(`${lc} complete.`);
158
+ }
159
+ }
160
+ }
161
+ async handleSseStreamRequest(req, res, url) {
162
+ const lc = `${this.lc}[${this.handleSseStreamRequest.name}]`;
163
+ try {
164
+ if (logalot) {
165
+ console.log(`${lc} starting... (I: 17800c6b501b3b07436303e97b930626)`);
166
+ }
167
+ // Get clientId from query param, or generate one
168
+ const clientId = url.searchParams.get('clientId') || Math.random().toString(36).substring(2, 10);
169
+ if (logalot) {
170
+ console.log(`${lc} New SSE Connection: ${clientId} (I: c1ebeeb91763b76ed0a64cf8af7c6326)`);
171
+ }
172
+ res.writeHead(200, {
173
+ 'Content-Type': 'text/event-stream',
174
+ 'Cache-Control': 'no-cache',
175
+ 'Connection': 'keep-alive'
176
+ });
177
+ // Register the stream
178
+ this.activeSseStreams.set(clientId, res);
179
+ // Keep connection alive
180
+ const keepAliveInterval = setInterval(() => {
181
+ res.write(`:\n\n`); // comment line
182
+ }, 30000);
183
+ req.on('close', () => {
184
+ if (logalot) {
185
+ console.log(`${lc} SSE Connection Closed: ${clientId} (I: 44aea766eb8b7279e5d9cf699a12cb26)`);
186
+ }
187
+ clearInterval(keepAliveInterval);
188
+ this.activeSseStreams.delete(clientId);
189
+ });
190
+ // Send an initial connected message (optional)
191
+ res.write(`data: ${JSON.stringify({ type: 'connected', clientId })}\n\n`);
192
+ }
193
+ catch (error) {
194
+ console.error(`${lc} ${extractErrorMsg(error)}`);
195
+ throw error;
196
+ }
197
+ finally {
198
+ if (logalot) {
199
+ console.log(`${lc} complete.`);
200
+ }
201
+ }
202
+ }
203
+ async handleSyncFrameRequest(req, res, url) {
204
+ const lc = `${this.lc}[${this.handleSyncFrameRequest.name}]`;
205
+ try {
206
+ if (logalot) {
207
+ console.log(`${lc} starting... (I: fee247b53b894f2b6cf3f1f2d4dec726)`);
208
+ }
209
+ // Assume the client ID is passed via query param or header
210
+ const clientId = url.searchParams.get('clientId') || req.headers['x-client-id'];
211
+ if (!clientId) {
212
+ res.writeHead(400);
213
+ res.end('clientId required');
214
+ return;
215
+ }
216
+ const streamRes = this.activeSseStreams.get(clientId);
217
+ if (!streamRes) {
218
+ res.writeHead(400);
219
+ res.end(`No active SSE stream found for clientId: ${clientId}`);
220
+ return;
221
+ }
222
+ // 1. Parse incoming POST body
223
+ const body = await this.readRequestBody(req);
224
+ // TODO [USER]: Deserialize your incoming JSON request body into the expected IbGib variables
225
+ const parsedBody = JSON.parse(body);
226
+ // EXPECTED TYPES:
227
+ const context = parsedBody.context;
228
+ const controlIbGibs = parsedBody.controlIbGibs || [];
229
+ // 2. Hand it off to the HTTP Receiver Peer
230
+ if (logalot) {
231
+ console.log(`${lc} Handling Incoming Sync Request from ${clientId} (I: d89d3d28a418d9f6b261b61a164bd326)`);
232
+ }
233
+ const responseContext = await this.receiverPeer.handleIncomingSyncRequest({
234
+ context,
235
+ controlIbGibs
236
+ });
237
+ if (!responseContext) {
238
+ res.writeHead(200);
239
+ res.end('OK - No Response Context');
240
+ return;
241
+ }
242
+ // 3. We successfully processed it and got a responseContext.
243
+ // Now, we must stream the response down the `streamRes` (SSE Connection).
244
+ // Stream Domain IbGibs first
245
+ if (responseContext.payloadIbGibsDomain) {
246
+ for (const domainIbGib of responseContext.payloadIbGibsDomain) {
247
+ // TODO [USER]: Serialize Domain IbGib for transport
248
+ const payloadChunk = JSON.stringify({
249
+ type: 'domain',
250
+ ibGib: domainIbGib
251
+ });
252
+ streamRes.write(`data: ${payloadChunk}\n\n`);
253
+ }
254
+ // Clean it up so we don't send the entire domain payload list again in the control context
255
+ delete responseContext.payloadIbGibsDomain;
256
+ }
257
+ // Stream Control Context response
258
+ // TODO [USER]: Serialize Response Context for transport
259
+ const contextChunk = JSON.stringify({
260
+ type: 'context',
261
+ context: responseContext
262
+ });
263
+ streamRes.write(`data: ${contextChunk}\n\n`);
264
+ // Ack the POST request
265
+ res.writeHead(200);
266
+ res.end('OK');
267
+ }
268
+ catch (error) {
269
+ console.error(`${lc} ${extractErrorMsg(error)}`);
270
+ res.writeHead(500);
271
+ res.end(`Internal Server Error`);
272
+ }
273
+ finally {
274
+ if (logalot) {
275
+ console.log(`${lc} complete.`);
276
+ }
277
+ }
278
+ }
279
+ readRequestBody(req) {
280
+ const lc = `${this.lc}[${this.readRequestBody.name}]`;
281
+ return new Promise((resolve, reject) => {
282
+ try {
283
+ if (logalot) {
284
+ console.log(`${lc} starting... (I: 95cf4f489e1b7174dc5294096c651326)`);
285
+ }
286
+ let body = '';
287
+ req.on('data', chunk => {
288
+ body += chunk.toString();
289
+ });
290
+ req.on('end', () => {
291
+ resolve(body);
292
+ });
293
+ req.on('error', (err) => {
294
+ console.error(`${lc} ${extractErrorMsg(err)}`);
295
+ reject(err);
296
+ });
297
+ }
298
+ catch (error) {
299
+ console.error(`${lc} ${extractErrorMsg(error)}`);
300
+ reject(error);
301
+ }
302
+ finally {
303
+ if (logalot) {
304
+ console.log(`${lc} complete.`);
305
+ }
306
+ }
307
+ });
308
+ }
309
+ }
310
+ //# sourceMappingURL=sync-http-node-adapter.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync-http-node-adapter.mjs","sourceRoot":"","sources":["../../../../src/sync/s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C,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE;oBACpB,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,IAAI,eAAe,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;oBAC/C,MAAM,CAAC,GAAG,CAAC,CAAC;gBAChB,CAAC,CAAC,CAAC;YACP,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACb,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,IAAI,eAAe,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;gBACjD,MAAM,CAAC,KAAK,CAAC,CAAC;YAClB,CAAC;oBAAS,CAAC;gBACP,IAAI,OAAO,EAAE,CAAC;oBAAC,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;gBAAC,CAAC;YACpD,CAAC;QACL,CAAC,CAAC,CAAC;IACP,CAAC;CACJ"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @module sync-peer-http-receiver-types
3
+ */
4
+ import { IbGib_V1 } from '@ibgib/ts-gib/dist/V1/types.mjs';
5
+ import { SyncPeerData_V1, SyncPeerRel8ns_V1, InitializeSyncPeerOpts } from '../sync-peer-types.mjs';
6
+ import { MetaspaceService } from '../../../witness/space/metaspace/metaspace-types.mjs';
7
+ import { SyncSagaCoordinator } from '../../sync-saga-coordinator.mjs';
8
+ /**
9
+ * Data for the SyncPeerHttpReceiver witness.
10
+ */
11
+ export interface SyncPeerHttpReceiverData_V1 extends SyncPeerData_V1 {
12
+ }
13
+ /**
14
+ * Relations for the SyncPeerHttpReceiver witness.
15
+ */
16
+ export interface SyncPeerHttpReceiverRel8ns_V1 extends SyncPeerRel8ns_V1 {
17
+ }
18
+ /**
19
+ * The SyncPeerHttpReceiver witness IbGib.
20
+ */
21
+ export interface SyncPeerHttpReceiverIbGib_V1 extends IbGib_V1<SyncPeerHttpReceiverData_V1, SyncPeerHttpReceiverRel8ns_V1> {
22
+ }
23
+ export interface InitializeSyncPeerHttpReceiverOpts extends InitializeSyncPeerOpts {
24
+ localCoordinator: SyncSagaCoordinator;
25
+ localMetaspace: MetaspaceService;
26
+ }
27
+ //# sourceMappingURL=sync-peer-http-receiver-types.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync-peer-http-receiver-types.d.mts","sourceRoot":"","sources":["../../../../src/sync/sync-peer/sync-peer-http-receiver/sync-peer-http-receiver-types.mts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAgC,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AACzF,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAmB,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AACrH,OAAO,EAAE,gBAAgB,EAAE,MAAM,sDAAsD,CAAC;AACxF,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAGtE;;GAEG;AACH,MAAM,WAAW,2BAA4B,SAAQ,eAAe;CACnE;AAED;;GAEG;AACH,MAAM,WAAW,6BAA8B,SAAQ,iBAAiB;CACvE;AAED;;GAEG;AACH,MAAM,WAAW,4BAA6B,SAAQ,QAAQ,CAAC,2BAA2B,EAAE,6BAA6B,CAAC;CAAI;AAE9H,MAAM,WAAW,kCAAmC,SAAQ,sBAAsB;IAC9E,gBAAgB,EAAE,mBAAmB,CAAC;IACtC,cAAc,EAAE,gBAAgB,CAAC;CACpC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=sync-peer-http-receiver-types.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync-peer-http-receiver-types.mjs","sourceRoot":"","sources":["../../../../src/sync/sync-peer/sync-peer-http-receiver/sync-peer-http-receiver-types.mts"],"names":[],"mappings":""}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * @module sync-peer-http-receiver-v1
3
+ */
4
+ import { IbGib_V1 } from '@ibgib/ts-gib/dist/V1/types.mjs';
5
+ import { SyncPeer_V1 } from '../sync-peer-v1.mjs';
6
+ import { SyncSagaContextIbGib_V1 } from '../../sync-saga-context/sync-saga-context-types.mjs';
7
+ import { IbGibSpaceAny } from '../../../witness/space/space-base-v1.mjs';
8
+ import { InitializeSyncPeerHttpReceiverOpts, SyncPeerHttpReceiverData_V1, SyncPeerHttpReceiverRel8ns_V1, SyncPeerHttpReceiverIbGib_V1 } from './sync-peer-http-receiver-types.mjs';
9
+ /**
10
+ * Http Receiver Peer implementation.
11
+ * Acts as the Symmetric Server Node. Accepts requests, routes to Receiver Coordinator.
12
+ */
13
+ export declare class SyncPeerHttpReceiver_V1 extends SyncPeer_V1<InitializeSyncPeerHttpReceiverOpts> implements SyncPeerHttpReceiverIbGib_V1 {
14
+ protected lc: string;
15
+ get classname(): string;
16
+ data: SyncPeerHttpReceiverData_V1 | undefined;
17
+ rel8ns: SyncPeerHttpReceiverRel8ns_V1 | undefined;
18
+ constructor(initialData: SyncPeerHttpReceiverData_V1, initialRel8ns?: SyncPeerHttpReceiverRel8ns_V1);
19
+ protected ensureLocalTempSpace(): Promise<IbGibSpaceAny>;
20
+ protected sendContextRequest(context: SyncSagaContextIbGib_V1): Promise<SyncSagaContextIbGib_V1 | undefined>;
21
+ /**
22
+ * Entry point from the HTTP Endpoint Adapter (e.g. Express POST route)
23
+ */
24
+ handleIncomingSyncRequest({ context, controlIbGibs, }: {
25
+ context: SyncSagaContextIbGib_V1;
26
+ controlIbGibs?: IbGib_V1[];
27
+ }): Promise<SyncSagaContextIbGib_V1 | undefined>;
28
+ }
29
+ //# sourceMappingURL=sync-peer-http-receiver-v1.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync-peer-http-receiver-v1.d.mts","sourceRoot":"","sources":["../../../../src/sync/sync-peer/sync-peer-http-receiver/sync-peer-http-receiver-v1.mts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAG3D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,uBAAuB,EAAE,MAAM,qDAAqD,CAAC;AAC9F,OAAO,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AACzE,OAAO,EACH,kCAAkC,EAClC,2BAA2B,EAC3B,6BAA6B,EAC7B,4BAA4B,EAC/B,MAAM,qCAAqC,CAAC;AAK7C;;;GAGG;AACH,qBAAa,uBACT,SAAQ,WAAW,CAAC,kCAAkC,CACtD,YAAW,4BAA4B;IAEvC,UAAmB,EAAE,EAAE,MAAM,CAAuC;IAEpE,IAAa,SAAS,IAAI,MAAM,CAE/B;IAEO,IAAI,EAAE,2BAA2B,GAAG,SAAS,CAAC;IAC9C,MAAM,EAAE,6BAA6B,GAAG,SAAS,CAAC;gBAGtD,WAAW,EAAE,2BAA2B,EACxC,aAAa,CAAC,EAAE,6BAA6B;cAKjC,oBAAoB,IAAI,OAAO,CAAC,aAAa,CAAC;cA8BrC,kBAAkB,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,uBAAuB,GAAG,SAAS,CAAC;IAkB3H;;OAEG;IACU,yBAAyB,CAAC,EACnC,OAAO,EACP,aAAkB,GACrB,EAAE;QACC,OAAO,EAAE,uBAAuB,CAAC;QACjC,aAAa,CAAC,EAAE,QAAQ,EAAE,CAAC;KAC9B,GAAG,OAAO,CAAC,uBAAuB,GAAG,SAAS,CAAC;CA2CnD"}
@@ -0,0 +1,122 @@
1
+ /**
2
+ * @module sync-peer-http-receiver-v1
3
+ */
4
+ import { extractErrorMsg } from '@ibgib/helper-gib/dist/helpers/utils-helper.mjs';
5
+ import { GLOBAL_LOG_A_LOT } from '../../../core-constants.mjs';
6
+ import { SyncPeer_V1 } from '../sync-peer-v1.mjs';
7
+ import { putInSpace } from '../../../witness/space/space-helper.mjs';
8
+ const logalot = GLOBAL_LOG_A_LOT;
9
+ /**
10
+ * Http Receiver Peer implementation.
11
+ * Acts as the Symmetric Server Node. Accepts requests, routes to Receiver Coordinator.
12
+ */
13
+ export class SyncPeerHttpReceiver_V1 extends SyncPeer_V1 {
14
+ lc = `[${SyncPeerHttpReceiver_V1.name}]`;
15
+ get classname() {
16
+ return SyncPeerHttpReceiver_V1.name;
17
+ }
18
+ constructor(initialData, initialRel8ns) {
19
+ super(initialData, initialRel8ns);
20
+ }
21
+ async ensureLocalTempSpace() {
22
+ const lc = `${this.lc}[${this.ensureLocalTempSpace.name}]`;
23
+ try {
24
+ if (!this.opts) {
25
+ throw new Error(`opts not initialized. (E: 3a77d1f466b92cc7940c0f241ac6c926)`);
26
+ }
27
+ if (!this.opts.localTempSpace) {
28
+ const { localMetaspace } = this.opts;
29
+ const uuid = crypto.randomUUID ? crypto.randomUUID() : Math.random().toString(36);
30
+ const tempSpaceName = `tmp_sync_recv_${uuid.substring(0, 8)}`;
31
+ const localTempSpace = await localMetaspace.createNewLocalSpace({
32
+ opts: {
33
+ allowCancel: false,
34
+ spaceName: tempSpaceName,
35
+ getFnPrompt: localMetaspace.getFnPrompt,
36
+ logalot
37
+ }
38
+ });
39
+ if (!localTempSpace) {
40
+ throw new Error(`couldn't create a temp space (E: fed96e4491b7297240031fb7f04adf26)`);
41
+ }
42
+ await localTempSpace.initialized;
43
+ this.opts.localTempSpace = localTempSpace;
44
+ }
45
+ return this.opts.localTempSpace;
46
+ }
47
+ catch (error) {
48
+ console.error(`${lc} ${extractErrorMsg(error)}`);
49
+ throw error;
50
+ }
51
+ }
52
+ async sendContextRequest(context) {
53
+ const lc = `${this.lc}[${this.sendContextRequest.name}]`;
54
+ try {
55
+ if (logalot) {
56
+ console.log(`${lc} starting... (I: 5297013216ae491894600b5a81115d26)`);
57
+ }
58
+ // This method might not be directly called on the receiver in the same way
59
+ // as it is on the sender, or it handles the internal routing for the HTTP request.
60
+ // When an HTTP Endpoint receives a POST, it deserializes the context and triggers this.
61
+ throw new Error(`Not implemented (E: c56d5d6799b76bd8fd661846f6b9ee26)`);
62
+ }
63
+ catch (error) {
64
+ console.error(`${lc} ${extractErrorMsg(error)}`);
65
+ throw error;
66
+ }
67
+ finally {
68
+ if (logalot) {
69
+ console.log(`${lc} complete.`);
70
+ }
71
+ }
72
+ }
73
+ /**
74
+ * Entry point from the HTTP Endpoint Adapter (e.g. Express POST route)
75
+ */
76
+ async handleIncomingSyncRequest({ context, controlIbGibs = [], }) {
77
+ const lc = `${this.lc}[${this.handleIncomingSyncRequest.name}]`;
78
+ try {
79
+ if (logalot) {
80
+ console.log(`${lc} starting... (I: 1de30d7db7e404ddf59eeed22a3bde26)`);
81
+ }
82
+ if (!this.opts) {
83
+ throw new Error(`opts not initialized. (E: 56f585e25a54489280c9ba1393a46226)`);
84
+ }
85
+ const { localCoordinator, localMetaspace, localSpace } = this.opts;
86
+ const localTempSpace = await this.ensureLocalTempSpace();
87
+ // Put control ibgibs into durable space
88
+ const allControlIbGibs = [context, ...controlIbGibs];
89
+ for (const ibGib of allControlIbGibs) {
90
+ await putInSpace({ space: localSpace, ibGibs: [ibGib] });
91
+ }
92
+ // Put domain payloads into temp space
93
+ if (context.payloadIbGibsDomain && context.payloadIbGibsDomain.length > 0) {
94
+ for (const ibGib of context.payloadIbGibsDomain) {
95
+ await putInSpace({ space: localTempSpace, ibGibs: [ibGib] });
96
+ }
97
+ }
98
+ const identitySecret = context.fnIdentitySecret ?
99
+ await context.fnIdentitySecret() :
100
+ undefined;
101
+ const responseCtx = await localCoordinator.continueSync({
102
+ sagaContext: context,
103
+ metaspace: localMetaspace,
104
+ mySpace: localSpace,
105
+ myTempSpace: localTempSpace,
106
+ identity: context.signedSessionKeystone,
107
+ identitySecret,
108
+ });
109
+ return responseCtx || undefined;
110
+ }
111
+ catch (error) {
112
+ console.error(`${lc} ${extractErrorMsg(error)}`);
113
+ throw error;
114
+ }
115
+ finally {
116
+ if (logalot) {
117
+ console.log(`${lc} complete.`);
118
+ }
119
+ }
120
+ }
121
+ }
122
+ //# sourceMappingURL=sync-peer-http-receiver-v1.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync-peer-http-receiver-v1.mjs","sourceRoot":"","sources":["../../../../src/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AC,CAAC;gBAC7C,MAAM,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC;gBAClC,SAAS,CAAC;YAEd,MAAM,WAAW,GAAG,MAAM,gBAAgB,CAAC,YAAY,CAAC;gBACpD,WAAW,EAAE,OAAO;gBACpB,SAAS,EAAE,cAAc;gBACzB,OAAO,EAAE,UAAU;gBACnB,WAAW,EAAE,cAAc;gBAC3B,QAAQ,EAAE,OAAO,CAAC,qBAAqB;gBACvC,cAAc;aACjB,CAAC,CAAC;YAEH,OAAO,WAAW,IAAI,SAAS,CAAC;QACpC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,IAAI,eAAe,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YACjD,MAAM,KAAK,CAAC;QAChB,CAAC;gBAAS,CAAC;YACP,IAAI,OAAO,EAAE,CAAC;gBAAC,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;YAAC,CAAC;QACpD,CAAC;IACL,CAAC;CACJ"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @module sync-peer-http-sender-types
3
+ */
4
+ import { IbGib_V1 } from '@ibgib/ts-gib/dist/V1/types.mjs';
5
+ import { SyncPeerData_V1, SyncPeerRel8ns_V1, InitializeSyncPeerOpts } from '../sync-peer-types.mjs';
6
+ /**
7
+ * Data for the SyncPeerHttpSender witness.
8
+ */
9
+ export interface SyncPeerHttpSenderData_V1 extends SyncPeerData_V1 {
10
+ /** Http POST endpoint for sending context */
11
+ syncRoute: string;
12
+ /** Http GET endpoint for SSE events */
13
+ syncEventsRoute: string;
14
+ }
15
+ /**
16
+ * Relations for the SyncPeerHttpSender witness.
17
+ */
18
+ export interface SyncPeerHttpSenderRel8ns_V1 extends SyncPeerRel8ns_V1 {
19
+ }
20
+ /**
21
+ * The SyncPeerHttpSender witness IbGib.
22
+ */
23
+ export interface SyncPeerHttpSenderIbGib_V1 extends IbGib_V1<SyncPeerHttpSenderData_V1, SyncPeerHttpSenderRel8ns_V1> {
24
+ }
25
+ export interface InitializeSyncPeerHttpSenderOpts extends InitializeSyncPeerOpts {
26
+ }
27
+ //# sourceMappingURL=sync-peer-http-sender-types.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync-peer-http-sender-types.d.mts","sourceRoot":"","sources":["../../../../src/sync/sync-peer/sync-peer-http-sender/sync-peer-http-sender-types.mts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAgC,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AACzF,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAmB,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAErH;;GAEG;AACH,MAAM,WAAW,yBAA0B,SAAQ,eAAe;IAC9D,6CAA6C;IAC7C,SAAS,EAAE,MAAM,CAAC;IAClB,uCAAuC;IACvC,eAAe,EAAE,MAAM,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,2BAA4B,SAAQ,iBAAiB;CACrE;AAED;;GAEG;AACH,MAAM,WAAW,0BAA2B,SAAQ,QAAQ,CAAC,yBAAyB,EAAE,2BAA2B,CAAC;CAAI;AAExH,MAAM,WAAW,gCAAiC,SAAQ,sBAAsB;CAI/E"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=sync-peer-http-sender-types.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync-peer-http-sender-types.mjs","sourceRoot":"","sources":["../../../../src/sync/sync-peer/sync-peer-http-sender/sync-peer-http-sender-types.mts"],"names":[],"mappings":""}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @module sync-peer-http-sender-v1
3
+ */
4
+ import { SyncPeer_V1 } from '../sync-peer-v1.mjs';
5
+ import { SyncSagaContextIbGib_V1 } from '../../sync-saga-context/sync-saga-context-types.mjs';
6
+ import { InitializeSyncPeerHttpSenderOpts, SyncPeerHttpSenderData_V1, SyncPeerHttpSenderRel8ns_V1, SyncPeerHttpSenderIbGib_V1 } from './sync-peer-http-sender-types.mjs';
7
+ /**
8
+ * Http Sender Peer implementation.
9
+ * Sends Context to a remote server utilizing POST for uplink and SSE for downlink.
10
+ */
11
+ export declare class SyncPeerHttpSender_V1 extends SyncPeer_V1<InitializeSyncPeerHttpSenderOpts> implements SyncPeerHttpSenderIbGib_V1 {
12
+ protected lc: string;
13
+ get classname(): string;
14
+ data: SyncPeerHttpSenderData_V1 | undefined;
15
+ rel8ns: SyncPeerHttpSenderRel8ns_V1 | undefined;
16
+ /**
17
+ * Stored reference to the SSE EventSource connection.
18
+ * Ensure you polyfill EventSource in Node environments if needed.
19
+ */
20
+ protected eventSource?: EventSource;
21
+ constructor(initialData: SyncPeerHttpSenderData_V1, initialRel8ns?: SyncPeerHttpSenderRel8ns_V1);
22
+ protected sendContextRequest(context: SyncSagaContextIbGib_V1): Promise<SyncSagaContextIbGib_V1 | undefined>;
23
+ }
24
+ //# sourceMappingURL=sync-peer-http-sender-v1.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync-peer-http-sender-v1.d.mts","sourceRoot":"","sources":["../../../../src/sync/sync-peer/sync-peer-http-sender/sync-peer-http-sender-v1.mts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,uBAAuB,EAAE,MAAM,qDAAqD,CAAC;AAG9F,OAAO,EACH,gCAAgC,EAChC,yBAAyB,EACzB,2BAA2B,EAC3B,0BAA0B,EAC7B,MAAM,mCAAmC,CAAC;AAI3C;;;GAGG;AACH,qBAAa,qBACT,SAAQ,WAAW,CAAC,gCAAgC,CACpD,YAAW,0BAA0B;IAErC,UAAmB,EAAE,EAAE,MAAM,CAAqC;IAElE,IAAa,SAAS,IAAI,MAAM,CAE/B;IAEO,IAAI,EAAE,yBAAyB,GAAG,SAAS,CAAC;IAC5C,MAAM,EAAE,2BAA2B,GAAG,SAAS,CAAC;IAExD;;;OAGG;IACH,SAAS,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC;gBAGhC,WAAW,EAAE,yBAAyB,EACtC,aAAa,CAAC,EAAE,2BAA2B;cAOtB,kBAAkB,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,uBAAuB,GAAG,SAAS,CAAC;CA8E9H"}