@ibgib/core-gib 0.1.21 → 0.1.22
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/sync/sync-conflict.respec.mjs +24 -22
- package/dist/sync/sync-conflict.respec.mjs.map +1 -1
- package/dist/sync/sync-constants.d.mts +8 -8
- package/dist/sync/sync-constants.d.mts.map +1 -1
- package/dist/sync/sync-constants.mjs +3 -3
- package/dist/sync/sync-constants.mjs.map +1 -1
- package/dist/sync/sync-helpers.d.mts +2 -0
- package/dist/sync/sync-helpers.d.mts.map +1 -1
- package/dist/sync/sync-helpers.mjs +11 -9
- package/dist/sync/sync-helpers.mjs.map +1 -1
- package/dist/sync/sync-innerspace-constants.respec.mjs +5 -1
- package/dist/sync/sync-innerspace-constants.respec.mjs.map +1 -1
- package/dist/sync/sync-innerspace-deep-updates.respec.mjs +5 -1
- package/dist/sync/sync-innerspace-deep-updates.respec.mjs.map +1 -1
- package/dist/sync/sync-innerspace-dest-ahead.respec.mjs +8 -4
- package/dist/sync/sync-innerspace-dest-ahead.respec.mjs.map +1 -1
- package/dist/sync/sync-innerspace-multiple-timelines.respec.mjs +5 -1
- package/dist/sync/sync-innerspace-multiple-timelines.respec.mjs.map +1 -1
- package/dist/sync/sync-innerspace-partial-update.respec.mjs +5 -1
- package/dist/sync/sync-innerspace-partial-update.respec.mjs.map +1 -1
- package/dist/sync/sync-innerspace.respec.mjs +5 -1
- package/dist/sync/sync-innerspace.respec.mjs.map +1 -1
- package/dist/sync/sync-peer/sync-peer-constants.d.mts +2 -0
- package/dist/sync/sync-peer/sync-peer-constants.d.mts.map +1 -0
- package/dist/sync/sync-peer/sync-peer-constants.mjs +2 -0
- package/dist/sync/sync-peer/sync-peer-constants.mjs.map +1 -0
- package/dist/sync/sync-peer/sync-peer-helpers.d.mts +2 -0
- package/dist/sync/sync-peer/sync-peer-helpers.d.mts.map +1 -0
- package/dist/sync/sync-peer/sync-peer-helpers.mjs +2 -0
- package/dist/sync/sync-peer/sync-peer-helpers.mjs.map +1 -0
- package/dist/sync/sync-peer/sync-peer-innerspace/sync-peer-innerspace-constants.d.mts +8 -0
- package/dist/sync/sync-peer/sync-peer-innerspace/sync-peer-innerspace-constants.d.mts.map +1 -0
- package/dist/sync/sync-peer/sync-peer-innerspace/sync-peer-innerspace-constants.mjs +8 -0
- package/dist/sync/sync-peer/sync-peer-innerspace/sync-peer-innerspace-constants.mjs.map +1 -0
- package/dist/sync/sync-peer/sync-peer-innerspace/sync-peer-innerspace-helpers.d.mts +18 -0
- package/dist/sync/sync-peer/sync-peer-innerspace/sync-peer-innerspace-helpers.d.mts.map +1 -0
- package/dist/sync/sync-peer/sync-peer-innerspace/sync-peer-innerspace-helpers.mjs +54 -0
- package/dist/sync/sync-peer/sync-peer-innerspace/sync-peer-innerspace-helpers.mjs.map +1 -0
- package/dist/sync/sync-peer/sync-peer-innerspace/sync-peer-innerspace-types.d.mts +80 -0
- package/dist/sync/sync-peer/sync-peer-innerspace/sync-peer-innerspace-types.d.mts.map +1 -0
- package/dist/sync/sync-peer/sync-peer-innerspace/sync-peer-innerspace-types.mjs +5 -0
- package/dist/sync/sync-peer/sync-peer-innerspace/sync-peer-innerspace-types.mjs.map +1 -0
- package/dist/sync/sync-peer/sync-peer-innerspace/sync-peer-innerspace-v1.d.mts +43 -0
- package/dist/sync/sync-peer/sync-peer-innerspace/sync-peer-innerspace-v1.d.mts.map +1 -0
- package/dist/sync/sync-peer/sync-peer-innerspace/sync-peer-innerspace-v1.mjs +229 -0
- package/dist/sync/sync-peer/sync-peer-innerspace/sync-peer-innerspace-v1.mjs.map +1 -0
- package/dist/sync/sync-peer/sync-peer-types.d.mts +12 -0
- package/dist/sync/sync-peer/sync-peer-types.d.mts.map +1 -1
- package/dist/sync/sync-peer/sync-peer-v1.d.mts +15 -7
- package/dist/sync/sync-peer/sync-peer-v1.d.mts.map +1 -1
- package/dist/sync/sync-peer/sync-peer-v1.mjs +105 -24
- package/dist/sync/sync-peer/sync-peer-v1.mjs.map +1 -1
- package/dist/sync/sync-saga-context/sync-saga-context-helpers.d.mts +5 -8
- package/dist/sync/sync-saga-context/sync-saga-context-helpers.d.mts.map +1 -1
- package/dist/sync/sync-saga-context/sync-saga-context-helpers.mjs +34 -18
- package/dist/sync/sync-saga-context/sync-saga-context-helpers.mjs.map +1 -1
- package/dist/sync/sync-saga-context/sync-saga-context-types.d.mts +26 -22
- package/dist/sync/sync-saga-context/sync-saga-context-types.d.mts.map +1 -1
- package/dist/sync/sync-saga-context/sync-saga-context-types.mjs +1 -9
- package/dist/sync/sync-saga-context/sync-saga-context-types.mjs.map +1 -1
- package/dist/sync/sync-saga-coordinator.d.mts +23 -33
- package/dist/sync/sync-saga-coordinator.d.mts.map +1 -1
- package/dist/sync/sync-saga-coordinator.mjs +271 -163
- package/dist/sync/sync-saga-coordinator.mjs.map +1 -1
- package/dist/sync/sync-types.d.mts +15 -3
- package/dist/sync/sync-types.d.mts.map +1 -1
- package/dist/witness/light-witness-base-v1.d.mts.map +1 -1
- package/dist/witness/light-witness-base-v1.mjs +2 -0
- package/dist/witness/light-witness-base-v1.mjs.map +1 -1
- package/dist/witness/space/inner-space/inner-space-v1.mjs +1 -1
- package/dist/witness/space/inner-space/inner-space-v1.mjs.map +1 -1
- package/package.json +1 -1
- package/src/sync/README.md +31 -22
- package/src/sync/sync-conflict.respec.mts +23 -19
- package/src/sync/sync-constants.mts +4 -5
- package/src/sync/sync-helpers.mts +11 -7
- package/src/sync/sync-innerspace-constants.respec.mts +5 -1
- package/src/sync/sync-innerspace-deep-updates.respec.mts +5 -1
- package/src/sync/sync-innerspace-dest-ahead.respec.mts +7 -3
- package/src/sync/sync-innerspace-multiple-timelines.respec.mts +5 -1
- package/src/sync/sync-innerspace-partial-update.respec.mts +8 -2
- package/src/sync/sync-innerspace.respec.mts +5 -1
- package/src/sync/sync-peer/sync-peer-constants.mts +0 -0
- package/src/sync/sync-peer/sync-peer-helpers.mts +0 -0
- package/src/sync/sync-peer/sync-peer-innerspace/sync-peer-innerspace-constants.mts +8 -0
- package/src/sync/sync-peer/sync-peer-innerspace/sync-peer-innerspace-helpers.mts +72 -0
- package/src/sync/sync-peer/sync-peer-innerspace/sync-peer-innerspace-types.mts +87 -0
- package/src/sync/sync-peer/sync-peer-innerspace/sync-peer-innerspace-v1.mts +242 -0
- package/src/sync/sync-peer/sync-peer-types.mts +13 -1
- package/src/sync/sync-peer/sync-peer-v1.mts +93 -27
- package/src/sync/sync-saga-context/sync-saga-context-helpers.mts +47 -29
- package/src/sync/sync-saga-context/sync-saga-context-types.mts +29 -30
- package/src/sync/sync-saga-coordinator.mts +280 -170
- package/src/sync/sync-types.mts +17 -3
- package/src/witness/light-witness-base-v1.mts +2 -1
- package/src/witness/space/inner-space/inner-space-v1.mts +1 -1
- package/test_output.log +0 -0
- package/tmp.md +62 -44
- package/dist/sync/sync-local-spaces.respec.d.mts +0 -2
- package/dist/sync/sync-local-spaces.respec.d.mts.map +0 -1
- package/dist/sync/sync-local-spaces.respec.mjs +0 -159
- package/dist/sync/sync-local-spaces.respec.mjs.map +0 -1
- package/dist/sync/sync-peer/sync-peer-innerspace-v1.d.mts +0 -42
- package/dist/sync/sync-peer/sync-peer-innerspace-v1.d.mts.map +0 -1
- package/dist/sync/sync-peer/sync-peer-innerspace-v1.mjs +0 -194
- package/dist/sync/sync-peer/sync-peer-innerspace-v1.mjs.map +0 -1
- package/dist/sync/sync-saga-coordinator.respec.d.mts +0 -2
- package/dist/sync/sync-saga-coordinator.respec.d.mts.map +0 -1
- package/dist/sync/sync-saga-coordinator.respec.mjs +0 -40
- package/dist/sync/sync-saga-coordinator.respec.mjs.map +0 -1
- package/src/sync/sync-local-spaces.respec.mts +0 -200
- package/src/sync/sync-peer/sync-peer-innerspace-v1.mts +0 -240
- package/src/sync/sync-saga-coordinator.respec.mts +0 -52
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
* @module SyncPeer_V1 witness class
|
|
3
3
|
*/
|
|
4
4
|
import { IbGib_V1 } from '@ibgib/ts-gib/dist/V1/types.mjs';
|
|
5
|
+
import { SubjectWitness } from '../../common/pubsub/subject/subject-types.mjs';
|
|
5
6
|
import { SyncSagaContextIbGib_V1 } from '../sync-saga-context/sync-saga-context-types.mjs';
|
|
6
7
|
import { SyncPeerData_V1, SyncPeerRel8ns_V1, SyncPeerWitness } from './sync-peer-types.mjs';
|
|
7
8
|
import { LightWitnessBase_V1 } from '../../witness/light-witness-base-v1.mjs';
|
|
9
|
+
import { IbGibAddr } from '@ibgib/ts-gib/dist/types.mjs';
|
|
8
10
|
/**
|
|
9
11
|
* Abstract witness for talking to a Sync Peer (e.g. Remote Node or Local Simulator).
|
|
10
12
|
*
|
|
@@ -17,6 +19,9 @@ import { LightWitnessBase_V1 } from '../../witness/light-witness-base-v1.mjs';
|
|
|
17
19
|
*/
|
|
18
20
|
export declare abstract class SyncPeer_V1 extends LightWitnessBase_V1<SyncPeerData_V1, SyncPeerRel8ns_V1> implements SyncPeerWitness {
|
|
19
21
|
protected lc: string;
|
|
22
|
+
abstract payloadIbGibsDomainReceived$: SubjectWitness<IbGib_V1>;
|
|
23
|
+
get classname(): string;
|
|
24
|
+
constructor(initialData: SyncPeerData_V1, initialRel8ns?: SyncPeerRel8ns_V1);
|
|
20
25
|
/**
|
|
21
26
|
* Witness the synchronization context (Send/Receive).
|
|
22
27
|
*
|
|
@@ -25,18 +30,21 @@ export declare abstract class SyncPeer_V1 extends LightWitnessBase_V1<SyncPeerDa
|
|
|
25
30
|
*/
|
|
26
31
|
witness(arg: SyncSagaContextIbGib_V1): Promise<SyncSagaContextIbGib_V1 | undefined>;
|
|
27
32
|
/**
|
|
28
|
-
*
|
|
33
|
+
* Transmits the Context IbGib itself to the Peer.
|
|
29
34
|
*/
|
|
30
|
-
protected abstract
|
|
35
|
+
protected abstract sendContextRequest(context: SyncSagaContextIbGib_V1): Promise<SyncSagaContextIbGib_V1 | undefined>;
|
|
31
36
|
/**
|
|
32
|
-
*
|
|
33
|
-
*
|
|
37
|
+
* Pushes specific IbGib(s) (by address) from Local to Remote.
|
|
38
|
+
*
|
|
39
|
+
* Should NOT have to handle identifying if the remote already has it
|
|
40
|
+
* (optimization), because the sync coordinator should be doing this in
|
|
41
|
+
* its diffing algorithm.
|
|
34
42
|
*/
|
|
35
|
-
protected abstract push(
|
|
43
|
+
protected abstract push(addrs: IbGibAddr[]): Promise<void>;
|
|
36
44
|
/**
|
|
37
|
-
* Primitive: Pulls
|
|
45
|
+
* Primitive: Pulls specific IbGib(s) (by address) from Remote to Local.
|
|
38
46
|
*/
|
|
39
|
-
protected abstract pull(
|
|
47
|
+
protected abstract pull(addrs: IbGibAddr[]): Promise<void>;
|
|
40
48
|
/**
|
|
41
49
|
* Helper to orchestrate the PUSH of a Context's dependency graph.
|
|
42
50
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync-peer-v1.d.mts","sourceRoot":"","sources":["../../../src/sync/sync-peer/sync-peer-v1.mts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"sync-peer-v1.d.mts","sourceRoot":"","sources":["../../../src/sync/sync-peer/sync-peer-v1.mts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,+CAA+C,CAAC;AAI/E,OAAO,EAAE,uBAAuB,EAAE,MAAM,kDAAkD,CAAC;AAC3F,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC5F,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAC9E,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAMzD;;;;;;;;;GASG;AACH,8BAAsB,WAAY,SAAQ,mBAAmB,CAAC,eAAe,EAAE,iBAA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_A_LOT } from '../../core-constants.mjs';
|
|
7
|
-
import { SYNC_MSG_REL8N_NAME,
|
|
7
|
+
import { SYNC_MSG_REL8N_NAME, SYNC_SAGA_PAYLOAD_ADDRS_DOMAIN } from '../sync-constants.mjs';
|
|
8
8
|
import { LightWitnessBase_V1 } from '../../witness/light-witness-base-v1.mjs';
|
|
9
9
|
const logalot = GLOBAL_LOG_A_LOT || true;
|
|
10
|
+
const logalotControlDomain = true;
|
|
11
|
+
const lcControlDomain = '[ControlDomain]';
|
|
10
12
|
/**
|
|
11
13
|
* Abstract witness for talking to a Sync Peer (e.g. Remote Node or Local Simulator).
|
|
12
14
|
*
|
|
@@ -19,6 +21,18 @@ const logalot = GLOBAL_LOG_A_LOT || true;
|
|
|
19
21
|
*/
|
|
20
22
|
export class SyncPeer_V1 extends LightWitnessBase_V1 {
|
|
21
23
|
lc = `[${SyncPeer_V1.name}]`;
|
|
24
|
+
get classname() {
|
|
25
|
+
if (!this.data) {
|
|
26
|
+
throw new Error(`(UNEXPECTED) this.data falsy? (E: 1ab1841e9338b54f3aa615fa37024826)`);
|
|
27
|
+
}
|
|
28
|
+
if (!this.data.classname) {
|
|
29
|
+
throw new Error(`invalid peer. this.data.classname is falsy (E: b0ee28a0abb84a06588d9de7afcef826)`);
|
|
30
|
+
}
|
|
31
|
+
return this.data.classname;
|
|
32
|
+
}
|
|
33
|
+
constructor(initialData, initialRel8ns) {
|
|
34
|
+
super(initialData, initialRel8ns);
|
|
35
|
+
}
|
|
22
36
|
/**
|
|
23
37
|
* Witness the synchronization context (Send/Receive).
|
|
24
38
|
*
|
|
@@ -28,13 +42,16 @@ export class SyncPeer_V1 extends LightWitnessBase_V1 {
|
|
|
28
42
|
async witness(arg) {
|
|
29
43
|
const lc = `${this.lc}[${this.witness.name}]`;
|
|
30
44
|
try {
|
|
45
|
+
if (logalot) {
|
|
46
|
+
console.log(`${lc} starting...`);
|
|
47
|
+
}
|
|
31
48
|
if (logalot) {
|
|
32
49
|
console.log(`${lc} starting...`);
|
|
33
50
|
}
|
|
34
51
|
// 1. PUSH: Ensure Request Data is available on Receiver
|
|
35
52
|
await this.pushContextGraph({ context: arg });
|
|
36
53
|
// 2. EXECUTE: Trigger Remote Processing
|
|
37
|
-
const response = await this.
|
|
54
|
+
const response = await this.sendContextRequest(arg);
|
|
38
55
|
if (!response) {
|
|
39
56
|
if (logalot) {
|
|
40
57
|
console.log(`${lc} No response from peer.`);
|
|
@@ -59,34 +76,52 @@ export class SyncPeer_V1 extends LightWitnessBase_V1 {
|
|
|
59
76
|
* Helper to orchestrate the PUSH of a Context's dependency graph.
|
|
60
77
|
*/
|
|
61
78
|
async pushContextGraph({ context }) {
|
|
79
|
+
const lc = `[${SyncPeer_V1.name}][pushContextGraph]`;
|
|
62
80
|
// A. Push Context Envelope
|
|
63
81
|
const contextAddr = getIbGibAddr({ ibGib: context });
|
|
64
|
-
|
|
82
|
+
if (logalotControlDomain) {
|
|
83
|
+
console.log(`${lc}${lcControlDomain} PUSH Context Envelope -> ${contextAddr} (I: 3f4e5a6b7c8d9e0f)`);
|
|
84
|
+
}
|
|
85
|
+
await this.push([contextAddr]);
|
|
65
86
|
// B. Push Saga Frame & Immediate Deps (Msg, Identity)
|
|
66
87
|
const frameAddr = context.rel8ns?.sagaFrame?.[0];
|
|
67
88
|
if (frameAddr) {
|
|
68
|
-
|
|
89
|
+
if (logalotControlDomain) {
|
|
90
|
+
console.log(`${lc}${lcControlDomain} PUSH CONTROL: Saga Frame -> ${frameAddr} (I: 4a5b6c7d8e9f0a1b)`);
|
|
91
|
+
}
|
|
92
|
+
await this.push([frameAddr]);
|
|
69
93
|
// We inspect the local frame to find its immediate deps
|
|
70
94
|
const frame = await this.getLocalIbGib(frameAddr);
|
|
71
95
|
if (frame) {
|
|
72
96
|
// Msg Stone
|
|
73
97
|
const msgAddrs = frame.rel8ns?.[SYNC_MSG_REL8N_NAME];
|
|
74
98
|
if (msgAddrs) {
|
|
75
|
-
for (const addr of msgAddrs)
|
|
76
|
-
|
|
99
|
+
for (const addr of msgAddrs) {
|
|
100
|
+
if (logalotControlDomain) {
|
|
101
|
+
console.log(`${lc}${lcControlDomain} PUSH CONTROL: Msg Stone -> ${addr} (I: 5b6c7d8e9f0a1b2c)`);
|
|
102
|
+
}
|
|
103
|
+
await this.push([addr]);
|
|
104
|
+
}
|
|
77
105
|
}
|
|
78
106
|
// Identity
|
|
79
107
|
const idAddrs = frame.rel8ns?.identity;
|
|
80
108
|
if (idAddrs) {
|
|
81
|
-
for (const addr of idAddrs)
|
|
82
|
-
|
|
109
|
+
for (const addr of idAddrs) {
|
|
110
|
+
if (logalotControlDomain) {
|
|
111
|
+
console.log(`${lc}${lcControlDomain} PUSH CONTROL: Identity -> ${addr} (I: 6c7d8e9f0a1b2c3d)`);
|
|
112
|
+
}
|
|
113
|
+
await this.push([addr]);
|
|
114
|
+
}
|
|
83
115
|
}
|
|
84
116
|
}
|
|
85
117
|
}
|
|
86
118
|
// C. Push Session Identity
|
|
87
119
|
const sessionKeystoneAddr = context.rel8ns?.sessionKeystone?.[0];
|
|
88
120
|
if (sessionKeystoneAddr) {
|
|
89
|
-
|
|
121
|
+
if (logalotControlDomain) {
|
|
122
|
+
console.log(`${lc}${lcControlDomain} PUSH CONTROL: Session Keystone -> ${sessionKeystoneAddr} (I: 7d8e9f0a1b2c3d4e)`);
|
|
123
|
+
}
|
|
124
|
+
await this.push([sessionKeystoneAddr]);
|
|
90
125
|
}
|
|
91
126
|
// D. Push Payloads (Deep/Soft)
|
|
92
127
|
// For payloads, the Peer is just a transport. It doesn't know the structure.
|
|
@@ -95,50 +130,96 @@ export class SyncPeer_V1 extends LightWitnessBase_V1 {
|
|
|
95
130
|
// Or do we need to be explicit?
|
|
96
131
|
// User said: "payloads should be flat... sync coordinator is the one doing the heavy lifting".
|
|
97
132
|
// So we just push the addrs listed.
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
133
|
+
// 1. Control Payloads
|
|
134
|
+
// const controlAddrs = context.data?.[SYNC_SAGA_PAYLOAD_ADDRS_CONTROL];
|
|
135
|
+
// if (controlAddrs && controlAddrs.length > 0) {
|
|
136
|
+
// if (logalotControlDomain) { console.log(`${lc}${lcControlDomain} PUSH CONTROL PAYLOADS (${controlAddrs.length}): ${controlAddrs.join(', ')} (I: 8e9f0a1b2c3d4e5f)`); }
|
|
137
|
+
// for (const addr of controlAddrs) {
|
|
138
|
+
// await this.push(addr);
|
|
139
|
+
// }
|
|
140
|
+
// }
|
|
141
|
+
// 2. Domain Payloads
|
|
142
|
+
const domainAddrs = context.data?.[SYNC_SAGA_PAYLOAD_ADDRS_DOMAIN];
|
|
143
|
+
if (domainAddrs && domainAddrs.length > 0) {
|
|
144
|
+
if (logalotControlDomain) {
|
|
145
|
+
console.log(`${lc}${lcControlDomain} PUSH DOMAIN PAYLOADS (${domainAddrs.length}): ${domainAddrs.join(', ')} (I: 9f0a1b2c3d4e5f6a)`);
|
|
146
|
+
}
|
|
147
|
+
for (const addr of domainAddrs) {
|
|
148
|
+
await this.push([addr]);
|
|
102
149
|
}
|
|
103
150
|
}
|
|
151
|
+
if (logalotControlDomain) {
|
|
152
|
+
console.log(`${lc}${lcControlDomain} PUSH COMPLETE for context ${contextAddr} (I: a0b1c2d3e4f5a6b7)`);
|
|
153
|
+
}
|
|
104
154
|
}
|
|
105
155
|
/**
|
|
106
156
|
* Helper to orchestrate the PULL of a Context's dependency graph.
|
|
107
157
|
*/
|
|
108
158
|
async pullContextGraph({ context }) {
|
|
159
|
+
const lc = `[${SyncPeer_V1.name}][pullContextGraph]`;
|
|
109
160
|
// A. Pull Context Envelope
|
|
110
161
|
const contextAddr = getIbGibAddr({ ibGib: context });
|
|
111
|
-
|
|
162
|
+
if (logalotControlDomain) {
|
|
163
|
+
console.log(`${lc}${lcControlDomain} PULL Context Envelope <- ${contextAddr} (I: b1c2d3e4f5a6b7c8)`);
|
|
164
|
+
}
|
|
165
|
+
await this.pull([contextAddr]);
|
|
112
166
|
// B. Pull Saga Frame & Immediate Deps
|
|
113
167
|
const frameAddr = context.rel8ns?.sagaFrame?.[0];
|
|
114
168
|
if (frameAddr) {
|
|
115
|
-
|
|
169
|
+
if (logalotControlDomain) {
|
|
170
|
+
console.log(`${lc}${lcControlDomain} PULL CONTROL: Saga Frame <- ${frameAddr} (I: c2d3e4f5a6b7c8d9)`);
|
|
171
|
+
}
|
|
172
|
+
await this.pull([frameAddr]);
|
|
116
173
|
// Inspect REMOTE frame? We need to have pulled it first.
|
|
117
174
|
const frame = await this.getLocalIbGib(frameAddr); // Should be local now
|
|
118
175
|
if (frame) {
|
|
119
176
|
const msgAddrs = frame.rel8ns?.[SYNC_MSG_REL8N_NAME];
|
|
120
177
|
if (msgAddrs) {
|
|
121
|
-
for (const addr of msgAddrs)
|
|
122
|
-
|
|
178
|
+
for (const addr of msgAddrs) {
|
|
179
|
+
if (logalotControlDomain) {
|
|
180
|
+
console.log(`${lc}${lcControlDomain} PULL CONTROL: Msg Stone <- ${addr} (I: d3e4f5a6b7c8d9e0)`);
|
|
181
|
+
}
|
|
182
|
+
await this.pull([addr]);
|
|
183
|
+
}
|
|
123
184
|
}
|
|
124
185
|
const idAddrs = frame.rel8ns?.identity;
|
|
125
186
|
if (idAddrs) {
|
|
126
|
-
for (const addr of idAddrs)
|
|
127
|
-
|
|
187
|
+
for (const addr of idAddrs) {
|
|
188
|
+
if (logalotControlDomain) {
|
|
189
|
+
console.log(`${lc}${lcControlDomain} PULL CONTROL: Identity <- ${addr} (I: e4f5a6b7c8d9e0f1)`);
|
|
190
|
+
}
|
|
191
|
+
await this.pull([addr]);
|
|
192
|
+
}
|
|
128
193
|
}
|
|
129
194
|
}
|
|
130
195
|
}
|
|
131
196
|
// C. Pull Session Identity
|
|
132
197
|
const sessionKeystoneAddr = context.rel8ns?.sessionKeystone?.[0];
|
|
133
198
|
if (sessionKeystoneAddr) {
|
|
134
|
-
|
|
199
|
+
if (logalotControlDomain) {
|
|
200
|
+
console.log(`${lc}${lcControlDomain} PULL CONTROL: Session Keystone <- ${sessionKeystoneAddr} (I: f5a6b7c8d9e0f1a2)`);
|
|
201
|
+
}
|
|
202
|
+
await this.pull([sessionKeystoneAddr]);
|
|
135
203
|
}
|
|
136
204
|
// D. Pull Payloads
|
|
137
|
-
const
|
|
138
|
-
if (
|
|
139
|
-
|
|
140
|
-
|
|
205
|
+
// const controlAddrs = context.data?.[SYNC_SAGA_PAYLOAD_ADDRS_CONTROL];
|
|
206
|
+
// if (controlAddrs && controlAddrs.length > 0) {
|
|
207
|
+
// if (logalotControlDomain) { console.log(`${lc}${lcControlDomain} PULL CONTROL PAYLOADS (${controlAddrs.length}): ${controlAddrs.join(', ')} (I: a6b7c8d9e0f1a2b3)`); }
|
|
208
|
+
// for (const addr of controlAddrs) {
|
|
209
|
+
// await this.pull(addr);
|
|
210
|
+
// }
|
|
211
|
+
// }
|
|
212
|
+
const domainAddrs = context.data?.[SYNC_SAGA_PAYLOAD_ADDRS_DOMAIN];
|
|
213
|
+
if (domainAddrs && domainAddrs.length > 0) {
|
|
214
|
+
if (logalotControlDomain) {
|
|
215
|
+
console.log(`${lc}${lcControlDomain} PULL DOMAIN PAYLOADS (${domainAddrs.length}): ${domainAddrs.join(', ')} (I: b7c8d9e0f1a2b3c4)`);
|
|
141
216
|
}
|
|
217
|
+
for (const addr of domainAddrs) {
|
|
218
|
+
await this.pull([addr]);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
if (logalotControlDomain) {
|
|
222
|
+
console.log(`${lc}${lcControlDomain} PULL COMPLETE for context ${contextAddr} (I: c8d9e0f1a2b3c4d5)`);
|
|
142
223
|
}
|
|
143
224
|
}
|
|
144
225
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync-peer-v1.mjs","sourceRoot":"","sources":["../../../src/sync/sync-peer/sync-peer-v1.mts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,iDAAiD,CAAC;AAClF,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AAM,GAAG,CAAC,EAAE,CAAC;YACxC,IAAI,oBAAoB,EAAE,CAAC;gBAAC,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,eAAe,0BAA0B,WAAW,CAAC,MAAM,MAAM,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;YAAC,CAAC;YACnK,KAAK,MAAM,IAAI,IAAI,WAAW,EAAE,CAAC;gBAC7B,MAAM,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;YAC5B,CAAC;QACL,CAAC;QAED,IAAI,oBAAoB,EAAE,CAAC;YAAC,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,eAAe,8BAA8B,WAAW,wBAAwB,CAAC,CAAC;QAAC,CAAC;IACxI,CAAC;CAOJ"}
|
|
@@ -3,15 +3,11 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { IbGib_V1 } from '@ibgib/ts-gib/dist/V1/types.mjs';
|
|
5
5
|
import { Ib } from '@ibgib/ts-gib/dist/types.mjs';
|
|
6
|
-
import {
|
|
6
|
+
import { SyncSagaContextData_V1, SyncSagaContextIbGib_V1, SyncSagaContextIb_V1 } from './sync-saga-context-types.mjs';
|
|
7
7
|
/**
|
|
8
8
|
* Options for creating a SyncSagaContext ibgib.
|
|
9
9
|
*/
|
|
10
10
|
export interface CreateSyncSagaContextOptions {
|
|
11
|
-
/**
|
|
12
|
-
* Optional command string (e.g. 'process').
|
|
13
|
-
*/
|
|
14
|
-
cmd?: SyncSagaContextCmd | string;
|
|
15
11
|
/**
|
|
16
12
|
* The main saga frame (Init, Ack, etc.).
|
|
17
13
|
*/
|
|
@@ -21,9 +17,10 @@ export interface CreateSyncSagaContextOptions {
|
|
|
21
17
|
*/
|
|
22
18
|
sessionKeystones?: IbGib_V1[];
|
|
23
19
|
/**
|
|
24
|
-
*
|
|
20
|
+
* Domain payload ibgibs when the sync saga frame includes actual domain
|
|
21
|
+
* payloads to send, e.g., in a Delta frame.
|
|
25
22
|
*/
|
|
26
|
-
|
|
23
|
+
payloadIbGibsDomain?: IbGib_V1[];
|
|
27
24
|
}
|
|
28
25
|
/**
|
|
29
26
|
* Constructs the standard 'ib' string for a Sync Saga Context stone.
|
|
@@ -42,5 +39,5 @@ export declare function parseSyncSagaContextIb({ ib, }: {
|
|
|
42
39
|
*
|
|
43
40
|
* @returns The context ibGib.
|
|
44
41
|
*/
|
|
45
|
-
export declare function createSyncSagaContext({
|
|
42
|
+
export declare function createSyncSagaContext({ sagaFrame, sessionKeystones, payloadIbGibsDomain, }: CreateSyncSagaContextOptions): Promise<SyncSagaContextIbGib_V1>;
|
|
46
43
|
//# sourceMappingURL=sync-saga-context-helpers.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync-saga-context-helpers.d.mts","sourceRoot":"","sources":["../../../src/sync/sync-saga-context/sync-saga-context-helpers.mts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,OAAO,EAAE,QAAQ,EAAG,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,EAAE,EAAE,MAAM,8BAA8B,CAAC;AAIlD,OAAO,EACH,
|
|
1
|
+
{"version":3,"file":"sync-saga-context-helpers.d.mts","sourceRoot":"","sources":["../../../src/sync/sync-saga-context/sync-saga-context-helpers.mts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,OAAO,EAAE,QAAQ,EAAG,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,EAAE,EAAE,MAAM,8BAA8B,CAAC;AAIlD,OAAO,EACH,sBAAsB,EAAE,uBAAuB,EAC/C,oBAAoB,EACvB,MAAM,+BAA+B,CAAC;AAGvC;;GAEG;AACH,MAAM,WAAW,4BAA4B;IACzC;;OAEG;IACH,SAAS,EAAE,QAAQ,CAAC;IACpB;;OAEG;IACH,gBAAgB,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC9B;;;OAGG;IACH,mBAAmB,CAAC,EAAE,QAAQ,EAAE,CAAC;CACpC;AAED;;GAEG;AACH,wBAAsB,oBAAoB,CAAC,EACvC,IAAI,GACP,EAAE;IACC,IAAI,EAAE,sBAAsB,CAAC;CAChC,GAAG,OAAO,CAAC,EAAE,CAAC,CAiBd;AAED;;GAEG;AACH,wBAAsB,sBAAsB,CAAC,EACzC,EAAE,GACL,EAAE;IACC,EAAE,EAAE,EAAE,CAAC;CACV,GAAG,OAAO,CAAC,oBAAoB,CAAC,CA2BhC;AAED;;;;GAIG;AACH,wBAAsB,qBAAqB,CAAC,EACxC,SAAS,EACT,gBAAgB,EAChB,mBAAmB,GACtB,EAAE,4BAA4B,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAyCjE"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module sync saga context helpers
|
|
3
3
|
*/
|
|
4
|
-
import { extractErrorMsg } from '@ibgib/helper-gib/dist/helpers/utils-helper.mjs';
|
|
4
|
+
import { extractErrorMsg, getTimestamp } from '@ibgib/helper-gib/dist/helpers/utils-helper.mjs';
|
|
5
5
|
import { Factory_V1 } from '@ibgib/ts-gib/dist/V1/factory.mjs';
|
|
6
6
|
import { getIbGibAddr } from '@ibgib/ts-gib/dist/helper.mjs';
|
|
7
7
|
import { SYNC_SAGA_CONTEXT_ATOM } from './sync-saga-context-constants.mjs';
|
|
8
|
-
import {
|
|
8
|
+
import { SYNC_SAGA_PAYLOAD_ADDRS_DOMAIN } from '../sync-constants.mjs';
|
|
9
9
|
/**
|
|
10
10
|
* Constructs the standard 'ib' string for a Sync Saga Context stone.
|
|
11
11
|
*/
|
|
@@ -15,11 +15,11 @@ export async function getSyncSagaContextIb({ data, }) {
|
|
|
15
15
|
if (!data) {
|
|
16
16
|
throw new Error(`data required (E: 839d82138c234b3e89582855594191fe)`);
|
|
17
17
|
}
|
|
18
|
-
const
|
|
18
|
+
const payloadCount = data['@payloadAddrsDomain'] ? data['@payloadAddrsDomain'].length : 0;
|
|
19
19
|
// sync_sagacontext cmd
|
|
20
20
|
const ib = [
|
|
21
21
|
SYNC_SAGA_CONTEXT_ATOM,
|
|
22
|
-
|
|
22
|
+
payloadCount,
|
|
23
23
|
].join(' ');
|
|
24
24
|
return ib;
|
|
25
25
|
}
|
|
@@ -35,15 +35,21 @@ export async function parseSyncSagaContextIb({ ib, }) {
|
|
|
35
35
|
const lc = `[${parseSyncSagaContextIb.name}]`;
|
|
36
36
|
try {
|
|
37
37
|
const parts = ib.split(' ');
|
|
38
|
-
if (parts.length
|
|
39
|
-
throw new Error(`Invalid sync saga context ib. Expected at least 2 parts [atom
|
|
38
|
+
if (parts.length !== 2) {
|
|
39
|
+
throw new Error(`Invalid sync saga context ib. Expected at least 2 parts [atom, payloadCount]. Got ${parts.length}. (E: 8b06c88820c74f5fb9f21f148459422a)`);
|
|
40
40
|
}
|
|
41
|
-
const [atom,
|
|
42
|
-
const cmd = rest.join(' '); // cmd might have spaces if it's not a strict enum? but usually single word key.
|
|
41
|
+
const [atom, payloadCountStr,] = parts;
|
|
43
42
|
if (atom !== SYNC_SAGA_CONTEXT_ATOM) {
|
|
44
43
|
throw new Error(`Atom mismatch. Expected ${SYNC_SAGA_CONTEXT_ATOM}. Got ${atom}. (E: 67d71fc0f8d04840b178652309f471f5)`);
|
|
45
44
|
}
|
|
46
|
-
|
|
45
|
+
if (!payloadCountStr) {
|
|
46
|
+
throw new Error(`invalid ib. second piece should be payloadCount but is falsy (E: 0bb7580793d800ca02227828a7294826)`);
|
|
47
|
+
}
|
|
48
|
+
const payloadCount = parseInt(payloadCountStr);
|
|
49
|
+
if (isNaN(payloadCount)) {
|
|
50
|
+
throw new Error(`payloadCountStr is not a number. (E: 49457814282a44069871630987588722)`);
|
|
51
|
+
}
|
|
52
|
+
return { atom, payloadCount };
|
|
47
53
|
}
|
|
48
54
|
catch (error) {
|
|
49
55
|
console.error(`${lc} ${extractErrorMsg(error)}`);
|
|
@@ -55,19 +61,25 @@ export async function parseSyncSagaContextIb({ ib, }) {
|
|
|
55
61
|
*
|
|
56
62
|
* @returns The context ibGib.
|
|
57
63
|
*/
|
|
58
|
-
export async function createSyncSagaContext({
|
|
64
|
+
export async function createSyncSagaContext({ sagaFrame, sessionKeystones, payloadIbGibsDomain, }) {
|
|
65
|
+
const date = new Date();
|
|
66
|
+
const timestamp = getTimestamp(date);
|
|
67
|
+
const timestampMs = date.getMilliseconds();
|
|
59
68
|
const data = {
|
|
60
|
-
|
|
69
|
+
timestamp,
|
|
70
|
+
timestampMs,
|
|
61
71
|
};
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
if (sagaFrame) {
|
|
67
|
-
rel8ns.sagaFrame = [getIbGibAddr(sagaFrame)];
|
|
72
|
+
// Domain Payloads
|
|
73
|
+
const payloadAddrsDomain = payloadIbGibsDomain ? payloadIbGibsDomain?.map(x => getIbGibAddr({ ibGib: x })) : undefined;
|
|
74
|
+
if (payloadAddrsDomain && payloadAddrsDomain.length > 0) {
|
|
75
|
+
data[SYNC_SAGA_PAYLOAD_ADDRS_DOMAIN] = payloadAddrsDomain;
|
|
68
76
|
}
|
|
77
|
+
// rel8ns should always have saga frame, sometimes have keystone
|
|
78
|
+
const rel8ns = {
|
|
79
|
+
sagaFrame: [getIbGibAddr({ ibGib: sagaFrame })],
|
|
80
|
+
};
|
|
69
81
|
if (sessionKeystones && sessionKeystones.length > 0) {
|
|
70
|
-
rel8ns.sessionKeystone = sessionKeystones.map(getIbGibAddr);
|
|
82
|
+
rel8ns.sessionKeystone = sessionKeystones.map(x => getIbGibAddr({ ibGib: x }));
|
|
71
83
|
}
|
|
72
84
|
// Generate standard ib
|
|
73
85
|
const ib = await getSyncSagaContextIb({ data });
|
|
@@ -77,6 +89,10 @@ export async function createSyncSagaContext({ cmd, sagaFrame, sessionKeystones,
|
|
|
77
89
|
data,
|
|
78
90
|
rel8ns,
|
|
79
91
|
});
|
|
92
|
+
// Attach actual ibgibs for transport
|
|
93
|
+
if (payloadIbGibsDomain && payloadIbGibsDomain.length > 0) {
|
|
94
|
+
contextIbGib.payloadIbGibsDomain = payloadIbGibsDomain;
|
|
95
|
+
}
|
|
80
96
|
return contextIbGib;
|
|
81
97
|
}
|
|
82
98
|
//# sourceMappingURL=sync-saga-context-helpers.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync-saga-context-helpers.mjs","sourceRoot":"","sources":["../../../src/sync/sync-saga-context/sync-saga-context-helpers.mts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,iDAAiD,CAAC;
|
|
1
|
+
{"version":3,"file":"sync-saga-context-helpers.mjs","sourceRoot":"","sources":["../../../src/sync/sync-saga-context/sync-saga-context-helpers.mts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,iDAAiD,CAAC;AAChG,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAI7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AA0BvE;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,EACvC,IAAI,GAGP;IACG,MAAM,EAAE,GAAG,IAAI,oBAAoB,CAAC,IAAI,GAAG,CAAC;IAC5C,IAAI,CAAC;QACD,IAAI,CAAC,IAAI,EAAE,CAAC;YAAC,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;QAAC,CAAC;QAEtF,MAAM,YAAY,GAAG,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1F,uBAAuB;QACvB,MAAM,EAAE,GAAG;YACP,sBAAsB;YACtB,YAAY;SACf,CAAC,IAA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;QACzC,EAAE;QACF,IAAI;QACJ,MAAM;KACT,CAA4B,CAAC;IAE9B,sCAAsC;IACtC,IAAI,mBAAmB,IAAI,mBAAmB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACxD,YAAY,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;IAC3D,CAAC;IAED,OAAO,YAAY,CAAC;AACxB,CAAC"}
|
|
@@ -3,35 +3,25 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { IbGibAddr } from '@ibgib/ts-gib/dist/types.mjs';
|
|
5
5
|
import { IbGibData_V1, IbGibRel8ns_V1, IbGib_V1 } from '@ibgib/ts-gib/dist/V1/types.mjs';
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
*/
|
|
10
|
-
export type SyncSagaContextCmd = 'process' | 'ping';
|
|
11
|
-
export declare const SyncSagaContextCmd: {
|
|
12
|
-
process: SyncSagaContextCmd;
|
|
13
|
-
ping: SyncSagaContextCmd;
|
|
14
|
-
};
|
|
15
|
-
export declare const SYNC_SAGA_CONTEXT_CMD_VALID_VALUES: SyncSagaContextCmd[];
|
|
16
|
-
export declare function isValidSyncSagaContextCmd(cmd: string): cmd is SyncSagaContextCmd;
|
|
6
|
+
import { SYNC_SAGA_PAYLOAD_ADDRS_DOMAIN } from '../sync-constants.mjs';
|
|
7
|
+
import { SyncIbGib_V1 } from '../sync-types.mjs';
|
|
8
|
+
import { SYNC_SAGA_CONTEXT_ATOM } from './sync-saga-context-constants.mjs';
|
|
17
9
|
export interface SyncSagaContextIb_V1 {
|
|
18
|
-
atom:
|
|
19
|
-
|
|
10
|
+
atom: typeof SYNC_SAGA_CONTEXT_ATOM;
|
|
11
|
+
/**
|
|
12
|
+
* simple metadata count of data["@payloadAddrsDomain"]
|
|
13
|
+
*/
|
|
14
|
+
payloadCount: number;
|
|
20
15
|
}
|
|
21
16
|
/**
|
|
22
17
|
* Data payload for the Sync Saga Context.
|
|
23
18
|
*/
|
|
24
19
|
export interface SyncSagaContextData_V1 extends IbGibData_V1 {
|
|
25
20
|
/**
|
|
26
|
-
*
|
|
27
|
-
* e.g. "process", "ping".
|
|
28
|
-
*/
|
|
29
|
-
cmd?: SyncSagaContextCmd | string;
|
|
30
|
-
/**
|
|
31
|
-
* Payload data (ibGibs) being transported in this context (e.g. for Delta stage).
|
|
21
|
+
* Payload data addresses for DOMAIN ibGibs (Timeline frames, user content).
|
|
32
22
|
* Soft-linked via data property to avoid hard-linking graph dependencies.
|
|
33
23
|
*/
|
|
34
|
-
[
|
|
24
|
+
[SYNC_SAGA_PAYLOAD_ADDRS_DOMAIN]?: IbGibAddr[];
|
|
35
25
|
}
|
|
36
26
|
/**
|
|
37
27
|
* Relationships for the Sync Saga Context.
|
|
@@ -40,9 +30,10 @@ export interface SyncSagaContextData_V1 extends IbGibData_V1 {
|
|
|
40
30
|
export interface SyncSagaContextRel8ns_V1 extends IbGibRel8ns_V1 {
|
|
41
31
|
/**
|
|
42
32
|
* The primary Saga Frame being transported (Init, Ack, Delta, etc.).
|
|
43
|
-
*
|
|
33
|
+
*
|
|
34
|
+
* Should be a single addr.
|
|
44
35
|
*/
|
|
45
|
-
sagaFrame
|
|
36
|
+
sagaFrame: IbGibAddr[];
|
|
46
37
|
/**
|
|
47
38
|
* The Ephemeral Session Keystone Identity used for this saga.
|
|
48
39
|
* Required for validating the saga frame signature.
|
|
@@ -54,5 +45,18 @@ export interface SyncSagaContextRel8ns_V1 extends IbGibRel8ns_V1 {
|
|
|
54
45
|
* between Sync Peers.
|
|
55
46
|
*/
|
|
56
47
|
export interface SyncSagaContextIbGib_V1 extends IbGib_V1<SyncSagaContextData_V1, SyncSagaContextRel8ns_V1> {
|
|
48
|
+
/**
|
|
49
|
+
* Domain ibgibs - OUTBOUND only.
|
|
50
|
+
*
|
|
51
|
+
* For inbound, the domain payload ibgibs are streamed via observable in the
|
|
52
|
+
* peer.
|
|
53
|
+
*/
|
|
54
|
+
payloadIbGibsDomain?: IbGib_V1[];
|
|
55
|
+
/**
|
|
56
|
+
* Reference to the actual sync saga frame that this context conveys.
|
|
57
|
+
*
|
|
58
|
+
* This frame's addr should be {@link SyncSagaContextRel8ns_V1.sagaFrame}.
|
|
59
|
+
*/
|
|
60
|
+
sagaFrame: SyncIbGib_V1;
|
|
57
61
|
}
|
|
58
62
|
//# sourceMappingURL=sync-saga-context-types.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync-saga-context-types.d.mts","sourceRoot":"","sources":["../../../src/sync/sync-saga-context/sync-saga-context-types.mts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"sync-saga-context-types.d.mts","sourceRoot":"","sources":["../../../src/sync/sync-saga-context/sync-saga-context-types.mts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAEzF,OAAO,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAE3E,MAAM,WAAW,oBAAoB;IACjC,IAAI,EAAE,OAAO,sBAAsB,CAAC;IACpC;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,YAAY;IACxD;;;OAGG;IACH,CAAC,8BAA8B,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC;CAClD;AAED;;;GAGG;AACH,MAAM,WAAW,wBAAyB,SAAQ,cAAc;IAC5D;;;;OAIG;IACH,SAAS,EAAE,SAAS,EAAE,CAAC;IAEvB;;;OAGG;IACH,eAAe,CAAC,EAAE,SAAS,EAAE,CAAC;CACjC;AAED;;;GAGG;AACH,MAAM,WAAW,uBAAwB,SAAQ,QAAQ,CAAC,sBAAsB,EAAE,wBAAwB,CAAC;IACvG;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,QAAQ,EAAE,CAAC;IAEjC;;;;OAIG;IACH,SAAS,EAAE,YAAY,CAAC;CAC3B"}
|
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module sync saga context types
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
5
|
-
export const SyncSagaContextCmd = {
|
|
6
|
-
process: 'process',
|
|
7
|
-
ping: 'ping',
|
|
8
|
-
};
|
|
9
|
-
export const SYNC_SAGA_CONTEXT_CMD_VALID_VALUES = Object.values(SyncSagaContextCmd);
|
|
10
|
-
export function isValidSyncSagaContextCmd(cmd) {
|
|
11
|
-
return SYNC_SAGA_CONTEXT_CMD_VALID_VALUES.includes(cmd);
|
|
12
|
-
}
|
|
4
|
+
import { SYNC_SAGA_PAYLOAD_ADDRS_DOMAIN } from '../sync-constants.mjs';
|
|
13
5
|
//# sourceMappingURL=sync-saga-context-types.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync-saga-context-types.mjs","sourceRoot":"","sources":["../../../src/sync/sync-saga-context/sync-saga-context-types.mts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"sync-saga-context-types.mjs","sourceRoot":"","sources":["../../../src/sync/sync-saga-context/sync-saga-context-types.mts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,OAAO,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC"}
|