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

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 (77) hide show
  1. package/dist/blobs/index.cjs.map +1 -1
  2. package/dist/blobs/index.d.cts +2 -2
  3. package/dist/blobs/index.d.ts +2 -2
  4. package/dist/blobs/index.js +2 -2
  5. package/dist/bundle/index.d.cts +2 -2
  6. package/dist/bundle/index.d.ts +2 -2
  7. package/dist/bundle/index.js +3 -3
  8. package/dist/{chunk-QUDXYI4W.js → chunk-3WCRU7TI.js} +2 -2
  9. package/dist/{chunk-6NPQTBZN.js → chunk-6IJQ27XN.js} +112 -4
  10. package/dist/chunk-6IJQ27XN.js.map +1 -0
  11. package/dist/{chunk-NXUVITPB.js → chunk-B6HF6NTZ.js} +1 -1
  12. package/dist/{chunk-NXUVITPB.js.map → chunk-B6HF6NTZ.js.map} +1 -1
  13. package/dist/{chunk-H3DV46AQ.js → chunk-CL37QSND.js} +2 -2
  14. package/dist/{chunk-LRN3PNI6.js → chunk-FAAWLVTF.js} +2 -2
  15. package/dist/{chunk-UQQ2XFXI.js → chunk-GILMPJXB.js} +2 -2
  16. package/dist/{chunk-MIRZMUSQ.js → chunk-INSJBB5W.js} +3 -3
  17. package/dist/{chunk-E4OOAPBZ.js → chunk-KPF2HHPI.js} +2 -2
  18. package/dist/{chunk-LMKOSLJY.js → chunk-N2LMZKLR.js} +2 -2
  19. package/dist/{chunk-QV4WLLKB.js → chunk-NZ4XCIKS.js} +3 -3
  20. package/dist/consent/index.d.cts +2 -2
  21. package/dist/consent/index.d.ts +2 -2
  22. package/dist/{dev-unlock-BgFqShBi.d.ts → dev-unlock-CcJ1qIi7.d.ts} +1 -1
  23. package/dist/{dev-unlock-qVMxG2Je.d.cts → dev-unlock-Dk14V6lX.d.cts} +1 -1
  24. package/dist/{hash-BhoL7iUE.d.ts → hash-1Xsqx1jl.d.ts} +1 -1
  25. package/dist/{hash-Bpvl2eSe.d.cts → hash-h_2U3TFb.d.cts} +1 -1
  26. package/dist/history/index.cjs.map +1 -1
  27. package/dist/history/index.d.cts +3 -3
  28. package/dist/history/index.d.ts +3 -3
  29. package/dist/history/index.js +2 -2
  30. package/dist/i18n/index.cjs.map +1 -1
  31. package/dist/i18n/index.d.cts +2 -2
  32. package/dist/i18n/index.d.ts +2 -2
  33. package/dist/i18n/index.js +3 -3
  34. package/dist/{index-DyRt_5vM.d.cts → index-Cvb0efA_.d.cts} +1 -1
  35. package/dist/{index-DhK_zqOO.d.ts → index-DZn6Yick.d.ts} +1 -1
  36. package/dist/index.cjs +505 -4
  37. package/dist/index.cjs.map +1 -1
  38. package/dist/index.d.cts +60 -6
  39. package/dist/index.d.ts +60 -6
  40. package/dist/index.js +409 -13
  41. package/dist/index.js.map +1 -1
  42. package/dist/{ledger-GA4DMJS6.js → ledger-5V67MAIL.js} +3 -3
  43. package/dist/periods/index.cjs.map +1 -1
  44. package/dist/periods/index.d.cts +2 -2
  45. package/dist/periods/index.d.ts +2 -2
  46. package/dist/periods/index.js +3 -3
  47. package/dist/{public-envelope-R4EIEQE6.js → public-envelope-DFJZHXVH.js} +3 -3
  48. package/dist/session/index.d.cts +3 -3
  49. package/dist/session/index.d.ts +3 -3
  50. package/dist/shadow/index.d.cts +2 -2
  51. package/dist/shadow/index.d.ts +2 -2
  52. package/dist/store/index.d.cts +2 -2
  53. package/dist/store/index.d.ts +2 -2
  54. package/dist/sync/index.cjs.map +1 -1
  55. package/dist/sync/index.d.cts +1 -1
  56. package/dist/sync/index.d.ts +1 -1
  57. package/dist/sync/index.js +2 -2
  58. package/dist/team/index.cjs.map +1 -1
  59. package/dist/team/index.d.cts +2 -2
  60. package/dist/team/index.d.ts +2 -2
  61. package/dist/team/index.js +4 -4
  62. package/dist/tx/index.d.cts +2 -2
  63. package/dist/tx/index.d.ts +2 -2
  64. package/dist/{types-Df72wWCC.d.ts → types-D-6bmD2c.d.ts} +378 -2
  65. package/dist/{types-BpyE4o_n.d.cts → types-D3QLmhlk.d.cts} +378 -2
  66. package/package.json +1 -1
  67. package/dist/chunk-6NPQTBZN.js.map +0 -1
  68. /package/dist/{chunk-QUDXYI4W.js.map → chunk-3WCRU7TI.js.map} +0 -0
  69. /package/dist/{chunk-H3DV46AQ.js.map → chunk-CL37QSND.js.map} +0 -0
  70. /package/dist/{chunk-LRN3PNI6.js.map → chunk-FAAWLVTF.js.map} +0 -0
  71. /package/dist/{chunk-UQQ2XFXI.js.map → chunk-GILMPJXB.js.map} +0 -0
  72. /package/dist/{chunk-MIRZMUSQ.js.map → chunk-INSJBB5W.js.map} +0 -0
  73. /package/dist/{chunk-E4OOAPBZ.js.map → chunk-KPF2HHPI.js.map} +0 -0
  74. /package/dist/{chunk-LMKOSLJY.js.map → chunk-N2LMZKLR.js.map} +0 -0
  75. /package/dist/{chunk-QV4WLLKB.js.map → chunk-NZ4XCIKS.js.map} +0 -0
  76. /package/dist/{ledger-GA4DMJS6.js.map → ledger-5V67MAIL.js.map} +0 -0
  77. /package/dist/{public-envelope-R4EIEQE6.js.map → public-envelope-DFJZHXVH.js.map} +0 -0
@@ -1,5 +1,5 @@
1
- import { at as NoydbStore, ar as UnlockedKeyring } from '../types-BpyE4o_n.cjs';
2
- export { b$ as PresenceHandle, cx as SyncEngine, cF as SyncTransaction, cZ as evaluateExportCapability, c_ as evaluateImportCapability, d0 as hasExportCapability, d1 as hasImportCapability } from '../types-BpyE4o_n.cjs';
1
+ import { at as NoydbStore, ar as UnlockedKeyring } from '../types-D3QLmhlk.cjs';
2
+ export { c2 as PresenceHandle, cA as SyncEngine, cI as SyncTransaction, d7 as evaluateExportCapability, d8 as evaluateImportCapability, da as hasExportCapability, db as hasImportCapability } from '../types-D3QLmhlk.cjs';
3
3
  import '../lazy-builder-CZVLKh0Z.cjs';
4
4
  import '../predicate-SBHmi6D0.cjs';
5
5
  import '../strategy-D-SrOLCl.cjs';
@@ -1,5 +1,5 @@
1
- import { at as NoydbStore, ar as UnlockedKeyring } from '../types-Df72wWCC.js';
2
- export { b$ as PresenceHandle, cx as SyncEngine, cF as SyncTransaction, cZ as evaluateExportCapability, c_ as evaluateImportCapability, d0 as hasExportCapability, d1 as hasImportCapability } from '../types-Df72wWCC.js';
1
+ import { at as NoydbStore, ar as UnlockedKeyring } from '../types-D-6bmD2c.js';
2
+ export { c2 as PresenceHandle, cA as SyncEngine, cI as SyncTransaction, d7 as evaluateExportCapability, d8 as evaluateImportCapability, da as hasExportCapability, db as hasImportCapability } from '../types-D-6bmD2c.js';
3
3
  import '../lazy-builder-BwEoBQZ9.js';
4
4
  import '../predicate-SBHmi6D0.js';
5
5
  import '../strategy-D-SrOLCl.js';
@@ -5,20 +5,20 @@ import {
5
5
  getCredential,
6
6
  listCredentials,
7
7
  putCredential
8
- } from "../chunk-MIRZMUSQ.js";
8
+ } from "../chunk-INSJBB5W.js";
9
9
  import {
10
10
  PresenceHandle,
11
11
  SyncEngine,
12
12
  SyncTransaction
13
- } from "../chunk-H3DV46AQ.js";
13
+ } from "../chunk-CL37QSND.js";
14
14
  import {
15
15
  evaluateExportCapability,
16
16
  evaluateImportCapability,
17
17
  hasExportCapability,
18
18
  hasImportCapability
19
- } from "../chunk-6NPQTBZN.js";
19
+ } from "../chunk-6IJQ27XN.js";
20
20
  import "../chunk-2QR2PQTT.js";
21
- import "../chunk-NXUVITPB.js";
21
+ import "../chunk-B6HF6NTZ.js";
22
22
  import "../chunk-MR4424N3.js";
23
23
  import "../chunk-ACLDOTNQ.js";
24
24
  export {
@@ -1,5 +1,5 @@
1
- import { ak as TxStrategy } from '../types-BpyE4o_n.cjs';
2
- export { al as TxCollection, am as TxContext, an as TxVault, ao as runTransaction } from '../types-BpyE4o_n.cjs';
1
+ import { ak as TxStrategy } from '../types-D3QLmhlk.cjs';
2
+ export { al as TxCollection, am as TxContext, an as TxVault, ao as runTransaction } from '../types-D3QLmhlk.cjs';
3
3
  import '../lazy-builder-CZVLKh0Z.cjs';
4
4
  import '../predicate-SBHmi6D0.cjs';
5
5
  import '../strategy-D-SrOLCl.cjs';
@@ -1,5 +1,5 @@
1
- import { ak as TxStrategy } from '../types-Df72wWCC.js';
2
- export { al as TxCollection, am as TxContext, an as TxVault, ao as runTransaction } from '../types-Df72wWCC.js';
1
+ import { ak as TxStrategy } from '../types-D-6bmD2c.js';
2
+ export { al as TxCollection, am as TxContext, an as TxVault, ao as runTransaction } from '../types-D-6bmD2c.js';
3
3
  import '../lazy-builder-BwEoBQZ9.js';
4
4
  import '../predicate-SBHmi6D0.js';
5
5
  import '../strategy-D-SrOLCl.js';
@@ -1819,6 +1819,56 @@ declare function assertStrongPassphrase(s: string, opts?: PassphrasePolicy & {
1819
1819
  */
1820
1820
  declare function estimateEntropy(passphrase: string): number;
1821
1821
 
1822
+ /**
1823
+ * Type surface for the per-principal user envelope subsystem.
1824
+ *
1825
+ * @see docs/superpowers/specs/2026-05-05-user-envelope-design.md
1826
+ *
1827
+ * @module
1828
+ */
1829
+
1830
+ /**
1831
+ * Thin reader view of a user envelope. The on-disk shape is the standard
1832
+ * {@link import('../../types.js').EncryptedEnvelope}; this is what callers
1833
+ * see after the storage layer has decrypted the payload.
1834
+ *
1835
+ * Hub commits to the `keyringId` ⇔ `userId` identity and the `_v` / `_ts`
1836
+ * envelope metadata. The `data` payload is fully app-defined — hub does
1837
+ * not introspect, validate, or reserve any keys inside it.
1838
+ */
1839
+ interface UserEnvelope<T> {
1840
+ /** The principal id this envelope belongs to. Equals the keyring `user_id`. */
1841
+ readonly keyringId: string;
1842
+ /** App-owned payload. Opaque to hub. */
1843
+ readonly data: T;
1844
+ /** Optimistic-concurrency version. Increments on every write. */
1845
+ readonly _v: number;
1846
+ /** ISO timestamp of the last write. */
1847
+ readonly _ts: string;
1848
+ }
1849
+ /**
1850
+ * Soft cap on the JSON-serialized payload size. Generous (a typical
1851
+ * profile + preferences + small app annex is ~1 KiB); rejects accidental
1852
+ * "stuff app state in here" anti-patterns.
1853
+ */
1854
+ declare const USER_ENVELOPE_MAX_BYTES: number;
1855
+ /**
1856
+ * Reserved store collection name for user envelopes. Starts with `_` so the
1857
+ * keyring grant machinery propagates the DEK to every granted user via the
1858
+ * existing system-collection DEK propagation path in `team/keyring.ts`.
1859
+ */
1860
+ declare const USER_ENVELOPE_COLLECTION = "_users";
1861
+ /**
1862
+ * Thrown when a user-envelope payload exceeds {@link USER_ENVELOPE_MAX_BYTES}
1863
+ * after JSON-serialization. The error carries the actual size so callers
1864
+ * can decide whether to trim or split.
1865
+ */
1866
+ declare class UserEnvelopeOversizedError extends NoydbError {
1867
+ readonly bytes: number;
1868
+ readonly limit: number;
1869
+ constructor(bytes: number, limit?: number);
1870
+ }
1871
+
1822
1872
  /** In-memory representation of an unlocked keyring. */
1823
1873
  interface UnlockedKeyring {
1824
1874
  readonly userId: string;
@@ -1911,6 +1961,29 @@ interface BundleRecipient {
1911
1961
  * @internal
1912
1962
  */
1913
1963
  declare function buildRecipientKeyringFile(callerKeyring: UnlockedKeyring, recipient: BundleRecipient): Promise<KeyringFile>;
1964
+ /** List all users with access to a vault. */
1965
+ declare function listUsers(adapter: NoydbStore, vault: string): Promise<UserInfo[]>;
1966
+ /**
1967
+ * Joined enumeration: every keyring + its `_users/<keyringId>`
1968
+ * envelope side by side. Convenience for admin UIs that want to
1969
+ * render team-member lists with profile data ("Bob — operator —
1970
+ * 'Bob the Auditor' avatar X locale fr-FR") in a single pass.
1971
+ *
1972
+ * `userEnvelopeDek` is the vault's `_users` collection DEK
1973
+ * (`vault.getDEK('_users')`); used to decrypt every envelope.
1974
+ *
1975
+ * Principals without a persisted envelope (legacy keyrings predating
1976
+ * the user-envelope feature) come back with `envelope: null`. The
1977
+ * caller chooses how to render — usually "fall back to keyring's
1978
+ * `displayName`".
1979
+ *
1980
+ * Order matches `listUsers()` (store-defined; sort if you need a
1981
+ * stable display order).
1982
+ */
1983
+ declare function listUsersWithEnvelopes<T = unknown>(adapter: NoydbStore, vault: string, userEnvelopeDek: CryptoKey): Promise<Array<{
1984
+ user: UserInfo;
1985
+ envelope: UserEnvelope<T> | null;
1986
+ }>>;
1914
1987
  /**
1915
1988
  * Check whether a keyring is authorised for a given `@noy-db/as-*`
1916
1989
  * export tier.
@@ -3342,7 +3415,11 @@ interface GatePolicy {
3342
3415
  * and use the same engine; the engine treats unknown names with no
3343
3416
  * configured policy as "no gate" (no-op).
3344
3417
  */
3345
- type BuiltInGateName = 'rotate-passphrase' | 'recover-passphrase' | 'enroll-authenticator' | 'remove-authenticator' | 'rotate-unlock' | 'enroll-user' | 'revoke-user' | 'export-bundle' | 'export-plaintext' | 'view-user-auth';
3418
+ type BuiltInGateName = 'rotate-passphrase' | 'recover-passphrase' | 'enroll-authenticator' | 'remove-authenticator' | 'rotate-unlock' | 'enroll-user' | 'revoke-user' | 'export-bundle' | 'export-plaintext' | 'view-user-auth'
3419
+ /** Authorize a write to one's own user envelope (#22). */
3420
+ | 'edit-own-profile'
3421
+ /** Authorize reading other principals' user envelopes (#22). */
3422
+ | 'view-team-profiles';
3346
3423
  /** Either a built-in gate name or an `app:*` custom gate. */
3347
3424
  type GateName = BuiltInGateName | `app:${string}`;
3348
3425
  /**
@@ -3627,6 +3704,28 @@ declare class Noydb {
3627
3704
  private getSyncEngine;
3628
3705
  on<K extends keyof NoydbEventMap>(event: K, handler: (data: NoydbEventMap[K]) => void): void;
3629
3706
  off<K extends keyof NoydbEventMap>(event: K, handler: (data: NoydbEventMap[K]) => void): void;
3707
+ /**
3708
+ * Soft-lock a single vault: clear its in-memory keyring, DEKs, vault
3709
+ * instance, sync engine, policy enforcer, and active-tier entry —
3710
+ * WITHOUT destroying the `Noydb` instance.
3711
+ *
3712
+ * Designed for "lock screen" UX: the user taps **Lock** and DEKs are
3713
+ * scrubbed from memory immediately, but the same `Noydb` instance can
3714
+ * be re-unlocked via {@link unlockViaAuthenticator} (tier 2) or
3715
+ * {@link unlockViaPin} (tier 3) without re-running `createNoydb`.
3716
+ *
3717
+ * **QuickUnlock state is preserved.** That's the whole point — the
3718
+ * user can still resume via PIN without a full credential re-prompt.
3719
+ * The on-disk `_meta/policy` document is also kept in cache (it
3720
+ * survives lock; nothing about it changes when DEKs are scrubbed).
3721
+ *
3722
+ * No-op when `vault` is not currently in cache (idempotent).
3723
+ *
3724
+ * Unblocks vLannaAi/niwat#33.
3725
+ *
3726
+ * @see #17
3727
+ */
3728
+ lockVault(vault: string): void;
3630
3729
  close(): void;
3631
3730
  /**
3632
3731
  * Returns a snapshot of all translator invocations since the last
@@ -3718,6 +3817,73 @@ declare class Noydb {
3718
3817
  }): Promise<void>;
3719
3818
  /** Read the slot list for a vault. Internal — `describeAuthConfig` (#13) consumes this. */
3720
3819
  listAuthenticators(vault: string): Promise<ReadonlyArray<KeyringAuthenticator>>;
3820
+ /**
3821
+ * Native WebAuthn enrollment using the **real** internal keyring (#16).
3822
+ *
3823
+ * Why this exists: when a consumer is using `createNoydb({ secret })`,
3824
+ * they cannot reach the live `UnlockedKeyring` to feed it to
3825
+ * `enrollWebAuthn(keyring, vault, opts)` from `@noy-db/on-webauthn`.
3826
+ * Constructing a synthetic keyring (the previous workaround) produces
3827
+ * a slot whose `wrapped_kek` references the synthetic payload, not
3828
+ * the live session — so `unlockViaAuthenticator()` later replaces the
3829
+ * live DEK map with stale wrapped DEKs and every decrypt fails.
3830
+ *
3831
+ * This method runs `ceremony` with the REAL keyring (still in
3832
+ * `keyringCache`). The ceremony performs the WebAuthn enrollment and
3833
+ * returns the slot options that hub then persists via the standard
3834
+ * tier-2 enrollAuthenticator path.
3835
+ *
3836
+ * Layering note: hub does not import `@noy-db/on-webauthn` (that
3837
+ * would invert the dep graph). The consumer wires it in:
3838
+ *
3839
+ * ```ts
3840
+ * import { enrollWebAuthn } from '@noy-db/on-webauthn'
3841
+ *
3842
+ * await db.enrollWebAuthn('demo', async (keyring) => {
3843
+ * const e = await enrollWebAuthn(keyring, 'demo', { rp: {...} })
3844
+ * return {
3845
+ * id: `webauthn-${e.credentialId.slice(0, 8)}`,
3846
+ * method: 'webauthn',
3847
+ * wrapped_kek: e.wrappedPayload,
3848
+ * meta: {
3849
+ * credentialId: e.credentialId,
3850
+ * wrapIv: e.wrapIv,
3851
+ * prfUsed: e.prfUsed,
3852
+ * beFlag: e.beFlag,
3853
+ * requireSingleDevice: e.requireSingleDevice,
3854
+ * },
3855
+ * }
3856
+ * })
3857
+ * ```
3858
+ *
3859
+ * Returns the WebAuthn `credentialId` (extracted from `meta.credentialId`)
3860
+ * for the caller's lookup index (a bootstrap vault, a PublicEnvelope,
3861
+ * a server-side allowlist).
3862
+ *
3863
+ * Gated by `enroll-authenticator` like `enrollAuthenticator()` itself.
3864
+ *
3865
+ * @see #16
3866
+ */
3867
+ enrollWebAuthn(vault: string, ceremony: (keyring: UnlockedKeyring) => Promise<EnrollAuthenticatorOptions>, presented?: {
3868
+ factors?: ReadonlyArray<FactorProof>;
3869
+ sharedDevice?: boolean;
3870
+ }): Promise<{
3871
+ credentialId: string;
3872
+ }>;
3873
+ /**
3874
+ * Filter the slot list to webauthn-method slots only. Useful for
3875
+ * "you have N WebAuthn credentials enrolled" UI surfaces and for
3876
+ * deciding when a new device prompt should appear. Identity is
3877
+ * `id` + `enrolled_at`; the `meta.credentialId` (base64) is used by
3878
+ * `allowCredentials` at unlock time.
3879
+ *
3880
+ * @see #16
3881
+ */
3882
+ listWebAuthnSlots(vault: string): Promise<ReadonlyArray<{
3883
+ id: string;
3884
+ enrolledAt: string;
3885
+ credentialId: string;
3886
+ }>>;
3721
3887
  /**
3722
3888
  * Resolve a slot by id, then hand the wrapped-KEK ciphertext + meta
3723
3889
  * to the caller-supplied verifier. The verifier is the
@@ -4317,6 +4483,170 @@ declare function magicLinkGrantRecordId(token: string, index: number): string;
4317
4483
  */
4318
4484
  declare function isMagicLinkGrantExpired(payload: MagicLinkGrantPayload, now?: Date): boolean;
4319
4485
 
4486
+ /**
4487
+ * Public `vault.user.*` API surface.
4488
+ *
4489
+ * Three families:
4490
+ * - Write-self: `me` / `updateMe` / `setMe` — always target the writer's
4491
+ * own keyringId. **Own-only write rule** is structural — no method
4492
+ * exists to write someone else's envelope.
4493
+ * - Read-anyone: `get` / `list` — read other principals' envelopes
4494
+ * (subject to `view-team-profiles` policy gate, wired in #22).
4495
+ * - Reactive: `subscribe` / `live` — in-process event emission on local
4496
+ * writes. Cross-instance updates land via the team/sync engine and
4497
+ * surface to subscribers when the sync diff replays through this API.
4498
+ *
4499
+ * @see docs/superpowers/specs/2026-05-05-user-envelope-design.md
4500
+ *
4501
+ * @module
4502
+ */
4503
+
4504
+ /**
4505
+ * Recursive partial. Used for `updateMe(patch)` so callers can hand in
4506
+ * deeply-nested partial shapes and have them deep-merged onto the
4507
+ * current envelope.
4508
+ */
4509
+ type DeepPartial<T> = T extends object ? {
4510
+ [P in keyof T]?: DeepPartial<T[P]>;
4511
+ } : T;
4512
+ /** Cancel a previously-registered subscription. */
4513
+ type Unsubscribe = () => void;
4514
+ /**
4515
+ * Optional factor-proof bundle threaded into gated user-envelope
4516
+ * operations. Same shape as `Noydb.checkGate(vault, gate, presented)`
4517
+ * accepts elsewhere — apps that have already presented a TOTP/email-OTP
4518
+ * for this session pass it here to satisfy tightened policies.
4519
+ */
4520
+ interface UserEnvelopePresented {
4521
+ readonly factors?: readonly FactorProof[];
4522
+ readonly sharedDevice?: boolean;
4523
+ }
4524
+ /**
4525
+ * Callback used by `UserApi` to validate the active session against a
4526
+ * policy gate. Provided by the `Vault` constructor; in production this
4527
+ * delegates to `Noydb.checkGate(vault, gate, presented)`. In tests, a
4528
+ * no-op stub is fine.
4529
+ */
4530
+ type UserEnvelopeCheckGate = (gate: 'edit-own-profile' | 'view-team-profiles', presented?: UserEnvelopePresented) => Promise<void>;
4531
+ /**
4532
+ * Reactive handle returned by `live()`. `current` is the most recently
4533
+ * observed value; `subscribe(cb)` fires on subsequent local writes.
4534
+ * `stop()` releases the underlying subscription.
4535
+ */
4536
+ interface LiveUserEnvelope<T> {
4537
+ current(): UserEnvelope<T> | null;
4538
+ subscribe(cb: (env: UserEnvelope<T> | null) => void): Unsubscribe;
4539
+ stop(): void;
4540
+ }
4541
+ /**
4542
+ * Implementation behind `vault.user`. Constructed once per Vault, holds
4543
+ * the writer's keyringId in closure so `updateMe`/`setMe` cannot target
4544
+ * any other principal — the own-only rule is enforced at the type level
4545
+ * (no `set(otherKeyringId, …)` method) AND at runtime (the
4546
+ * keyringId argument simply doesn't exist on the write path).
4547
+ */
4548
+ declare class UserApi {
4549
+ private readonly adapter;
4550
+ private readonly vaultName;
4551
+ /** The writer's own keyringId. Frozen at construction time. */
4552
+ private readonly writerKeyringId;
4553
+ private readonly getDek;
4554
+ /**
4555
+ * Policy-gate validator. When omitted, gates are skipped — useful
4556
+ * for low-level tests that exercise the storage layer directly.
4557
+ * Production paths always wire the Noydb-backed implementation.
4558
+ */
4559
+ private readonly checkGate?;
4560
+ /** keyringId → set of listeners. Wildcard '*' fires on every change. */
4561
+ private readonly listeners;
4562
+ constructor(adapter: NoydbStore, vaultName: string,
4563
+ /** The writer's own keyringId. Frozen at construction time. */
4564
+ writerKeyringId: string, getDek: () => Promise<CryptoKey>,
4565
+ /**
4566
+ * Policy-gate validator. When omitted, gates are skipped — useful
4567
+ * for low-level tests that exercise the storage layer directly.
4568
+ * Production paths always wire the Noydb-backed implementation.
4569
+ */
4570
+ checkGate?: UserEnvelopeCheckGate | undefined);
4571
+ /** Read the writer's own envelope. Returns null if never written. */
4572
+ me<T = unknown>(): Promise<UserEnvelope<T> | null>;
4573
+ /**
4574
+ * Deep-merge a partial patch into the writer's own envelope. Creates
4575
+ * the envelope on first call. Optimistic-concurrency safe — a stale
4576
+ * `_v` (parallel writer on another device) throws `ConflictError`.
4577
+ *
4578
+ * Gated by the `edit-own-profile` policy gate (default `minTier: 3`).
4579
+ * Pass `presented` to satisfy tightened policies that require a
4580
+ * factor proof (e.g. STRICT_POLICY's TOTP requirement).
4581
+ */
4582
+ updateMe<T extends object = Record<string, unknown>>(patch: DeepPartial<T>, presented?: UserEnvelopePresented): Promise<UserEnvelope<T>>;
4583
+ /**
4584
+ * Replace the writer's own envelope with `payload`. Use sparingly —
4585
+ * `updateMe` is the canonical mutation. No `expectedVersion` check;
4586
+ * callers explicitly take last-write-wins semantics.
4587
+ *
4588
+ * Gated by `edit-own-profile`. See `updateMe` for `presented` usage.
4589
+ */
4590
+ setMe<T = unknown>(payload: T, presented?: UserEnvelopePresented): Promise<UserEnvelope<T>>;
4591
+ /**
4592
+ * Read another principal's envelope by their keyringId. Returns null
4593
+ * if the principal exists but has no envelope yet, or if the
4594
+ * keyringId does not exist at all.
4595
+ *
4596
+ * Gated by `view-team-profiles` (default `minTier: 2`) — but ONLY for
4597
+ * cross-principal reads. Reading your own envelope (`keyringId ===
4598
+ * self`) is never gated; that's just `me()` written long-form.
4599
+ */
4600
+ get<T = unknown>(keyringId: string, presented?: UserEnvelopePresented): Promise<UserEnvelope<T> | null>;
4601
+ /**
4602
+ * Read every persisted envelope in the vault. Order is store-defined.
4603
+ *
4604
+ * Gated by `view-team-profiles`. Default policy (`minTier: 2`) lets
4605
+ * any authenticated session read all envelopes. Two privacy-strict
4606
+ * opt-outs:
4607
+ *
4608
+ * - `view-team-profiles.enabled: false` → list() returns only the
4609
+ * caller's own envelope (silent self-fallback, no thrown error).
4610
+ * - `view-team-profiles.minTier: 1` + insufficient tier → throws
4611
+ * `PolicyDeniedError` with `reason: 'insufficient-tier'`. The
4612
+ * caller is expected to elevate, not silently degrade.
4613
+ *
4614
+ * The asymmetry is deliberate: `enabled: false` is a deliberate
4615
+ * design choice ("nobody sees teammate profiles in this app");
4616
+ * `insufficient-tier` is "you need to authenticate further". Different
4617
+ * UX prompts for different intents.
4618
+ */
4619
+ list<T = unknown>(presented?: UserEnvelopePresented): Promise<UserEnvelope<T>[]>;
4620
+ /**
4621
+ * Listen for changes to a specific keyringId's envelope. The callback
4622
+ * fires synchronously after every successful local `updateMe` /
4623
+ * `setMe` for that principal.
4624
+ *
4625
+ * Cross-instance changes (a teammate edits their profile on their
4626
+ * device, the sync engine pulls the diff onto this device) will fire
4627
+ * subscribers when the sync layer replays the write through this API.
4628
+ * In v1, subscribers do NOT fire on raw store changes — wire your sync
4629
+ * layer to call back through `vault.user.setMe` / `updateMe` if you
4630
+ * need that.
4631
+ *
4632
+ * Pass keyringId `'*'` to fire on every change in the vault.
4633
+ */
4634
+ subscribe<T = unknown>(keyringId: string, cb: (env: UserEnvelope<T> | null) => void): Unsubscribe;
4635
+ /**
4636
+ * Reactive handle that caches the current value and re-reads on every
4637
+ * change for the given keyringId. Convenient for framework bindings:
4638
+ *
4639
+ * const live = vault.user.live<UserShape>(vault.userId)
4640
+ * live.subscribe(env => render(env?.data))
4641
+ *
4642
+ * Initial value is `null` until the first `current()` call materializes
4643
+ * it via `vault.user.get()`. Call `stop()` when done to release the
4644
+ * subscription.
4645
+ */
4646
+ live<T = unknown>(keyringId: string): LiveUserEnvelope<T>;
4647
+ private fireChange;
4648
+ }
4649
+
4320
4650
  /** A vault (tenant namespace) containing collections. */
4321
4651
  declare class Vault {
4322
4652
  private readonly adapter;
@@ -4360,6 +4690,19 @@ declare class Vault {
4360
4690
  private readonly i18nStrategy;
4361
4691
  private readonly syncStrategy;
4362
4692
  private getDEK;
4693
+ /**
4694
+ * Per-principal user envelope API.
4695
+ *
4696
+ * - Write-self: `me()`, `updateMe(patch)`, `setMe(payload)` — always
4697
+ * target this vault session's keyringId. There is no method to write
4698
+ * another principal's envelope (own-only write rule, structural).
4699
+ * - Read-anyone: `get(keyringId)`, `list()` — read other principals'
4700
+ * envelopes, subject to the `view-team-profiles` policy gate (#22).
4701
+ * - Reactive: `subscribe(id, cb)`, `live(id)` — fire on local writes.
4702
+ *
4703
+ * @see docs/superpowers/specs/2026-05-05-user-envelope-design.md
4704
+ */
4705
+ readonly user: UserApi;
4363
4706
  /**
4364
4707
  * Optional callback that re-derives an UnlockedKeyring from the
4365
4708
  * adapter using the active user's passphrase. Called by `load()`
@@ -7653,6 +7996,23 @@ interface GrantOptions {
7653
7996
  * `PassphrasePolicy`. Test fixtures and CLI scripts pass `true`.
7654
7997
  */
7655
7998
  readonly allowWeakPassphrase?: boolean;
7999
+ /**
8000
+ * Initial user-envelope payload for the new principal. Sealed under
8001
+ * the same vault DEK (the reserved `_users` collection's DEK) and
8002
+ * persisted alongside the keyring during grant.
8003
+ *
8004
+ * **Bootstrap-only.** Once the new user activates and writes their
8005
+ * own envelope, the own-only write rule kicks in — admins cannot
8006
+ * edit a teammate's envelope after activation. Use this field for
8007
+ * pre-fill at invite time (e.g. "displayName: Bob, locale: en-US")
8008
+ * and let the user take over from there.
8009
+ *
8010
+ * Hub does not introspect the payload; it is JSON-serialized and
8011
+ * encrypted opaquely. Apps own the schema.
8012
+ *
8013
+ * @see docs/superpowers/specs/2026-05-05-user-envelope-design.md → Lifecycle
8014
+ */
8015
+ readonly initialProfile?: unknown;
7656
8016
  }
7657
8017
  interface RevokeOptions {
7658
8018
  readonly userId: string;
@@ -8346,6 +8706,22 @@ interface NoydbOptions {
8346
8706
  * turn this on now.
8347
8707
  */
8348
8708
  readonly requireRecovery?: boolean;
8709
+ /**
8710
+ * What to do when `openVault` finds an existing keyring in the store that
8711
+ * cannot be decrypted with the supplied credentials (`InvalidKeyError`).
8712
+ *
8713
+ * - `'error'` (default) — propagate the error. The app must prompt the user
8714
+ * to supply the correct credentials or clear both the data and auth stores.
8715
+ * - `'reset'` — delete the stale keyring and re-initialise the vault from
8716
+ * scratch using the current credentials. Use this when the data store can
8717
+ * become detached from the auth store (e.g. the user cleared the IndexedDB
8718
+ * data records but not the keyring row, or a WebAuthn credential was rotated).
8719
+ * **All previously encrypted data is unrecoverable after a reset.**
8720
+ *
8721
+ * Only applies to the passphrase (`secret`) path. When `getKeyring` is used,
8722
+ * the callback is responsible for handling stale-keyring detection itself.
8723
+ */
8724
+ readonly onInvalidKey?: 'error' | 'reset';
8349
8725
  /**
8350
8726
  * Enable the public envelope subsystem (`docs/subsystems/public-envelope.md`).
8351
8727
  * Pass `true` for the default schema (every standard field, 256 KB
@@ -8454,4 +8830,4 @@ interface DeleteManyResult {
8454
8830
  }>;
8455
8831
  }
8456
8832
 
8457
- export { type ConsentAuditEntry as $, type BlobObject as A, type BlobStrategy as B, type BlobPutOptions as C, DICT_COLLECTION_PREFIX as D, type BlobResponseOptions as E, BlobSet as F, type BlobStrategyOpenArgs as G, type CompactRunOptions as H, type I18nStrategy as I, type CompactionContext as J, type CompactionResult as K, DEFAULT_CHUNK_SIZE as L, EXPORT_AUDIT_COLLECTION as M, ExportBlobsAbortedError as N, type ExportBlobsAuditEntry as O, PolicyEnforcer as P, type ExportBlobsHandle as Q, type ExportBlobsOptions as R, type SessionStrategy as S, type ExportedBlob as T, type SlotInfo as U, type SlotRecord as V, type VersionRecord as W, createExportBlobsHandle as X, runCompaction as Y, type ConsentStrategy as Z, CONSENT_AUDIT_COLLECTION as _, type DictEntry as a, type BundleRecipient as a$, type ConsentAuditFilter as a0, type ConsentContext as a1, type ConsentOp as a2, loadConsentEntries as a3, writeConsentEntry as a4, type PeriodsStrategy as a5, type CarryForwardContext as a6, type ClosePeriodOptions as a7, type OpenPeriodOptions as a8, PERIODS_COLLECTION as a9, type DiffEntry as aA, type JsonPatch as aB, type JsonPatchOp as aC, type LedgerEntry as aD, LedgerStore as aE, type VaultEngine as aF, VaultInstant as aG, type VerifyResult as aH, applyPatch as aI, canonicalJson as aJ, computePatch as aK, diff as aL, formatDiff as aM, hashEntry as aN, paddedIndex as aO, parseIndex as aP, sha256Hex as aQ, type PublicEnvelope as aR, type GateName as aS, type GatePolicy as aT, type VaultPolicy as aU, type ActiveTier as aV, type FactorProof as aW, Vault as aX, type AccessibleVault as aY, BUNDLE_STORE_POLICY as aZ, type BuiltInGateName as a_, type PeriodRecord as aa, type ReadOnlyCollection as ab, appendPeriodLedgerEntry as ac, assertTsWritable as ad, chainAnchor as ae, loadPeriods as af, validatePeriodName as ag, type ShadowStrategy as ah, CollectionFrame as ai, VaultFrame as aj, type TxStrategy as ak, TxCollection as al, TxContext as am, TxVault as an, runTransaction as ao, type SyncStrategy as ap, type Role as aq, type UnlockedKeyring as ar, type HistoryStrategy as as, type NoydbStore as at, type HistoryOptions as au, type EncryptedEnvelope as av, type PruneOptions as aw, type AppendInput as ax, type ChangeType as ay, CollectionInstant as az, type DictKeyDescriptor as b, PresenceHandle as b$, type CacheOptions as b0, type CacheStats as b1, type ChangeEvent as b2, Collection as b3, type CollectionChangeEvent as b4, type CollectionConflictResolver as b5, type Conflict as b6, type ConflictPolicy as b7, type ConflictStrategy as b8, type CrossTierAccessEvent as b9, type ListPageResult as bA, type LocaleReadOptions as bB, Lru as bC, type LruOptions as bD, type LruStats as bE, MAGIC_LINK_CONTENT_INFO_PREFIX as bF, MAGIC_LINK_GRANTS_COLLECTION as bG, MAGIC_LINK_KEK_INFO_PREFIX as bH, type MagicLinkGrantPayload as bI, type MagicLinkGrantRecord as bJ, NOYDB_BACKUP_VERSION as bK, NOYDB_FORMAT_VERSION as bL, NOYDB_KEYRING_VERSION as bM, NOYDB_SYNC_VERSION as bN, Noydb as bO, type NoydbBundleStore as bP, type NoydbEventMap as bQ, type NoydbOptions as bR, PUBLIC_ENVELOPE_FIELDS as bS, type PaperRecoveryDoc as bT, type PaperRecoveryEntry as bU, type PassphrasePolicy as bV, type PassphraseValidationResult as bW, type Permission as bX, type Permissions as bY, type PlaintextTranslatorContext as bZ, type PlaintextTranslatorFn as b_, DEFAULT_PUBLIC_ENVELOPE_SCHEMA as ba, DELEGATIONS_COLLECTION as bb, type DelegationToken as bc, type DeleteManyResult as bd, type DirtyEntry as be, ELEVATION_AUDIT_COLLECTION as bf, ElevatedHandle as bg, type EnrollAuthenticatorOptions as bh, type ExportCapability as bi, type ExportChunk as bj, type ExportFormat as bk, type ExportStreamOptions as bl, type FactorKind as bm, type FactorRequirement as bn, type GhostRecord as bo, type GrantOptions as bp, type HistoryConfig as bq, type HistoryEntry as br, INDEXED_STORE_POLICY as bs, type ImportCapability as bt, type InferOutput as bu, type IssueDelegationOptions as bv, type IssueMagicLinkGrantOptions as bw, type KeyringAuthenticator as bx, type KeyringFile as by, type ListAccessibleVaultsOptions as bz, DictionaryHandle as c, findAuthenticator as c$, type PresencePeer as c0, type PublicEnvelopeField as c1, type PublicEnvelopeSchema as c2, type PublicEnvelopeText as c3, type PullMode as c4, type PullOptions as c5, type PullPolicy as c6, type PullResult as c7, type PushMode as c8, type PushOptions as c9, SyncScheduler as cA, type SyncSchedulerStatus as cB, type SyncStatus as cC, type SyncTarget as cD, type SyncTargetRole as cE, SyncTransaction as cF, type SyncTransactionResult as cG, type TierMode as cH, type TranslatorAuditEntry as cI, type TxOp as cJ, type UserInfo as cK, type VaultBackup as cL, type VaultPolicyOnDisk as cM, type VaultSnapshot as cN, type WarningRules as cO, WeakPassphraseError as cP, type WeakPassphraseReason as cQ, assertStrongPassphrase as cR, buildRecipientKeyringFile as cS, burnPaperRecoveryEntry as cT, createNoydb as cU, createStore as cV, deriveMagicLinkContentKey as cW, enrollAuthenticator as cX, estimateEntropy as cY, evaluateExportCapability as cZ, evaluateImportCapability as c_, type PushPolicy as ca, type PushResult as cb, type PutManyItemOptions as cc, type PutManyOptions as cd, type PutManyResult as ce, type QueryAcrossOptions as cf, type QueryAcrossResult as cg, type QuickUnlockState as ch, QuickUnlockStore as ci, type ReAuthOperation as cj, type RecoverPassphraseInput as ck, type RecoveryProof as cl, type ResolvedPublicEnvelopeSchema as cm, type RevokeOptions as cn, type RotatePassphraseInput as co, type SessionPolicy as cp, type SetPublicEnvelopeInput as cq, type StandardSchemaV1 as cr, type StandardSchemaV1Issue as cs, type StandardSchemaV1SyncResult as ct, type StoreAuth as cu, type StoreAuthKind as cv, type StoreCapabilities as cw, SyncEngine as cx, type SyncMetadata as cy, type SyncPolicy as cz, type DictionaryOptions as d, hasExportCapability as d0, hasImportCapability as d1, hasRecoveryEnrolled as d2, isMagicLinkGrantExpired as d3, isPublicEnvelope as d4, issueDelegation as d5, recoverPassphrase as d6, rotatePassphrase as d7, listMagicLinkGrants as d8, loadActiveDelegations as d9, loadPaperRecoveryEntries as da, magicLinkGrantRecordId as db, readMagicLinkGrantRecord as dc, removeAuthenticator as dd, resolveSchema as de, revokeDelegation as df, revokeMagicLinkGrant as dg, savePaperRecoveryEntries as dh, unwrapMagicLinkGrant as di, validatePassphrase as dj, validatePublicEnvelopeInput as dk, validateSchemaInput as dl, validateSchemaOutput as dm, writeMagicLinkGrant as dn, type I18nTextDescriptor as e, type I18nTextOptions as f, applyI18nLocale as g, dictCollectionName as h, dictKey as i, i18nText as j, isDictCollectionName as k, isDictKeyDescriptor as l, isI18nTextDescriptor as m, createEnforcer as n, validateSessionPolicy as o, BLOB_CHUNKS_COLLECTION as p, BLOB_COLLECTION as q, resolveI18nText as r, BLOB_EVICTION_AUDIT_COLLECTION as s, BLOB_INDEX_COLLECTION as t, BLOB_SLOTS_PREFIX as u, validateI18nTextValue as v, BLOB_VERSIONS_PREFIX as w, type BlobEvictionEntry as x, type BlobFieldPolicy as y, type BlobFieldsConfig as z };
8833
+ export { type ConsentAuditEntry as $, type BlobObject as A, type BlobStrategy as B, type BlobPutOptions as C, DICT_COLLECTION_PREFIX as D, type BlobResponseOptions as E, BlobSet as F, type BlobStrategyOpenArgs as G, type CompactRunOptions as H, type I18nStrategy as I, type CompactionContext as J, type CompactionResult as K, DEFAULT_CHUNK_SIZE as L, EXPORT_AUDIT_COLLECTION as M, ExportBlobsAbortedError as N, type ExportBlobsAuditEntry as O, PolicyEnforcer as P, type ExportBlobsHandle as Q, type ExportBlobsOptions as R, type SessionStrategy as S, type ExportedBlob as T, type SlotInfo as U, type SlotRecord as V, type VersionRecord as W, createExportBlobsHandle as X, runCompaction as Y, type ConsentStrategy as Z, CONSENT_AUDIT_COLLECTION as _, type DictEntry as a, type BuiltInGateName as a$, type ConsentAuditFilter as a0, type ConsentContext as a1, type ConsentOp as a2, loadConsentEntries as a3, writeConsentEntry as a4, type PeriodsStrategy as a5, type CarryForwardContext as a6, type ClosePeriodOptions as a7, type OpenPeriodOptions as a8, PERIODS_COLLECTION as a9, type DiffEntry as aA, type JsonPatch as aB, type JsonPatchOp as aC, type LedgerEntry as aD, LedgerStore as aE, type VaultEngine as aF, VaultInstant as aG, type VerifyResult as aH, applyPatch as aI, canonicalJson as aJ, computePatch as aK, diff as aL, formatDiff as aM, hashEntry as aN, paddedIndex as aO, parseIndex as aP, sha256Hex as aQ, type UserEnvelope as aR, type PublicEnvelope as aS, type GateName as aT, type GatePolicy as aU, type VaultPolicy as aV, type ActiveTier as aW, type FactorProof as aX, Vault as aY, type AccessibleVault as aZ, BUNDLE_STORE_POLICY as a_, type PeriodRecord as aa, type ReadOnlyCollection as ab, appendPeriodLedgerEntry as ac, assertTsWritable as ad, chainAnchor as ae, loadPeriods as af, validatePeriodName as ag, type ShadowStrategy as ah, CollectionFrame as ai, VaultFrame as aj, type TxStrategy as ak, TxCollection as al, TxContext as am, TxVault as an, runTransaction as ao, type SyncStrategy as ap, type Role as aq, type UnlockedKeyring as ar, type HistoryStrategy as as, type NoydbStore as at, type HistoryOptions as au, type EncryptedEnvelope as av, type PruneOptions as aw, type AppendInput as ax, type ChangeType as ay, CollectionInstant as az, type DictKeyDescriptor as b, type Permissions as b$, type BundleRecipient as b0, type CacheOptions as b1, type CacheStats as b2, type ChangeEvent as b3, Collection as b4, type CollectionChangeEvent as b5, type CollectionConflictResolver as b6, type Conflict as b7, type ConflictPolicy as b8, type ConflictStrategy as b9, type KeyringFile as bA, type ListAccessibleVaultsOptions as bB, type ListPageResult as bC, type LiveUserEnvelope as bD, type LocaleReadOptions as bE, Lru as bF, type LruOptions as bG, type LruStats as bH, MAGIC_LINK_CONTENT_INFO_PREFIX as bI, MAGIC_LINK_GRANTS_COLLECTION as bJ, MAGIC_LINK_KEK_INFO_PREFIX as bK, type MagicLinkGrantPayload as bL, type MagicLinkGrantRecord as bM, NOYDB_BACKUP_VERSION as bN, NOYDB_FORMAT_VERSION as bO, NOYDB_KEYRING_VERSION as bP, NOYDB_SYNC_VERSION as bQ, Noydb as bR, type NoydbBundleStore as bS, type NoydbEventMap as bT, type NoydbOptions as bU, PUBLIC_ENVELOPE_FIELDS as bV, type PaperRecoveryDoc as bW, type PaperRecoveryEntry as bX, type PassphrasePolicy as bY, type PassphraseValidationResult as bZ, type Permission as b_, type CrossTierAccessEvent as ba, DEFAULT_PUBLIC_ENVELOPE_SCHEMA as bb, DELEGATIONS_COLLECTION as bc, type DeepPartial as bd, type DelegationToken as be, type DeleteManyResult as bf, type DirtyEntry as bg, ELEVATION_AUDIT_COLLECTION as bh, ElevatedHandle as bi, type EnrollAuthenticatorOptions as bj, type ExportCapability as bk, type ExportChunk as bl, type ExportFormat as bm, type ExportStreamOptions as bn, type FactorKind as bo, type FactorRequirement as bp, type GhostRecord as bq, type GrantOptions as br, type HistoryConfig as bs, type HistoryEntry as bt, INDEXED_STORE_POLICY as bu, type ImportCapability as bv, type InferOutput as bw, type IssueDelegationOptions as bx, type IssueMagicLinkGrantOptions as by, type KeyringAuthenticator as bz, DictionaryHandle as c, assertStrongPassphrase as c$, type PlaintextTranslatorContext as c0, type PlaintextTranslatorFn as c1, PresenceHandle as c2, type PresencePeer as c3, type PublicEnvelopeField as c4, type PublicEnvelopeSchema as c5, type PublicEnvelopeText as c6, type PullMode as c7, type PullOptions as c8, type PullPolicy as c9, SyncEngine as cA, type SyncMetadata as cB, type SyncPolicy as cC, SyncScheduler as cD, type SyncSchedulerStatus as cE, type SyncStatus as cF, type SyncTarget as cG, type SyncTargetRole as cH, SyncTransaction as cI, type SyncTransactionResult as cJ, type TierMode as cK, type TranslatorAuditEntry as cL, type TxOp as cM, USER_ENVELOPE_COLLECTION as cN, USER_ENVELOPE_MAX_BYTES as cO, type Unsubscribe as cP, UserApi as cQ, type UserEnvelopeCheckGate as cR, UserEnvelopeOversizedError as cS, type UserEnvelopePresented as cT, type UserInfo as cU, type VaultBackup as cV, type VaultPolicyOnDisk as cW, type VaultSnapshot as cX, type WarningRules as cY, WeakPassphraseError as cZ, type WeakPassphraseReason as c_, type PullResult as ca, type PushMode as cb, type PushOptions as cc, type PushPolicy as cd, type PushResult as ce, type PutManyItemOptions as cf, type PutManyOptions as cg, type PutManyResult as ch, type QueryAcrossOptions as ci, type QueryAcrossResult as cj, type QuickUnlockState as ck, QuickUnlockStore as cl, type ReAuthOperation as cm, type RecoverPassphraseInput as cn, type RecoveryProof as co, type ResolvedPublicEnvelopeSchema as cp, type RevokeOptions as cq, type RotatePassphraseInput as cr, type SessionPolicy as cs, type SetPublicEnvelopeInput as ct, type StandardSchemaV1 as cu, type StandardSchemaV1Issue as cv, type StandardSchemaV1SyncResult as cw, type StoreAuth as cx, type StoreAuthKind as cy, type StoreCapabilities as cz, type DictionaryOptions as d, buildRecipientKeyringFile as d0, burnPaperRecoveryEntry as d1, createNoydb as d2, createStore as d3, deriveMagicLinkContentKey as d4, enrollAuthenticator as d5, estimateEntropy as d6, evaluateExportCapability as d7, evaluateImportCapability as d8, findAuthenticator as d9, writeMagicLinkGrant as dA, hasExportCapability as da, hasImportCapability as db, hasRecoveryEnrolled as dc, isMagicLinkGrantExpired as dd, isPublicEnvelope as de, issueDelegation as df, recoverPassphrase as dg, rotatePassphrase as dh, listMagicLinkGrants as di, listUsers as dj, listUsersWithEnvelopes as dk, loadActiveDelegations as dl, loadPaperRecoveryEntries as dm, magicLinkGrantRecordId as dn, readMagicLinkGrantRecord as dp, removeAuthenticator as dq, resolveSchema as dr, revokeDelegation as ds, revokeMagicLinkGrant as dt, savePaperRecoveryEntries as du, unwrapMagicLinkGrant as dv, validatePassphrase as dw, validatePublicEnvelopeInput as dx, validateSchemaInput as dy, validateSchemaOutput as dz, type I18nTextDescriptor as e, type I18nTextOptions as f, applyI18nLocale as g, dictCollectionName as h, dictKey as i, i18nText as j, isDictCollectionName as k, isDictKeyDescriptor as l, isI18nTextDescriptor as m, createEnforcer as n, validateSessionPolicy as o, BLOB_CHUNKS_COLLECTION as p, BLOB_COLLECTION as q, resolveI18nText as r, BLOB_EVICTION_AUDIT_COLLECTION as s, BLOB_INDEX_COLLECTION as t, BLOB_SLOTS_PREFIX as u, validateI18nTextValue as v, BLOB_VERSIONS_PREFIX as w, type BlobEvictionEntry as x, type BlobFieldPolicy as y, type BlobFieldsConfig as z };