@powerhousedao/reactor 6.0.0-dev.105 → 6.0.0-dev.107

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 (242) hide show
  1. package/dist/index.d.ts +4306 -0
  2. package/dist/index.d.ts.map +1 -0
  3. package/dist/index.js +9433 -0
  4. package/dist/index.js.map +1 -0
  5. package/package.json +16 -18
  6. package/dist/src/actions/index.d.ts +0 -24
  7. package/dist/src/actions/index.d.ts.map +0 -1
  8. package/dist/src/admin/document-integrity-service.d.ts +0 -17
  9. package/dist/src/admin/document-integrity-service.d.ts.map +0 -1
  10. package/dist/src/admin/types.d.ts +0 -30
  11. package/dist/src/admin/types.d.ts.map +0 -1
  12. package/dist/src/cache/buffer/ring-buffer.d.ts +0 -37
  13. package/dist/src/cache/buffer/ring-buffer.d.ts.map +0 -1
  14. package/dist/src/cache/collection-membership-cache.d.ts +0 -14
  15. package/dist/src/cache/collection-membership-cache.d.ts.map +0 -1
  16. package/dist/src/cache/document-meta-cache-types.d.ts +0 -114
  17. package/dist/src/cache/document-meta-cache-types.d.ts.map +0 -1
  18. package/dist/src/cache/document-meta-cache.d.ts +0 -31
  19. package/dist/src/cache/document-meta-cache.d.ts.map +0 -1
  20. package/dist/src/cache/index.d.ts +0 -3
  21. package/dist/src/cache/index.d.ts.map +0 -1
  22. package/dist/src/cache/kysely-operation-index.d.ts +0 -24
  23. package/dist/src/cache/kysely-operation-index.d.ts.map +0 -1
  24. package/dist/src/cache/kysely-write-cache.d.ts +0 -142
  25. package/dist/src/cache/kysely-write-cache.d.ts.map +0 -1
  26. package/dist/src/cache/lru/lru-tracker.d.ts +0 -15
  27. package/dist/src/cache/lru/lru-tracker.d.ts.map +0 -1
  28. package/dist/src/cache/operation-index-types.d.ts +0 -64
  29. package/dist/src/cache/operation-index-types.d.ts.map +0 -1
  30. package/dist/src/cache/write/interfaces.d.ts +0 -88
  31. package/dist/src/cache/write/interfaces.d.ts.map +0 -1
  32. package/dist/src/cache/write-cache-types.d.ts +0 -42
  33. package/dist/src/cache/write-cache-types.d.ts.map +0 -1
  34. package/dist/src/client/reactor-client.d.ts +0 -121
  35. package/dist/src/client/reactor-client.d.ts.map +0 -1
  36. package/dist/src/client/types.d.ts +0 -260
  37. package/dist/src/client/types.d.ts.map +0 -1
  38. package/dist/src/core/reactor-builder.d.ts +0 -60
  39. package/dist/src/core/reactor-builder.d.ts.map +0 -1
  40. package/dist/src/core/reactor-client-builder.d.ts +0 -53
  41. package/dist/src/core/reactor-client-builder.d.ts.map +0 -1
  42. package/dist/src/core/reactor.d.ts +0 -56
  43. package/dist/src/core/reactor.d.ts.map +0 -1
  44. package/dist/src/core/types.d.ts +0 -312
  45. package/dist/src/core/types.d.ts.map +0 -1
  46. package/dist/src/core/utils.d.ts +0 -95
  47. package/dist/src/core/utils.d.ts.map +0 -1
  48. package/dist/src/events/event-bus.d.ts +0 -8
  49. package/dist/src/events/event-bus.d.ts.map +0 -1
  50. package/dist/src/events/interfaces.d.ts +0 -27
  51. package/dist/src/events/interfaces.d.ts.map +0 -1
  52. package/dist/src/events/types.d.ts +0 -92
  53. package/dist/src/events/types.d.ts.map +0 -1
  54. package/dist/src/executor/document-action-handler.d.ts +0 -30
  55. package/dist/src/executor/document-action-handler.d.ts.map +0 -1
  56. package/dist/src/executor/execution-scope.d.ts +0 -44
  57. package/dist/src/executor/execution-scope.d.ts.map +0 -1
  58. package/dist/src/executor/interfaces.d.ts +0 -49
  59. package/dist/src/executor/interfaces.d.ts.map +0 -1
  60. package/dist/src/executor/signature-verifier.d.ts +0 -9
  61. package/dist/src/executor/signature-verifier.d.ts.map +0 -1
  62. package/dist/src/executor/simple-job-executor-manager.d.ts +0 -40
  63. package/dist/src/executor/simple-job-executor-manager.d.ts.map +0 -1
  64. package/dist/src/executor/simple-job-executor.d.ts +0 -42
  65. package/dist/src/executor/simple-job-executor.d.ts.map +0 -1
  66. package/dist/src/executor/types.d.ts +0 -91
  67. package/dist/src/executor/types.d.ts.map +0 -1
  68. package/dist/src/executor/util.d.ts +0 -84
  69. package/dist/src/executor/util.d.ts.map +0 -1
  70. package/dist/src/index.d.ts +0 -56
  71. package/dist/src/index.d.ts.map +0 -1
  72. package/dist/src/index.js +0 -20714
  73. package/dist/src/job-tracker/in-memory-job-tracker.d.ts +0 -26
  74. package/dist/src/job-tracker/in-memory-job-tracker.d.ts.map +0 -1
  75. package/dist/src/job-tracker/index.d.ts +0 -3
  76. package/dist/src/job-tracker/index.d.ts.map +0 -1
  77. package/dist/src/job-tracker/interfaces.d.ts +0 -41
  78. package/dist/src/job-tracker/interfaces.d.ts.map +0 -1
  79. package/dist/src/logging/console.d.ts +0 -2
  80. package/dist/src/logging/console.d.ts.map +0 -1
  81. package/dist/src/logging/types.d.ts +0 -2
  82. package/dist/src/logging/types.d.ts.map +0 -1
  83. package/dist/src/processors/index.d.ts +0 -2
  84. package/dist/src/processors/index.d.ts.map +0 -1
  85. package/dist/src/processors/processor-manager.d.ts +0 -51
  86. package/dist/src/processors/processor-manager.d.ts.map +0 -1
  87. package/dist/src/processors/utils.d.ts +0 -11
  88. package/dist/src/processors/utils.d.ts.map +0 -1
  89. package/dist/src/queue/interfaces.d.ts +0 -103
  90. package/dist/src/queue/interfaces.d.ts.map +0 -1
  91. package/dist/src/queue/job-execution-handle.d.ts +0 -28
  92. package/dist/src/queue/job-execution-handle.d.ts.map +0 -1
  93. package/dist/src/queue/queue.d.ts +0 -110
  94. package/dist/src/queue/queue.d.ts.map +0 -1
  95. package/dist/src/queue/types.d.ts +0 -74
  96. package/dist/src/queue/types.d.ts.map +0 -1
  97. package/dist/src/read-models/base-read-model.d.ts +0 -62
  98. package/dist/src/read-models/base-read-model.d.ts.map +0 -1
  99. package/dist/src/read-models/coordinator.d.ts +0 -39
  100. package/dist/src/read-models/coordinator.d.ts.map +0 -1
  101. package/dist/src/read-models/document-view.d.ts +0 -27
  102. package/dist/src/read-models/document-view.d.ts.map +0 -1
  103. package/dist/src/read-models/interfaces.d.ts +0 -29
  104. package/dist/src/read-models/interfaces.d.ts.map +0 -1
  105. package/dist/src/read-models/types.d.ts +0 -63
  106. package/dist/src/read-models/types.d.ts.map +0 -1
  107. package/dist/src/registry/document-model-resolver.d.ts +0 -29
  108. package/dist/src/registry/document-model-resolver.d.ts.map +0 -1
  109. package/dist/src/registry/implementation.d.ts +0 -74
  110. package/dist/src/registry/implementation.d.ts.map +0 -1
  111. package/dist/src/registry/index.d.ts +0 -5
  112. package/dist/src/registry/index.d.ts.map +0 -1
  113. package/dist/src/registry/interfaces.d.ts +0 -108
  114. package/dist/src/registry/interfaces.d.ts.map +0 -1
  115. package/dist/src/shared/awaiter.d.ts +0 -35
  116. package/dist/src/shared/awaiter.d.ts.map +0 -1
  117. package/dist/src/shared/collect-all-pages.d.ts +0 -7
  118. package/dist/src/shared/collect-all-pages.d.ts.map +0 -1
  119. package/dist/src/shared/consistency-tracker.d.ts +0 -48
  120. package/dist/src/shared/consistency-tracker.d.ts.map +0 -1
  121. package/dist/src/shared/drive-url.d.ts +0 -15
  122. package/dist/src/shared/drive-url.d.ts.map +0 -1
  123. package/dist/src/shared/errors.d.ts +0 -50
  124. package/dist/src/shared/errors.d.ts.map +0 -1
  125. package/dist/src/shared/factories.d.ts +0 -20
  126. package/dist/src/shared/factories.d.ts.map +0 -1
  127. package/dist/src/shared/types.d.ts +0 -161
  128. package/dist/src/shared/types.d.ts.map +0 -1
  129. package/dist/src/shared/utils.d.ts +0 -3
  130. package/dist/src/shared/utils.d.ts.map +0 -1
  131. package/dist/src/signer/passthrough-signer.d.ts +0 -12
  132. package/dist/src/signer/passthrough-signer.d.ts.map +0 -1
  133. package/dist/src/signer/types.d.ts +0 -17
  134. package/dist/src/signer/types.d.ts.map +0 -1
  135. package/dist/src/storage/index.d.ts +0 -4
  136. package/dist/src/storage/index.d.ts.map +0 -1
  137. package/dist/src/storage/interfaces.d.ts +0 -574
  138. package/dist/src/storage/interfaces.d.ts.map +0 -1
  139. package/dist/src/storage/kysely/document-indexer.d.ts +0 -27
  140. package/dist/src/storage/kysely/document-indexer.d.ts.map +0 -1
  141. package/dist/src/storage/kysely/keyframe-store.d.ts +0 -24
  142. package/dist/src/storage/kysely/keyframe-store.d.ts.map +0 -1
  143. package/dist/src/storage/kysely/store.d.ts +0 -21
  144. package/dist/src/storage/kysely/store.d.ts.map +0 -1
  145. package/dist/src/storage/kysely/sync-cursor-storage.d.ts +0 -13
  146. package/dist/src/storage/kysely/sync-cursor-storage.d.ts.map +0 -1
  147. package/dist/src/storage/kysely/sync-dead-letter-storage.d.ts +0 -18
  148. package/dist/src/storage/kysely/sync-dead-letter-storage.d.ts.map +0 -1
  149. package/dist/src/storage/kysely/sync-remote-storage.d.ts +0 -13
  150. package/dist/src/storage/kysely/sync-remote-storage.d.ts.map +0 -1
  151. package/dist/src/storage/kysely/types.d.ts +0 -157
  152. package/dist/src/storage/kysely/types.d.ts.map +0 -1
  153. package/dist/src/storage/migrations/001_create_operation_table.d.ts +0 -3
  154. package/dist/src/storage/migrations/001_create_operation_table.d.ts.map +0 -1
  155. package/dist/src/storage/migrations/002_create_keyframe_table.d.ts +0 -3
  156. package/dist/src/storage/migrations/002_create_keyframe_table.d.ts.map +0 -1
  157. package/dist/src/storage/migrations/003_create_document_table.d.ts +0 -3
  158. package/dist/src/storage/migrations/003_create_document_table.d.ts.map +0 -1
  159. package/dist/src/storage/migrations/004_create_document_relationship_table.d.ts +0 -3
  160. package/dist/src/storage/migrations/004_create_document_relationship_table.d.ts.map +0 -1
  161. package/dist/src/storage/migrations/005_create_indexer_state_table.d.ts +0 -3
  162. package/dist/src/storage/migrations/005_create_indexer_state_table.d.ts.map +0 -1
  163. package/dist/src/storage/migrations/006_create_document_snapshot_table.d.ts +0 -3
  164. package/dist/src/storage/migrations/006_create_document_snapshot_table.d.ts.map +0 -1
  165. package/dist/src/storage/migrations/007_create_slug_mapping_table.d.ts +0 -3
  166. package/dist/src/storage/migrations/007_create_slug_mapping_table.d.ts.map +0 -1
  167. package/dist/src/storage/migrations/008_create_view_state_table.d.ts +0 -3
  168. package/dist/src/storage/migrations/008_create_view_state_table.d.ts.map +0 -1
  169. package/dist/src/storage/migrations/009_create_operation_index_tables.d.ts +0 -3
  170. package/dist/src/storage/migrations/009_create_operation_index_tables.d.ts.map +0 -1
  171. package/dist/src/storage/migrations/010_create_sync_tables.d.ts +0 -3
  172. package/dist/src/storage/migrations/010_create_sync_tables.d.ts.map +0 -1
  173. package/dist/src/storage/migrations/011_add_cursor_type_column.d.ts +0 -3
  174. package/dist/src/storage/migrations/011_add_cursor_type_column.d.ts.map +0 -1
  175. package/dist/src/storage/migrations/012_add_source_remote_column.d.ts +0 -3
  176. package/dist/src/storage/migrations/012_add_source_remote_column.d.ts.map +0 -1
  177. package/dist/src/storage/migrations/013_create_sync_dead_letters_table.d.ts +0 -3
  178. package/dist/src/storage/migrations/013_create_sync_dead_letters_table.d.ts.map +0 -1
  179. package/dist/src/storage/migrations/014_create_processor_cursor_table.d.ts +0 -3
  180. package/dist/src/storage/migrations/014_create_processor_cursor_table.d.ts.map +0 -1
  181. package/dist/src/storage/migrations/index.d.ts +0 -3
  182. package/dist/src/storage/migrations/index.d.ts.map +0 -1
  183. package/dist/src/storage/migrations/migrator.d.ts +0 -6
  184. package/dist/src/storage/migrations/migrator.d.ts.map +0 -1
  185. package/dist/src/storage/migrations/run-migrations.d.ts +0 -2
  186. package/dist/src/storage/migrations/run-migrations.d.ts.map +0 -1
  187. package/dist/src/storage/migrations/types.d.ts +0 -9
  188. package/dist/src/storage/migrations/types.d.ts.map +0 -1
  189. package/dist/src/storage/txn.d.ts +0 -15
  190. package/dist/src/storage/txn.d.ts.map +0 -1
  191. package/dist/src/subs/default-error-handler.d.ts +0 -13
  192. package/dist/src/subs/default-error-handler.d.ts.map +0 -1
  193. package/dist/src/subs/react-subscription-manager.d.ts +0 -45
  194. package/dist/src/subs/react-subscription-manager.d.ts.map +0 -1
  195. package/dist/src/subs/subscription-notification-read-model.d.ts +0 -18
  196. package/dist/src/subs/subscription-notification-read-model.d.ts.map +0 -1
  197. package/dist/src/subs/types.d.ts +0 -64
  198. package/dist/src/subs/types.d.ts.map +0 -1
  199. package/dist/src/sync/batch-aggregator.d.ts +0 -25
  200. package/dist/src/sync/batch-aggregator.d.ts.map +0 -1
  201. package/dist/src/sync/buffered-mailbox.d.ts +0 -37
  202. package/dist/src/sync/buffered-mailbox.d.ts.map +0 -1
  203. package/dist/src/sync/channels/gql-req-channel.d.ts +0 -133
  204. package/dist/src/sync/channels/gql-req-channel.d.ts.map +0 -1
  205. package/dist/src/sync/channels/gql-request-channel-factory.d.ts +0 -32
  206. package/dist/src/sync/channels/gql-request-channel-factory.d.ts.map +0 -1
  207. package/dist/src/sync/channels/gql-res-channel.d.ts +0 -31
  208. package/dist/src/sync/channels/gql-res-channel.d.ts.map +0 -1
  209. package/dist/src/sync/channels/gql-response-channel-factory.d.ts +0 -13
  210. package/dist/src/sync/channels/gql-response-channel-factory.d.ts.map +0 -1
  211. package/dist/src/sync/channels/index.d.ts +0 -8
  212. package/dist/src/sync/channels/index.d.ts.map +0 -1
  213. package/dist/src/sync/channels/interval-poll-timer.d.ts +0 -40
  214. package/dist/src/sync/channels/interval-poll-timer.d.ts.map +0 -1
  215. package/dist/src/sync/channels/poll-timer.d.ts +0 -14
  216. package/dist/src/sync/channels/poll-timer.d.ts.map +0 -1
  217. package/dist/src/sync/channels/utils.d.ts +0 -44
  218. package/dist/src/sync/channels/utils.d.ts.map +0 -1
  219. package/dist/src/sync/errors.d.ts +0 -16
  220. package/dist/src/sync/errors.d.ts.map +0 -1
  221. package/dist/src/sync/index.d.ts +0 -16
  222. package/dist/src/sync/index.d.ts.map +0 -1
  223. package/dist/src/sync/interfaces.d.ts +0 -203
  224. package/dist/src/sync/interfaces.d.ts.map +0 -1
  225. package/dist/src/sync/mailbox.d.ts +0 -62
  226. package/dist/src/sync/mailbox.d.ts.map +0 -1
  227. package/dist/src/sync/sync-awaiter.d.ts +0 -34
  228. package/dist/src/sync/sync-awaiter.d.ts.map +0 -1
  229. package/dist/src/sync/sync-builder.d.ts +0 -23
  230. package/dist/src/sync/sync-builder.d.ts.map +0 -1
  231. package/dist/src/sync/sync-manager.d.ts +0 -51
  232. package/dist/src/sync/sync-manager.d.ts.map +0 -1
  233. package/dist/src/sync/sync-operation.d.ts +0 -30
  234. package/dist/src/sync/sync-operation.d.ts.map +0 -1
  235. package/dist/src/sync/sync-status-tracker.d.ts +0 -31
  236. package/dist/src/sync/sync-status-tracker.d.ts.map +0 -1
  237. package/dist/src/sync/types.d.ts +0 -165
  238. package/dist/src/sync/types.d.ts.map +0 -1
  239. package/dist/src/sync/utils.d.ts +0 -71
  240. package/dist/src/sync/utils.d.ts.map +0 -1
  241. package/dist/src/utils/reshuffle.d.ts +0 -47
  242. package/dist/src/utils/reshuffle.d.ts.map +0 -1
@@ -1,203 +0,0 @@
1
- import type { IOperationIndex } from "../cache/operation-index-types.js";
2
- import type { ShutdownStatus } from "../shared/types.js";
3
- import type { ISyncCursorStorage } from "../storage/interfaces.js";
4
- import type { IMailbox } from "./mailbox.js";
5
- import type { SyncStatus, SyncStatusChangeCallback } from "./sync-status-tracker.js";
6
- import type { ChannelConfig, ConnectionStateSnapshot, RemoteFilter, RemoteOptions, SyncResult } from "./types.js";
7
- /**
8
- * Represents a bidirectional synchronization channel between two reactor instances.
9
- *
10
- * A channel manages three mailboxes:
11
- * - inbox: Sync operations received from the remote that need to be applied locally
12
- * - outbox: Sync operations to be sent to the remote
13
- * - deadLetter: Sync operations that failed and cannot be retried
14
- */
15
- export type ConnectionStateChangeCallback = (snapshot: ConnectionStateSnapshot) => void;
16
- export interface IChannel {
17
- /**
18
- * Mailbox containing sync operations received from the remote that need to be applied locally.
19
- * Consumers should register callbacks via onAdded to process incoming sync operations.
20
- */
21
- inbox: IMailbox;
22
- /**
23
- * Mailbox containing sync operations that need to be sent to the remote.
24
- * The channel is responsible for transporting these sync operations and handling ACKs.
25
- */
26
- outbox: IMailbox;
27
- /**
28
- * Mailbox containing sync operations that failed and cannot be retried.
29
- * These sync operations require manual intervention or should be logged for debugging.
30
- */
31
- deadLetter: IMailbox;
32
- /**
33
- * Initializes the channel asynchronously.
34
- * For remote channels, this typically involves registering the channel on the remote server.
35
- * Must be called after construction before the channel is used.
36
- */
37
- init(): Promise<void>;
38
- /**
39
- * Shuts down the channel and prevents further operations.
40
- */
41
- shutdown(): Promise<void>;
42
- /**
43
- * Returns the current connection state snapshot.
44
- */
45
- getConnectionState(): ConnectionStateSnapshot;
46
- /**
47
- * Registers a callback that fires when the connection state changes.
48
- * Returns an unsubscribe function.
49
- */
50
- onConnectionStateChange(callback: ConnectionStateChangeCallback): () => void;
51
- }
52
- /**
53
- * Factory for creating channel instances.
54
- *
55
- * Different channel implementations (InternalChannel, GqlChannel, etc.) will have
56
- * their own factories that implement this interface.
57
- */
58
- export interface IChannelFactory {
59
- /**
60
- * Creates a new channel instance with the given configuration.
61
- *
62
- * @param remoteId - Unique identifier for the remote
63
- * @param remoteName - Name of the remote
64
- * @param config - Channel configuration including type and parameters
65
- * @param cursorStorage - Storage for persisting synchronization cursors
66
- * @param collectionId - Collection ID to synchronize
67
- * @param filter - Filter to apply to operations
68
- * @param operationIndex - Operation index for querying timestamps
69
- * @returns A new channel instance
70
- */
71
- instance(remoteId: string, remoteName: string, config: ChannelConfig, cursorStorage: ISyncCursorStorage, collectionId: string, filter: RemoteFilter, operationIndex: IOperationIndex): IChannel;
72
- }
73
- /**
74
- * Represents a configured remote with an active channel.
75
- *
76
- * A remote defines what to synchronize (collectionId, filter) and how to synchronize it (channel).
77
- * The remote name is used as a unique identifier across the system.
78
- */
79
- export type Remote = {
80
- /**
81
- * Unique identifier for this remote.
82
- */
83
- id: string;
84
- /**
85
- * Unique name for this remote.
86
- */
87
- name: string;
88
- /**
89
- * Collection ID to synchronize.
90
- * Typically created via driveCollectionId(branch, documentId) for drive-level sync.
91
- */
92
- collectionId: string;
93
- /**
94
- * Filter to apply to operations.
95
- * Can filter by documentId, scope, and branch.
96
- */
97
- filter: RemoteFilter;
98
- /**
99
- * Additional configuration options for the remote.
100
- */
101
- options: RemoteOptions;
102
- /**
103
- * Active channel for bidirectional communication with the remote.
104
- */
105
- channel: IChannel;
106
- };
107
- /**
108
- * Orchestrates all synchronization activity for a reactor instance.
109
- */
110
- export interface ISyncManager {
111
- /**
112
- * Starts the synchronization manager.
113
- *
114
- * This recreates all remotes from storage and prepares channels for synchronization.
115
- * Each remote's channel will begin processing its inbox/outbox mailboxes.
116
- *
117
- * @returns Promise that resolves when the manager is started
118
- */
119
- startup(): Promise<void>;
120
- /**
121
- * Shuts down the synchronization manager.
122
- *
123
- * This stops all channels, flushes pending operations, and releases resources.
124
- * The shutdown status indicates whether the system was cleanly shut down.
125
- *
126
- * @returns Status object with shutdown information
127
- */
128
- shutdown(): ShutdownStatus;
129
- /**
130
- * Gets a remote by name.
131
- *
132
- * @param name - The name of the remote
133
- * @returns The remote
134
- * @throws Error if the remote does not exist
135
- */
136
- getByName(name: string): Remote;
137
- /**
138
- * Gets a remote by ID.
139
- *
140
- * @param id - The ID of the remote
141
- * @returns The remote
142
- * @throws Error if the remote does not exist
143
- */
144
- getById(id: string): Remote;
145
- /**
146
- * Adds a new remote and starts its channel.
147
- *
148
- * The remote configuration is persisted to storage and a channel is created
149
- * using the appropriate factory. The channel begins processing immediately.
150
- *
151
- * @param name - Unique name for the remote
152
- * @param collectionId - Collection ID to synchronize
153
- * @param channelConfig - Configuration for the channel type and parameters
154
- * @param filter - Optional filter for operations (defaults to no filtering)
155
- * @param options - Optional remote configuration options
156
- * @param id - Optional ID for the remote (generated if not provided)
157
- * @returns Promise that resolves with the created remote
158
- * @throws Error if a remote with this name already exists
159
- */
160
- add(name: string, collectionId: string, channelConfig: ChannelConfig, filter?: RemoteFilter, options?: RemoteOptions, id?: string): Promise<Remote>;
161
- /**
162
- * Removes a remote and stops its channel.
163
- *
164
- * The remote configuration is removed from storage and the channel is shut down.
165
- * Any pending sync operations in the channel's mailboxes will be processed before shutdown.
166
- *
167
- * @param name - The name of the remote to remove
168
- * @returns Promise that resolves when the remote is removed
169
- * @throws Error if the remote does not exist
170
- */
171
- remove(name: string): Promise<void>;
172
- /**
173
- * Lists all configured remotes.
174
- *
175
- * @returns Array of all remotes
176
- */
177
- list(): Remote[];
178
- /**
179
- * Waits for sync operations for a job to complete.
180
- * Resolves when SYNC_SUCCEEDED is emitted.
181
- * Rejects when SYNC_FAILED is emitted.
182
- *
183
- * @param jobId - The job id to wait for
184
- * @param signal - Optional abort signal
185
- * @returns The sync result
186
- */
187
- waitForSync(jobId: string, signal?: AbortSignal): Promise<SyncResult>;
188
- /**
189
- * Gets the current sync status for a document.
190
- *
191
- * @param documentId - The document ID to check
192
- * @returns The sync status, or undefined if the document has never been tracked
193
- */
194
- getSyncStatus(documentId: string): SyncStatus | undefined;
195
- /**
196
- * Registers a callback that fires when a document's sync status changes.
197
- *
198
- * @param callback - Called with (documentId, newStatus) on each transition
199
- * @returns Unsubscribe function
200
- */
201
- onSyncStatusChange(callback: SyncStatusChangeCallback): () => void;
202
- }
203
- //# sourceMappingURL=interfaces.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/sync/interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,KAAK,EACV,UAAU,EACV,wBAAwB,EACzB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EACV,aAAa,EACb,uBAAuB,EACvB,YAAY,EACZ,aAAa,EACb,UAAU,EACX,MAAM,YAAY,CAAC;AAEpB;;;;;;;GAOG;AACH,MAAM,M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AE3B;;;;;;OAMG;IACH,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IAEhC;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IAE5B;;;;;;;;;;;;;;OAcG;IACH,GAAG,CACD,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,aAAa,EAC5B,MAAM,CAAC,EAAE,YAAY,EACrB,OAAO,CAAC,EAAE,aAAa,EACvB,EAAE,CAAC,EAAE,MAAM,GACV,OAAO,CAAC,MAAM,CAAC,CAAC;IAEnB;;;;;;;;;OASG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEpC;;;;OAIG;IACH,IAAI,IAAI,MAAM,EAAE,CAAC;IAEjB;;;;;;;;OAQG;IACH,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAEtE;;;;;OAKG;IACH,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAAC;IAE1D;;;;;OAKG;IACH,kBAAkB,CAAC,QAAQ,EAAE,wBAAwB,GAAG,MAAM,IAAI,CAAC;CACpE"}
@@ -1,62 +0,0 @@
1
- import type { SyncOperation } from "./sync-operation.js";
2
- export type MailboxCallback = (items: SyncOperation[]) => void;
3
- /**
4
- * The Mailbox interface is not intended to use any persistence. Instead, the
5
- * IChannel implementation is responsible for persisting cursors or other data.
6
- *
7
- * This means that ackOrdinal and latestOrdinal are in memory only.
8
- */
9
- export interface IMailbox {
10
- get items(): ReadonlyArray<SyncOperation>;
11
- /**
12
- * The latest ordinal that has been acknowledged. Because acknowledged items
13
- * are removed from the mailbox, this is the last ordinal that has been removed.
14
- */
15
- get ackOrdinal(): number;
16
- /**
17
- * The latest ordinal of the items that are or have been added to the mailbox.
18
- * This may be greater than the ack ordinal if items have been added but not
19
- * yet acknowledged.
20
- */
21
- get latestOrdinal(): number;
22
- init(ackOrdinal: number): void;
23
- advanceOrdinal(ordinal: number): void;
24
- get(id: string): SyncOperation | undefined;
25
- add(...items: SyncOperation[]): void;
26
- remove(...items: SyncOperation[]): void;
27
- onAdded(callback: MailboxCallback): void;
28
- onRemoved(callback: MailboxCallback): void;
29
- pause(): void;
30
- resume(): void;
31
- flush(): void;
32
- isPaused(): boolean;
33
- }
34
- export declare class MailboxAggregateError extends Error {
35
- errors: Error[];
36
- constructor(errors: Error[]);
37
- }
38
- export declare class Mailbox implements IMailbox {
39
- private itemsMap;
40
- private addedCallbacks;
41
- private removedCallbacks;
42
- private paused;
43
- private addedBuffer;
44
- private removedBuffer;
45
- private _ack;
46
- private _latestOrdinal;
47
- init(ackOrdinal: number): void;
48
- advanceOrdinal(ordinal: number): void;
49
- get items(): ReadonlyArray<SyncOperation>;
50
- get ackOrdinal(): number;
51
- get latestOrdinal(): number;
52
- get(id: string): SyncOperation | undefined;
53
- add(...items: SyncOperation[]): void;
54
- remove(...items: SyncOperation[]): void;
55
- onAdded(callback: MailboxCallback): void;
56
- onRemoved(callback: MailboxCallback): void;
57
- pause(): void;
58
- resume(): void;
59
- flush(): void;
60
- isPaused(): boolean;
61
- }
62
- //# sourceMappingURL=mailbox.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mailbox.d.ts","sourceRoot":"","sources":["../../../src/sync/mailbox.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGzD,MAAM,MAAM,eAAe,GAAG,CAAC,KAAK,EAAE,aAAa,EAAE,KAAK,IAAI,CAAC;AAE/D;;;;;GAKG;AACH,MAAM,WAAW,QAAQ;IACvB,IAAI,KAAK,IAAI,aAAa,CAAC,aAAa,CAAC,CAAC;IAE1C;;;OAGG;IACH,IAAI,UAAU,IAAI,MAAM,CAAC;IAEzB;;;;OAIG;IACH,IAAI,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GAAG,SAAS;IAI1C,GAAG,CAAC,GAAG,KAAK,EAAE,aAAa,EAAE,GAAG,IAAI;IAsCpC,MAAM,CAAC,GAAG,KAAK,EAAE,aAAa,EAAE,GAAG,IAAI;IAwBvC,OAAO,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI;IAIxC,SAAS,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI;IAI1C,KAAK,IAAI,IAAI;IAIb,MAAM,IAAI,IAAI;IAKd,KAAK,IAAI,IAAI;IAsCb,QAAQ,IAAI,OAAO;CAGpB"}
@@ -1,34 +0,0 @@
1
- import type { IEventBus } from "../events/interfaces.js";
2
- import { type SyncResult } from "./types.js";
3
- /**
4
- * Provides a promise-based interface for waiting on sync completion.
5
- * Subscribes to sync events at construction and tracks completed sync results
6
- * to provide a fast path for jobs that have already synced.
7
- */
8
- export declare class SyncAwaiter {
9
- private readonly eventBus;
10
- private readonly completedResults;
11
- private readonly pendingWaiters;
12
- private readonly unsubscribers;
13
- private isShutdown;
14
- constructor(eventBus: IEventBus);
15
- /**
16
- * Waits for sync operations for a job to complete.
17
- * Resolves when SYNC_SUCCEEDED is emitted.
18
- * Rejects when SYNC_FAILED is emitted.
19
- *
20
- * @param jobId - The job id to wait for
21
- * @param signal - Optional abort signal
22
- * @returns The sync result
23
- */
24
- waitForSync(jobId: string, signal?: AbortSignal): Promise<SyncResult>;
25
- /**
26
- * Shuts down the sync awaiter. This will synchronously reject all pending waiters.
27
- */
28
- shutdown(): void;
29
- private subscribeToEvents;
30
- private handleSyncSucceeded;
31
- private handleSyncFailed;
32
- private resolveWaiters;
33
- }
34
- //# sourceMappingURL=sync-awaiter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sync-awaiter.d.ts","sourceRoot":"","sources":["../../../src/sync/sync-awaiter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEzD,OAAO,EAGL,KAAK,UAAU,EAEhB,MAAM,YAAY,CAAC;AAQpB;;;;GAIG;AACH,qBAAa,WAAW;IAMV,OAAO,CAAC,QAAQ,CAAC,QAAQ;IALrC,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAiC;IAClE,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAmC;IAClE,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAqB;IACnD,OAAO,CAAC,UAAU,CAAS;gBAEE,QAAQ,EAAE,SAAS;IAIhD;;;;;;;;OAQG;IACH,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC;IAyCrE;;OAEG;IACH,QAAQ,IAAI,IAAI;IAgBhB,OAAO,CAAC,iBAAiB;IAoBzB,OAAO,CAAC,mBAAmB;IAc3B,OAAO,CAAC,gBAAgB;IAcxB,OAAO,CAAC,cAAc;CAgBvB"}
@@ -1,23 +0,0 @@
1
- import type { Kysely } from "kysely";
2
- import type { IOperationIndex } from "../cache/operation-index-types.js";
3
- import type { IReactor, SyncModule } from "../core/types.js";
4
- import type { IEventBus } from "../events/interfaces.js";
5
- import type { ILogger } from "../logging/types.js";
6
- import type { ISyncCursorStorage, ISyncDeadLetterStorage, ISyncRemoteStorage } from "../storage/interfaces.js";
7
- import type { Database } from "../storage/kysely/types.js";
8
- import type { IChannelFactory, ISyncManager } from "./interfaces.js";
9
- export declare class SyncBuilder {
10
- private channelFactory?;
11
- private remoteStorage?;
12
- private cursorStorage?;
13
- private deadLetterStorage?;
14
- private maxDeadLettersPerRemote;
15
- withChannelFactory(factory: IChannelFactory): this;
16
- withRemoteStorage(storage: ISyncRemoteStorage): this;
17
- withCursorStorage(storage: ISyncCursorStorage): this;
18
- withDeadLetterStorage(storage: ISyncDeadLetterStorage): this;
19
- withMaxDeadLettersPerRemote(limit: number): this;
20
- build(reactor: IReactor, logger: ILogger, operationIndex: IOperationIndex, eventBus: IEventBus, db: Kysely<Database>): ISyncManager;
21
- buildModule(reactor: IReactor, logger: ILogger, operationIndex: IOperationIndex, eventBus: IEventBus, db: Kysely<Database>): SyncModule;
22
- }
23
- //# sourceMappingURL=sync-builder.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sync-builder.d.ts","sourceRoot":"","sources":["../../../src/sync/sync-builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,EACV,kBAAkB,EAClB,sBAAsB,EACtB,kBAAkB,EACnB,MAAM,0BAA0B,CAAC;AAIlC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAGrE,qBAAa,WAAW;IACtB,OAAO,CAAC,cAAc,CAAC,CAAkB;IACzC,OAAO,CAAC,aAAa,CAAC,CAAqB;IAC3C,OAAO,CAAC,aAAa,CAAC,CAAqB;IAC3C,OAAO,CAAC,iBAAiB,CAAC,CAAyB;IACnD,OAAO,CAAC,uBAAuB,CAAe;IAE9C,kBAAkB,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI;IAKlD,iBAAiB,CAAC,OAAO,EAAE,kBAAkB,GAAG,IAAI;IAKpD,iBAAiB,CAAC,OAAO,EAAE,kBAAkB,GAAG,IAAI;IAKpD,qBAAqB,CAAC,OAAO,EAAE,sBAAsB,GAAG,IAAI;IAK5D,2BAA2B,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAKhD,KAAK,CACH,OAAO,EAAE,QAAQ,EACjB,MAAM,EAAE,OAAO,EACf,cAAc,EAAE,eAAe,EAC/B,QAAQ,EAAE,SAAS,EACnB,EAAE,EAAE,MAAM,CAAC,QAAQ,CAAC,GACnB,YAAY;IAWf,WAAW,CACT,OAAO,EAAE,QAAQ,EACjB,MAAM,EAAE,OAAO,EACf,cAAc,EAAE,eAAe,EAC/B,QAAQ,EAAE,SAAS,EACnB,EAAE,EAAE,MAAM,CAAC,QAAQ,CAAC,GACnB,UAAU;CA8Bd"}
@@ -1,51 +0,0 @@
1
- import type { IOperationIndex } from "../cache/operation-index-types.js";
2
- import type { IReactor } from "../core/types.js";
3
- import type { IEventBus } from "../events/interfaces.js";
4
- import type { ILogger } from "../logging/types.js";
5
- import { type ShutdownStatus } from "../shared/types.js";
6
- import type { ISyncCursorStorage, ISyncDeadLetterStorage, ISyncRemoteStorage } from "../storage/interfaces.js";
7
- import type { IChannelFactory, ISyncManager, Remote } from "./interfaces.js";
8
- import { type SyncStatus, type SyncStatusChangeCallback } from "./sync-status-tracker.js";
9
- import type { ChannelConfig, RemoteFilter, RemoteOptions, SyncResult } from "./types.js";
10
- export declare class SyncManager implements ISyncManager {
11
- private readonly logger;
12
- private readonly remoteStorage;
13
- private readonly cursorStorage;
14
- private readonly deadLetterStorage;
15
- private readonly channelFactory;
16
- private readonly operationIndex;
17
- private readonly reactor;
18
- private readonly eventBus;
19
- private readonly remotes;
20
- private readonly awaiter;
21
- private readonly syncAwaiter;
22
- private readonly abortController;
23
- private isShutdown;
24
- private eventUnsubscribe?;
25
- private failedEventUnsubscribe?;
26
- private readonly batchAggregator;
27
- private readonly syncStatusTracker;
28
- private readonly maxDeadLettersPerRemote;
29
- private readonly connectionStateUnsubscribes;
30
- private readonly quarantinedDocumentIds;
31
- constructor(logger: ILogger, remoteStorage: ISyncRemoteStorage, cursorStorage: ISyncCursorStorage, deadLetterStorage: ISyncDeadLetterStorage, channelFactory: IChannelFactory, operationIndex: IOperationIndex, reactor: IReactor, eventBus: IEventBus, maxDeadLettersPerRemote?: number);
32
- startup(): Promise<void>;
33
- shutdown(): ShutdownStatus;
34
- getByName(name: string): Remote;
35
- getById(id: string): Remote;
36
- add(name: string, collectionId: string, channelConfig: ChannelConfig, filter?: RemoteFilter, options?: RemoteOptions, id?: string): Promise<Remote>;
37
- remove(name: string): Promise<void>;
38
- list(): Remote[];
39
- waitForSync(jobId: string, signal?: AbortSignal): Promise<SyncResult>;
40
- getSyncStatus(documentId: string): SyncStatus | undefined;
41
- onSyncStatusChange(callback: SyncStatusChangeCallback): () => void;
42
- private wireChannelCallbacks;
43
- private loadDeadLetters;
44
- private getRemotesForCollection;
45
- private processCompleteBatch;
46
- private handleInboxAdded;
47
- private applyInboxJob;
48
- private applyInboxBatch;
49
- private updateOutbox;
50
- }
51
- //# sourceMappingURL=sync-manager.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sync-manager.d.ts","sourceRoot":"","sources":["../../../src/sync/sync-manager.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,KAAK,EAGV,QAAQ,EACT,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAMzD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAEnD,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,KAAK,EAEV,kBAAkB,EAClB,sBAAsB,EACtB,kBAAkB,EACnB,MAAM,0BAA0B,CAAC;AAGlC,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAG7E,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,wBAAwB,EAC9B,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EACV,aAAa,EAGb,YAAY,EACZ,aAAa,EAGb,UAAU,EACX,MAAM,YAAY,CAAC;AAUpB,qBAAa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E,MAAM,GAAG,MAAM;IAQ/B,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM;IASrB,GAAG,CACP,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,aAAa,EAC5B,MAAM,GAAE,YAAwD,EAChE,OAAO,GAAE,aAA4C,EACrD,EAAE,CAAC,EAAE,MAAM,GACV,OAAO,CAAC,MAAM,CAAC;IA2EZ,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAsBzC,IAAI,IAAI,MAAM,EAAE;IAIhB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC;IAIrE,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS;IAIzD,kBAAkB,CAAC,QAAQ,EAAE,wBAAwB,GAAG,MAAM,IAAI;IAIlE,OAAO,CAAC,oBAAoB;YA2Ed,eAAe;IAqD7B,OAAO,CAAC,uBAAuB;YAMjB,oBAAoB;IAkClC,OAAO,CAAC,gBAAgB;YA8BV,aAAa;YA8Eb,eAAe;YA0Ff,YAAY;CA+E3B"}
@@ -1,30 +0,0 @@
1
- import type { OperationWithContext } from "@powerhousedao/shared/document-model";
2
- import type { ChannelError } from "./errors.js";
3
- import { SyncOperationStatus } from "./types.js";
4
- type SyncOperationStatusCallback = (syncOp: SyncOperation, prev: SyncOperationStatus, next: SyncOperationStatus) => void;
5
- export declare class SyncOperationAggregateError extends Error {
6
- errors: Error[];
7
- constructor(errors: Error[]);
8
- }
9
- export declare class SyncOperation {
10
- readonly id: string;
11
- readonly jobId: string;
12
- jobDependencies: string[];
13
- readonly remoteName: string;
14
- readonly documentId: string;
15
- readonly scopes: string[];
16
- readonly branch: string;
17
- readonly operations: OperationWithContext[];
18
- status: SyncOperationStatus;
19
- error?: ChannelError;
20
- private callbacks;
21
- constructor(id: string, jobId: string, jobDependencies: string[], remoteName: string, documentId: string, scopes: string[], branch: string, operations: OperationWithContext[]);
22
- on(callback: SyncOperationStatusCallback): void;
23
- started(): void;
24
- transported(): void;
25
- executed(): void;
26
- failed(error: ChannelError): void;
27
- private transition;
28
- }
29
- export {};
30
- //# sourceMappingURL=sync-operation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sync-operation.d.ts","sourceRoot":"","sources":["../../../src/sync/sync-operation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEjD,KAAK,2BAA2B,GAAG,CACjC,MAAM,EAAE,aAAa,EACrB,IAAI,EAAE,mBAAmB,EACzB,IAAI,EAAE,mBAAmB,KACtB,IAAI,CAAC;AAEV,qBAAa,2BAA4B,SAAQ,KAAK;IACpD,MAAM,EAAE,KAAK,EAAE,CAAC;gBAEJ,MAAM,EAAE,KAAK,EAAE;CAQ5B;AAED,qBAAa,aAAa;IACxB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,oBAAoB,EAAE,CAAC;IAC5C,MAAM,EAAE,mBAAmB,CAAC;IAC5B,KAAK,CAAC,EAAE,YAAY,CAAC;IAErB,OAAO,CAAC,SAAS,CAAqC;gBAGpD,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,EACb,eAAe,EAAE,MAAM,EAAE,EACzB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,EAAE,EAChB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,oBAAoB,EAAE;IAapC,EAAE,CAAC,QAAQ,EAAE,2BAA2B,GAAG,IAAI;IAI/C,OAAO,IAAI,IAAI;IAIf,WAAW,IAAI,IAAI;IAInB,QAAQ,IAAI,IAAI;IAIhB,MAAM,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI;IAKjC,OAAO,CAAC,UAAU;CAkBnB"}
@@ -1,31 +0,0 @@
1
- import type { IChannel } from "./interfaces.js";
2
- export declare enum SyncStatus {
3
- Synced = "SYNCED",
4
- Outgoing = "OUTGOING",
5
- Incoming = "INCOMING",
6
- OutgoingAndIncoming = "OUTGOING_AND_INCOMING",
7
- Error = "ERROR"
8
- }
9
- export type SyncStatusChangeCallback = (documentId: string, status: SyncStatus) => void;
10
- export interface ISyncStatusTracker {
11
- getStatus(documentId: string): SyncStatus | undefined;
12
- onChange(callback: SyncStatusChangeCallback): () => void;
13
- trackRemote(remoteName: string, channel: IChannel): void;
14
- untrackRemote(remoteName: string): void;
15
- clear(): void;
16
- }
17
- export declare class SyncStatusTracker implements ISyncStatusTracker {
18
- private readonly remotes;
19
- private readonly seen;
20
- private readonly callbacks;
21
- getStatus(documentId: string): SyncStatus | undefined;
22
- onChange(callback: SyncStatusChangeCallback): () => void;
23
- trackRemote(remoteName: string, channel: IChannel): void;
24
- untrackRemote(remoteName: string): void;
25
- clear(): void;
26
- private handleAdded;
27
- private handleRemoved;
28
- private getOrCreateCounts;
29
- private notifyChange;
30
- }
31
- //# sourceMappingURL=sync-status-tracker.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sync-status-tracker.d.ts","sourceRoot":"","sources":["../../../src/sync/sync-status-tracker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGhD,oBAAY,UAAU;IACpB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,QAAQ,aAAa;IACrB,mBAAmB,0BAA0B;IAC7C,KAAK,UAAU;CAChB;AAED,MAAM,MAAM,wBAAwB,GAAG,CACrC,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,UAAU,KACf,IAAI,CAAC;AAEV,MAAM,WAAW,kBAAkB;IACjC,SAAS,CAAC,UAAU,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAAC;IACtD,QAAQ,CAAC,QAAQ,EAAE,wBAAwB,GAAG,MAAM,IAAI,CAAC;IACzD,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,GAAG,IAAI,CAAC;IACzD,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,KAAK,IAAI,IAAI,CAAC;CACf;AAUD,qBAAa,iBAAkB,YAAW,kBAAkB;IAC1D,OAAO,CAAC,QAAQ,CAAC,OAAO,CACZ;IACZ,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA0B;IAC/C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA4C;IAEtE,SAAS,CAAC,UAAU,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS;IAqBrD,QAAQ,CAAC,QAAQ,EAAE,wBAAwB,GAAG,MAAM,IAAI;IAOxD,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,GAAG,IAAI;IAoBxD,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAcvC,KAAK,IAAI,IAAI;IAMb,OAAO,CAAC,WAAW;IA+BnB,OAAO,CAAC,aAAa;IAwBrB,OAAO,CAAC,iBAAiB;IAmBzB,OAAO,CAAC,YAAY;CAUrB"}
@@ -1,165 +0,0 @@
1
- import type { OperationWithContext } from "@powerhousedao/shared/document-model";
2
- export declare enum ChannelScheme {
3
- CONNECT = "connect",
4
- SWITCHBOARD = "switchboard"
5
- }
6
- /**
7
- * Dynamic JWT token handler for generating authentication tokens per-request.
8
- * Called with the target URL to enable audience-specific tokens (aud claim).
9
- * Returns undefined if no authentication is available (e.g., user not logged in).
10
- */
11
- export type JwtHandler = (url: string) => Promise<string | undefined>;
12
- export type RemoteOptions = {
13
- sinceTimestampUtcMs: string;
14
- };
15
- export type RemoteFilter = {
16
- documentId: string[];
17
- scope: string[];
18
- branch: string;
19
- };
20
- export type RemoteCursor = {
21
- remoteName: string;
22
- cursorType: string;
23
- cursorOrdinal: number;
24
- lastSyncedAtUtcMs?: number;
25
- };
26
- export type ChannelMeta = {
27
- id: string;
28
- };
29
- export type SyncEnvelopeType = "operations" | "ack";
30
- export type SyncEnvelope = {
31
- type: SyncEnvelopeType;
32
- channelMeta: ChannelMeta;
33
- operations?: OperationWithContext[];
34
- cursor?: RemoteCursor;
35
- key?: string;
36
- dependsOn?: string[];
37
- };
38
- export declare enum SyncOperationStatus {
39
- Unknown = -1,
40
- TransportPending = 0,
41
- ExecutionPending = 1,
42
- Applied = 2,
43
- Error = 3
44
- }
45
- export declare enum ChannelErrorSource {
46
- None = "none",
47
- Channel = "channel",
48
- Inbox = "inbox",
49
- Outbox = "outbox"
50
- }
51
- export type SyncOperationErrorType = "SIGNATURE_INVALID" | "HASH_MISMATCH" | "LIBRARY_ERROR" | "MISSING_OPERATIONS" | "EXCESSIVE_SHUFFLE" | "GRACEFUL_ABORT";
52
- export type ChannelHealth = {
53
- state: "idle" | "running" | "error";
54
- lastSuccessUtcMs?: number;
55
- lastFailureUtcMs?: number;
56
- failureCount: number;
57
- };
58
- export type ConnectionState = "connecting" | "connected" | "disconnected" | "reconnecting" | "error";
59
- export type ConnectionStateSnapshot = {
60
- state: ConnectionState;
61
- failureCount: number;
62
- lastSuccessUtcMs: number;
63
- lastFailureUtcMs: number;
64
- pushBlocked: boolean;
65
- pushFailureCount: number;
66
- };
67
- export type ConnectionStateChangedEvent = {
68
- remoteName: string;
69
- remoteId: string;
70
- previous: ConnectionState;
71
- current: ConnectionState;
72
- snapshot: ConnectionStateSnapshot;
73
- };
74
- export type RemoteStatus = {
75
- push: ChannelHealth;
76
- pull: ChannelHealth;
77
- };
78
- export type ChannelConfig = {
79
- type: string;
80
- parameters: Record<string, unknown>;
81
- };
82
- export type RemoteRecord = {
83
- id: string;
84
- name: string;
85
- collectionId: string;
86
- channelConfig: ChannelConfig;
87
- filter: RemoteFilter;
88
- options: RemoteOptions;
89
- status: RemoteStatus;
90
- };
91
- /**
92
- * Event types for sync lifecycle events.
93
- * These events track the sync progress of a job's operations to remotes.
94
- * Uses a separate namespace (20000 range) from ReactorEventTypes (10000 range).
95
- */
96
- export declare const SyncEventTypes: {
97
- readonly SYNC_PENDING: 20001;
98
- readonly SYNC_SUCCEEDED: 20002;
99
- readonly SYNC_FAILED: 20003;
100
- readonly DEAD_LETTER_ADDED: 20004;
101
- readonly CONNECTION_STATE_CHANGED: 20005;
102
- };
103
- /**
104
- * Event emitted when all SyncOperations for a job are queued in outboxes.
105
- */
106
- export type SyncPendingEvent = {
107
- jobId: string;
108
- syncOperationCount: number;
109
- remoteNames: string[];
110
- };
111
- /**
112
- * Event emitted when all sync operations for a job succeed.
113
- */
114
- export type SyncSucceededEvent = {
115
- jobId: string;
116
- syncOperationCount: number;
117
- };
118
- /**
119
- * Event emitted when at least one sync operation for a job fails.
120
- */
121
- export type SyncFailedEvent = {
122
- jobId: string;
123
- successCount: number;
124
- failureCount: number;
125
- errors: Array<{
126
- remoteName: string;
127
- documentId: string;
128
- error: string;
129
- }>;
130
- };
131
- /**
132
- * Event emitted when a sync operation is moved to dead letter storage.
133
- */
134
- export type DeadLetterAddedEvent = {
135
- id: string;
136
- jobId: string;
137
- remoteName: string;
138
- documentId: string;
139
- errorSource: ChannelErrorSource;
140
- };
141
- /**
142
- * Status of a sync operation result.
143
- */
144
- export type SyncResultStatus = "succeeded" | "failed";
145
- /**
146
- * Error information for a failed sync operation to a specific remote.
147
- */
148
- export type SyncResultError = {
149
- remoteName: string;
150
- documentId: string;
151
- error: string;
152
- };
153
- /**
154
- * Result of waiting for sync operations to complete for a job.
155
- * Returned by ISyncManager.waitForSync().
156
- */
157
- export type SyncResult = {
158
- jobId: string;
159
- status: SyncResultStatus;
160
- syncOperationCount: number;
161
- successCount: number;
162
- failureCount: number;
163
- errors: SyncResultError[];
164
- };
165
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/sync/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAEjF,oBAAY,aAAa;IACvB,OAAO,YAAY;IACnB,WAAW,gBAAgB;CAC5B;AAED;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;AAEtE,MAAM,MAAM,aAAa,GAAG;IAC1B,mBAAmB,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,YAAY,GAAG,KAAK,CAAC;AAEpD,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,gBAAgB,CAAC;IACvB,WAAW,EAAE,WAAW,CAAC;IACzB,UAAU,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACpC,MAAM,CAAC,EA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