@xnetjs/data 2.2.0 → 2.4.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-ZD3HMRY6.js → account-LYZ3VDC4.js} +4 -4
  2. package/dist/{account-ledger-ZHBNVREV.js → account-ledger-7VF5SHTT.js} +2 -2
  3. package/dist/{agent-OFQJQMNB.js → agent-IJLOS2LA.js} +4 -4
  4. package/dist/auth/index.d.ts +4 -4
  5. package/dist/{budget-FTGZEXX6.js → budget-WXX7PAWQ.js} +4 -4
  6. package/dist/canvas-64KGRYXI.js +10 -0
  7. package/dist/channel-DXLP6PEJ.js +12 -0
  8. package/dist/chat-message-EZW77LY3.js +10 -0
  9. package/dist/{checkpoint-MZHJ7PCZ.js → checkpoint-SAKNGDI3.js} +4 -4
  10. package/dist/{chunk-ZKMWJNDQ.js → chunk-2DAVPHDV.js} +1 -1
  11. package/dist/{chunk-KTPSQJ5L.js → chunk-2JROE7ML.js} +2 -2
  12. package/dist/{chunk-JWGS7JMA.js → chunk-2K6BLSNC.js} +2 -2
  13. package/dist/{chunk-IKGUBSZP.js → chunk-37PXEMYQ.js} +1 -1
  14. package/dist/{chunk-M4KGY2PC.js → chunk-3FWYS6AW.js} +2 -2
  15. package/dist/chunk-3UOUVEZW.js +122 -0
  16. package/dist/{chunk-EYRZ6ZUB.js → chunk-4HJZJMPI.js} +14 -1
  17. package/dist/{chunk-T45PWXNA.js → chunk-4SIMTLCC.js} +2 -2
  18. package/dist/{chunk-II7WS264.js → chunk-56EXPOJ4.js} +47 -6
  19. package/dist/{chunk-5UJMY3AH.js → chunk-57AT2DT2.js} +2 -2
  20. package/dist/{chunk-4KJ4NAMC.js → chunk-5ECIKN6Z.js} +1 -1
  21. package/dist/{chunk-MEAIGK3W.js → chunk-6AKAZHVZ.js} +1 -1
  22. package/dist/{chunk-UUQVNDBG.js → chunk-7MSSPUMC.js} +2 -2
  23. package/dist/{chunk-OF6455OV.js → chunk-AKKBG7HW.js} +2 -2
  24. package/dist/{chunk-FWCM2TKJ.js → chunk-CM57A2GS.js} +2 -2
  25. package/dist/{chunk-OD2JYCVG.js → chunk-CNGEXCIH.js} +192 -189
  26. package/dist/{chunk-HPUXHSKR.js → chunk-CTQALHJM.js} +2 -2
  27. package/dist/{chunk-WC7EDJHC.js → chunk-CY6EJUNV.js} +1 -1
  28. package/dist/{chunk-JLUFPUIL.js → chunk-EA2PZ3EU.js} +2 -2
  29. package/dist/{chunk-4S73XDWH.js → chunk-EGGRKSRH.js} +93 -8
  30. package/dist/{chunk-NSMSOIEW.js → chunk-EUJR5QQC.js} +2 -2
  31. package/dist/{chunk-RXBLWQQI.js → chunk-EZJ3OD5A.js} +2 -2
  32. package/dist/{chunk-SOXXBQ4P.js → chunk-F6ICOU6R.js} +2 -2
  33. package/dist/{chunk-D4EVJN2P.js → chunk-FTKHARBY.js} +2 -2
  34. package/dist/{chunk-LK5ZIAIE.js → chunk-GSLOK5KV.js} +8 -1
  35. package/dist/{chunk-EZTBWWMS.js → chunk-HSCGVBQN.js} +2 -2
  36. package/dist/{chunk-Z5I2T75Z.js → chunk-HXIEK5L6.js} +6 -2
  37. package/dist/{chunk-I7JMGCV6.js → chunk-ICBC5VLZ.js} +2 -2
  38. package/dist/{chunk-C4CQH7UD.js → chunk-IJZ5YPYT.js} +1 -1
  39. package/dist/{chunk-WWQO7QKV.js → chunk-IKREWSCX.js} +2 -2
  40. package/dist/{chunk-XQDXQ7WG.js → chunk-IVCHWQY7.js} +2 -2
  41. package/dist/{chunk-ZKJXGQCR.js → chunk-JB6BPIVP.js} +2 -2
  42. package/dist/{chunk-3PV6QTKF.js → chunk-JUTPAFDP.js} +1 -1
  43. package/dist/{chunk-HTZTBXKL.js → chunk-KHLOVRMQ.js} +2 -2
  44. package/dist/{chunk-IKI5FBNO.js → chunk-L6DF76E2.js} +2 -2
  45. package/dist/{chunk-7PCMTV6J.js → chunk-LDKJDNSW.js} +1 -1
  46. package/dist/{chunk-22FKOLMX.js → chunk-M6STMJ2V.js} +2 -2
  47. package/dist/{chunk-RRXJNZX5.js → chunk-NH6OLO3X.js} +46 -0
  48. package/dist/{chunk-26HTTVJN.js → chunk-O34JPX6Q.js} +2 -2
  49. package/dist/{chunk-YD2ZPFT7.js → chunk-PKLHOQSO.js} +2 -2
  50. package/dist/{chunk-DPJ4T2LQ.js → chunk-QH7RZEHT.js} +2 -2
  51. package/dist/{chunk-S6JWYPVW.js → chunk-QOTR4SGT.js} +2 -2
  52. package/dist/{chunk-52DR23IW.js → chunk-QVGTYLL3.js} +2 -2
  53. package/dist/{chunk-IA23CLGV.js → chunk-R2AZXT3D.js} +2 -2
  54. package/dist/{chunk-YSD4NSCE.js → chunk-RAJNAD64.js} +2 -2
  55. package/dist/{chunk-JA56EQJO.js → chunk-RLRAWZJE.js} +1 -1
  56. package/dist/{chunk-ZKVRGKLM.js → chunk-RRIRY7FP.js} +3 -3
  57. package/dist/{chunk-GCTONBF6.js → chunk-TH2BJPDZ.js} +1 -1
  58. package/dist/{chunk-6ZUJID52.js → chunk-TOQ2LBAN.js} +2 -2
  59. package/dist/{chunk-SMYZILJ6.js → chunk-UFV5QWCL.js} +3 -3
  60. package/dist/{chunk-QDLWTOII.js → chunk-WOBZDEKQ.js} +2 -2
  61. package/dist/{chunk-S5RP5RKY.js → chunk-WOEFYS7Y.js} +16 -1
  62. package/dist/{chunk-W3QOEPUN.js → chunk-WQRBUG65.js} +1 -1
  63. package/dist/{chunk-57UZYV3L.js → chunk-XFOUIAJF.js} +1 -1
  64. package/dist/{chunk-OIWW5TG3.js → chunk-XP3VSSXD.js} +2 -2
  65. package/dist/{chunk-YHO7GNZK.js → chunk-Y2XWK7AA.js} +2 -2
  66. package/dist/{chunk-Q6VTTPG4.js → chunk-YFLL3CME.js} +1 -1
  67. package/dist/{chunk-EN6XTVLZ.js → chunk-YRFCXKJC.js} +2 -2
  68. package/dist/{chunk-DP4Q2HMO.js → chunk-ZEMCCIIO.js} +2 -2
  69. package/dist/{chunk-XJBDESCX.js → chunk-ZNHLH7SC.js} +1 -1
  70. package/dist/{clone-CU6rTzC0.d.ts → clone-BsoRt89i.d.ts} +4 -4
  71. package/dist/comment-2AS6EGH3.js +10 -0
  72. package/dist/{crm-AFJSSPHK.js → crm-VIJIXKFO.js} +4 -4
  73. package/dist/dashboard-BDKJKEGQ.js +10 -0
  74. package/dist/database/index.d.ts +5 -5
  75. package/dist/database/index.js +12 -10
  76. package/dist/database-VJSYCFXH.js +10 -0
  77. package/dist/database-field-JTTDAN4A.js +10 -0
  78. package/dist/database-row-NFINK37Z.js +10 -0
  79. package/dist/database-select-option-TYDAHMXK.js +10 -0
  80. package/dist/database-view-3OHCI5YK.js +10 -0
  81. package/dist/debug-report-JFSUVHHJ.js +10 -0
  82. package/dist/{draft-KGHITKX2.js → draft-T5KDLPC4.js} +2 -2
  83. package/dist/experiment-ZEUCF3B7.js +10 -0
  84. package/dist/{external-item-ZVD33IXV.js → external-item-K7MZNXKZ.js} +4 -4
  85. package/dist/{external-reference-LGFNVEKC.js → external-reference-NWFUYRF3.js} +2 -2
  86. package/dist/feed-WR4A7XUF.js +12 -0
  87. package/dist/{feed-item-QXRIE6FU.js → feed-item-S7XTCRWW.js} +4 -4
  88. package/dist/{folder-NU5TJFOT.js → folder-D4IL7UHP.js} +2 -2
  89. package/dist/{form-types-xc7NdHaW.d.ts → form-types-Dkqm9UO2.d.ts} +18 -3
  90. package/dist/{game-7WW2JX6O.js → game-NEQP7OFX.js} +4 -4
  91. package/dist/{grant-W772T6FE.js → grant-LNTRVBUG.js} +2 -2
  92. package/dist/{grant-expiration-cleaner-B_Q2pncC.d.ts → grant-expiration-cleaner-BwdmRFua.d.ts} +3 -3
  93. package/dist/{import-batch-ZRU4FY6Y.js → import-batch-4AI3Q2HT.js} +4 -4
  94. package/dist/{inbox-state-IO5C7HVE.js → inbox-state-4XQSSHUQ.js} +2 -2
  95. package/dist/index.d.ts +320 -9
  96. package/dist/index.js +1038 -371
  97. package/dist/map-TDNNBSMU.js +10 -0
  98. package/dist/{media-asset-VHFL65HI.js → media-asset-BQOGFRJZ.js} +2 -2
  99. package/dist/{meeting-PVNKBGTI.js → meeting-XQWTQK7J.js} +4 -4
  100. package/dist/{memory-5PD3XCKB.js → memory-PAPUIKWD.js} +2 -2
  101. package/dist/metric-ZZ3C6T2W.js +10 -0
  102. package/dist/{milestone-MZAZCWGR.js → milestone-HACU5NDB.js} +4 -4
  103. package/dist/{moderation-CXQB77CP.js → moderation-HRMMBFVH.js} +2 -2
  104. package/dist/observation-MVIQQNYJ.js +10 -0
  105. package/dist/page-RUS2BKMX.js +10 -0
  106. package/dist/{posting-5VZZMOKS.js → posting-ZQRTWYSE.js} +4 -4
  107. package/dist/{profile-USKJ6PN7.js → profile-5H6XWCK4.js} +2 -2
  108. package/dist/project-PBEJY4LU.js +10 -0
  109. package/dist/{query-ast-Bn3-oRUo.d.ts → query-ast-DYGcKxoa.d.ts} +1 -1
  110. package/dist/reaction-MRZHOGPW.js +10 -0
  111. package/dist/{registry-Wk8Rt0kh.d.ts → registry-D_3b1Lg6.d.ts} +1 -1
  112. package/dist/saved-view-NQ7QS2YM.js +10 -0
  113. package/dist/schema/index.d.ts +144 -13
  114. package/dist/schema/index.js +104 -90
  115. package/dist/{schema-extension-DV5D7JCQ.js → schema-extension-3AYLTMFL.js} +4 -4
  116. package/dist/{space-THD2MWHR.js → space-GBTEHZOK.js} +5 -5
  117. package/dist/{space-membership-M3QFMONE.js → space-membership-PS2O5TEQ.js} +2 -2
  118. package/dist/store/index.d.ts +4 -4
  119. package/dist/store/index.js +6 -4
  120. package/dist/{store-CyGU48TX.d.ts → store-BMnhBWzM.d.ts} +17 -1
  121. package/dist/{system-LFIMY3QQ.js → system-X2F6HN3K.js} +2 -2
  122. package/dist/{tag-W7ZYPXHK.js → tag-LHP2J53R.js} +2 -2
  123. package/dist/{task-DHTPD66H.js → task-YLRF5NBH.js} +4 -4
  124. package/dist/task-view-YUGGCX7N.js +10 -0
  125. package/dist/{transaction-ANNDXCJM.js → transaction-XVDTENOA.js} +4 -4
  126. package/dist/{transcription-DFTQ4FQ4.js → transcription-H5COCUFG.js} +4 -4
  127. package/dist/{types-BFnYlC8Z.d.ts → types-cycApzib.d.ts} +2 -2
  128. package/dist/{user-widget-5IRVORF3.js → user-widget-Q4A2BKRN.js} +2 -2
  129. package/dist/{workspace-RC4V4IF3.js → workspace-CGRCQCJN.js} +2 -2
  130. package/package.json +11 -7
  131. package/dist/canvas-NQBTRNLS.js +0 -10
  132. package/dist/channel-474QAZGP.js +0 -12
  133. package/dist/chat-message-LGLCITLE.js +0 -10
  134. package/dist/comment-IAZJHG6G.js +0 -10
  135. package/dist/dashboard-2DLFZM2J.js +0 -10
  136. package/dist/database-5M7ZA33U.js +0 -10
  137. package/dist/database-field-IFUWOK7X.js +0 -10
  138. package/dist/database-row-C52KCOPB.js +0 -10
  139. package/dist/database-select-option-AEAPKXEE.js +0 -10
  140. package/dist/database-view-NMG3AGXK.js +0 -10
  141. package/dist/debug-report-BTNZAKX3.js +0 -10
  142. package/dist/experiment-JXHENWXV.js +0 -10
  143. package/dist/feed-CLEHVA6Q.js +0 -12
  144. package/dist/map-BZAVGCR6.js +0 -10
  145. package/dist/metric-6IGGFJMB.js +0 -10
  146. package/dist/observation-O3DLKVIH.js +0 -10
  147. package/dist/page-UE5NPYEF.js +0 -10
  148. package/dist/project-UHGGEFLP.js +0 -10
  149. package/dist/reaction-KD3G75UH.js +0 -10
  150. package/dist/saved-view-AZTUINZA.js +0 -10
  151. package/dist/task-view-J2WRE62C.js +0 -10
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  ACCOUNT_SCHEMA_IRI,
3
3
  AccountSchema
4
- } from "./chunk-IKI5FBNO.js";
5
- import "./chunk-JA56EQJO.js";
6
- import "./chunk-LK5ZIAIE.js";
7
- import "./chunk-RRXJNZX5.js";
4
+ } from "./chunk-L6DF76E2.js";
5
+ import "./chunk-RLRAWZJE.js";
6
+ import "./chunk-GSLOK5KV.js";
7
+ import "./chunk-NH6OLO3X.js";
8
8
  import "./chunk-D4LUUZYD.js";
9
9
  export {
10
10
  ACCOUNT_SCHEMA_IRI,
@@ -15,8 +15,8 @@ import {
15
15
  resolveActiveDevices,
16
16
  revocationRecordId,
17
17
  revokedSubjects
18
- } from "./chunk-4KJ4NAMC.js";
19
- import "./chunk-RRXJNZX5.js";
18
+ } from "./chunk-5ECIKN6Z.js";
19
+ import "./chunk-NH6OLO3X.js";
20
20
  import "./chunk-D4LUUZYD.js";
21
21
  export {
22
22
  ACCOUNT_RECORD_SCHEMA_IRI,
@@ -24,10 +24,10 @@ import {
24
24
  agentPassportId,
25
25
  agentSessionId,
26
26
  redactInstruction
27
- } from "./chunk-JWGS7JMA.js";
28
- import "./chunk-JA56EQJO.js";
29
- import "./chunk-LK5ZIAIE.js";
30
- import "./chunk-RRXJNZX5.js";
27
+ } from "./chunk-2K6BLSNC.js";
28
+ import "./chunk-RLRAWZJE.js";
29
+ import "./chunk-GSLOK5KV.js";
30
+ import "./chunk-NH6OLO3X.js";
31
31
  import "./chunk-D4LUUZYD.js";
32
32
  export {
33
33
  AGENT_ACTION_SCHEMA_IRI,
@@ -1,12 +1,12 @@
1
1
  import { AllowExpr, DenyExpr, AuthExpression, AndExpr, OrExpr, NotExpr, PublicExpr, AuthenticatedExpr, CreatorRoleResolver, PropertyRoleResolver, RelationRoleResolver, MembershipRoleResolver, AuthorizationDefinition, SerializedAuthorization, SerializedAuthExpression, DID } from '@xnetjs/core';
2
2
  export { AUTH_ACTIONS, AllowExpr, AndExpr, AuthAction, AuthCheckInput, AuthDecision, AuthDenyReason, AuthExpression, AuthTrace, AuthTraceStep, AuthenticatedExpr, AuthorizationDefinition, CreatorRoleResolver, DenyExpr, MembershipRoleResolver, NotExpr, OrExpr, PolicyEvaluator, PropertyRoleResolver, PublicExpr, RelationRoleResolver, RoleRefExpr, RoleResolver, SerializedAuthExpression, SerializedAuthorization, SerializedRoleResolver } from '@xnetjs/core';
3
- import { F as PropertyDefinition, a as Schema, h as NodeState, S as SchemaIRI } from '../types-BFnYlC8Z.js';
4
- export { a_ as DEFAULT_OFFLINE_POLICY, aY as GRANT_SCHEMA_IRI, b4 as Grant, x as GrantIndex, b9 as GrantIndexOptions, b8 as GrantIndexStore, b3 as GrantInput, b7 as GrantNode, aX as GrantRateLimiter, bc as GrantRateLimiterOptions, O as OfflineAuthPolicy, bb as RevocationConfig, ba as RevocationConsistency, aW as StoreAuth, e as StoreAuthAPI, b5 as StoreAuthError, b6 as StoreAuthErrorCode, b2 as StoreAuthKeyManager, b0 as StoreAuthOptions, b1 as StoreAuthStore, aZ as isGrantActive, a$ as mergeOfflinePolicy } from '../types-BFnYlC8Z.js';
5
- export { A as ActionPermission, m as AuthDecisionEvent, b as DecisionCache, g as DecisionCacheOptions, D as DefaultPolicyEvaluator, j as DefaultPolicyEvaluatorOptions, a as DefaultRoleResolver, i as DefaultRoleResolverOptions, k as DefinedSchemaLike, G as GrantExpirationCleaner, o as GrantExpirationCleanerOptions, n as GrantExpirationStore, H as HubPolicy, N as NodeStoreReader, P as PermissionMatrix, l as RevalidationEvent, R as RoleSummary, S as SchemaRegistryReader, c as buildPermissionMatrix, f as createPolicyEvaluator, d as describeRoleResolver, e as evaluateExpression, h as hubActionsForSpaceRole, s as schemaToHubPolicy } from '../grant-expiration-cleaner-B_Q2pncC.js';
3
+ import { y as PropertyDefinition, a as Schema, h as NodeState, S as SchemaIRI } from '../types-cycApzib.js';
4
+ export { H as DEFAULT_OFFLINE_POLICY, z as GRANT_SCHEMA_IRI, $ as Grant, x as GrantIndex, F as GrantIndexOptions, E as GrantIndexStore, _ as GrantInput, B as GrantNode, Q as GrantRateLimiter, V as GrantRateLimiterOptions, O as OfflineAuthPolicy, K as RevocationConfig, R as RevocationConsistency, W as StoreAuth, e as StoreAuthAPI, a0 as StoreAuthError, a1 as StoreAuthErrorCode, Z as StoreAuthKeyManager, X as StoreAuthOptions, Y as StoreAuthStore, A as isGrantActive, J as mergeOfflinePolicy } from '../types-cycApzib.js';
5
+ export { A as ActionPermission, m as AuthDecisionEvent, D as DecisionCache, g as DecisionCacheOptions, c as DefaultPolicyEvaluator, j as DefaultPolicyEvaluatorOptions, a as DefaultRoleResolver, i as DefaultRoleResolverOptions, k as DefinedSchemaLike, G as GrantExpirationCleaner, o as GrantExpirationCleanerOptions, n as GrantExpirationStore, H as HubPolicy, N as NodeStoreReader, P as PermissionMatrix, l as RevalidationEvent, R as RoleSummary, S as SchemaRegistryReader, b as buildPermissionMatrix, f as createPolicyEvaluator, d as describeRoleResolver, e as evaluateExpression, h as hubActionsForSpaceRole, s as schemaToHubPolicy } from '../grant-expiration-cleaner-BwdmRFua.js';
6
6
  import { PublicKeyResolver } from '@xnetjs/crypto';
7
7
  import '@xnetjs/sqlite';
8
8
  import '@xnetjs/sync';
9
- import '../registry-Wk8Rt0kh.js';
9
+ import '../registry-D_3b1Lg6.js';
10
10
 
11
11
  /**
12
12
  * Authorization expression builders for schema definitions.
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  BUDGET_SCHEMA_IRI,
3
3
  BudgetSchema
4
- } from "./chunk-HTZTBXKL.js";
5
- import "./chunk-JA56EQJO.js";
6
- import "./chunk-LK5ZIAIE.js";
7
- import "./chunk-RRXJNZX5.js";
4
+ } from "./chunk-KHLOVRMQ.js";
5
+ import "./chunk-RLRAWZJE.js";
6
+ import "./chunk-GSLOK5KV.js";
7
+ import "./chunk-NH6OLO3X.js";
8
8
  import "./chunk-D4LUUZYD.js";
9
9
  export {
10
10
  BUDGET_SCHEMA_IRI,
@@ -0,0 +1,10 @@
1
+ import {
2
+ CanvasSchema
3
+ } from "./chunk-O34JPX6Q.js";
4
+ import "./chunk-RLRAWZJE.js";
5
+ import "./chunk-GSLOK5KV.js";
6
+ import "./chunk-NH6OLO3X.js";
7
+ import "./chunk-D4LUUZYD.js";
8
+ export {
9
+ CanvasSchema
10
+ };
@@ -0,0 +1,12 @@
1
+ import {
2
+ CHANNEL_KINDS,
3
+ ChannelSchema
4
+ } from "./chunk-7MSSPUMC.js";
5
+ import "./chunk-RLRAWZJE.js";
6
+ import "./chunk-GSLOK5KV.js";
7
+ import "./chunk-NH6OLO3X.js";
8
+ import "./chunk-D4LUUZYD.js";
9
+ export {
10
+ CHANNEL_KINDS,
11
+ ChannelSchema
12
+ };
@@ -0,0 +1,10 @@
1
+ import {
2
+ ChatMessageSchema
3
+ } from "./chunk-57AT2DT2.js";
4
+ import "./chunk-RLRAWZJE.js";
5
+ import "./chunk-GSLOK5KV.js";
6
+ import "./chunk-NH6OLO3X.js";
7
+ import "./chunk-D4LUUZYD.js";
8
+ export {
9
+ ChatMessageSchema
10
+ };
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  CHECKPOINT_SCHEMA_IRI,
3
3
  CheckpointSchema
4
- } from "./chunk-6ZUJID52.js";
5
- import "./chunk-JA56EQJO.js";
6
- import "./chunk-LK5ZIAIE.js";
7
- import "./chunk-RRXJNZX5.js";
4
+ } from "./chunk-TOQ2LBAN.js";
5
+ import "./chunk-RLRAWZJE.js";
6
+ import "./chunk-GSLOK5KV.js";
7
+ import "./chunk-NH6OLO3X.js";
8
8
  import "./chunk-D4LUUZYD.js";
9
9
  export {
10
10
  CHECKPOINT_SCHEMA_IRI,
@@ -5,7 +5,7 @@ import {
5
5
  relation,
6
6
  select,
7
7
  text
8
- } from "./chunk-RRXJNZX5.js";
8
+ } from "./chunk-NH6OLO3X.js";
9
9
  import {
10
10
  presets
11
11
  } from "./chunk-D4LUUZYD.js";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  spaceCascadeAuthorization
3
- } from "./chunk-JA56EQJO.js";
3
+ } from "./chunk-RLRAWZJE.js";
4
4
  import {
5
5
  defineSchema,
6
6
  json,
7
7
  number,
8
8
  relation,
9
9
  text
10
- } from "./chunk-RRXJNZX5.js";
10
+ } from "./chunk-NH6OLO3X.js";
11
11
 
12
12
  // src/schema/schemas/schema-extension.ts
13
13
  var SCHEMA_EXTENSION_SCHEMA_IRI = "xnet://xnet.fyi/SchemaExtension@1.0.0";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  spaceCascadeAuthorization
3
- } from "./chunk-JA56EQJO.js";
3
+ } from "./chunk-RLRAWZJE.js";
4
4
  import {
5
5
  created,
6
6
  createdBy,
@@ -11,7 +11,7 @@ import {
11
11
  relation,
12
12
  select,
13
13
  text
14
- } from "./chunk-RRXJNZX5.js";
14
+ } from "./chunk-NH6OLO3X.js";
15
15
 
16
16
  // src/schema/schemas/agent.ts
17
17
  var AGENT_PASSPORT_SCHEMA_IRI = "xnet://xnet.fyi/AgentPassport@1.0.0";
@@ -4,7 +4,7 @@ import {
4
4
  defineSchema,
5
5
  json,
6
6
  person
7
- } from "./chunk-RRXJNZX5.js";
7
+ } from "./chunk-NH6OLO3X.js";
8
8
  import {
9
9
  presets
10
10
  } from "./chunk-D4LUUZYD.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  spaceCascadeAuthorization
3
- } from "./chunk-JA56EQJO.js";
3
+ } from "./chunk-RLRAWZJE.js";
4
4
  import {
5
5
  date,
6
6
  defineSchema,
@@ -8,7 +8,7 @@ import {
8
8
  relation,
9
9
  select,
10
10
  text
11
- } from "./chunk-RRXJNZX5.js";
11
+ } from "./chunk-NH6OLO3X.js";
12
12
 
13
13
  // src/schema/schemas/project.ts
14
14
  var ProjectSchema = defineSchema({
@@ -0,0 +1,122 @@
1
+ import {
2
+ ACCOUNT_RECORD_SCHEMA_IRI,
3
+ DEVICE_RECORD_SCHEMA_IRI,
4
+ RECOVERY_RECORD_SCHEMA_IRI,
5
+ REVOCATION_RECORD_SCHEMA_IRI
6
+ } from "./chunk-5ECIKN6Z.js";
7
+
8
+ // src/schema/schemas/account-ledger-enforce.ts
9
+ function ledgerWriteKind(schemaId) {
10
+ switch (schemaId) {
11
+ case ACCOUNT_RECORD_SCHEMA_IRI:
12
+ return "account";
13
+ case DEVICE_RECORD_SCHEMA_IRI:
14
+ return "device";
15
+ case RECOVERY_RECORD_SCHEMA_IRI:
16
+ return "recovery";
17
+ case REVOCATION_RECORD_SCHEMA_IRI:
18
+ return "revocation";
19
+ default:
20
+ return null;
21
+ }
22
+ }
23
+ function ledgerAccountId(kind, properties) {
24
+ const value = kind === "account" ? properties.accountId : properties.account;
25
+ return typeof value === "string" && value.length > 0 ? value : null;
26
+ }
27
+ var deny = (reason) => ({ allowed: false, reason });
28
+ var controllersOf = (properties) => {
29
+ const raw = properties.controllers;
30
+ if (!Array.isArray(raw)) return null;
31
+ const dids = raw.filter((entry) => typeof entry === "string");
32
+ return dids.length === raw.length ? dids : null;
33
+ };
34
+ var epochOf = (properties) => {
35
+ const raw = properties.epoch;
36
+ if (raw === void 0 || raw === null) return null;
37
+ return typeof raw === "number" && Number.isFinite(raw) ? raw : Number.NaN;
38
+ };
39
+ var isActiveController = (authorDid, state) => !state.authorRevoked && (state.account?.controllers.includes(authorDid) ?? false);
40
+ function evaluateLedgerWrite(input) {
41
+ const kind = ledgerWriteKind(input.schemaId);
42
+ if (!kind) return { allowed: true };
43
+ const accountId = ledgerAccountId(kind, input.properties);
44
+ if (!accountId) return deny(`Ledger ${kind} record is missing its account reference`);
45
+ const { state } = input;
46
+ if (kind === "account") {
47
+ const controllers = controllersOf(input.properties);
48
+ if (!controllers || controllers.length === 0) {
49
+ return deny("Account record must list at least one controller DID");
50
+ }
51
+ const epoch = epochOf(input.properties) ?? 0;
52
+ if (Number.isNaN(epoch)) return deny("Account record epoch must be a number");
53
+ if (!state.account) {
54
+ if (!controllers.includes(input.authorDid)) {
55
+ return deny("Account genesis must include its author among the controllers");
56
+ }
57
+ return { allowed: true, genesis: true };
58
+ }
59
+ if (state.account.accountId !== accountId) {
60
+ return deny("Account record accountId cannot change");
61
+ }
62
+ if (!isActiveController(input.authorDid, state)) {
63
+ return deny("Only an active controller may update the account record");
64
+ }
65
+ if (epoch < state.account.epoch) {
66
+ return deny(`Account epoch may not move backwards (${epoch} < ${state.account.epoch})`);
67
+ }
68
+ return { allowed: true };
69
+ }
70
+ if (!state.account) {
71
+ return deny(`Ledger ${kind} record references unknown account ${accountId}`);
72
+ }
73
+ if (state.account.accountId !== accountId) {
74
+ return deny("Ledger record account does not match the verifier state");
75
+ }
76
+ if (!isActiveController(input.authorDid, state)) {
77
+ return deny(`Only an active controller may write ${kind} records for this account`);
78
+ }
79
+ if (kind === "device") {
80
+ const epoch = epochOf(input.properties);
81
+ if (epoch === null || Number.isNaN(epoch) || epoch !== state.account.epoch) {
82
+ return deny(`Device admission must carry the current account epoch ${state.account.epoch}`);
83
+ }
84
+ const deviceDid = input.properties.deviceDid;
85
+ if (typeof deviceDid !== "string" || deviceDid.length === 0) {
86
+ return deny("Device record must name the admitted device DID");
87
+ }
88
+ return { allowed: true };
89
+ }
90
+ if (kind === "revocation") {
91
+ const epoch = epochOf(input.properties);
92
+ const validEpoch = epoch !== null && !Number.isNaN(epoch) && (epoch === state.account.epoch + 1 || epoch === state.account.epoch);
93
+ if (!validEpoch) {
94
+ return deny(
95
+ `Revocation must carry epoch ${state.account.epoch} or ${state.account.epoch + 1}`
96
+ );
97
+ }
98
+ const subject = input.properties.subject;
99
+ if (typeof subject !== "string" || subject.length === 0) {
100
+ return deny("Revocation must name its subject");
101
+ }
102
+ return { allowed: true };
103
+ }
104
+ return { allowed: true };
105
+ }
106
+ function foldAccountRecord(properties) {
107
+ const accountId = ledgerAccountId("account", properties);
108
+ const controllers = controllersOf(properties) ?? [];
109
+ const epoch = epochOf(properties);
110
+ return {
111
+ accountId: accountId ?? "",
112
+ controllers,
113
+ epoch: typeof epoch === "number" && !Number.isNaN(epoch) ? epoch : 0
114
+ };
115
+ }
116
+
117
+ export {
118
+ ledgerWriteKind,
119
+ ledgerAccountId,
120
+ evaluateLedgerWrite,
121
+ foldAccountRecord
122
+ };
@@ -4,7 +4,7 @@ import {
4
4
  defineSchema,
5
5
  person,
6
6
  text
7
- } from "./chunk-RRXJNZX5.js";
7
+ } from "./chunk-NH6OLO3X.js";
8
8
 
9
9
  // src/schema/schemas/profile.ts
10
10
  var ProfileSchema = defineSchema({
@@ -35,6 +35,19 @@ var ProfileSchema = defineSchema({
35
35
  statusEmoji: text({ maxLength: 32 }),
36
36
  /** Free-form status message */
37
37
  statusMessage: text({ maxLength: 200 }),
38
+ /**
39
+ * Linked ATProto identity (explorations 0301/0322/0337). These fields are
40
+ * the xNet half of the bidirectional binding: the PDS half is the signed
41
+ * `net.x.identity.binding` record at `atprotoBindingUri`. Foreign DIDs are
42
+ * represent-only — they never sign xNet data — and a handle renders as
43
+ * "verified" only after the hub has resolved the DID document, fetched the
44
+ * binding record from the canonical PDS, and checked the xNet signature.
45
+ */
46
+ atprotoDid: text({ maxLength: 261 }),
47
+ /** The ATProto handle at link time (e.g. `alice.bsky.social`). */
48
+ atprotoHandle: text({ maxLength: 253 }),
49
+ /** `at://` URI of the binding record in the subject's ATProto repo. */
50
+ atprotoBindingUri: text({ maxLength: 512 }),
38
51
  createdAt: created(),
39
52
  createdBy: createdBy()
40
53
  },
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  spaceCascadeAuthorization
3
- } from "./chunk-JA56EQJO.js";
3
+ } from "./chunk-RLRAWZJE.js";
4
4
  import {
5
5
  defineSchema,
6
6
  json,
7
7
  relation,
8
8
  select,
9
9
  text
10
- } from "./chunk-RRXJNZX5.js";
10
+ } from "./chunk-NH6OLO3X.js";
11
11
 
12
12
  // src/schema/schemas/task-view.ts
13
13
  var TaskViewSchema = defineSchema({
@@ -5,7 +5,7 @@ import {
5
5
  ExtensionFieldSchema,
6
6
  SchemaExtensionSchema,
7
7
  schemaExtensionId
8
- } from "./chunk-KTPSQJ5L.js";
8
+ } from "./chunk-2JROE7ML.js";
9
9
  import {
10
10
  MAX_KEY_LENGTH,
11
11
  compareSortKeys,
@@ -16,19 +16,19 @@ import {
16
16
  } from "./chunk-QWFTRZQT.js";
17
17
  import {
18
18
  DatabaseRowSchema
19
- } from "./chunk-OF6455OV.js";
19
+ } from "./chunk-AKKBG7HW.js";
20
20
  import {
21
21
  DatabaseFieldSchema
22
- } from "./chunk-WWQO7QKV.js";
22
+ } from "./chunk-IKREWSCX.js";
23
23
  import {
24
24
  DatabaseSelectOptionSchema
25
- } from "./chunk-OIWW5TG3.js";
25
+ } from "./chunk-XP3VSSXD.js";
26
26
  import {
27
27
  DatabaseViewSchema
28
- } from "./chunk-SMYZILJ6.js";
28
+ } from "./chunk-UFV5QWCL.js";
29
29
  import {
30
30
  createNodeQueryDescriptor
31
- } from "./chunk-S5RP5RKY.js";
31
+ } from "./chunk-WOEFYS7Y.js";
32
32
 
33
33
  // src/database/cell-types.ts
34
34
  var CELL_PREFIX = "cell_";
@@ -65,6 +65,11 @@ function isDateRange(value) {
65
65
  const obj = value;
66
66
  return typeof obj.start === "string" && typeof obj.end === "string";
67
67
  }
68
+ function isGeoPoint(value) {
69
+ if (typeof value !== "object" || value === null) return false;
70
+ const obj = value;
71
+ return typeof obj.lat === "number" && Number.isFinite(obj.lat) && Math.abs(obj.lat) <= 90 && typeof obj.lng === "number" && Number.isFinite(obj.lng) && Math.abs(obj.lng) <= 180;
72
+ }
68
73
  function isFileRef(value) {
69
74
  if (typeof value !== "object" || value === null) return false;
70
75
  const obj = value;
@@ -79,6 +84,7 @@ function isCellValue(value) {
79
84
  return value.every((v) => typeof v === "string");
80
85
  }
81
86
  if (isDateRange(value)) return true;
87
+ if (isGeoPoint(value)) return true;
82
88
  if (isFileRef(value)) return true;
83
89
  return false;
84
90
  }
@@ -350,6 +356,7 @@ function isNodeStoreColumnType(type) {
350
356
  "checkbox",
351
357
  "date",
352
358
  "dateRange",
359
+ "geo",
353
360
  "select",
354
361
  "multiSelect",
355
362
  "person",
@@ -379,6 +386,7 @@ var FIELD_TYPES = [
379
386
  "checkbox",
380
387
  "date",
381
388
  "dateRange",
389
+ "geo",
382
390
  "select",
383
391
  "multiSelect",
384
392
  "person",
@@ -845,6 +853,8 @@ function cellValueToText(value, sourceType, ctx = {}) {
845
853
  }
846
854
  case "dateRange":
847
855
  return isDateRange(value) ? `${value.start} \u2192 ${value.end}` : String(value);
856
+ case "geo":
857
+ return isGeoPoint(value) ? `${value.lat}, ${value.lng}` : "";
848
858
  case "file":
849
859
  return isFileRef(value) ? value.name : "";
850
860
  default:
@@ -911,6 +921,14 @@ function convertCellValue(value, sourceType, targetType, ctx = {}) {
911
921
  }
912
922
  return { value: null };
913
923
  }
924
+ case "geo": {
925
+ const parts = text.split(",").map((s) => Number(s.trim()));
926
+ if (parts.length === 2) {
927
+ const point = { lat: parts[0], lng: parts[1] };
928
+ if (isGeoPoint(point)) return { value: point };
929
+ }
930
+ return { value: null };
931
+ }
914
932
  // Identity-style targets where text can't be trusted
915
933
  case "person":
916
934
  return /^did:[a-z]+:/.test(text) ? { value: text } : { value: null };
@@ -1824,6 +1842,7 @@ var OPERATORS_BY_TYPE = {
1824
1842
  checkbox: ["equals"],
1825
1843
  date: ["equals", "before", "after", "between", "isEmpty", "isNotEmpty"],
1826
1844
  dateRange: ["before", "after", "between", "isEmpty", "isNotEmpty"],
1845
+ geo: ["isEmpty", "isNotEmpty"],
1827
1846
  select: ["equals", "notEquals", "isEmpty", "isNotEmpty"],
1828
1847
  multiSelect: ["hasAny", "hasAll", "hasNone", "isEmpty", "isNotEmpty"],
1829
1848
  person: ["equals", "notEquals", "isEmpty", "isNotEmpty"],
@@ -1919,6 +1938,12 @@ function compareValues(a, b, type) {
1919
1938
  case "created":
1920
1939
  case "updated":
1921
1940
  return new Date(a).getTime() - new Date(b).getTime();
1941
+ // ─── Geo Type ─────────────────────────────────────────────────────────────
1942
+ case "geo": {
1943
+ const aGeo = a;
1944
+ const bGeo = b;
1945
+ return (bGeo?.lat ?? -Infinity) - (aGeo?.lat ?? -Infinity) || (aGeo?.lng ?? Infinity) - (bGeo?.lng ?? Infinity);
1946
+ }
1922
1947
  // ─── Array Types ──────────────────────────────────────────────────────────
1923
1948
  case "multiSelect":
1924
1949
  case "relation":
@@ -2158,6 +2183,7 @@ var ALL_COLUMN_TYPES = [
2158
2183
  "checkbox",
2159
2184
  "date",
2160
2185
  "dateRange",
2186
+ "geo",
2161
2187
  "select",
2162
2188
  "multiSelect",
2163
2189
  "person",
@@ -3980,6 +4006,16 @@ function parseValue(value, type) {
3980
4006
  const date = new Date(trimmed);
3981
4007
  return isNaN(date.getTime()) ? null : date.toISOString();
3982
4008
  }
4009
+ case "geo": {
4010
+ const parts = trimmed.split(",").map((v) => parseFloat(v.trim()));
4011
+ if (parts.length === 2) {
4012
+ const [lat, lng] = parts;
4013
+ if (!isNaN(lat) && Math.abs(lat) <= 90 && !isNaN(lng) && Math.abs(lng) <= 180) {
4014
+ return { lat, lng };
4015
+ }
4016
+ }
4017
+ return null;
4018
+ }
3983
4019
  case "multiSelect":
3984
4020
  return trimmed.split(",").map((v) => v.trim()).filter(Boolean);
3985
4021
  case "text":
@@ -4176,6 +4212,10 @@ function formatValue2(value, column, dateFormat = "iso") {
4176
4212
  const end = range.end ? formatDate(range.end, dateFormat) : "";
4177
4213
  return start && end ? `${start} - ${end}` : start || end;
4178
4214
  }
4215
+ case "geo": {
4216
+ const point = value;
4217
+ return typeof point.lat === "number" && typeof point.lng === "number" ? `${point.lat}, ${point.lng}` : "";
4218
+ }
4179
4219
  case "checkbox":
4180
4220
  return value ? "true" : "false";
4181
4221
  case "number":
@@ -5512,6 +5552,7 @@ export {
5512
5552
  toCellProperties,
5513
5553
  fromCellProperties,
5514
5554
  isDateRange,
5555
+ isGeoPoint,
5515
5556
  isFileRef,
5516
5557
  isCellValue,
5517
5558
  createRow,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  spaceContributorAuthorization
3
- } from "./chunk-JA56EQJO.js";
3
+ } from "./chunk-RLRAWZJE.js";
4
4
  import {
5
5
  checkbox,
6
6
  created,
@@ -11,7 +11,7 @@ import {
11
11
  json,
12
12
  relation,
13
13
  text
14
- } from "./chunk-RRXJNZX5.js";
14
+ } from "./chunk-NH6OLO3X.js";
15
15
 
16
16
  // src/schema/schemas/chat-message.ts
17
17
  var ChatMessageSchema = defineSchema({
@@ -7,7 +7,7 @@ import {
7
7
  person,
8
8
  select,
9
9
  text
10
- } from "./chunk-RRXJNZX5.js";
10
+ } from "./chunk-NH6OLO3X.js";
11
11
 
12
12
  // src/schema/schemas/account-ledger.ts
13
13
  var NS = "xnet://xnet.fyi/";
@@ -7,7 +7,7 @@ import {
7
7
  relation,
8
8
  select,
9
9
  text
10
- } from "./chunk-RRXJNZX5.js";
10
+ } from "./chunk-NH6OLO3X.js";
11
11
  import {
12
12
  presets
13
13
  } from "./chunk-D4LUUZYD.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  spaceCascadeAuthorization
3
- } from "./chunk-JA56EQJO.js";
3
+ } from "./chunk-RLRAWZJE.js";
4
4
  import {
5
5
  checkbox,
6
6
  created,
@@ -10,7 +10,7 @@ import {
10
10
  relation,
11
11
  select,
12
12
  text
13
- } from "./chunk-RRXJNZX5.js";
13
+ } from "./chunk-NH6OLO3X.js";
14
14
 
15
15
  // src/schema/schemas/channel.ts
16
16
  var CHANNEL_KINDS = ["channel", "dm", "voice"];
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  spaceCascadeAuthorization
3
- } from "./chunk-JA56EQJO.js";
3
+ } from "./chunk-RLRAWZJE.js";
4
4
  import {
5
5
  defineSchema,
6
6
  json,
7
7
  relation,
8
8
  text
9
- } from "./chunk-RRXJNZX5.js";
9
+ } from "./chunk-NH6OLO3X.js";
10
10
 
11
11
  // src/schema/schemas/database-row.ts
12
12
  var DatabaseRowSchema = defineSchema({
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  spaceCascadeAuthorization
3
- } from "./chunk-JA56EQJO.js";
3
+ } from "./chunk-RLRAWZJE.js";
4
4
  import {
5
5
  checkbox,
6
6
  date,
@@ -9,7 +9,7 @@ import {
9
9
  relation,
10
10
  select,
11
11
  text
12
- } from "./chunk-RRXJNZX5.js";
12
+ } from "./chunk-NH6OLO3X.js";
13
13
 
14
14
  // src/schema/schemas/task.ts
15
15
  var TaskSchema = defineSchema({