@noy-db/hub 0.1.0-pre.3 → 0.1.0-pre.5

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 (95) hide show
  1. package/dist/blobs/index.cjs.map +1 -1
  2. package/dist/blobs/index.d.cts +3 -3
  3. package/dist/blobs/index.d.ts +3 -3
  4. package/dist/blobs/index.js +2 -2
  5. package/dist/bundle/index.cjs +26 -3
  6. package/dist/bundle/index.cjs.map +1 -1
  7. package/dist/bundle/index.d.cts +3 -3
  8. package/dist/bundle/index.d.ts +3 -3
  9. package/dist/bundle/index.js +3 -1
  10. package/dist/{chunk-M2F2JAWB.js → chunk-6NPQTBZN.js} +103 -8
  11. package/dist/chunk-6NPQTBZN.js.map +1 -0
  12. package/dist/{chunk-UQFSPSWG.js → chunk-E4OOAPBZ.js} +2 -2
  13. package/dist/chunk-EMIGCR7X.js +39 -0
  14. package/dist/chunk-EMIGCR7X.js.map +1 -0
  15. package/dist/{chunk-EXQRC2L4.js → chunk-H3DV46AQ.js} +2 -2
  16. package/dist/{chunk-XHFOENR2.js → chunk-LMKOSLJY.js} +2 -2
  17. package/dist/{chunk-GJILMRPO.js → chunk-LRN3PNI6.js} +42 -4
  18. package/dist/chunk-LRN3PNI6.js.map +1 -0
  19. package/dist/{chunk-4OWFYIDQ.js → chunk-MIRZMUSQ.js} +3 -3
  20. package/dist/{chunk-ZRG4V3F5.js → chunk-NXUVITPB.js} +1 -1
  21. package/dist/chunk-NXUVITPB.js.map +1 -0
  22. package/dist/{chunk-5AATM2M2.js → chunk-QUDXYI4W.js} +2 -2
  23. package/dist/{chunk-ZLMV3TUA.js → chunk-QV4WLLKB.js} +3 -3
  24. package/dist/{chunk-E445ICYI.js → chunk-UFL4DUEV.js} +5 -3
  25. package/dist/chunk-UFL4DUEV.js.map +1 -0
  26. package/dist/chunk-UQQ2XFXI.js +155 -0
  27. package/dist/chunk-UQQ2XFXI.js.map +1 -0
  28. package/dist/consent/index.d.cts +3 -3
  29. package/dist/consent/index.d.ts +3 -3
  30. package/dist/{dev-unlock-KrKkcqD3.d.ts → dev-unlock-BgFqShBi.d.ts} +1 -1
  31. package/dist/{dev-unlock-CeXic1xC.d.cts → dev-unlock-qVMxG2Je.d.cts} +1 -1
  32. package/dist/{hash-ChfJjRjQ.d.ts → hash-BhoL7iUE.d.ts} +1 -1
  33. package/dist/{hash-9KO1BGxh.d.cts → hash-Bpvl2eSe.d.cts} +1 -1
  34. package/dist/history/index.cjs.map +1 -1
  35. package/dist/history/index.d.cts +4 -4
  36. package/dist/history/index.d.ts +4 -4
  37. package/dist/history/index.js +2 -2
  38. package/dist/i18n/index.cjs +3 -1
  39. package/dist/i18n/index.cjs.map +1 -1
  40. package/dist/i18n/index.d.cts +3 -3
  41. package/dist/i18n/index.d.ts +3 -3
  42. package/dist/i18n/index.js +3 -3
  43. package/dist/{index-DN-J-5wT.d.cts → index-6xNpPsxR.d.cts} +1 -1
  44. package/dist/{index-BRHBCmLt.d.ts → index-DJTf9yxn.d.ts} +1 -1
  45. package/dist/{index-DhjMjz7L.d.cts → index-DhK_zqOO.d.ts} +39 -5
  46. package/dist/{index-C8kQtmOk.d.ts → index-DyRt_5vM.d.cts} +39 -5
  47. package/dist/index.cjs +1501 -51
  48. package/dist/index.cjs.map +1 -1
  49. package/dist/index.d.cts +261 -19
  50. package/dist/index.d.ts +261 -19
  51. package/dist/index.js +1118 -44
  52. package/dist/index.js.map +1 -1
  53. package/dist/{ledger-2NX4L7PN.js → ledger-GA4DMJS6.js} +3 -3
  54. package/dist/periods/index.cjs.map +1 -1
  55. package/dist/periods/index.d.cts +3 -3
  56. package/dist/periods/index.d.ts +3 -3
  57. package/dist/periods/index.js +3 -3
  58. package/dist/public-envelope-R4EIEQE6.js +31 -0
  59. package/dist/public-envelope-R4EIEQE6.js.map +1 -0
  60. package/dist/query/index.d.cts +1 -1
  61. package/dist/query/index.d.ts +1 -1
  62. package/dist/session/index.cjs +4 -2
  63. package/dist/session/index.cjs.map +1 -1
  64. package/dist/session/index.d.cts +4 -4
  65. package/dist/session/index.d.ts +4 -4
  66. package/dist/session/index.js +1 -1
  67. package/dist/shadow/index.d.cts +3 -3
  68. package/dist/shadow/index.d.ts +3 -3
  69. package/dist/store/index.d.cts +3 -3
  70. package/dist/store/index.d.ts +3 -3
  71. package/dist/sync/index.cjs.map +1 -1
  72. package/dist/sync/index.d.cts +2 -2
  73. package/dist/sync/index.d.ts +2 -2
  74. package/dist/sync/index.js +2 -2
  75. package/dist/team/index.cjs +3 -1
  76. package/dist/team/index.cjs.map +1 -1
  77. package/dist/team/index.d.cts +3 -3
  78. package/dist/team/index.d.ts +3 -3
  79. package/dist/team/index.js +4 -4
  80. package/dist/tx/index.d.cts +3 -3
  81. package/dist/tx/index.d.ts +3 -3
  82. package/dist/{types-Bfs0qr5F.d.cts → types-BpyE4o_n.d.cts} +935 -4
  83. package/dist/{types-BZpCZB8N.d.ts → types-Df72wWCC.d.ts} +935 -4
  84. package/package.json +1 -1
  85. package/dist/chunk-E445ICYI.js.map +0 -1
  86. package/dist/chunk-GJILMRPO.js.map +0 -1
  87. package/dist/chunk-M2F2JAWB.js.map +0 -1
  88. package/dist/chunk-ZRG4V3F5.js.map +0 -1
  89. /package/dist/{chunk-UQFSPSWG.js.map → chunk-E4OOAPBZ.js.map} +0 -0
  90. /package/dist/{chunk-EXQRC2L4.js.map → chunk-H3DV46AQ.js.map} +0 -0
  91. /package/dist/{chunk-XHFOENR2.js.map → chunk-LMKOSLJY.js.map} +0 -0
  92. /package/dist/{chunk-4OWFYIDQ.js.map → chunk-MIRZMUSQ.js.map} +0 -0
  93. /package/dist/{chunk-5AATM2M2.js.map → chunk-QUDXYI4W.js.map} +0 -0
  94. /package/dist/{chunk-ZLMV3TUA.js.map → chunk-QV4WLLKB.js.map} +0 -0
  95. /package/dist/{ledger-2NX4L7PN.js.map → ledger-GA4DMJS6.js.map} +0 -0
package/dist/index.d.ts CHANGED
@@ -1,15 +1,16 @@
1
- import { ar as UnlockedKeyring, aR as Vault, aA as DiffEntry } from './types-BZpCZB8N.js';
2
- export { aS as AccessibleVault, ax as AppendInput, p as BLOB_CHUNKS_COLLECTION, q as BLOB_COLLECTION, t as BLOB_INDEX_COLLECTION, u as BLOB_SLOTS_PREFIX, w as BLOB_VERSIONS_PREFIX, aT as BUNDLE_STORE_POLICY, A as BlobObject, C as BlobPutOptions, E as BlobResponseOptions, F as BlobSet, aU as BundleRecipient, _ as CONSENT_AUDIT_COLLECTION, aV as CacheOptions, aW as CacheStats, aX as ChangeEvent, ay as ChangeType, a7 as ClosePeriodOptions, aY as Collection, aZ as CollectionChangeEvent, a_ as CollectionConflictResolver, ai as CollectionFrame, az as CollectionInstant, a$ as Conflict, b0 as ConflictPolicy, b1 as ConflictStrategy, $ as ConsentAuditEntry, a0 as ConsentAuditFilter, a1 as ConsentContext, a2 as ConsentOp, b2 as CrossTierAccessEvent, L as DEFAULT_CHUNK_SIZE, b3 as DELEGATIONS_COLLECTION, D as DICT_COLLECTION_PREFIX, b4 as DelegationToken, b5 as DeleteManyResult, a as DictEntry, b as DictKeyDescriptor, c as DictionaryHandle, d as DictionaryOptions, b6 as DirtyEntry, b7 as ELEVATION_AUDIT_COLLECTION, b8 as ElevatedHandle, av as EncryptedEnvelope, b9 as ExportCapability, ba as ExportChunk, bb as ExportFormat, bc as ExportStreamOptions, bd as GhostRecord, be as GrantOptions, bf as HistoryConfig, bg as HistoryEntry, au as HistoryOptions, e as I18nTextDescriptor, f as I18nTextOptions, bh as INDEXED_STORE_POLICY, bi as ImportCapability, bj as InferOutput, bk as IssueDelegationOptions, bl as IssueMagicLinkGrantOptions, aB as JsonPatch, aC as JsonPatchOp, bm as KeyringFile, aD as LedgerEntry, aE as LedgerStore, bn as ListAccessibleVaultsOptions, bo as ListPageResult, bp as LocaleReadOptions, bq as Lru, br as LruOptions, bs as LruStats, bt as MAGIC_LINK_CONTENT_INFO_PREFIX, bu as MAGIC_LINK_GRANTS_COLLECTION, bv as MAGIC_LINK_KEK_INFO_PREFIX, bw as MagicLinkGrantPayload, bx as MagicLinkGrantRecord, by as NOYDB_BACKUP_VERSION, bz as NOYDB_FORMAT_VERSION, bA as NOYDB_KEYRING_VERSION, bB as NOYDB_SYNC_VERSION, bC as Noydb, bD as NoydbBundleStore, bE as NoydbEventMap, bF as NoydbOptions, at as NoydbStore, a8 as OpenPeriodOptions, a9 as PERIODS_COLLECTION, aa as PeriodRecord, bG as Permission, bH as Permissions, bI as PlaintextTranslatorContext, bJ as PlaintextTranslatorFn, P as PolicyEnforcer, bK as PresenceHandle, bL as PresencePeer, aw as PruneOptions, bM as PullMode, bN as PullOptions, bO as PullPolicy, bP as PullResult, bQ as PushMode, bR as PushOptions, bS as PushPolicy, bT as PushResult, bU as PutManyItemOptions, bV as PutManyOptions, bW as PutManyResult, bX as QueryAcrossOptions, bY as QueryAcrossResult, bZ as ReAuthOperation, b_ as RevokeOptions, aq as Role, b$ as SessionPolicy, U as SlotInfo, V as SlotRecord, c0 as StandardSchemaV1, c1 as StandardSchemaV1Issue, c2 as StandardSchemaV1SyncResult, c3 as StoreAuth, c4 as StoreAuthKind, c5 as StoreCapabilities, c6 as SyncEngine, c7 as SyncMetadata, c8 as SyncPolicy, c9 as SyncScheduler, ca as SyncSchedulerStatus, cb as SyncStatus, cc as SyncTarget, cd as SyncTargetRole, ce as SyncTransaction, cf as SyncTransactionResult, cg as TierMode, ch as TranslatorAuditEntry, al as TxCollection, am as TxContext, ci as TxOp, an as TxVault, cj as UserInfo, ck as VaultBackup, aF as VaultEngine, aj as VaultFrame, aG as VaultInstant, cl as VaultSnapshot, aH as VerifyResult, W as VersionRecord, g as applyI18nLocale, aI as applyPatch, cm as buildRecipientKeyringFile, aJ as canonicalJson, aK as computePatch, n as createEnforcer, cn as createNoydb, co as createStore, cp as deriveMagicLinkContentKey, h as dictCollectionName, i as dictKey, aL as diff, cq as evaluateExportCapability, cr as evaluateImportCapability, aM as formatDiff, cs as hasExportCapability, ct as hasImportCapability, aN as hashEntry, j as i18nText, k as isDictCollectionName, l as isDictKeyDescriptor, m as isI18nTextDescriptor, cu as isMagicLinkGrantExpired, cv as issueDelegation, cw as listMagicLinkGrants, cx as loadActiveDelegations, cy as magicLinkGrantRecordId, aO as paddedIndex, aP as parseIndex, cz as readMagicLinkGrantRecord, r as resolveI18nText, cA as revokeDelegation, cB as revokeMagicLinkGrant, ao as runTransaction, aQ as sha256Hex, cC as unwrapMagicLinkGrant, v as validateI18nTextValue, cD as validateSchemaInput, cE as validateSchemaOutput, o as validateSessionPolicy, cF as writeMagicLinkGrant } from './types-BZpCZB8N.js';
1
+ import { at as NoydbStore, aR as PublicEnvelope, aS as GateName, aT as GatePolicy, aU as VaultPolicy, aV as ActiveTier, aW as FactorProof, ar as UnlockedKeyring, aX as Vault, aA as DiffEntry } from './types-Df72wWCC.js';
2
+ export { aY as AccessibleVault, ax as AppendInput, p as BLOB_CHUNKS_COLLECTION, q as BLOB_COLLECTION, t as BLOB_INDEX_COLLECTION, u as BLOB_SLOTS_PREFIX, w as BLOB_VERSIONS_PREFIX, aZ as BUNDLE_STORE_POLICY, A as BlobObject, C as BlobPutOptions, E as BlobResponseOptions, F as BlobSet, a_ as BuiltInGateName, a$ as BundleRecipient, _ as CONSENT_AUDIT_COLLECTION, b0 as CacheOptions, b1 as CacheStats, b2 as ChangeEvent, ay as ChangeType, a7 as ClosePeriodOptions, b3 as Collection, b4 as CollectionChangeEvent, b5 as CollectionConflictResolver, ai as CollectionFrame, az as CollectionInstant, b6 as Conflict, b7 as ConflictPolicy, b8 as ConflictStrategy, $ as ConsentAuditEntry, a0 as ConsentAuditFilter, a1 as ConsentContext, a2 as ConsentOp, b9 as CrossTierAccessEvent, L as DEFAULT_CHUNK_SIZE, ba as DEFAULT_PUBLIC_ENVELOPE_SCHEMA, bb as DELEGATIONS_COLLECTION, D as DICT_COLLECTION_PREFIX, bc as DelegationToken, bd as DeleteManyResult, a as DictEntry, b as DictKeyDescriptor, c as DictionaryHandle, d as DictionaryOptions, be as DirtyEntry, bf as ELEVATION_AUDIT_COLLECTION, bg as ElevatedHandle, av as EncryptedEnvelope, bh as EnrollAuthenticatorOptions, bi as ExportCapability, bj as ExportChunk, bk as ExportFormat, bl as ExportStreamOptions, bm as FactorKind, bn as FactorRequirement, bo as GhostRecord, bp as GrantOptions, bq as HistoryConfig, br as HistoryEntry, au as HistoryOptions, e as I18nTextDescriptor, f as I18nTextOptions, bs as INDEXED_STORE_POLICY, bt as ImportCapability, bu as InferOutput, bv as IssueDelegationOptions, bw as IssueMagicLinkGrantOptions, aB as JsonPatch, aC as JsonPatchOp, bx as KeyringAuthenticator, by as KeyringFile, aD as LedgerEntry, aE as LedgerStore, bz as ListAccessibleVaultsOptions, bA as ListPageResult, bB as LocaleReadOptions, bC as Lru, bD as LruOptions, bE as LruStats, bF as MAGIC_LINK_CONTENT_INFO_PREFIX, bG as MAGIC_LINK_GRANTS_COLLECTION, bH as MAGIC_LINK_KEK_INFO_PREFIX, bI as MagicLinkGrantPayload, bJ as MagicLinkGrantRecord, bK as NOYDB_BACKUP_VERSION, bL as NOYDB_FORMAT_VERSION, bM as NOYDB_KEYRING_VERSION, bN as NOYDB_SYNC_VERSION, bO as Noydb, bP as NoydbBundleStore, bQ as NoydbEventMap, bR as NoydbOptions, a8 as OpenPeriodOptions, a9 as PERIODS_COLLECTION, bS as PUBLIC_ENVELOPE_FIELDS, bT as PaperRecoveryDoc, bU as PaperRecoveryEntry, bV as PassphrasePolicy, bW as PassphraseValidationResult, aa as PeriodRecord, bX as Permission, bY as Permissions, bZ as PlaintextTranslatorContext, b_ as PlaintextTranslatorFn, P as PolicyEnforcer, b$ as PresenceHandle, c0 as PresencePeer, aw as PruneOptions, c1 as PublicEnvelopeField, c2 as PublicEnvelopeSchema, c3 as PublicEnvelopeText, c4 as PullMode, c5 as PullOptions, c6 as PullPolicy, c7 as PullResult, c8 as PushMode, c9 as PushOptions, ca as PushPolicy, cb as PushResult, cc as PutManyItemOptions, cd as PutManyOptions, ce as PutManyResult, cf as QueryAcrossOptions, cg as QueryAcrossResult, ch as QuickUnlockState, ci as QuickUnlockStore, cj as ReAuthOperation, ck as RecoverPassphraseInput, cl as RecoveryProof, cm as ResolvedPublicEnvelopeSchema, cn as RevokeOptions, aq as Role, co as RotatePassphraseInput, cp as SessionPolicy, cq as SetPublicEnvelopeInput, U as SlotInfo, V as SlotRecord, cr as StandardSchemaV1, cs as StandardSchemaV1Issue, ct as StandardSchemaV1SyncResult, cu as StoreAuth, cv as StoreAuthKind, cw as StoreCapabilities, cx as SyncEngine, cy as SyncMetadata, cz as SyncPolicy, cA as SyncScheduler, cB as SyncSchedulerStatus, cC as SyncStatus, cD as SyncTarget, cE as SyncTargetRole, cF as SyncTransaction, cG as SyncTransactionResult, cH as TierMode, cI as TranslatorAuditEntry, al as TxCollection, am as TxContext, cJ as TxOp, an as TxVault, cK as UserInfo, cL as VaultBackup, aF as VaultEngine, aj as VaultFrame, aG as VaultInstant, cM as VaultPolicyOnDisk, cN as VaultSnapshot, aH as VerifyResult, W as VersionRecord, cO as WarningRules, cP as WeakPassphraseError, cQ as WeakPassphraseReason, g as applyI18nLocale, aI as applyPatch, cR as assertStrongPassphrase, cS as buildRecipientKeyringFile, cT as burnPaperRecoveryEntry, aJ as canonicalJson, aK as computePatch, n as createEnforcer, cU as createNoydb, cV as createStore, cW as deriveMagicLinkContentKey, h as dictCollectionName, i as dictKey, aL as diff, cX as enrollAuthenticator, cY as estimateEntropy, cZ as evaluateExportCapability, c_ as evaluateImportCapability, c$ as findAuthenticator, aM as formatDiff, d0 as hasExportCapability, d1 as hasImportCapability, d2 as hasRecoveryEnrolled, aN as hashEntry, j as i18nText, k as isDictCollectionName, l as isDictKeyDescriptor, m as isI18nTextDescriptor, d3 as isMagicLinkGrantExpired, d4 as isPublicEnvelope, d5 as issueDelegation, d6 as keyringRecoverPassphrase, d7 as keyringRotatePassphrase, d8 as listMagicLinkGrants, d9 as loadActiveDelegations, da as loadPaperRecoveryEntries, db as magicLinkGrantRecordId, aO as paddedIndex, aP as parseIndex, dc as readMagicLinkGrantRecord, dd as removeAuthenticator, r as resolveI18nText, de as resolvePublicEnvelopeSchema, df as revokeDelegation, dg as revokeMagicLinkGrant, ao as runTransaction, dh as savePaperRecoveryEntries, aQ as sha256Hex, di as unwrapMagicLinkGrant, v as validateI18nTextValue, dj as validatePassphrase, dk as validatePublicEnvelopeInput, dl as validateSchemaInput, dm as validateSchemaOutput, o as validateSessionPolicy, dn as writeMagicLinkGrant } from './types-Df72wWCC.js';
3
3
  export { d as detectMagic, a as detectMimeType, i as isPreCompressed } from './mime-magic-CBBSOkjm.js';
4
4
  export { AgeRoute, BlobLifecyclePolicy, BlobStoreRoute, CircuitBreakerOptions, HealthCheckOptions, LogLevel, LoggingOptions, MetricsOptions, OverrideOptions, OverrideTarget, RetryOptions, RouteStatus, RouteStoreOptions, RoutedNoydbStore, StoreCacheOptions, StoreMiddleware, StoreOperation, SuspendOptions, WrapBundleStoreOptions, WrappedBundleNoydbStore, createBundleStore, routeStore, withCache, withCircuitBreaker, withHealthCheck, withLogging, withMetrics, withRetry, wrapBundleStore, wrapStore } from './store/index.js';
5
- export { A as AlreadyElevatedError, B as BackupCorruptedError, a as BackupLedgerError, b as BundleIntegrityError, c as BundleVersionConflictError, C as ConflictError, D as DEFAULT_JOIN_MAX_ROWS, d as DanglingReferenceError, e as DecryptionError, f as DelegationTargetMissingError, g as DictKeyInUseError, h as DictKeyMissingError, E as ElevationExpiredError, i as ExportCapabilityError, F as FilenameSanitizationError, G as GroupCardinalityError, I as ImportCapabilityError, j as IndexRequiredError, k as IndexWriteFailureError, l as InvalidKeyError, J as JoinContext, m as JoinLeg, n as JoinStrategy, o as JoinTooLargeError, p as JoinableSource, K as KeyringExpiredError, L as LedgerContentionError, q as LiveQuery, r as LiveUpstream, s as LocaleNotSpecifiedError, M as MissingTranslationError, N as NetworkError, t as NoAccessError, u as NotFoundError, v as NoydbError, O as OrderBy, P as PathEscapeError, w as PeriodClosedError, x as PermissionDeniedError, y as PrivilegeEscalationError, Q as Query, z as QueryPlan, H as QuerySource, R as ReadOnlyAtInstantError, S as ReadOnlyError, T as ReadOnlyFrameError, U as RefDescriptor, V as RefIntegrityError, W as RefMode, X as RefRegistry, Y as RefScopeError, Z as RefViolation, _ as ReservedCollectionNameError, $ as ScanBuilder, a0 as ScanPageProvider, a1 as SchemaValidationError, a2 as SessionExpiredError, a3 as SessionNotFoundError, a4 as SessionPolicyError, a5 as StoreCapabilityError, a6 as TamperedError, a7 as TierDemoteDeniedError, a8 as TierNotGrantedError, a9 as TranslatorNotConfiguredError, aa as ValidationError, ab as applyJoins, ac as buildLiveQuery, ad as executePlan, ae as ref, af as resetJoinWarnings } from './index-BRHBCmLt.js';
6
- export { C as CompressionAlgo, N as NOYDB_BUNDLE_FORMAT_VERSION, a as NOYDB_BUNDLE_MAGIC, b as NOYDB_BUNDLE_PREFIX_BYTES, c as NoydbBundleHeader, d as NoydbBundleReadResult, W as WriteNoydbBundleOptions, g as generateULID, h as hasNoydbBundleMagic, i as isULID, r as readNoydbBundle, e as readNoydbBundleHeader, f as resetBrotliSupportCache, w as writeNoydbBundle } from './index-C8kQtmOk.js';
5
+ import { N as NoydbError } from './index-DJTf9yxn.js';
6
+ export { A as AlreadyElevatedError, B as BackupCorruptedError, a as BackupLedgerError, b as BundleIntegrityError, c as BundleVersionConflictError, C as ConflictError, D as DEFAULT_JOIN_MAX_ROWS, d as DanglingReferenceError, e as DecryptionError, f as DelegationTargetMissingError, g as DictKeyInUseError, h as DictKeyMissingError, E as ElevationExpiredError, i as ExportCapabilityError, F as FilenameSanitizationError, G as GroupCardinalityError, I as ImportCapabilityError, j as IndexRequiredError, k as IndexWriteFailureError, l as InvalidKeyError, J as JoinContext, m as JoinLeg, n as JoinStrategy, o as JoinTooLargeError, p as JoinableSource, K as KeyringExpiredError, L as LedgerContentionError, q as LiveQuery, r as LiveUpstream, s as LocaleNotSpecifiedError, M as MissingTranslationError, t as NetworkError, u as NoAccessError, v as NotFoundError, O as OrderBy, P as PathEscapeError, w as PeriodClosedError, x as PermissionDeniedError, y as PrivilegeEscalationError, Q as Query, z as QueryPlan, H as QuerySource, R as ReadOnlyAtInstantError, S as ReadOnlyError, T as ReadOnlyFrameError, U as RefDescriptor, V as RefIntegrityError, W as RefMode, X as RefRegistry, Y as RefScopeError, Z as RefViolation, _ as ReservedCollectionNameError, $ as ScanBuilder, a0 as ScanPageProvider, a1 as SchemaValidationError, a2 as SessionExpiredError, a3 as SessionNotFoundError, a4 as SessionPolicyError, a5 as StoreCapabilityError, a6 as TamperedError, a7 as TierDemoteDeniedError, a8 as TierNotGrantedError, a9 as TranslatorNotConfiguredError, aa as ValidationError, ab as applyJoins, ac as buildLiveQuery, ad as executePlan, ae as ref, af as resetJoinWarnings } from './index-DJTf9yxn.js';
7
+ export { C as CompressionAlgo, N as NOYDB_BUNDLE_FORMAT_VERSION, a as NOYDB_BUNDLE_MAGIC, b as NOYDB_BUNDLE_PREFIX_BYTES, c as NoydbBundleHeader, d as NoydbBundleReadResult, W as WriteNoydbBundleOptions, g as generateULID, h as hasNoydbBundleMagic, i as isULID, r as readNoydbBundle, e as readNoydbBundleHeader, f as readNoydbBundlePublicEnvelope, j as resetBrotliSupportCache, w as writeNoydbBundle } from './index-DhK_zqOO.js';
7
8
  export { a as CrdtMode, b as CrdtState, L as LwwMapState, R as RgaState, Y as YjsState, m as mergeCrdtStates, r as resolveCrdtSnapshot } from './strategy-BSxFXGzb.js';
8
9
  export { SYNC_CREDENTIALS_COLLECTION, SyncCredential, credentialStatus, deleteCredential, getCredential, listCredentials, putCredential } from './team/index.js';
9
- export { C as CreateSessionOptions, a as CreateSessionResult, D as DevUnlockOptions, S as SessionToken, b as activeSessionCount, c as clearDevUnlock, d as createSession, e as enableDevUnlock, i as isDevUnlockActive, f as isSessionAlive, l as loadDevUnlock, r as resolveSession, g as revokeAllSessions, h as revokeSession } from './dev-unlock-KrKkcqD3.js';
10
+ export { C as CreateSessionOptions, a as CreateSessionResult, D as DevUnlockOptions, S as SessionToken, b as activeSessionCount, c as clearDevUnlock, d as createSession, e as enableDevUnlock, i as isDevUnlockActive, f as isSessionAlive, l as loadDevUnlock, r as resolveSession, g as revokeAllSessions, h as revokeSession } from './dev-unlock-BgFqShBi.js';
10
11
  export { a as Clause, C as CollectionIndexes, F as FieldClause, b as FilterClause, G as GroupClause, H as HashIndex, I as IndexDef, O as Operator, e as evaluateClause, c as evaluateFieldClause, r as readPath } from './predicate-SBHmi6D0.js';
11
12
  export { a as AggregateResult, b as AggregateSpec, c as Aggregation, d as AggregationUpstream, G as GROUPBY_MAX_CARDINALITY, e as GROUPBY_WARN_CARDINALITY, f as GroupedAggregation, g as GroupedQuery, h as GroupedRow, L as LiveAggregation, R as Reducer, i as ReducerOptions, j as avg, l as count, m as groupAndReduce, n as max, o as min, r as reduceRecords, s as sum } from './strategy-D-SrOLCl.js';
12
- export { L as LEDGER_COLLECTION, a as LEDGER_DELTAS_COLLECTION, e as envelopePayloadHash } from './hash-ChfJjRjQ.js';
13
+ export { L as LEDGER_COLLECTION, a as LEDGER_DELTAS_COLLECTION, e as envelopePayloadHash } from './hash-BhoL7iUE.js';
13
14
  import './lazy-builder-BwEoBQZ9.js';
14
15
 
15
16
  /**
@@ -45,6 +46,259 @@ declare function parseBytes(input: number | string): number;
45
46
  */
46
47
  declare function estimateRecordBytes(record: unknown): number;
47
48
 
49
+ /**
50
+ * Persistence helpers for `_meta/public-envelope`. Mirrors the
51
+ * bypass-AES pattern used by `_meta/handle` and `_meta/policy` —
52
+ * the document is plaintext JSON, the envelope's `_iv` field is
53
+ * left empty.
54
+ *
55
+ * @module
56
+ */
57
+
58
+ /** Reserved id for the vault-level public envelope record. */
59
+ declare const PUBLIC_ENVELOPE_RECORD_ID = "public-envelope";
60
+ /**
61
+ * Read the public envelope from `_meta/public-envelope`. Returns
62
+ * `undefined` when no envelope has been persisted (fresh vault, or
63
+ * a vault written before the feature was enabled). Tolerates
64
+ * corrupted documents — a JSON parse failure surfaces as `undefined`,
65
+ * not a thrown error, mirroring `_meta/handle`'s contract.
66
+ */
67
+ declare function loadPublicEnvelope(store: NoydbStore, vault: string): Promise<PublicEnvelope | undefined>;
68
+ /** Persist the public envelope. Idempotent — overwrites any prior write. */
69
+ declare function savePublicEnvelope(store: NoydbStore, vault: string, envelope: PublicEnvelope): Promise<void>;
70
+ /**
71
+ * Public, no-key reader. Plain function, not a method on `Noydb` —
72
+ * the whole point is it works without an authenticated session, so
73
+ * a UI can show "Acme 2026 Tax Records" before unlocking.
74
+ *
75
+ * Resolves any `name` / `description` locale map through the supplied
76
+ * `locale` (when provided). Omitting `locale` returns the raw
77
+ * envelope, which a multilingual picker can render as it pleases.
78
+ */
79
+ declare function readPublicEnvelope(store: NoydbStore, vault: string, opts?: {
80
+ readonly locale?: string;
81
+ }): Promise<PublicEnvelope | undefined>;
82
+
83
+ /**
84
+ * Why a gate denied a request. Stable across hub versions so consumers
85
+ * can switch on the value in error UIs.
86
+ */
87
+ type PolicyDenyReason = 'insufficient-tier' | 'missing-factor' | 'stale-proof' | 'disabled' | 'shared-device-blocked';
88
+ /**
89
+ * Thrown by {@link checkGate} when the active session does not meet
90
+ * the gate's requirements. Carries the gate name, the reason, and the
91
+ * full required {@link GatePolicy} so error UIs can prompt the user
92
+ * for the missing factor without re-reading the policy document.
93
+ */
94
+ declare class PolicyDeniedError extends NoydbError {
95
+ readonly gate: GateName;
96
+ readonly reason: PolicyDenyReason;
97
+ readonly required: GatePolicy;
98
+ constructor(gate: GateName, reason: PolicyDenyReason, required: GatePolicy, message?: string);
99
+ }
100
+ /**
101
+ * Raised by `createNoydb({ ... })` when the developer omits a recovery
102
+ * profile and `recover-passphrase` is not explicitly disabled. Vaults
103
+ * MUST have at least one recovery path enrolled before being
104
+ * production-ready (paper, shamir, multi-channel, or admin-mediated).
105
+ *
106
+ * The error references issue #10 in its message so a developer hitting
107
+ * it gets a one-line pointer to the design.
108
+ */
109
+ declare class RecoveryNotEnrolledError extends NoydbError {
110
+ constructor(message?: string);
111
+ }
112
+ /**
113
+ * Raised by `db.recoverPassphrase` when the developer requests a
114
+ * recovery profile other than `'paper'` in v0.1.0-pre.5. The other
115
+ * three profiles (Shamir, multi-channel, admin-mediated) ship the API
116
+ * shape now; their per-profile dispatch lands in follow-up issues.
117
+ *
118
+ * The carried `profile` and `tracking` fields let consumers steer the
119
+ * UI ("Shamir recovery is not yet wired up — open issue #N to follow").
120
+ */
121
+ declare class RecoveryProfileNotImplementedError extends NoydbError {
122
+ readonly profile: string;
123
+ readonly tracking: string;
124
+ constructor(profile: string, tracking: string);
125
+ }
126
+
127
+ /**
128
+ * Default policy for personal vaults and SMB deployments — the gates
129
+ * that need an off-device factor get one (TOTP / email-OTP / paper
130
+ * recovery), the rest take a tier-1 unlock alone. Tier-3 (PIN) is the
131
+ * floor only for `rotate-unlock` because that's the
132
+ * "change my PIN" flow.
133
+ *
134
+ * The unspecified gates (e.g. `view-user-auth`) inherit the engine
135
+ * default of `{ enabled: false, minTier: 1 }` — they fail closed.
136
+ *
137
+ * @see docs/subsystems/session-tiers.md → Built-in gates
138
+ */
139
+ declare const PERSONAL_POLICY: VaultPolicy;
140
+ /**
141
+ * Strict policy for regulated deployments and shared workstations —
142
+ * raises the phrase floor to 8 words, demands two distinct factors for
143
+ * exports, and blocks export-on-shared-device. Use as a base for
144
+ * `policy: { ...STRICT_POLICY, gates: { ...STRICT_POLICY.gates, ... } }`
145
+ * tweaks.
146
+ */
147
+ declare const STRICT_POLICY: VaultPolicy;
148
+ /**
149
+ * Merge a developer override onto a preset. Unspecified gates inherit;
150
+ * specified gates fully replace the preset's entry for that gate.
151
+ *
152
+ * Example:
153
+ *
154
+ * ```ts
155
+ * mergePolicy(PERSONAL_POLICY, {
156
+ * gates: {
157
+ * 'app:approve-large-payment': { minTier: 2, factors: [{ anyOf: ['totp'] }] },
158
+ * },
159
+ * })
160
+ * // → PERSONAL_POLICY plus the new app gate; existing gates intact.
161
+ * ```
162
+ */
163
+ declare function mergePolicy(base: VaultPolicy, override?: Partial<VaultPolicy>): VaultPolicy;
164
+
165
+ /**
166
+ * Policy gate engine — the {@link checkGate} entry point.
167
+ *
168
+ * Given a configured {@link VaultPolicy}, an active session tier, and
169
+ * the factor proofs an actor is presenting, decide whether the gate
170
+ * permits the action. On denial, throws {@link PolicyDeniedError} with
171
+ * a stable {@link PolicyDenyReason} so consumers can branch in error
172
+ * UIs.
173
+ *
174
+ * @see docs/subsystems/session-tiers.md → checkGate() API
175
+ *
176
+ * @module
177
+ */
178
+
179
+ /** Default freshness window — 5 minutes. */
180
+ declare const DEFAULT_FRESHNESS_MS: number;
181
+ /** Caller-supplied context for one `checkGate` invocation. */
182
+ interface CheckGateContext {
183
+ /** Tier the active session currently holds. */
184
+ readonly activeTier: ActiveTier;
185
+ /** Proofs the actor is presenting for this gate. */
186
+ readonly factors?: ReadonlyArray<FactorProof>;
187
+ /**
188
+ * If the host knows the actor is on a shared device, set this to
189
+ * `true` so the engine can apply `warn.sharedDevice` rules. Defaults
190
+ * to `false`.
191
+ */
192
+ readonly sharedDevice?: boolean;
193
+ /**
194
+ * Override `now()` for tests. Defaults to `Date.now()`.
195
+ * @internal
196
+ */
197
+ readonly now?: number;
198
+ }
199
+ /**
200
+ * Decide whether `gate` permits the action under `context`. Throws
201
+ * {@link PolicyDeniedError} on denial; resolves with `void` on success.
202
+ *
203
+ * Lookup rules:
204
+ * - **Built-in gates** without a configured policy fail closed
205
+ * (`enabled: false`).
206
+ * - **App-defined gates** (`app:*`) without a configured policy are
207
+ * treated as no-op (allow). The developer registered the policy if
208
+ * they wanted enforcement; absence means the gate is informational.
209
+ */
210
+ declare function checkGate(policy: VaultPolicy, gate: GateName, context: CheckGateContext): Promise<void>;
211
+ /**
212
+ * Same as {@link checkGate} but returns a structured verdict instead
213
+ * of throwing. Useful when an error UI wants to show the user
214
+ * "you'll need TOTP plus a recovery code to do that" without first
215
+ * triggering the action.
216
+ */
217
+ declare function describeGate(policy: VaultPolicy, gate: GateName, context: CheckGateContext): Promise<{
218
+ ok: true;
219
+ } | {
220
+ ok: false;
221
+ reason: PolicyDenyReason;
222
+ required: GatePolicy;
223
+ }>;
224
+
225
+ /**
226
+ * Persistence helpers for the vault-level policy document
227
+ * (`_meta/policy`). Mirrors the bypass-AES pattern used by
228
+ * `_meta/handle` — the policy document is plain JSON, the envelope's
229
+ * `_iv` field is left empty.
230
+ *
231
+ * @see docs/subsystems/session-tiers.md → Storage location
232
+ *
233
+ * @module
234
+ */
235
+
236
+ /** Reserved collection name for vault-level metadata documents. */
237
+ declare const META_COLLECTION = "_meta";
238
+ /** Reserved id for the vault-level policy document. */
239
+ declare const POLICY_RECORD_ID = "policy";
240
+ /**
241
+ * Read the vault-level policy from `_meta/policy`. Returns `undefined`
242
+ * when no policy has been persisted (fresh vault, or a vault written
243
+ * before the policy module landed). The caller falls back to the
244
+ * default preset.
245
+ *
246
+ * Tolerates corrupted documents the same way `_meta/handle` does: a
247
+ * JSON parse failure surfaces as `undefined`, not a thrown error, so
248
+ * a bad write never permanently locks a vault.
249
+ */
250
+ declare function loadVaultPolicy(store: NoydbStore, vault: string): Promise<VaultPolicy | undefined>;
251
+ /**
252
+ * Persist the vault-level policy at `_meta/policy`. Idempotent — call
253
+ * once at vault creation and again on `db.updatePolicy()` invocations.
254
+ */
255
+ declare function saveVaultPolicy(store: NoydbStore, vault: string, policy: VaultPolicy): Promise<void>;
256
+
257
+ /**
258
+ * Authentication introspection — issue #13.
259
+ *
260
+ * Three surfaces over the configured tier model and the actual
261
+ * per-user enrollment state:
262
+ *
263
+ * 1. **Vault-wide English summary** — {@link describeAuthConfig}.
264
+ * 2. **Vault-wide Mermaid diagram** — {@link diagramAuthConfig}.
265
+ * 3. **Per-user introspection** — {@link describeUserAuth}, gated by
266
+ * the `view-user-auth` policy gate (off by default).
267
+ *
268
+ * The per-user surface is held to a strict allowlist — fields not on
269
+ * the allowlist are dropped, never rendered. The negative test in
270
+ * `auth-introspection.test.ts` exercises the allowlist by feeding a
271
+ * contrived keyring with fake "secret" fields and asserting that none
272
+ * of them appear in the output.
273
+ *
274
+ * @module
275
+ */
276
+
277
+ /** Vault-wide English summary of the configured authentication graph. */
278
+ declare function describeAuthConfig(store: NoydbStore, vault: string): Promise<string>;
279
+ /**
280
+ * Render the vault's auth graph as Mermaid `flowchart TB` source. The
281
+ * caller pipes this through Mermaid (CLI or browser) to get an SVG.
282
+ */
283
+ declare function diagramAuthConfig(store: NoydbStore, vault: string): Promise<string>;
284
+ /**
285
+ * Render the per-user enrollment summary. Returns an empty
286
+ * (non-throwing) string when the user has no keyring file — never
287
+ * confirms or denies the existence of the user from the document
288
+ * alone.
289
+ *
290
+ * Sanitization is strict: only the slot list, enrollment dates, and
291
+ * recovery-profile counts are rendered. WebAuthn cred ids, OIDC
292
+ * subject ids, password hashes, recovery codes, TOTP secrets — all
293
+ * dropped at the allowlist boundary, not redacted.
294
+ */
295
+ declare function describeUserAuth(store: NoydbStore, vault: string, userId: string): Promise<string>;
296
+ /** Bulk variant for owner dashboards. */
297
+ declare function describeAllUsersAuth(store: NoydbStore, vault: string): Promise<Array<{
298
+ userId: string;
299
+ description: string;
300
+ }>>;
301
+
48
302
  interface EncryptResult {
49
303
  iv: string;
50
304
  data: string;
@@ -254,16 +508,4 @@ type DiffCandidate<T = unknown> = Vault | Record<string, readonly T[]> | string;
254
508
  */
255
509
  declare function diffVault<T = unknown>(vault: Vault, candidate: DiffCandidate<T>, options?: DiffOptions): Promise<VaultDiff<T>>;
256
510
 
257
- /**
258
- * Validate passphrase strength.
259
- * Checks length and basic entropy heuristics.
260
- * Throws ValidationError if too weak.
261
- */
262
- declare function validatePassphrase(passphrase: string): void;
263
- /**
264
- * Estimate passphrase entropy in bits.
265
- * Uses character class analysis (not dictionary-based).
266
- */
267
- declare function estimateEntropy(passphrase: string): number;
268
-
269
- export { type DiffCandidate, DiffEntry, type DiffOptions, UnlockedKeyring, Vault, type VaultDiff, type VaultDiffEntry, type VaultDiffModifiedEntry, assertTierAccess, base64ToBuffer, bufferToBase64, decryptBytes, decryptDeterministic, dekKey, derivePresenceKey, diffVault, effectiveClearance, encryptBytes, encryptDeterministic, estimateEntropy, estimateRecordBytes, parseBytes, validatePassphrase };
511
+ export { ActiveTier, type CheckGateContext, DEFAULT_FRESHNESS_MS, type DiffCandidate, DiffEntry, type DiffOptions, FactorProof, GateName, GatePolicy, META_COLLECTION, NoydbError, NoydbStore, PERSONAL_POLICY, POLICY_RECORD_ID, PUBLIC_ENVELOPE_RECORD_ID, PolicyDeniedError, type PolicyDenyReason, PublicEnvelope, RecoveryNotEnrolledError, RecoveryProfileNotImplementedError, STRICT_POLICY, UnlockedKeyring, Vault, type VaultDiff, type VaultDiffEntry, type VaultDiffModifiedEntry, VaultPolicy, assertTierAccess, base64ToBuffer, bufferToBase64, checkGate, decryptBytes, decryptDeterministic, dekKey, derivePresenceKey, describeAllUsersAuth, describeAuthConfig, describeGate, describeUserAuth, diagramAuthConfig, diffVault, effectiveClearance, encryptBytes, encryptDeterministic, estimateRecordBytes, loadPublicEnvelope, loadVaultPolicy, mergePolicy, parseBytes, readPublicEnvelope, savePublicEnvelope, saveVaultPolicy };