@xnetjs/data 0.0.3 → 0.1.0

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 (151) hide show
  1. package/dist/account-MWNCH4GJ.js +12 -0
  2. package/dist/account-ledger-R2GAFJL6.js +38 -0
  3. package/dist/auth/index.d.ts +11 -4
  4. package/dist/auth/index.js +1 -1
  5. package/dist/budget-NN7P35XP.js +12 -0
  6. package/dist/canvas-6WYBNH53.js +10 -0
  7. package/dist/channel-AT3LQF4A.js +12 -0
  8. package/dist/chat-message-DSVO72B3.js +10 -0
  9. package/dist/{chunk-J6EDPPH4.js → chunk-2ZNJWIQG.js} +2 -2
  10. package/dist/{chunk-5FHJE7RC.js → chunk-3J3HILXO.js} +2 -2
  11. package/dist/{chunk-EZA5UT4Y.js → chunk-3RUDVTMH.js} +6 -6
  12. package/dist/{chunk-YEQ6LLUY.js → chunk-4EYKGTSQ.js} +2 -2
  13. package/dist/{chunk-L66WXPTW.js → chunk-53F4PRNC.js} +2 -2
  14. package/dist/{chunk-LGD72FVD.js → chunk-5EXHNXPL.js} +2 -2
  15. package/dist/{chunk-4U4KBCDN.js → chunk-5HC5NO57.js} +2 -2
  16. package/dist/{chunk-YWN27MLD.js → chunk-6KLGA6IR.js} +2 -2
  17. package/dist/{chunk-37267RSF.js → chunk-6OMG4I7M.js} +2 -2
  18. package/dist/{chunk-DOZJXPQ6.js → chunk-BQLQSWKZ.js} +2 -2
  19. package/dist/{chunk-V6HZ3LF3.js → chunk-BY5O6LNC.js} +1 -1
  20. package/dist/{chunk-64AM6JPM.js → chunk-DCTRX6II.js} +1 -1
  21. package/dist/{chunk-SPFKSTPT.js → chunk-DWEXKD6E.js} +2 -2
  22. package/dist/{chunk-O64EK5FK.js → chunk-EBNMV2VO.js} +11 -2
  23. package/dist/{chunk-J4IVJA5M.js → chunk-FVEACSKE.js} +2 -2
  24. package/dist/{chunk-XWA3CJQ6.js → chunk-GU6THOAB.js} +2 -2
  25. package/dist/{chunk-XTUGZSYQ.js → chunk-H4GA4BBK.js} +2 -2
  26. package/dist/{chunk-GR3NDMBY.js → chunk-IJ44LR7N.js} +2 -2
  27. package/dist/{chunk-E6S557NC.js → chunk-J4ANIXIV.js} +2 -2
  28. package/dist/{chunk-EIQX7INF.js → chunk-JDFNMFOZ.js} +2 -2
  29. package/dist/{chunk-PSUJEKVV.js → chunk-K7DOZWWT.js} +244 -155
  30. package/dist/{chunk-UDUPQKRB.js → chunk-KQAT4XBL.js} +2 -2
  31. package/dist/chunk-KQUALW4O.js +183 -0
  32. package/dist/{chunk-KPVBKKZS.js → chunk-LYSWLCOI.js} +2 -2
  33. package/dist/{chunk-YXZGYLKV.js → chunk-MBTUO3ZL.js} +2 -2
  34. package/dist/{chunk-7GMJOAPF.js → chunk-NI4FHG2K.js} +2 -2
  35. package/dist/{chunk-6OPZJ7MG.js → chunk-OCMSAKWV.js} +2 -2
  36. package/dist/{chunk-IP4BEVVD.js → chunk-OGJCRNGE.js} +2 -2
  37. package/dist/{chunk-6CN53PON.js → chunk-OPPHF3TF.js} +3 -3
  38. package/dist/{chunk-77UDLVQY.js → chunk-OSAWNZVM.js} +1 -1
  39. package/dist/{chunk-GWYVY2K4.js → chunk-PNESGUH5.js} +2 -2
  40. package/dist/{chunk-RSSZXCLL.js → chunk-Q3IEGH4B.js} +2 -2
  41. package/dist/{chunk-2DSDH2ZH.js → chunk-QJW5LDP4.js} +2 -2
  42. package/dist/{chunk-JESSJ5CZ.js → chunk-RL64OJJ5.js} +13 -3
  43. package/dist/{chunk-S4B5OPZU.js → chunk-S5RP5RKY.js} +1 -0
  44. package/dist/{chunk-4UQTURCD.js → chunk-S6U6TCMN.js} +2 -2
  45. package/dist/{chunk-C5IRSEEZ.js → chunk-SVNGSZZA.js} +2 -2
  46. package/dist/{chunk-ZICIXDEE.js → chunk-T5AZAOG5.js} +1 -1
  47. package/dist/{chunk-IJ675GJR.js → chunk-TCTZW4A6.js} +2 -2
  48. package/dist/{chunk-54Y7QRZN.js → chunk-U64CW73O.js} +2 -2
  49. package/dist/{chunk-QVZXXJSP.js → chunk-UDWKWTAX.js} +485 -81
  50. package/dist/{chunk-3RB2FMMO.js → chunk-UQM3G5A2.js} +2 -2
  51. package/dist/{chunk-ENTHVNOC.js → chunk-VQ7JHB67.js} +2 -2
  52. package/dist/{chunk-JO6Y4E5V.js → chunk-W7EBL7ZU.js} +2 -2
  53. package/dist/{chunk-WUR3WWQM.js → chunk-WEPK7SZF.js} +2 -2
  54. package/dist/{chunk-3JKW6TDE.js → chunk-XMSKJ5PV.js} +2 -2
  55. package/dist/{chunk-WMSCEBFH.js → chunk-XROI44ZP.js} +2 -2
  56. package/dist/{chunk-CHZUSBSB.js → chunk-Y3S5SRVM.js} +2 -2
  57. package/dist/{chunk-KTJLFJEQ.js → chunk-YEFKQYKA.js} +2 -2
  58. package/dist/{chunk-DTPSTMUD.js → chunk-YSUIXD2Y.js} +2 -2
  59. package/dist/{chunk-ZMCO3O2Z.js → chunk-ZCOFZY5M.js} +2 -2
  60. package/dist/{chunk-U6CBYDVZ.js → chunk-ZLU4Y3O2.js} +2 -2
  61. package/dist/{chunk-337E3ZOB.js → chunk-ZPZ7XDA6.js} +2 -2
  62. package/dist/{chunk-6GB7PBCR.js → chunk-ZZ6TWKGS.js} +2 -2
  63. package/dist/{clone-DpbVKLUu.d.ts → clone-C0Jhk2UN.d.ts} +2 -2
  64. package/dist/comment-QSWYAQVS.js +10 -0
  65. package/dist/{crm-AAJXYIJY.js → crm-L5RYAAF3.js} +5 -5
  66. package/dist/dashboard-JMKTTRA7.js +10 -0
  67. package/dist/database/index.d.ts +3 -3
  68. package/dist/database/index.js +11 -11
  69. package/dist/database-GIXSPZJW.js +10 -0
  70. package/dist/database-field-3EPAMZUR.js +10 -0
  71. package/dist/database-row-6Q6TRVE4.js +10 -0
  72. package/dist/database-select-option-BBBJFLLH.js +10 -0
  73. package/dist/database-view-5PLSOBI2.js +10 -0
  74. package/dist/experiment-DOVOZ34Y.js +10 -0
  75. package/dist/{external-item-D654PKLI.js → external-item-P2E5X7BZ.js} +5 -5
  76. package/dist/external-reference-7BSFF6SA.js +8 -0
  77. package/dist/feed-2IXHHP6O.js +12 -0
  78. package/dist/feed-item-DPE6LN7I.js +12 -0
  79. package/dist/{folder-ONKSWHUT.js → folder-6KM3KYD5.js} +3 -3
  80. package/dist/{game-BF7DP5JU.js → game-5AK5XWBR.js} +5 -5
  81. package/dist/grant-WTQSNT5A.js +8 -0
  82. package/dist/{grant-expiration-cleaner-DBiNTWbD.d.ts → grant-expiration-cleaner-CY6BcmlR.d.ts} +2 -2
  83. package/dist/import-batch-IXBJLQPJ.js +12 -0
  84. package/dist/{inbox-state-AN6FPCIY.js → inbox-state-E5NSVOGP.js} +3 -3
  85. package/dist/index.d.ts +7 -7
  86. package/dist/index.js +101 -55
  87. package/dist/map-RG5Y3CPC.js +10 -0
  88. package/dist/media-asset-QTCGLIZA.js +8 -0
  89. package/dist/{memory-NV6EVJBE.js → memory-PNRTMBZO.js} +3 -3
  90. package/dist/metric-65SVOX5C.js +10 -0
  91. package/dist/milestone-XEO6ZGDG.js +12 -0
  92. package/dist/{moderation-QSUVBCNS.js → moderation-FFHETMRB.js} +3 -3
  93. package/dist/observation-2Y3QKUXM.js +10 -0
  94. package/dist/page-2V27JGKJ.js +10 -0
  95. package/dist/posting-GBOSZCMZ.js +12 -0
  96. package/dist/profile-BLLDWIDK.js +8 -0
  97. package/dist/project-CQL5LN26.js +10 -0
  98. package/dist/{query-ast-CWo6_30h.d.ts → query-ast-C3m6kZYv.d.ts} +1 -1
  99. package/dist/reaction-T2DTJBBV.js +10 -0
  100. package/dist/{registry-CQoN_p8U.d.ts → registry-DunPv__d.d.ts} +1 -1
  101. package/dist/saved-view-4R2DBCL3.js +10 -0
  102. package/dist/schema/index.d.ts +320 -13
  103. package/dist/schema/index.js +98 -52
  104. package/dist/{schema-extension-5BUXRDPB.js → schema-extension-LNRF2YRD.js} +5 -5
  105. package/dist/{space-PZ737CIS.js → space-IJU24PBH.js} +6 -6
  106. package/dist/{space-membership-N35NRX6F.js → space-membership-DEUMM7NV.js} +3 -3
  107. package/dist/store/index.d.ts +131 -4
  108. package/dist/store/index.js +5 -5
  109. package/dist/{store-CvgiydME.d.ts → store-DtIDjk7c.d.ts} +18 -1
  110. package/dist/{system-Q5I6STDC.js → system-ILHCZOVO.js} +3 -3
  111. package/dist/{tag-C677GKQW.js → tag-SKCHM3U5.js} +3 -3
  112. package/dist/{task-WQLMPN5U.js → task-7AOBP7WC.js} +5 -5
  113. package/dist/task-view-NUGKELJP.js +10 -0
  114. package/dist/transaction-ZDSEGDIR.js +12 -0
  115. package/dist/transcription-PSCLDAGX.js +12 -0
  116. package/dist/{types-Def-5Nka.d.ts → types-S-BJAKyK.d.ts} +53 -2
  117. package/dist/user-widget-RLY2N46A.js +8 -0
  118. package/package.json +7 -7
  119. package/dist/account-BZHETMC4.js +0 -12
  120. package/dist/budget-WR2Q4YH3.js +0 -12
  121. package/dist/canvas-HFMMVQLD.js +0 -10
  122. package/dist/channel-DXDYJ3ZH.js +0 -12
  123. package/dist/chat-message-QUUQGXEW.js +0 -10
  124. package/dist/comment-Y2Y3QYYI.js +0 -10
  125. package/dist/dashboard-3DC6B4BJ.js +0 -10
  126. package/dist/database-DRGL5UYS.js +0 -10
  127. package/dist/database-field-F47FY3XX.js +0 -10
  128. package/dist/database-row-77OXW2NF.js +0 -10
  129. package/dist/database-select-option-6S3TTA7A.js +0 -10
  130. package/dist/database-view-YW7DQG5X.js +0 -10
  131. package/dist/experiment-TJOAL3OH.js +0 -10
  132. package/dist/external-reference-K5SUJIQN.js +0 -8
  133. package/dist/feed-L23XTNDI.js +0 -12
  134. package/dist/feed-item-GSO242J6.js +0 -12
  135. package/dist/grant-NNKMWXPX.js +0 -8
  136. package/dist/import-batch-JMESZ4VI.js +0 -12
  137. package/dist/map-AUV65YS3.js +0 -10
  138. package/dist/media-asset-4I5YPR4R.js +0 -8
  139. package/dist/metric-X7W55DLC.js +0 -10
  140. package/dist/milestone-JJGOGK4R.js +0 -12
  141. package/dist/observation-UZSXXGBC.js +0 -10
  142. package/dist/page-NI7XODS6.js +0 -10
  143. package/dist/posting-FZOYVGH2.js +0 -12
  144. package/dist/profile-42A43GES.js +0 -8
  145. package/dist/project-G2CTLDXY.js +0 -10
  146. package/dist/reaction-VAQBVDUD.js +0 -10
  147. package/dist/saved-view-AOQHGHNM.js +0 -10
  148. package/dist/task-view-T5S32V4L.js +0 -10
  149. package/dist/transaction-U3ITRGJP.js +0 -12
  150. package/dist/transcription-F3T23LLO.js +0 -12
  151. package/dist/user-widget-4SJJFPG5.js +0 -8
@@ -7,7 +7,9 @@ import {
7
7
  SchemaRegistry,
8
8
  SystemSchemaIndex,
9
9
  TASK_SHORT_ID_PATTERN,
10
+ accountState,
10
11
  addDefault,
12
+ admitDeviceRecord,
11
13
  bucketPresenceCount,
12
14
  buildEffectiveSchema,
13
15
  builtInSchemas,
@@ -16,6 +18,7 @@ import {
16
18
  composeLens,
17
19
  convert,
18
20
  copy,
21
+ createAccountRecord,
19
22
  createNodeGraphSchemaResolver,
20
23
  createOperations,
21
24
  decodeAnchor,
@@ -42,12 +45,15 @@ import {
42
45
  mentionsInclude,
43
46
  merge,
44
47
  mergeSidecarsIntoRow,
48
+ nextEpoch,
45
49
  normalizeMentions,
46
50
  parseTaskShortId,
47
51
  promoteOverlay,
48
52
  remove,
49
53
  rename,
50
54
  resolveEffectiveSchema,
55
+ revokeDeviceRecord,
56
+ revokeSubjectRecord,
51
57
  schemaRegistry,
52
58
  selectExtensionFields,
53
59
  shortIdsFromBlock,
@@ -57,10 +63,13 @@ import {
57
63
  taskBranchName,
58
64
  transform,
59
65
  when
60
- } from "../chunk-PSUJEKVV.js";
66
+ } from "../chunk-K7DOZWWT.js";
67
+ import {
68
+ UserWidgetSchema
69
+ } from "../chunk-53F4PRNC.js";
61
70
  import {
62
71
  DashboardSchema
63
- } from "../chunk-2DSDH2ZH.js";
72
+ } from "../chunk-QJW5LDP4.js";
64
73
  import {
65
74
  AbuseReportSchema,
66
75
  AppealSchema,
@@ -74,7 +83,7 @@ import {
74
83
  PublicInteractionPolicySchema,
75
84
  QualitySignalSchema,
76
85
  ReviewTaskSchema
77
- } from "../chunk-4UQTURCD.js";
86
+ } from "../chunk-S6U6TCMN.js";
78
87
  import {
79
88
  ACHIEVEMENT_SCHEMA_IRI,
80
89
  AchievementSchema,
@@ -97,68 +106,83 @@ import {
97
106
  PLAYER_IDENTITY_SCHEMA_IRI,
98
107
  PlayerIdentitySchema,
99
108
  gameSchemas
100
- } from "../chunk-DOZJXPQ6.js";
109
+ } from "../chunk-BQLQSWKZ.js";
101
110
  import {
102
111
  MEMORY_ITEM_SCHEMA_IRI,
103
112
  MEMORY_KINDS,
104
113
  MemoryItemSchema
105
- } from "../chunk-XWA3CJQ6.js";
114
+ } from "../chunk-GU6THOAB.js";
106
115
  import {
107
116
  ChatMessageSchema
108
- } from "../chunk-RSSZXCLL.js";
117
+ } from "../chunk-Q3IEGH4B.js";
109
118
  import {
110
119
  FEED_SCHEMA_IRI,
111
120
  FeedSchema
112
- } from "../chunk-IJ675GJR.js";
121
+ } from "../chunk-TCTZW4A6.js";
113
122
  import {
114
123
  FEED_ITEM_SCHEMA_IRI,
115
124
  FeedItemSchema
116
- } from "../chunk-LGD72FVD.js";
125
+ } from "../chunk-5EXHNXPL.js";
117
126
  import {
118
127
  EXTERNAL_ITEM_SCHEMA_IRI,
119
128
  EXTERNAL_ITEM_SOURCES,
120
129
  ExternalItemSchema
121
- } from "../chunk-GWYVY2K4.js";
130
+ } from "../chunk-PNESGUH5.js";
122
131
  import {
123
132
  DEFAULT_CHANNEL_TIER,
124
133
  InboxStateSchema,
125
134
  inboxStateNodeId
126
- } from "../chunk-KTJLFJEQ.js";
135
+ } from "../chunk-YEFKQYKA.js";
127
136
  import {
128
137
  GrantSchema
129
- } from "../chunk-77UDLVQY.js";
138
+ } from "../chunk-OSAWNZVM.js";
139
+ import {
140
+ ACCOUNT_RECORD_SCHEMA_IRI,
141
+ AccountRecordSchema,
142
+ DEVICE_RECORD_SCHEMA_IRI,
143
+ DeviceRecordSchema,
144
+ RECOVERY_RECORD_SCHEMA_IRI,
145
+ REVOCATION_RECORD_SCHEMA_IRI,
146
+ RecoveryRecordSchema,
147
+ RevocationRecordSchema,
148
+ accountRecordId,
149
+ deviceRecipientExpander,
150
+ deviceRecordId,
151
+ isDeviceAuthorized,
152
+ recoveryRecordId,
153
+ resolveActiveDevices,
154
+ revocationRecordId,
155
+ revokedSubjects
156
+ } from "../chunk-KQUALW4O.js";
130
157
  import {
131
158
  SavedViewSchema
132
- } from "../chunk-6GB7PBCR.js";
133
- import {
134
- UserWidgetSchema
135
- } from "../chunk-L66WXPTW.js";
159
+ } from "../chunk-ZZ6TWKGS.js";
136
160
  import {
137
161
  MediaAssetSchema
138
- } from "../chunk-5FHJE7RC.js";
162
+ } from "../chunk-3J3HILXO.js";
139
163
  import {
140
164
  TRANSCRIPTION_SCHEMA_IRI,
141
165
  TranscriptionSchema
142
- } from "../chunk-J6EDPPH4.js";
166
+ } from "../chunk-2ZNJWIQG.js";
143
167
  import {
144
168
  CanvasSchema
145
- } from "../chunk-KPVBKKZS.js";
169
+ } from "../chunk-LYSWLCOI.js";
146
170
  import {
147
171
  MapSchema
148
- } from "../chunk-7GMJOAPF.js";
172
+ } from "../chunk-NI4FHG2K.js";
149
173
  import {
150
174
  CommentSchema
151
- } from "../chunk-4U4KBCDN.js";
175
+ } from "../chunk-5HC5NO57.js";
152
176
  import {
153
177
  ReactionSchema
154
- } from "../chunk-CHZUSBSB.js";
178
+ } from "../chunk-Y3S5SRVM.js";
155
179
  import {
156
180
  ProfileSchema
157
- } from "../chunk-64AM6JPM.js";
181
+ } from "../chunk-DCTRX6II.js";
158
182
  import {
159
183
  CHANNEL_KINDS,
160
184
  ChannelSchema
161
- } from "../chunk-ZMCO3O2Z.js";
185
+ } from "../chunk-ZCOFZY5M.js";
162
186
  import {
163
187
  ACTIVITY_KINDS,
164
188
  ACTIVITY_SCHEMA_IRI,
@@ -190,27 +214,27 @@ import {
190
214
  STAGE_SCHEMA_IRI,
191
215
  StageSchema,
192
216
  crmSchemas
193
- } from "../chunk-E6S557NC.js";
217
+ } from "../chunk-J4ANIXIV.js";
194
218
  import {
195
219
  ACCOUNT_SCHEMA_IRI,
196
220
  AccountSchema
197
- } from "../chunk-3JKW6TDE.js";
221
+ } from "../chunk-XMSKJ5PV.js";
198
222
  import {
199
223
  TRANSACTION_SCHEMA_IRI,
200
224
  TransactionSchema
201
- } from "../chunk-YXZGYLKV.js";
225
+ } from "../chunk-MBTUO3ZL.js";
202
226
  import {
203
227
  POSTING_SCHEMA_IRI,
204
228
  PostingSchema
205
- } from "../chunk-EIQX7INF.js";
229
+ } from "../chunk-JDFNMFOZ.js";
206
230
  import {
207
231
  BUDGET_SCHEMA_IRI,
208
232
  BudgetSchema
209
- } from "../chunk-337E3ZOB.js";
233
+ } from "../chunk-ZPZ7XDA6.js";
210
234
  import {
211
235
  IMPORT_BATCH_SCHEMA_IRI,
212
236
  ImportBatchSchema
213
- } from "../chunk-ENTHVNOC.js";
237
+ } from "../chunk-VQ7JHB67.js";
214
238
  import {
215
239
  NODE_VISIBILITY,
216
240
  SPACE_KINDS,
@@ -228,38 +252,38 @@ import {
228
252
  spaceRoleGrantActions,
229
253
  spaceRoleToShareRole,
230
254
  wouldCreateSpaceCycle
231
- } from "../chunk-6CN53PON.js";
255
+ } from "../chunk-OPPHF3TF.js";
232
256
  import {
233
257
  ExternalReferenceSchema
234
- } from "../chunk-C5IRSEEZ.js";
258
+ } from "../chunk-SVNGSZZA.js";
235
259
  import {
236
260
  TASK_STATUS_CATEGORIES,
237
261
  TaskSchema,
238
262
  getTaskStatusCategory,
239
263
  isCompletedTaskStatus
240
- } from "../chunk-3RB2FMMO.js";
264
+ } from "../chunk-UQM3G5A2.js";
241
265
  import {
242
266
  TaskViewSchema
243
- } from "../chunk-YEQ6LLUY.js";
267
+ } from "../chunk-4EYKGTSQ.js";
244
268
  import {
245
269
  ProjectSchema
246
- } from "../chunk-WMSCEBFH.js";
270
+ } from "../chunk-XROI44ZP.js";
247
271
  import {
248
272
  MetricSchema
249
- } from "../chunk-54Y7QRZN.js";
273
+ } from "../chunk-U64CW73O.js";
250
274
  import {
251
275
  ObservationSchema
252
- } from "../chunk-JO6Y4E5V.js";
276
+ } from "../chunk-W7EBL7ZU.js";
253
277
  import {
254
278
  ExperimentSchema
255
- } from "../chunk-J4IVJA5M.js";
279
+ } from "../chunk-FVEACSKE.js";
256
280
  import {
257
281
  MILESTONE_SCHEMA_IRI,
258
282
  MilestoneSchema
259
- } from "../chunk-IP4BEVVD.js";
283
+ } from "../chunk-OGJCRNGE.js";
260
284
  import {
261
285
  PageSchema
262
- } from "../chunk-U6CBYDVZ.js";
286
+ } from "../chunk-ZLU4Y3O2.js";
263
287
  import {
264
288
  FOLDER_SCHEMA_IRI,
265
289
  FolderSchema,
@@ -268,17 +292,17 @@ import {
268
292
  folderAncestorIds,
269
293
  folderPathIds,
270
294
  wouldCreateFolderCycle
271
- } from "../chunk-DTPSTMUD.js";
295
+ } from "../chunk-YSUIXD2Y.js";
272
296
  import {
273
297
  MAX_TAG_NAME_LENGTH,
274
298
  TAG_SCHEMA_IRI,
275
299
  TagSchema,
276
300
  isValidTagName,
277
301
  normalizeTagName
278
- } from "../chunk-YWN27MLD.js";
302
+ } from "../chunk-6KLGA6IR.js";
279
303
  import {
280
304
  DatabaseSchema
281
- } from "../chunk-GR3NDMBY.js";
305
+ } from "../chunk-IJ44LR7N.js";
282
306
  import {
283
307
  EXT_PREFIX,
284
308
  extKey,
@@ -291,21 +315,21 @@ import {
291
315
  SCHEMA_EXTENSION_SCHEMA_IRI,
292
316
  SchemaExtensionSchema,
293
317
  schemaExtensionId
294
- } from "../chunk-WUR3WWQM.js";
318
+ } from "../chunk-WEPK7SZF.js";
295
319
  import "../chunk-QWFTRZQT.js";
296
320
  import {
297
321
  DatabaseRowSchema
298
- } from "../chunk-SPFKSTPT.js";
322
+ } from "../chunk-DWEXKD6E.js";
299
323
  import {
300
324
  DatabaseFieldSchema
301
- } from "../chunk-UDUPQKRB.js";
325
+ } from "../chunk-KQAT4XBL.js";
302
326
  import {
303
327
  DatabaseSelectOptionSchema
304
- } from "../chunk-37267RSF.js";
328
+ } from "../chunk-6OMG4I7M.js";
305
329
  import {
306
330
  DatabaseViewSchema
307
- } from "../chunk-XTUGZSYQ.js";
308
- import "../chunk-6OPZJ7MG.js";
331
+ } from "../chunk-H4GA4BBK.js";
332
+ import "../chunk-OCMSAKWV.js";
309
333
  import {
310
334
  PresenceSummarySchema,
311
335
  SYSTEM_NAMESPACE_KINDS,
@@ -323,13 +347,13 @@ import {
323
347
  parseSystemNamespaceResource,
324
348
  resolveSchemaAuthority,
325
349
  validateSchemaDefinitionNode
326
- } from "../chunk-V6HZ3LF3.js";
350
+ } from "../chunk-BY5O6LNC.js";
327
351
  import {
328
352
  SPACE_MEMBERSHIP_SCHEMA_IRI,
329
353
  SpaceMembershipSchema,
330
354
  isSpaceRole,
331
355
  spaceMembershipId
332
- } from "../chunk-ZICIXDEE.js";
356
+ } from "../chunk-T5AZAOG5.js";
333
357
  import {
334
358
  DEFAULT_SCHEMA_VERSION,
335
359
  DEFAULT_SCHEMA_VERSION2,
@@ -361,14 +385,16 @@ import {
361
385
  text,
362
386
  updated,
363
387
  url
364
- } from "../chunk-O64EK5FK.js";
365
- import "../chunk-JESSJ5CZ.js";
388
+ } from "../chunk-EBNMV2VO.js";
389
+ import "../chunk-RL64OJJ5.js";
366
390
  export {
391
+ ACCOUNT_RECORD_SCHEMA_IRI,
367
392
  ACCOUNT_SCHEMA_IRI,
368
393
  ACHIEVEMENT_SCHEMA_IRI,
369
394
  ACTIVITY_KINDS,
370
395
  ACTIVITY_SCHEMA_IRI,
371
396
  AbuseReportSchema,
397
+ AccountRecordSchema,
372
398
  AccountSchema,
373
399
  AchievementSchema,
374
400
  ActivitySchema,
@@ -392,6 +418,7 @@ export {
392
418
  DEAL_SOURCES,
393
419
  DEFAULT_CHANNEL_TIER,
394
420
  DEFAULT_SCHEMA_VERSION,
421
+ DEVICE_RECORD_SCHEMA_IRI,
395
422
  DashboardSchema,
396
423
  DatabaseFieldSchema,
397
424
  DatabaseRowSchema,
@@ -400,6 +427,7 @@ export {
400
427
  DatabaseViewSchema,
401
428
  DealContactRoleSchema,
402
429
  DealSchema,
430
+ DeviceRecordSchema,
403
431
  EXTENSION_FIELD_SCHEMA_IRI,
404
432
  EXTERNAL_ITEM_SCHEMA_IRI,
405
433
  EXTERNAL_ITEM_SOURCES,
@@ -475,11 +503,15 @@ export {
475
503
  ProjectSchema,
476
504
  PublicInteractionPolicySchema,
477
505
  QualitySignalSchema,
506
+ RECOVERY_RECORD_SCHEMA_IRI,
478
507
  RELATIONSHIP_KINDS,
479
508
  RELATIONSHIP_SCHEMA_IRI,
509
+ REVOCATION_RECORD_SCHEMA_IRI,
480
510
  ReactionSchema,
511
+ RecoveryRecordSchema,
481
512
  RelationshipSchema,
482
513
  ReviewTaskSchema,
514
+ RevocationRecordSchema,
483
515
  SCHEMA_EXTENSION_SCHEMA_IRI,
484
516
  DEFAULT_SCHEMA_VERSION2 as SCHEMA_VERSION,
485
517
  SIDECAR_PREFIX,
@@ -513,7 +545,10 @@ export {
513
545
  TransactionSchema,
514
546
  TranscriptionSchema,
515
547
  UserWidgetSchema,
548
+ accountRecordId,
549
+ accountState,
516
550
  addDefault,
551
+ admitDeviceRecord,
517
552
  bucketPresenceCount,
518
553
  buildEffectiveSchema,
519
554
  buildFolderTree,
@@ -531,6 +566,7 @@ export {
531
566
  computeSchemaDefinitionContentHash,
532
567
  convert,
533
568
  copy,
569
+ createAccountRecord,
534
570
  createNodeGraphSchemaResolver,
535
571
  createNodeId,
536
572
  createOperations,
@@ -542,6 +578,8 @@ export {
542
578
  dateRange,
543
579
  decodeAnchor,
544
580
  defineSchema,
581
+ deviceRecipientExpander,
582
+ deviceRecordId,
545
583
  effectiveSpaceRole,
546
584
  email,
547
585
  encodeAnchor,
@@ -568,6 +606,7 @@ export {
568
606
  isCellAnchor,
569
607
  isColumnAnchor,
570
608
  isCompletedTaskStatus,
609
+ isDeviceAuthorized,
571
610
  isExtKey,
572
611
  isMoneyValue,
573
612
  isNode,
@@ -590,6 +629,7 @@ export {
590
629
  mergeSidecarsIntoRow,
591
630
  money,
592
631
  multiSelect,
632
+ nextEpoch,
593
633
  normalizeMentions,
594
634
  normalizeSchemaIRI,
595
635
  normalizeTagName,
@@ -601,11 +641,17 @@ export {
601
641
  person,
602
642
  phone,
603
643
  promoteOverlay,
644
+ recoveryRecordId,
604
645
  relation,
605
646
  remove,
606
647
  rename,
648
+ resolveActiveDevices,
607
649
  resolveEffectiveSchema,
608
650
  resolveSchemaAuthority,
651
+ revocationRecordId,
652
+ revokeDeviceRecord,
653
+ revokeSubjectRecord,
654
+ revokedSubjects,
609
655
  schemaExtensionId,
610
656
  schemaRegistry,
611
657
  select,
@@ -4,11 +4,11 @@ import {
4
4
  SCHEMA_EXTENSION_SCHEMA_IRI,
5
5
  SchemaExtensionSchema,
6
6
  schemaExtensionId
7
- } from "./chunk-WUR3WWQM.js";
8
- import "./chunk-6OPZJ7MG.js";
9
- import "./chunk-ZICIXDEE.js";
10
- import "./chunk-O64EK5FK.js";
11
- import "./chunk-JESSJ5CZ.js";
7
+ } from "./chunk-WEPK7SZF.js";
8
+ import "./chunk-OCMSAKWV.js";
9
+ import "./chunk-T5AZAOG5.js";
10
+ import "./chunk-EBNMV2VO.js";
11
+ import "./chunk-RL64OJJ5.js";
12
12
  export {
13
13
  EXTENSION_FIELD_SCHEMA_IRI,
14
14
  ExtensionFieldSchema,
@@ -15,13 +15,13 @@ import {
15
15
  spaceRoleGrantActions,
16
16
  spaceRoleToShareRole,
17
17
  wouldCreateSpaceCycle
18
- } from "./chunk-6CN53PON.js";
19
- import "./chunk-DTPSTMUD.js";
18
+ } from "./chunk-OPPHF3TF.js";
19
+ import "./chunk-YSUIXD2Y.js";
20
20
  import "./chunk-QWFTRZQT.js";
21
- import "./chunk-6OPZJ7MG.js";
22
- import "./chunk-ZICIXDEE.js";
23
- import "./chunk-O64EK5FK.js";
24
- import "./chunk-JESSJ5CZ.js";
21
+ import "./chunk-OCMSAKWV.js";
22
+ import "./chunk-T5AZAOG5.js";
23
+ import "./chunk-EBNMV2VO.js";
24
+ import "./chunk-RL64OJJ5.js";
25
25
  export {
26
26
  NODE_VISIBILITY,
27
27
  SPACE_KINDS,
@@ -3,9 +3,9 @@ import {
3
3
  SpaceMembershipSchema,
4
4
  isSpaceRole,
5
5
  spaceMembershipId
6
- } from "./chunk-ZICIXDEE.js";
7
- import "./chunk-O64EK5FK.js";
8
- import "./chunk-JESSJ5CZ.js";
6
+ } from "./chunk-T5AZAOG5.js";
7
+ import "./chunk-EBNMV2VO.js";
8
+ import "./chunk-RL64OJJ5.js";
9
9
  export {
10
10
  SPACE_MEMBERSHIP_SCHEMA_IRI,
11
11
  SpaceMembershipSchema,
@@ -1,7 +1,7 @@
1
- import { g as NodeStorageAdapter, r as NodeChange, i as NodeId, h as NodeState, aa as NodeBatchPreflightResult, a3 as ImportNodesOptions, a5 as ApplyNodeBatchInput, a6 as ApplyNodeBatchResult, L as ListNodesOptions, ae as CountNodesOptions, a2 as SetNodeOptions, j as NodeQueryDescriptor, k as NodeQueryResult, S as SchemaIRI, a4 as RebuildNodeIndexesOptions } from '../types-Def-5Nka.js';
2
- export { av as ConflictResult, ay as ContentKeyCache, C as CreateNodeOptions, ab as DeterministicNodeBatchWriteInput, m as DeterministicNodeImportDraft, G as GetWithMigrationOptions, n as ImportDeterministicNodesOptions, o as ImportDeterministicNodesResult, s as MergeConflict, M as MigratedNodeState, az as MigrationInfo, aw as NodeBatchChangeEvent, u as NodeBatchChangeListener, a7 as NodeBatchIndexMode, a8 as NodeBatchNotificationMode, a9 as NodeBatchSyncMode, p as NodeBatchWriteInput, ac as NodeBatchWritePolicy, q as NodeBatchWriteResult, ad as NodeBatchWriteTimings, v as NodeChangeEvent, t as NodeChangeListener, ax as NodeContentCipher, a0 as NodePayload, ar as NodeQueryCursor, aq as NodeQueryCursorOrderEntry, ao as NodeQueryMaterializedViewOptions, as as NodeQueryOptions, N as NodeQueryPageCountMode, ap as NodeQueryPageOptions, au as NodeQueryParityCheckMetadata, at as NodeQueryPlanMetadata, am as NodeQuerySearchField, an as NodeQuerySearchFilter, al as NodeQuerySpatialFilter, af as NodeQuerySpatialPoint, ah as NodeQuerySpatialPointFields, ak as NodeQuerySpatialRadius, ag as NodeQuerySpatialRect, ai as NodeQuerySpatialRectFields, aj as NodeQuerySpatialWindow, f as NodeStoreOptions, bi as OperationNodeBatchWriteInput, $ as PropertyKey, bj as PropertyLookup, a1 as PropertyTimestamp, aR as SchemaLookup, c as SortDirection, d as SystemOrderField, aO as TEMP_ID_PREFIX, aS as TempIdResolution, T as TransactionOperation, l as TransactionResult, U as UpdateNodeOptions, aI as applyNodeQueryDescriptor, aA as createNodeQueryDescriptor, bk as createPropertyLookup, aQ as createSchemaLookup, aC as decodeNodeQueryCursor, aB as encodeNodeQueryCursor, aG as filterNodeQueryResults, aJ as getNodeQuerySearchTokens, aN as isTempId, aF as matchesNodeQueryDescriptor, aK as nodeQueryDescriptorNeedsBoundedReload, aD as nodeQueryDescriptorToOptions, aP as resolveTempIds, aE as serializeNodeQueryDescriptor, aH as sortNodeQueryResults, aM as withoutNodeQueryMaterializedView, aL as withoutNodeQueryPagination } from '../types-Def-5Nka.js';
3
- export { G as QUERY_AST_VERSION, r as QueryAST, n as QueryASTAggregate, A as QueryASTAggregateExecution, m as QueryASTAggregateFunction, y as QueryASTAggregateGroup, x as QueryASTAggregatePlan, z as QueryASTAggregateResult, d as QueryASTComparisonPredicate, e as QueryASTCompoundPredicate, a as QueryASTField, l as QueryASTIncludes, p as QueryASTNodeQuery, s as QueryASTNodeQueryOptions, f as QueryASTNotPredicate, c as QueryASTOperator, h as QueryASTOrderBy, i as QueryASTPage, B as QueryASTPlannerGate, g as QueryASTPredicate, q as QueryASTQuerySet, o as QueryASTQuerySetAggregate, j as QueryASTRelationDirection, k as QueryASTRelationInclude, t as QueryASTRelationIncludeOptions, w as QueryASTRelationIndexRequirement, b as QueryASTSchemaInput, u as QueryASTValidationError, v as QueryASTValidationResult, Q as QueryASTVersion, S as SavedViewDescriptor, F as SavedViewFeedDensity, E as SavedViewFeedLayout, C as SavedViewPresentationHint, D as SavedViewPresentationHintMode, V as and, a3 as avg, N as between, P as contains, a0 as count, a1 as countDistinct, a9 as dashboardQuerySet, Z as defineNodeQueryAST, a8 as defineQuerySetAST, ab as defineSavedViewDescriptor, H as eq, aj as evaluateQueryASTPlannerGate, af as executeQueryASTLoadedAggregates, ag as filterQueryASTLoadedRows, _ as follow, $ as from, ah as getQueryASTRelationIndexRequirements, a6 as groupBy, J as gt, K as gte, a7 as having, O as includesAny, U as isNotNull, T as isNull, L as lt, M as lte, ai as matchesQueryASTLoadedRow, a5 as max, a4 as min, I as neq, X as not, W as or, ae as planQueryASTAggregates, Y as queryOperators, aa as querySetCount, R as startsWith, a2 as sum, ac as validateQueryAST, ad as validateSavedViewDescriptor } from '../query-ast-CWo6_30h.js';
4
- export { N as NodeStore } from '../store-CvgiydME.js';
1
+ import { g as NodeStorageAdapter, r as NodeChange, i as NodeId, h as NodeState, aa as NodeBatchPreflightResult, a3 as ImportNodesOptions, a5 as ApplyNodeBatchInput, a6 as ApplyNodeBatchResult, L as ListNodesOptions, ae as CountNodesOptions, a2 as SetNodeOptions, j as NodeQueryDescriptor, k as NodeQueryResult, S as SchemaIRI, a4 as RebuildNodeIndexesOptions, bi as NodeReadAuthorizer, bj as AuthorizationStateVersion } from '../types-S-BJAKyK.js';
2
+ export { av as ConflictResult, ay as ContentKeyCache, C as CreateNodeOptions, ab as DeterministicNodeBatchWriteInput, m as DeterministicNodeImportDraft, G as GetWithMigrationOptions, n as ImportDeterministicNodesOptions, o as ImportDeterministicNodesResult, s as MergeConflict, M as MigratedNodeState, az as MigrationInfo, aw as NodeBatchChangeEvent, u as NodeBatchChangeListener, a7 as NodeBatchIndexMode, a8 as NodeBatchNotificationMode, a9 as NodeBatchSyncMode, p as NodeBatchWriteInput, ac as NodeBatchWritePolicy, q as NodeBatchWriteResult, ad as NodeBatchWriteTimings, v as NodeChangeEvent, t as NodeChangeListener, ax as NodeContentCipher, a0 as NodePayload, ar as NodeQueryCursor, aq as NodeQueryCursorOrderEntry, ao as NodeQueryMaterializedViewOptions, as as NodeQueryOptions, N as NodeQueryPageCountMode, ap as NodeQueryPageOptions, au as NodeQueryParityCheckMetadata, at as NodeQueryPlanMetadata, am as NodeQuerySearchField, an as NodeQuerySearchFilter, al as NodeQuerySpatialFilter, af as NodeQuerySpatialPoint, ah as NodeQuerySpatialPointFields, ak as NodeQuerySpatialRadius, ag as NodeQuerySpatialRect, ai as NodeQuerySpatialRectFields, aj as NodeQuerySpatialWindow, f as NodeStoreOptions, bk as OperationNodeBatchWriteInput, $ as PropertyKey, bl as PropertyLookup, a1 as PropertyTimestamp, aR as SchemaLookup, c as SortDirection, d as SystemOrderField, aO as TEMP_ID_PREFIX, aS as TempIdResolution, T as TransactionOperation, l as TransactionResult, U as UpdateNodeOptions, aI as applyNodeQueryDescriptor, aA as createNodeQueryDescriptor, bm as createPropertyLookup, aQ as createSchemaLookup, aC as decodeNodeQueryCursor, aB as encodeNodeQueryCursor, aG as filterNodeQueryResults, aJ as getNodeQuerySearchTokens, aN as isTempId, aF as matchesNodeQueryDescriptor, aK as nodeQueryDescriptorNeedsBoundedReload, aD as nodeQueryDescriptorToOptions, aP as resolveTempIds, aE as serializeNodeQueryDescriptor, aH as sortNodeQueryResults, aM as withoutNodeQueryMaterializedView, aL as withoutNodeQueryPagination } from '../types-S-BJAKyK.js';
3
+ export { G as QUERY_AST_VERSION, r as QueryAST, n as QueryASTAggregate, A as QueryASTAggregateExecution, m as QueryASTAggregateFunction, y as QueryASTAggregateGroup, x as QueryASTAggregatePlan, z as QueryASTAggregateResult, d as QueryASTComparisonPredicate, e as QueryASTCompoundPredicate, a as QueryASTField, l as QueryASTIncludes, p as QueryASTNodeQuery, s as QueryASTNodeQueryOptions, f as QueryASTNotPredicate, c as QueryASTOperator, h as QueryASTOrderBy, i as QueryASTPage, B as QueryASTPlannerGate, g as QueryASTPredicate, q as QueryASTQuerySet, o as QueryASTQuerySetAggregate, j as QueryASTRelationDirection, k as QueryASTRelationInclude, t as QueryASTRelationIncludeOptions, w as QueryASTRelationIndexRequirement, b as QueryASTSchemaInput, u as QueryASTValidationError, v as QueryASTValidationResult, Q as QueryASTVersion, S as SavedViewDescriptor, F as SavedViewFeedDensity, E as SavedViewFeedLayout, C as SavedViewPresentationHint, D as SavedViewPresentationHintMode, V as and, a3 as avg, N as between, P as contains, a0 as count, a1 as countDistinct, a9 as dashboardQuerySet, Z as defineNodeQueryAST, a8 as defineQuerySetAST, ab as defineSavedViewDescriptor, H as eq, aj as evaluateQueryASTPlannerGate, af as executeQueryASTLoadedAggregates, ag as filterQueryASTLoadedRows, _ as follow, $ as from, ah as getQueryASTRelationIndexRequirements, a6 as groupBy, J as gt, K as gte, a7 as having, O as includesAny, U as isNotNull, T as isNull, L as lt, M as lte, ai as matchesQueryASTLoadedRow, a5 as max, a4 as min, I as neq, X as not, W as or, ae as planQueryASTAggregates, Y as queryOperators, aa as querySetCount, R as startsWith, a2 as sum, ac as validateQueryAST, ad as validateSavedViewDescriptor } from '../query-ast-C3m6kZYv.js';
4
+ export { N as NodeStore } from '../store-DtIDjk7c.js';
5
5
  import { AuthAction, DID, AuthDenyReason, AuthDecision, ContentId } from '@xnetjs/core';
6
6
  import { SQLiteAdapter, SQLiteOperationStats } from '@xnetjs/sqlite';
7
7
  import '@xnetjs/crypto';
@@ -125,6 +125,21 @@ interface SQLiteNodeStorageAdapterOptions {
125
125
  * `xnet:query:debug` localStorage flag is set.
126
126
  */
127
127
  queryDiagnostics?: boolean;
128
+ /**
129
+ * Hydrate via SQL-side `json_group_object` aggregation — ONE row per node
130
+ * instead of one row per (node × property) — collapsing the boundary
131
+ * payload before it leaves SQLite (exploration 0264, Wave 2). Off by
132
+ * default while the mode is benchmarked; correctness is verified equal by
133
+ * the hydration test suite in both modes.
134
+ */
135
+ aggregatedHydration?: boolean;
136
+ /**
137
+ * Defer maintenance work (adaptive index creation) to an idle scheduler
138
+ * instead of running it inline on the query path. The web app passes a
139
+ * bootSettled-gated scheduler — no background work is free on the single
140
+ * serial SQLite worker (exploration 0260/0264). Default: run inline.
141
+ */
142
+ scheduleMaintenance?: (task: () => Promise<void> | void) => void;
128
143
  }
129
144
  /**
130
145
  * SQLite-backed storage adapter for NodeStore.
@@ -152,6 +167,10 @@ declare class SQLiteNodeStorageAdapter implements NodeStorageAdapter {
152
167
  private adaptiveIndexing;
153
168
  private queryVerification;
154
169
  private queryDiagnostics;
170
+ /** Hydrate one row per node via json_group_object (0264 Wave 2 flag). */
171
+ private aggregatedHydration;
172
+ /** Idle scheduler for maintenance work (adaptive index creation, 0264). */
173
+ private scheduleMaintenance?;
155
174
  private pendingQueryTelemetry;
156
175
  private pendingQueryTelemetryHits;
157
176
  private adaptiveIndexBudgetColumnsReady;
@@ -159,6 +178,15 @@ declare class SQLiteNodeStorageAdapter implements NodeStorageAdapter {
159
178
  private spatialTablesState;
160
179
  private fullTextSearchTablesState;
161
180
  private writeQueue;
181
+ /**
182
+ * Read-authorization filter applied before persisting a materialized view's
183
+ * id list (exploration 0226). Wired by `NodeStore` when an auth evaluator is
184
+ * present; `undefined` means materialized views are computed unauthorized
185
+ * (the trusted single-user case).
186
+ */
187
+ private nodeReadAuthorizer?;
188
+ /** One-time guard: ensure the `auth_fingerprint` column exists on upgraded DBs. */
189
+ private materializationColumnsReady;
162
190
  constructor(db: SQLiteAdapter, options?: SQLiteNodeStorageAdapterOptions);
163
191
  getSQLiteAdapter(): SQLiteAdapter;
164
192
  open(): Promise<void>;
@@ -178,6 +206,37 @@ declare class SQLiteNodeStorageAdapter implements NodeStorageAdapter {
178
206
  getChanges(nodeId: NodeId): Promise<NodeChange[]>;
179
207
  getAllChanges(): Promise<NodeChange[]>;
180
208
  getChangesSince(sinceLamport: number): Promise<NodeChange[]>;
209
+ /**
210
+ * Compact the local change log (exploration 0254 / F3): delete only
211
+ * *superseded* history so the OPFS file shrinks (fast cold open) and the
212
+ * outbound-resync slice shrinks (cheap first sync), without affecting reads,
213
+ * outbound sync, hash-chain chaining, or convergence with peers that never
214
+ * compacted.
215
+ *
216
+ * A row is deleted iff ALL of:
217
+ * - `lamport_time < wsafe` — below the confirmed-durable floor, so the hub
218
+ * holds it and it is not part of the unconfirmed outbound tail (K1);
219
+ * - it is NOT a node's hash-chain tip — we keep every row at a node's
220
+ * `MAX(lamport_time)` (the whole tie group), so `getLastChange()` still
221
+ * returns a real tip and the next write's `parentHash`/hash/signature are
222
+ * byte-identical to an uncompacted peer's (K2);
223
+ * - it backs NO currently-winning LWW value — its `(node_id, lamport_time,
224
+ * author)` is not the provenance of any live `node_properties` row (K3).
225
+ *
226
+ * K3 is the load-bearing safety net: because every live projection value keeps
227
+ * its backing row, the retained log still materialises to — and can re-push —
228
+ * the exact current state, so a stranded/rolled-back peer never loses live
229
+ * data. Reads are unaffected (they read the materialized `nodes`/
230
+ * `node_properties`, never the log). Only rows are deleted, never rewritten
231
+ * (the hash + signature are immutable and unforgeable). Runs chunked inside
232
+ * the write lane, yields between chunks, and never throws.
233
+ */
234
+ pruneSupersededChanges(wsafe: number, options?: {
235
+ chunk?: number;
236
+ maxRows?: number;
237
+ }): Promise<{
238
+ deleted: number;
239
+ }>;
181
240
  getChangeByHash(hash: ContentId): Promise<NodeChange | null>;
182
241
  getLastChange(nodeId: NodeId): Promise<NodeChange | null>;
183
242
  getLastChangesByNodeId(nodeIds: readonly NodeId[]): Promise<Map<NodeId, NodeChange>>;
@@ -206,7 +265,19 @@ declare class SQLiteNodeStorageAdapter implements NodeStorageAdapter {
206
265
  private setLastLamportTimeInternal;
207
266
  private syncCursorKey;
208
267
  getSyncCursor(room: string): Promise<number>;
268
+ /**
269
+ * The lowest confirmed-durable sync cursor across every node-change room
270
+ * (`MIN` over the persisted `nodeSync:hwm:*` marks), or `null` when no room has
271
+ * ever confirmed. This is the safe compaction floor (exploration 0254): the
272
+ * hub durably holds every change at or below it. Returns `null` — never 0 — so
273
+ * a workspace that has never synced is left untouched.
274
+ */
275
+ getMinConfirmedSyncCursor(): Promise<number | null>;
209
276
  setSyncCursor(room: string, lamport: number): Promise<void>;
277
+ /** Namespace app-state keys so they can't collide with sync cursors. */
278
+ private appStateKey;
279
+ getAppState(key: string): Promise<string | null>;
280
+ setAppState(key: string, value: string): Promise<void>;
210
281
  getDocumentContent(nodeId: NodeId): Promise<Uint8Array | null>;
211
282
  setDocumentContent(nodeId: NodeId, content: Uint8Array): Promise<void>;
212
283
  private setDocumentContentInternal;
@@ -296,9 +367,49 @@ declare class SQLiteNodeStorageAdapter implements NodeStorageAdapter {
296
367
  */
297
368
  clear(): Promise<void>;
298
369
  private hydrateJoinedRows;
370
+ private buildHydrateChunkQuery;
299
371
  private hydrateNodesByIds;
372
+ /**
373
+ * Aggregated hydrate (exploration 0264, Wave 2): collapse the EAV rows to
374
+ * ONE row per node inside SQL via `json_group_object`, so the boundary
375
+ * ships N rows instead of N × properties. `value` is stored as JSON text
376
+ * in a BLOB — `json(CAST(… AS TEXT))` re-emits it as real JSON inside the
377
+ * aggregate (without the cast/wrap it would double-encode as a string).
378
+ */
379
+ private buildAggregatedHydrateChunkQuery;
380
+ /** Parse one-row-per-node aggregated hydrate results into NodeStates. */
381
+ private hydrateAggregatedRows;
382
+ /**
383
+ * Read (or refresh) a materialized view.
384
+ *
385
+ * A materialized view is a purely LOCAL, DERIVED cache: an ordered list of
386
+ * node ids (membership + order) plus bookkeeping. It is NEVER part of the
387
+ * change log and is NEVER synced — peers each derive their own. It therefore
388
+ * carries no authority and can be rebuilt or dropped at any time (a wiped
389
+ * cache only costs a recompute, never data). Content is re-hydrated from the
390
+ * live `nodes`/`node_properties` tables on every read, so the cache exposes
391
+ * nothing the underlying tables don't already, and a write to the schema
392
+ * (`invalidated_at`) or a grant change (`auth_fingerprint`) forces a
393
+ * re-materialization. See exploration 0226.
394
+ */
300
395
  private queryMaterializedView;
301
396
  private getMaterializedView;
397
+ /**
398
+ * Ensure the `auth_fingerprint` column exists. Fresh databases get it from
399
+ * the DDL; databases upgraded in place (the runtime applies the full DDL with
400
+ * `CREATE TABLE IF NOT EXISTS`, which cannot add a column) need this guard.
401
+ * Idempotent and memoized (exploration 0226).
402
+ */
403
+ private ensureMaterializationColumns;
404
+ setNodeReadAuthorizer(authorizer: NodeReadAuthorizer | undefined): void;
405
+ /**
406
+ * Reload-stable version of the authorization-relevant control-plane state:
407
+ * grants (`Grant` schema) and per-subject `/sys/authz/` resources. Ordinary
408
+ * data writes do not touch these, so a database's materialized views survive
409
+ * reloads and edits, but any grant change shifts `count`/`maxUpdatedAt` and
410
+ * forces an `'authz-changed'` refresh (exploration 0226).
411
+ */
412
+ getAuthorizationStateVersion(): Promise<AuthorizationStateVersion>;
302
413
  private refreshMaterializedView;
303
414
  private readMaterializedViewPage;
304
415
  private invalidateMaterializedViewsForSchema;
@@ -362,9 +473,25 @@ declare class SQLiteNodeStorageAdapter implements NodeStorageAdapter {
362
473
  private getAdaptiveIndexColumns;
363
474
  private countCompiledNodeQuery;
364
475
  private compileNodeQuery;
476
+ /**
477
+ * A custom-property sort can push down when it is the descriptor's ONLY
478
+ * order key and no cursor/spatial/search accelerator is in play. Gated on
479
+ * the adaptive-indexing flag: the typed partial indexes on
480
+ * `node_property_scalars` make the join+order cheap, and the flag keeps
481
+ * the behavioural change opt-in while it soaks (exploration 0264).
482
+ */
483
+ private resolvePropertySortPushdown;
365
484
  private compileSqlQuery;
366
485
  private getCompiledPostFilterReason;
367
486
  private appendScalarPredicate;
487
+ /**
488
+ * ORDER BY for a pushed-down custom-property sort (0264). Mirrors the JS
489
+ * comparator in `applyNodeQueryDescriptor`: missing properties sort last
490
+ * ascending / first descending; typed value columns carry the order (for a
491
+ * homogeneous property exactly one is non-NULL). `n.id` breaks ties so the
492
+ * page boundary is a total order.
493
+ */
494
+ private buildPropertySortOrderBy;
368
495
  private buildSqlOrderBy;
369
496
  private hasOnlySystemOrdering;
370
497
  private serializePayload;