@xnetjs/data 2.1.0 → 2.3.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.
- package/dist/{account-ZD3HMRY6.js → account-LYZ3VDC4.js} +4 -4
- package/dist/{account-ledger-ZHBNVREV.js → account-ledger-7VF5SHTT.js} +2 -2
- package/dist/{agent-OFQJQMNB.js → agent-IJLOS2LA.js} +4 -4
- package/dist/auth/index.d.ts +4 -4
- package/dist/{budget-FTGZEXX6.js → budget-WXX7PAWQ.js} +4 -4
- package/dist/canvas-64KGRYXI.js +10 -0
- package/dist/channel-DXLP6PEJ.js +12 -0
- package/dist/chat-message-EZW77LY3.js +10 -0
- package/dist/{checkpoint-MZHJ7PCZ.js → checkpoint-SAKNGDI3.js} +4 -4
- package/dist/{chunk-4S73XDWH.js → chunk-27AF2RSY.js} +77 -4
- package/dist/{chunk-ZKMWJNDQ.js → chunk-2DAVPHDV.js} +1 -1
- package/dist/{chunk-KTPSQJ5L.js → chunk-2JROE7ML.js} +2 -2
- package/dist/{chunk-JWGS7JMA.js → chunk-2K6BLSNC.js} +2 -2
- package/dist/{chunk-LZX7O72B.js → chunk-32IVMT6Z.js} +193 -190
- package/dist/{chunk-IKGUBSZP.js → chunk-37PXEMYQ.js} +1 -1
- package/dist/{chunk-M4KGY2PC.js → chunk-3FWYS6AW.js} +2 -2
- package/dist/chunk-3UOUVEZW.js +122 -0
- package/dist/{chunk-EYRZ6ZUB.js → chunk-4HJZJMPI.js} +14 -1
- package/dist/{chunk-T45PWXNA.js → chunk-4SIMTLCC.js} +2 -2
- package/dist/{chunk-DESSPQBS.js → chunk-56EXPOJ4.js} +50 -9
- package/dist/{chunk-5UJMY3AH.js → chunk-57AT2DT2.js} +2 -2
- package/dist/{chunk-4KJ4NAMC.js → chunk-5ECIKN6Z.js} +1 -1
- package/dist/{chunk-MEAIGK3W.js → chunk-6AKAZHVZ.js} +1 -1
- package/dist/{chunk-UUQVNDBG.js → chunk-7MSSPUMC.js} +2 -2
- package/dist/{chunk-OF6455OV.js → chunk-AKKBG7HW.js} +2 -2
- package/dist/{chunk-FWCM2TKJ.js → chunk-CM57A2GS.js} +2 -2
- package/dist/{chunk-HPUXHSKR.js → chunk-CTQALHJM.js} +2 -2
- package/dist/{chunk-WC7EDJHC.js → chunk-CY6EJUNV.js} +1 -1
- package/dist/{chunk-JLUFPUIL.js → chunk-EA2PZ3EU.js} +2 -2
- package/dist/{chunk-NSMSOIEW.js → chunk-EUJR5QQC.js} +2 -2
- package/dist/{chunk-RXBLWQQI.js → chunk-EZJ3OD5A.js} +2 -2
- package/dist/{chunk-SOXXBQ4P.js → chunk-F6ICOU6R.js} +2 -2
- package/dist/{chunk-D4EVJN2P.js → chunk-FTKHARBY.js} +2 -2
- package/dist/{chunk-LK5ZIAIE.js → chunk-GSLOK5KV.js} +8 -1
- package/dist/{chunk-EZTBWWMS.js → chunk-HSCGVBQN.js} +2 -2
- package/dist/{chunk-Z5I2T75Z.js → chunk-HXIEK5L6.js} +6 -2
- package/dist/{chunk-I7JMGCV6.js → chunk-ICBC5VLZ.js} +2 -2
- package/dist/{chunk-C4CQH7UD.js → chunk-IJZ5YPYT.js} +1 -1
- package/dist/{chunk-WWQO7QKV.js → chunk-IKREWSCX.js} +2 -2
- package/dist/{chunk-XQDXQ7WG.js → chunk-IVCHWQY7.js} +2 -2
- package/dist/{chunk-ZKJXGQCR.js → chunk-JB6BPIVP.js} +2 -2
- package/dist/{chunk-3PV6QTKF.js → chunk-JUTPAFDP.js} +1 -1
- package/dist/{chunk-HTZTBXKL.js → chunk-KHLOVRMQ.js} +2 -2
- package/dist/{chunk-IKI5FBNO.js → chunk-L6DF76E2.js} +2 -2
- package/dist/{chunk-7PCMTV6J.js → chunk-LDKJDNSW.js} +1 -1
- package/dist/{chunk-22FKOLMX.js → chunk-M6STMJ2V.js} +2 -2
- package/dist/{chunk-RRXJNZX5.js → chunk-NH6OLO3X.js} +46 -0
- package/dist/{chunk-26HTTVJN.js → chunk-O34JPX6Q.js} +2 -2
- package/dist/{chunk-YD2ZPFT7.js → chunk-PKLHOQSO.js} +2 -2
- package/dist/{chunk-DPJ4T2LQ.js → chunk-QH7RZEHT.js} +2 -2
- package/dist/{chunk-S6JWYPVW.js → chunk-QOTR4SGT.js} +2 -2
- package/dist/{chunk-52DR23IW.js → chunk-QVGTYLL3.js} +2 -2
- package/dist/{chunk-IA23CLGV.js → chunk-R2AZXT3D.js} +2 -2
- package/dist/{chunk-YSD4NSCE.js → chunk-RAJNAD64.js} +2 -2
- package/dist/{chunk-JA56EQJO.js → chunk-RLRAWZJE.js} +1 -1
- package/dist/{chunk-ZKVRGKLM.js → chunk-RRIRY7FP.js} +3 -3
- package/dist/{chunk-GCTONBF6.js → chunk-TH2BJPDZ.js} +1 -1
- package/dist/{chunk-6ZUJID52.js → chunk-TOQ2LBAN.js} +2 -2
- package/dist/{chunk-TRPXLCND.js → chunk-UFV5QWCL.js} +21 -3
- package/dist/{chunk-QDLWTOII.js → chunk-WOBZDEKQ.js} +2 -2
- package/dist/{chunk-S5RP5RKY.js → chunk-WOEFYS7Y.js} +16 -1
- package/dist/{chunk-W3QOEPUN.js → chunk-WQRBUG65.js} +1 -1
- package/dist/{chunk-57UZYV3L.js → chunk-XFOUIAJF.js} +1 -1
- package/dist/{chunk-OIWW5TG3.js → chunk-XP3VSSXD.js} +2 -2
- package/dist/{chunk-YHO7GNZK.js → chunk-Y2XWK7AA.js} +2 -2
- package/dist/{chunk-Q6VTTPG4.js → chunk-YFLL3CME.js} +1 -1
- package/dist/{chunk-EN6XTVLZ.js → chunk-YRFCXKJC.js} +2 -2
- package/dist/{chunk-DP4Q2HMO.js → chunk-ZEMCCIIO.js} +2 -2
- package/dist/{chunk-XJBDESCX.js → chunk-ZNHLH7SC.js} +1 -1
- package/dist/{clone-DNcpkYAA.d.ts → clone-rOJgldM-.d.ts} +3 -3
- package/dist/comment-2AS6EGH3.js +10 -0
- package/dist/{crm-AFJSSPHK.js → crm-VIJIXKFO.js} +4 -4
- package/dist/dashboard-BDKJKEGQ.js +10 -0
- package/dist/database/index.d.ts +5 -5
- package/dist/database/index.js +12 -10
- package/dist/database-VJSYCFXH.js +10 -0
- package/dist/database-field-JTTDAN4A.js +10 -0
- package/dist/database-row-NFINK37Z.js +10 -0
- package/dist/database-select-option-TYDAHMXK.js +10 -0
- package/dist/database-view-3OHCI5YK.js +10 -0
- package/dist/debug-report-JFSUVHHJ.js +10 -0
- package/dist/{draft-KGHITKX2.js → draft-T5KDLPC4.js} +2 -2
- package/dist/experiment-ZEUCF3B7.js +10 -0
- package/dist/{external-item-ZVD33IXV.js → external-item-K7MZNXKZ.js} +4 -4
- package/dist/{external-reference-LGFNVEKC.js → external-reference-NWFUYRF3.js} +2 -2
- package/dist/feed-WR4A7XUF.js +12 -0
- package/dist/{feed-item-QXRIE6FU.js → feed-item-S7XTCRWW.js} +4 -4
- package/dist/{folder-NU5TJFOT.js → folder-D4IL7UHP.js} +2 -2
- package/dist/{form-types-BlZvpDEE.d.ts → form-types-BrHYdpi0.d.ts} +19 -4
- package/dist/{game-7WW2JX6O.js → game-NEQP7OFX.js} +4 -4
- package/dist/{grant-W772T6FE.js → grant-LNTRVBUG.js} +2 -2
- package/dist/{grant-expiration-cleaner-1by9wRlb.d.ts → grant-expiration-cleaner-CRS9OyhV.d.ts} +2 -2
- package/dist/{import-batch-ZRU4FY6Y.js → import-batch-4AI3Q2HT.js} +4 -4
- package/dist/{inbox-state-IO5C7HVE.js → inbox-state-4XQSSHUQ.js} +2 -2
- package/dist/index.d.ts +8 -8
- package/dist/index.js +166 -150
- package/dist/map-TDNNBSMU.js +10 -0
- package/dist/{media-asset-VHFL65HI.js → media-asset-BQOGFRJZ.js} +2 -2
- package/dist/{meeting-PVNKBGTI.js → meeting-XQWTQK7J.js} +4 -4
- package/dist/{memory-5PD3XCKB.js → memory-PAPUIKWD.js} +2 -2
- package/dist/metric-ZZ3C6T2W.js +10 -0
- package/dist/{milestone-MZAZCWGR.js → milestone-HACU5NDB.js} +4 -4
- package/dist/{moderation-CXQB77CP.js → moderation-HRMMBFVH.js} +2 -2
- package/dist/observation-MVIQQNYJ.js +10 -0
- package/dist/page-RUS2BKMX.js +10 -0
- package/dist/{posting-5VZZMOKS.js → posting-ZQRTWYSE.js} +4 -4
- package/dist/{profile-USKJ6PN7.js → profile-5H6XWCK4.js} +2 -2
- package/dist/project-PBEJY4LU.js +10 -0
- package/dist/{query-ast-NV5StnHo.d.ts → query-ast-DQJO7yRV.d.ts} +1 -1
- package/dist/reaction-MRZHOGPW.js +10 -0
- package/dist/{registry-s1fYgCSj.d.ts → registry-C9IRLLeR.d.ts} +1 -1
- package/dist/saved-view-NQ7QS2YM.js +10 -0
- package/dist/schema/index.d.ts +362 -193
- package/dist/schema/index.js +87 -73
- package/dist/{schema-extension-DV5D7JCQ.js → schema-extension-3AYLTMFL.js} +4 -4
- package/dist/{space-THD2MWHR.js → space-GBTEHZOK.js} +5 -5
- package/dist/{space-membership-M3QFMONE.js → space-membership-PS2O5TEQ.js} +2 -2
- package/dist/store/index.d.ts +4 -4
- package/dist/store/index.js +6 -4
- package/dist/{store-BIDKtpjW.d.ts → store-BYkdPZRJ.d.ts} +9 -1
- package/dist/{system-LFIMY3QQ.js → system-X2F6HN3K.js} +2 -2
- package/dist/{tag-W7ZYPXHK.js → tag-LHP2J53R.js} +2 -2
- package/dist/{task-DHTPD66H.js → task-YLRF5NBH.js} +4 -4
- package/dist/task-view-YUGGCX7N.js +10 -0
- package/dist/{transaction-ANNDXCJM.js → transaction-XVDTENOA.js} +4 -4
- package/dist/{transcription-DFTQ4FQ4.js → transcription-H5COCUFG.js} +4 -4
- package/dist/{types-C64g-IXg.d.ts → types-gws1tSf-.d.ts} +2 -2
- package/dist/{user-widget-5IRVORF3.js → user-widget-Q4A2BKRN.js} +2 -2
- package/dist/{workspace-RC4V4IF3.js → workspace-CGRCQCJN.js} +2 -2
- package/package.json +7 -7
- package/dist/canvas-NQBTRNLS.js +0 -10
- package/dist/channel-474QAZGP.js +0 -12
- package/dist/chat-message-LGLCITLE.js +0 -10
- package/dist/comment-IAZJHG6G.js +0 -10
- package/dist/dashboard-2DLFZM2J.js +0 -10
- package/dist/database-5M7ZA33U.js +0 -10
- package/dist/database-field-IFUWOK7X.js +0 -10
- package/dist/database-row-C52KCOPB.js +0 -10
- package/dist/database-select-option-AEAPKXEE.js +0 -10
- package/dist/database-view-GUGJHS7J.js +0 -10
- package/dist/debug-report-BTNZAKX3.js +0 -10
- package/dist/experiment-JXHENWXV.js +0 -10
- package/dist/feed-CLEHVA6Q.js +0 -12
- package/dist/map-BZAVGCR6.js +0 -10
- package/dist/metric-6IGGFJMB.js +0 -10
- package/dist/observation-O3DLKVIH.js +0 -10
- package/dist/page-UE5NPYEF.js +0 -10
- package/dist/project-UHGGEFLP.js +0 -10
- package/dist/reaction-KD3G75UH.js +0 -10
- package/dist/saved-view-AZTUINZA.js +0 -10
- 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-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
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-
|
|
19
|
-
import "./chunk-
|
|
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-
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
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,
|
package/dist/auth/index.d.ts
CHANGED
|
@@ -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-
|
|
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-
|
|
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-
|
|
3
|
+
import { F as PropertyDefinition, a as Schema, h as NodeState, S as SchemaIRI } from '../types-gws1tSf-.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-gws1tSf-.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-CRS9OyhV.js';
|
|
6
6
|
import { PublicKeyResolver } from '@xnetjs/crypto';
|
|
7
7
|
import '@xnetjs/sqlite';
|
|
8
8
|
import '@xnetjs/sync';
|
|
9
|
-
import '../registry-
|
|
9
|
+
import '../registry-C9IRLLeR.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-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
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,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CHECKPOINT_SCHEMA_IRI,
|
|
3
3
|
CheckpointSchema
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
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,
|
|
@@ -3,16 +3,26 @@ import {
|
|
|
3
3
|
getNodeQuerySearchTokens,
|
|
4
4
|
withoutNodeQueryMaterializedView,
|
|
5
5
|
withoutNodeQueryPagination
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-WOEFYS7Y.js";
|
|
7
|
+
import {
|
|
8
|
+
evaluateLedgerWrite,
|
|
9
|
+
foldAccountRecord,
|
|
10
|
+
ledgerAccountId,
|
|
11
|
+
ledgerWriteKind
|
|
12
|
+
} from "./chunk-3UOUVEZW.js";
|
|
13
|
+
import {
|
|
14
|
+
accountRecordId,
|
|
15
|
+
revocationRecordId
|
|
16
|
+
} from "./chunk-5ECIKN6Z.js";
|
|
7
17
|
import {
|
|
8
18
|
SYSTEM_SCHEMA_BASE_IRIS,
|
|
9
19
|
isSystemNamespaceResource,
|
|
10
20
|
isSystemSchemaIri
|
|
11
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-ZNHLH7SC.js";
|
|
12
22
|
import {
|
|
13
23
|
createNodeId,
|
|
14
24
|
getBaseSchemaIRI
|
|
15
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-NH6OLO3X.js";
|
|
16
26
|
|
|
17
27
|
// src/store/query-ast.ts
|
|
18
28
|
var QUERY_AST_VERSION = 1;
|
|
@@ -2642,6 +2652,53 @@ var NodeStore = class {
|
|
|
2642
2652
|
*
|
|
2643
2653
|
* @throws Error if signature verification fails
|
|
2644
2654
|
*/
|
|
2655
|
+
/**
|
|
2656
|
+
* Account-ledger enforcement for inbound changes (0149/0243, wired by 0337):
|
|
2657
|
+
* hydrate the account's controllers/epoch and the author's revocation status
|
|
2658
|
+
* from local storage, then require the write to pass `evaluateLedgerWrite`.
|
|
2659
|
+
* Mirrors the hub's `enforceLedgerWrite` so a hostile or auth-less hub still
|
|
2660
|
+
* cannot push unauthorized ledger records into a client.
|
|
2661
|
+
*/
|
|
2662
|
+
async enforceRemoteLedgerWrite(change) {
|
|
2663
|
+
const schemaId = change.payload.schemaId;
|
|
2664
|
+
const kind = ledgerWriteKind(schemaId);
|
|
2665
|
+
if (!kind) return;
|
|
2666
|
+
const properties = change.payload.properties ?? {};
|
|
2667
|
+
const accountId = ledgerAccountId(kind, properties);
|
|
2668
|
+
let account = null;
|
|
2669
|
+
let authorRevoked = false;
|
|
2670
|
+
if (accountId) {
|
|
2671
|
+
const accountNode = await this.storage.getNode(accountRecordId(accountId));
|
|
2672
|
+
if (accountNode) {
|
|
2673
|
+
account = foldAccountRecord(accountNode.properties);
|
|
2674
|
+
}
|
|
2675
|
+
const revocationNode = await this.storage.getNode(
|
|
2676
|
+
revocationRecordId(accountId, change.authorDID)
|
|
2677
|
+
);
|
|
2678
|
+
authorRevoked = revocationNode !== null && revocationNode !== void 0;
|
|
2679
|
+
}
|
|
2680
|
+
const decision = evaluateLedgerWrite({
|
|
2681
|
+
schemaId,
|
|
2682
|
+
authorDid: change.authorDID,
|
|
2683
|
+
properties,
|
|
2684
|
+
state: { account, authorRevoked }
|
|
2685
|
+
});
|
|
2686
|
+
if (!decision.allowed) {
|
|
2687
|
+
this.telemetry?.reportSecurityEvent("data.ledger_write_rejected", "high");
|
|
2688
|
+
throw new PermissionError({
|
|
2689
|
+
allowed: false,
|
|
2690
|
+
action: "update",
|
|
2691
|
+
subject: change.authorDID,
|
|
2692
|
+
resource: change.payload.nodeId,
|
|
2693
|
+
roles: [],
|
|
2694
|
+
grants: [],
|
|
2695
|
+
reasons: ["DENY_NODE_POLICY"],
|
|
2696
|
+
cached: false,
|
|
2697
|
+
evaluatedAt: Date.now(),
|
|
2698
|
+
duration: 0
|
|
2699
|
+
});
|
|
2700
|
+
}
|
|
2701
|
+
}
|
|
2645
2702
|
async applyRemoteChange(change) {
|
|
2646
2703
|
const start = this.telemetry ? Date.now() : 0;
|
|
2647
2704
|
try {
|
|
@@ -2669,6 +2726,7 @@ var NodeStore = class {
|
|
|
2669
2726
|
`[NodeStore] Remote change ${change.id} failed verification: ${err instanceof Error ? err.message : String(err)}`
|
|
2670
2727
|
);
|
|
2671
2728
|
}
|
|
2729
|
+
await this.enforceRemoteLedgerWrite(change);
|
|
2672
2730
|
if (this.authEvaluator) {
|
|
2673
2731
|
const stored = await this.storage.getNode(change.payload.nodeId);
|
|
2674
2732
|
const action = this.inferActionFromChange(change, stored);
|
|
@@ -4792,7 +4850,22 @@ CREATE INDEX IF NOT EXISTS idx_node_spatial_ids_schema
|
|
|
4792
4850
|
return null;
|
|
4793
4851
|
}
|
|
4794
4852
|
const value = node.properties[key];
|
|
4795
|
-
|
|
4853
|
+
if (typeof value === "number" && Number.isFinite(value)) {
|
|
4854
|
+
return value;
|
|
4855
|
+
}
|
|
4856
|
+
if (value === void 0) {
|
|
4857
|
+
const dot = key.indexOf(".");
|
|
4858
|
+
if (dot > 0) {
|
|
4859
|
+
const parent = node.properties[key.slice(0, dot)];
|
|
4860
|
+
if (typeof parent === "object" && parent !== null && !Array.isArray(parent)) {
|
|
4861
|
+
const sub = parent[key.slice(dot + 1)];
|
|
4862
|
+
if (typeof sub === "number" && Number.isFinite(sub)) {
|
|
4863
|
+
return sub;
|
|
4864
|
+
}
|
|
4865
|
+
}
|
|
4866
|
+
}
|
|
4867
|
+
}
|
|
4868
|
+
return null;
|
|
4796
4869
|
}
|
|
4797
4870
|
};
|
|
4798
4871
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
spaceCascadeAuthorization
|
|
3
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
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-
|
|
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";
|