@ibgib/core-gib 0.1.13 → 0.1.14
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/keystone/keystone-helpers.mjs +3 -3
- package/dist/keystone/keystone-helpers.mjs.map +1 -1
- package/dist/sync/sync-constants.d.mts +4 -1
- package/dist/sync/sync-constants.d.mts.map +1 -1
- package/dist/sync/sync-constants.mjs +3 -0
- package/dist/sync/sync-constants.mjs.map +1 -1
- package/dist/sync/sync-helpers.d.mts +18 -2
- package/dist/sync/sync-helpers.d.mts.map +1 -1
- package/dist/sync/sync-helpers.mjs +84 -3
- package/dist/sync/sync-helpers.mjs.map +1 -1
- package/dist/sync/sync-innerspace.respec.d.mts +0 -6
- package/dist/sync/sync-innerspace.respec.d.mts.map +1 -1
- package/dist/sync/sync-innerspace.respec.mjs +395 -404
- package/dist/sync/sync-innerspace.respec.mjs.map +1 -1
- package/dist/sync/sync-peer/sync-peer-types.d.mts +31 -0
- package/dist/sync/sync-peer/sync-peer-types.d.mts.map +1 -0
- package/dist/sync/sync-peer/sync-peer-types.mjs +5 -0
- package/dist/sync/sync-peer/sync-peer-types.mjs.map +1 -0
- package/dist/sync/sync-peer/sync-peer-v1.d.mts +22 -0
- package/dist/sync/sync-peer/sync-peer-v1.d.mts.map +1 -0
- package/dist/sync/sync-peer/sync-peer-v1.mjs +13 -0
- package/dist/sync/sync-peer/sync-peer-v1.mjs.map +1 -0
- package/dist/sync/sync-saga-context/sync-saga-context-constants.d.mts +8 -0
- package/dist/sync/sync-saga-context/sync-saga-context-constants.d.mts.map +1 -0
- package/dist/sync/sync-saga-context/sync-saga-context-constants.mjs +8 -0
- package/dist/sync/sync-saga-context/sync-saga-context-constants.mjs.map +1 -0
- package/dist/sync/sync-saga-context/sync-saga-context-helpers.d.mts +54 -0
- package/dist/sync/sync-saga-context/sync-saga-context-helpers.d.mts.map +1 -0
- package/dist/sync/sync-saga-context/sync-saga-context-helpers.mjs +87 -0
- package/dist/sync/sync-saga-context/sync-saga-context-helpers.mjs.map +1 -0
- package/dist/sync/sync-saga-context/sync-saga-context-types.d.mts +66 -0
- package/dist/sync/sync-saga-context/sync-saga-context-types.d.mts.map +1 -0
- package/dist/sync/sync-saga-context/sync-saga-context-types.mjs +12 -0
- package/dist/sync/sync-saga-context/sync-saga-context-types.mjs.map +1 -0
- package/dist/sync/sync-saga-coordinator.d.mts +115 -125
- package/dist/sync/sync-saga-coordinator.d.mts.map +1 -1
- package/dist/sync/sync-saga-coordinator.mjs +539 -456
- package/dist/sync/sync-saga-coordinator.mjs.map +1 -1
- package/dist/sync/sync-saga-coordinator.respec.mjs +7 -7
- package/dist/sync/sync-saga-coordinator.respec.mjs.map +1 -1
- package/dist/sync/sync-saga-message/sync-saga-message-constants.d.mts +2 -0
- package/dist/sync/sync-saga-message/sync-saga-message-constants.d.mts.map +1 -0
- package/dist/sync/sync-saga-message/sync-saga-message-constants.mjs +2 -0
- package/dist/sync/sync-saga-message/sync-saga-message-constants.mjs.map +1 -0
- package/dist/sync/sync-saga-message/sync-saga-message-helpers.d.mts +15 -0
- package/dist/sync/sync-saga-message/sync-saga-message-helpers.d.mts.map +1 -0
- package/dist/sync/sync-saga-message/sync-saga-message-helpers.mjs +43 -0
- package/dist/sync/sync-saga-message/sync-saga-message-helpers.mjs.map +1 -0
- package/dist/sync/sync-saga-message/sync-saga-message-types.d.mts +39 -0
- package/dist/sync/sync-saga-message/sync-saga-message-types.d.mts.map +1 -0
- package/dist/sync/sync-saga-message/sync-saga-message-types.mjs +2 -0
- package/dist/sync/sync-saga-message/sync-saga-message-types.mjs.map +1 -0
- package/dist/sync/sync-types.d.mts +81 -3
- package/dist/sync/sync-types.d.mts.map +1 -1
- package/dist/sync/sync-types.mjs +27 -1
- package/dist/sync/sync-types.mjs.map +1 -1
- package/dist/timeline/timeline-api.d.mts +16 -3
- package/dist/timeline/timeline-api.d.mts.map +1 -1
- package/dist/timeline/timeline-api.mjs +7 -7
- package/dist/timeline/timeline-api.mjs.map +1 -1
- package/dist/witness/space/outer-space/outer-space-types.d.mts +2 -0
- package/dist/witness/space/outer-space/outer-space-types.d.mts.map +1 -1
- package/dist/witness/space/space-base-v1.d.mts +19 -1
- package/dist/witness/space/space-base-v1.d.mts.map +1 -1
- package/dist/witness/space/space-base-v1.mjs +66 -6
- package/dist/witness/space/space-base-v1.mjs.map +1 -1
- package/dist/witness/space/space-helper.d.mts +14 -0
- package/dist/witness/space/space-helper.d.mts.map +1 -1
- package/dist/witness/space/space-helper.mjs +44 -1
- package/dist/witness/space/space-helper.mjs.map +1 -1
- package/dist/witness/space/space-respec-helper.d.mts.map +1 -1
- package/dist/witness/space/space-respec-helper.mjs +1 -1
- package/dist/witness/space/space-respec-helper.mjs.map +1 -1
- package/dist/witness/space/space-types.d.mts +12 -1
- package/dist/witness/space/space-types.d.mts.map +1 -1
- package/dist/witness/space/space-types.mjs +4 -0
- package/dist/witness/space/space-types.mjs.map +1 -1
- package/package.json +2 -2
- package/src/keystone/keystone-helpers.mts +3 -3
- package/src/sync/README.md +275 -0
- package/src/sync/sync-constants.mts +5 -0
- package/src/sync/sync-helpers.mts +105 -6
- package/src/sync/sync-innerspace.respec.mts +458 -457
- package/src/sync/sync-peer/sync-peer-types.mts +43 -0
- package/src/sync/sync-peer/sync-peer-v1.mts +28 -0
- package/src/sync/sync-saga-context/sync-saga-context-constants.mts +8 -0
- package/src/sync/sync-saga-context/sync-saga-context-helpers.mts +147 -0
- package/src/sync/sync-saga-context/sync-saga-context-types.mts +80 -0
- package/src/sync/sync-saga-coordinator.mts +709 -526
- package/src/sync/sync-saga-coordinator.respec.mts +7 -7
- package/src/sync/sync-saga-message/sync-saga-message-constants.mts +1 -0
- package/src/sync/sync-saga-message/sync-saga-message-helpers.mts +59 -0
- package/src/sync/sync-saga-message/sync-saga-message-types.mts +53 -0
- package/src/sync/sync-types.mts +103 -3
- package/src/timeline/timeline-api.mts +20 -4
- package/src/witness/space/space-base-v1.mts +62 -12
- package/src/witness/space/space-helper.mts +50 -1
- package/src/witness/space/space-respec-helper.mts +2 -1
- package/src/witness/space/space-types.mts +13 -1
- package/tmp.md +3 -9
|
@@ -2,114 +2,47 @@ import { IbGib_V1 } from "@ibgib/ts-gib/dist/V1/types.mjs";
|
|
|
2
2
|
import { IbGibSpaceAny } from "../witness/space/space-base-v1.mjs";
|
|
3
3
|
import { KeystoneIbGib_V1 } from "../keystone/keystone-types.mjs";
|
|
4
4
|
import { KeystoneService_V1 } from "../keystone/keystone-service-v1.mjs";
|
|
5
|
+
import { MetaspaceService } from "../witness/space/metaspace/metaspace-types.mjs";
|
|
6
|
+
import { SyncStage } from "./sync-constants.mjs";
|
|
5
7
|
import { SyncIbGib_V1 } from "./sync-types.mjs";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* The space receiving the data.
|
|
13
|
-
*/
|
|
14
|
-
dest: IbGibSpaceAny;
|
|
15
|
-
/**
|
|
16
|
-
* The identity authorizing this sync.
|
|
17
|
-
*/
|
|
18
|
-
identity: KeystoneIbGib_V1;
|
|
19
|
-
/**
|
|
20
|
-
* The secret for the identity (to sign the commit).
|
|
21
|
-
*/
|
|
22
|
-
identitySecret: string;
|
|
23
|
-
/**
|
|
24
|
-
* How to handle conflicts when both Source and Dest have diverged on the same timeline.
|
|
25
|
-
* @default 'abort'
|
|
26
|
-
*/
|
|
27
|
-
conflictStrategy?: SyncConflictStrategy;
|
|
28
|
-
}
|
|
29
|
-
export type SyncConflictStrategy = 'abort' | 'optimistic' | 'manual';
|
|
8
|
+
import { SyncSagaMessageData_V1 } from "./sync-saga-message/sync-saga-message-types.mjs";
|
|
9
|
+
import { Subject_V1 } from "../common/pubsub/subject/subject-v1.mjs";
|
|
10
|
+
import { SyncSagaInfo } from "./sync-types.mjs";
|
|
11
|
+
import { SyncPeerWitness } from "./sync-peer/sync-peer-types.mjs";
|
|
12
|
+
import { SyncSagaContextIbGib_V1 } from "./sync-saga-context/sync-saga-context-types.mjs";
|
|
30
13
|
/**
|
|
31
14
|
* Orchestrates the synchronization process between two spaces (Source and Destination).
|
|
32
|
-
*
|
|
33
|
-
* ## Architecture: Dependency Graph Synchronization
|
|
34
|
-
*
|
|
35
|
-
* Instead of a naive file-by-file sync or a holistic "Space" sync, this coordinator operates
|
|
36
|
-
* on a **Dependency Graph** derived from specific "Domain Roots" (e.g., a specific tag,
|
|
37
|
-
* folder, or application root).
|
|
38
|
-
*
|
|
39
|
-
* ### Workflow Pipeline
|
|
40
|
-
*
|
|
41
|
-
* 1. **Graph Generation**:
|
|
42
|
-
* * Generates a `FlatIbGibGraph` using `getDependencyGraph({ live: true })` starting
|
|
43
|
-
* from the provided `domainIbGibs`.
|
|
44
|
-
* * This ensures we capture the *latest* reachable state of all relevant timelines.
|
|
45
|
-
*
|
|
46
|
-
* 2. **Classification (`splitPerTjpAndOrDna`)**:
|
|
47
|
-
* * **Stones**: Immutable, non-living ibGibs (no TJP/DNA). Trivial to sync (copy if missing).
|
|
48
|
-
* * **Living**: Evolving timelines (TJP + DNA). Complex to sync (require ordering & merging).
|
|
49
|
-
*
|
|
50
|
-
* 3. **Timeline Ordering (`getTimelinesGroupedByTjp`)**:
|
|
51
|
-
* * Living ibGibs are grouped into timelines.
|
|
52
|
-
* * A "Timeline Dependency Graph" is built. Use Case: If a Comment Timeline refers to a
|
|
53
|
-
* Post Timeline, the Post Timeline must be synced *before* the Comment Timeline to
|
|
54
|
-
* ensure referential integrity at the destination.
|
|
55
|
-
* * **Topological Sort** determines the execution order. Circular dependencies are
|
|
56
|
-
* treated as siblings.
|
|
57
|
-
*
|
|
58
|
-
* 4. **Saga Execution ("Smart Coordinator, Dumb Space")**:
|
|
59
|
-
* * The Coordinator (running on the Client/Source) drives the entire process via a
|
|
60
|
-
* "Pull-Merge-Push" strategy to resolve conflicts.
|
|
61
|
-
*
|
|
62
|
-
* * **Phase 1: Knowledge Exchange (Init)**
|
|
63
|
-
* * Generates a "Knowledge Vector" (Map<Tjp, LatestAddr>) of the Source's graph.
|
|
64
|
-
* * Sends `SyncStage.Init` to Dest.
|
|
65
|
-
* * Dest responds with its own Knowledge Vector for overlapping timelines.
|
|
66
|
-
*
|
|
67
|
-
* * **Phase 2: Gap Analysis & Conflict Resolution**
|
|
68
|
-
* * Coordinator compares Source vs. Dest knowledge.
|
|
69
|
-
* * **Fast-Forward**: Source is strictly ahead of Dest. Mark new frames for PUSH.
|
|
70
|
-
* * **Fast-Backward**: Dest is strictly ahead of Source. Mark frames for PULL (to update Local).
|
|
71
|
-
* * **Conflict/Divergence**: Both have new frames from a common ancestor.
|
|
72
|
-
* * **LOCK**: `lockSpace({ scope: tjpGib })` on Dest to prevent race conditions.
|
|
73
|
-
* * **PULL**: Download conflicting branch from Dest.
|
|
74
|
-
* * **MERGE**: Execute merge logic locally (creating a new merge frame `A_merge`).
|
|
75
|
-
* * **PUSH**: Mark `A_merge` (and dependencies) for PUSH.
|
|
76
|
-
* * **UNLOCK**: Release Dest lock.
|
|
77
|
-
*
|
|
78
|
-
* * **Phase 3: Batch Streaming (Delta)**
|
|
79
|
-
* * **Stones**: Batch `putInSpace` all missing "Stone" ibGibs first.
|
|
80
|
-
* * **Timelines**: Batch `putInSpace` Living Timelines in topological order.
|
|
81
|
-
* * *Note*: The `SyncFrame` (Init/Delta/Commit) tracks protocol state, but data transfer
|
|
82
|
-
* happens via standard `putInSpace`.
|
|
83
|
-
*
|
|
84
|
-
* * **Phase 4: Commit**
|
|
85
|
-
* * Update Local Index (register new latests).
|
|
86
|
-
* * Send `SyncStage.Commit` to Dest to finalize session.
|
|
87
15
|
*/
|
|
88
16
|
export declare class SyncSagaCoordinator {
|
|
89
17
|
protected keystone: KeystoneService_V1;
|
|
90
18
|
protected lc: string;
|
|
91
19
|
constructor(keystone: KeystoneService_V1);
|
|
92
20
|
/**
|
|
93
|
-
* Executes a synchronization saga.
|
|
94
|
-
*
|
|
95
|
-
* @param opts.source The local space (Client) driving the sync.
|
|
96
|
-
* @param opts.dest The remote space (Server/Other Peer) to sync with.
|
|
97
|
-
* @param opts.identity The Keystone Identity performing the sync.
|
|
98
|
-
* @param opts.domainIbGibs The root ibGibs that define the scope of the sync (the "Dependency Graph").
|
|
99
|
-
* @param opts.identitySecret Optional secret if needed (usually handled by `keystone` service).
|
|
21
|
+
* Executes a synchronization saga using the Symmetric Sync Protocol.
|
|
100
22
|
*/
|
|
101
|
-
sync({
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
23
|
+
sync({ peer, localSpace, metaspace, primaryIdentity, primaryIdentitySecret, domainIbGibs, }: {
|
|
24
|
+
peer: SyncPeerWitness;
|
|
25
|
+
localSpace: IbGibSpaceAny;
|
|
26
|
+
metaspace: MetaspaceService;
|
|
27
|
+
primaryIdentity: KeystoneIbGib_V1;
|
|
28
|
+
primaryIdentitySecret: string;
|
|
105
29
|
domainIbGibs: IbGib_V1[];
|
|
106
|
-
|
|
107
|
-
conflictStrategy?: SyncConflictStrategy;
|
|
108
|
-
}): Promise<void>;
|
|
30
|
+
}): Promise<SyncSagaInfo>;
|
|
109
31
|
/**
|
|
110
|
-
*
|
|
111
|
-
*
|
|
32
|
+
* Drives the FSM loop of the Saga.
|
|
33
|
+
* Use "Ping Pong" style: Send Request -> Wait Response -> React (Handle) -> Repeat.
|
|
112
34
|
*/
|
|
35
|
+
protected executeSagaLoop({ initialFrame, srcGraph, peer, sessionIdentity, updates$, tempSpace, metaspace }: {
|
|
36
|
+
initialFrame: SyncIbGib_V1;
|
|
37
|
+
srcGraph: {
|
|
38
|
+
[addr: string]: IbGib_V1;
|
|
39
|
+
};
|
|
40
|
+
peer: SyncPeerWitness;
|
|
41
|
+
sessionIdentity: KeystoneIbGib_V1;
|
|
42
|
+
updates$: Subject_V1<SyncSagaContextIbGib_V1>;
|
|
43
|
+
tempSpace: IbGibSpaceAny;
|
|
44
|
+
metaspace: MetaspaceService;
|
|
45
|
+
}): Promise<IbGib_V1[]>;
|
|
113
46
|
protected analyzeTimelines({ domainIbGibs, space, }: {
|
|
114
47
|
domainIbGibs: IbGib_V1[];
|
|
115
48
|
space: IbGibSpaceAny;
|
|
@@ -123,51 +56,108 @@ export declare class SyncSagaCoordinator {
|
|
|
123
56
|
[addr: string]: IbGib_V1;
|
|
124
57
|
};
|
|
125
58
|
}>;
|
|
126
|
-
protected resolveConflicts(
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
59
|
+
protected resolveConflicts(): Promise<void>;
|
|
60
|
+
protected processBatchStream(): Promise<void>;
|
|
61
|
+
/**
|
|
62
|
+
* Creates the Initial Saga Frame (Init Stage).
|
|
63
|
+
*/
|
|
64
|
+
protected createInitFrame({ sagaId, sessionIdentity, localSpace, domainIbGibs, tempSpace, metaspace }: {
|
|
65
|
+
sagaId: string;
|
|
66
|
+
sessionIdentity: KeystoneIbGib_V1;
|
|
67
|
+
localSpace: IbGibSpaceAny;
|
|
68
|
+
domainIbGibs: IbGib_V1[];
|
|
69
|
+
tempSpace: IbGibSpaceAny;
|
|
70
|
+
metaspace: MetaspaceService;
|
|
71
|
+
}): Promise<{
|
|
72
|
+
sagaFrame: SyncIbGib_V1;
|
|
73
|
+
srcGraph: {
|
|
74
|
+
[addr: string]: IbGib_V1;
|
|
131
75
|
};
|
|
132
|
-
|
|
133
|
-
|
|
76
|
+
}>;
|
|
77
|
+
/**
|
|
78
|
+
* Reacts to an incoming saga frame and dispatches to appropriate handler.
|
|
79
|
+
*/
|
|
80
|
+
handleSagaFrame({ sagaIbGib, srcGraph, space, identity, identitySecret, metaspace, }: {
|
|
81
|
+
sagaIbGib: SyncIbGib_V1;
|
|
82
|
+
srcGraph: {
|
|
83
|
+
[addr: string]: IbGib_V1;
|
|
134
84
|
};
|
|
85
|
+
space: IbGibSpaceAny;
|
|
86
|
+
identity: KeystoneIbGib_V1;
|
|
87
|
+
identitySecret?: string;
|
|
88
|
+
metaspace: MetaspaceService;
|
|
89
|
+
}): Promise<{
|
|
90
|
+
frame: SyncIbGib_V1;
|
|
91
|
+
payload?: IbGib_V1[];
|
|
92
|
+
receivedPayload?: IbGib_V1[];
|
|
93
|
+
} | null>;
|
|
94
|
+
protected handleInitFrame({ sagaIbGib, payload, space, metaspace, identity, identitySecret, }: {
|
|
95
|
+
sagaIbGib: SyncIbGib_V1;
|
|
96
|
+
payload: any;
|
|
97
|
+
space: IbGibSpaceAny;
|
|
98
|
+
metaspace: MetaspaceService;
|
|
99
|
+
identity: KeystoneIbGib_V1;
|
|
100
|
+
identitySecret?: string;
|
|
101
|
+
}): Promise<{
|
|
102
|
+
frame: SyncIbGib_V1;
|
|
103
|
+
payload?: IbGib_V1[];
|
|
104
|
+
} | null>;
|
|
105
|
+
protected handleAckFrame({ sagaIbGib, srcGraph, space, metaspace, identity, }: {
|
|
106
|
+
sagaIbGib: SyncIbGib_V1;
|
|
135
107
|
srcGraph: {
|
|
136
108
|
[addr: string]: IbGib_V1;
|
|
137
109
|
};
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
110
|
+
space: IbGibSpaceAny;
|
|
111
|
+
metaspace: MetaspaceService;
|
|
112
|
+
identity: KeystoneIbGib_V1;
|
|
113
|
+
}): Promise<{
|
|
114
|
+
frame: SyncIbGib_V1;
|
|
115
|
+
payload?: IbGib_V1[];
|
|
116
|
+
} | null>;
|
|
117
|
+
protected handleDeltaFrame({ sagaIbGib, srcGraph, space, metaspace, identity, }: {
|
|
118
|
+
sagaIbGib: SyncIbGib_V1;
|
|
144
119
|
srcGraph: {
|
|
145
120
|
[addr: string]: IbGib_V1;
|
|
146
121
|
};
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
uuid: string;
|
|
150
|
-
stage: any;
|
|
151
|
-
payload: any;
|
|
122
|
+
space: IbGibSpaceAny;
|
|
123
|
+
metaspace: MetaspaceService;
|
|
152
124
|
identity: KeystoneIbGib_V1;
|
|
125
|
+
}): Promise<{
|
|
126
|
+
frame: SyncIbGib_V1;
|
|
127
|
+
payload?: IbGib_V1[];
|
|
128
|
+
receivedPayload?: IbGib_V1[];
|
|
129
|
+
} | null>;
|
|
130
|
+
protected handleCommitFrame({ sagaIbGib, space, }: {
|
|
131
|
+
sagaIbGib: SyncIbGib_V1;
|
|
132
|
+
space: IbGibSpaceAny;
|
|
133
|
+
}): Promise<{
|
|
134
|
+
frame: SyncIbGib_V1;
|
|
135
|
+
payload?: IbGib_V1[];
|
|
136
|
+
} | null>;
|
|
137
|
+
protected createSyncMsgStone<TStoneData extends SyncSagaMessageData_V1>({ data, space, metaspace, }: {
|
|
138
|
+
data: TStoneData;
|
|
139
|
+
space: IbGibSpaceAny;
|
|
140
|
+
metaspace: MetaspaceService;
|
|
141
|
+
}): Promise<IbGib_V1<TStoneData>>;
|
|
142
|
+
/**
|
|
143
|
+
* Evolves the saga timeline with a new frame.
|
|
144
|
+
*/
|
|
145
|
+
protected evolveSyncSagaIbGib({ prevSagaIbGib, msgStones, identity, space, metaspace, }: {
|
|
146
|
+
prevSagaIbGib?: SyncIbGib_V1;
|
|
147
|
+
msgStones: IbGib_V1[];
|
|
148
|
+
identity: KeystoneIbGib_V1;
|
|
149
|
+
space: IbGibSpaceAny;
|
|
150
|
+
metaspace: MetaspaceService;
|
|
153
151
|
}): Promise<SyncIbGib_V1>;
|
|
154
|
-
protected
|
|
152
|
+
protected getStageAndPayloadFromFrame({ ibGib, space }: {
|
|
153
|
+
ibGib: IbGib_V1;
|
|
155
154
|
space: IbGibSpaceAny;
|
|
156
|
-
tjpAddrs: string[];
|
|
157
155
|
}): Promise<{
|
|
158
|
-
|
|
156
|
+
stage: SyncStage;
|
|
157
|
+
payload: any;
|
|
159
158
|
}>;
|
|
160
159
|
protected sortTimelinesTopologically(timelines: {
|
|
161
160
|
[tjp: string]: IbGib_V1[];
|
|
162
161
|
}): string[];
|
|
163
|
-
/**
|
|
164
|
-
* Checks if an address is an ancestor of another by traversing `past` relations.
|
|
165
|
-
* Uses BFS. Returns true if `ancestorAddr` is found in the history of `descendantAddr`.
|
|
166
|
-
*/
|
|
167
|
-
protected isAncestor({ ancestorAddr, descendantAddr, space, }: {
|
|
168
|
-
ancestorAddr: string;
|
|
169
|
-
descendantAddr: string;
|
|
170
|
-
space: IbGibSpaceAny;
|
|
171
|
-
}): Promise<boolean>;
|
|
172
162
|
}
|
|
173
163
|
//# sourceMappingURL=sync-saga-coordinator.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync-saga-coordinator.d.mts","sourceRoot":"","sources":["../../src/sync/sync-saga-coordinator.mts"],"names":[],"mappings":"AAWA,OAAO,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"sync-saga-coordinator.d.mts","sourceRoot":"","sources":["../../src/sync/sync-saga-coordinator.mts"],"names":[],"mappings":"AAWA,OAAO,EAAE,QAAQ,EAAkB,MAAM,iCAAiC,CAAC;AAI3E,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAEnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAClF,OAAO,EAAE,SAAS,EAAkC,MAAM,sBAAsB,CAAC;AAEjF,OAAO,EACU,YAAY,EAG5B,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACH,sBAAsB,EAKzB,MAAM,iDAAiD,CAAC;AAGzD,OAAO,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAsB,MAAM,iDAAiD,CAAC;AAM9G;;GAEG;AACH,qBAAa,mBAAmB;IAIxB,SAAS,CAAC,QAAQ,EAAE,kBAAkB;IAH1C,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