@glyphteck/veyl 0.65.1 → 0.65.2

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.js CHANGED
@@ -39612,14 +39612,19 @@ function openAccount(options = {}) {
39612
39612
  return;
39613
39613
  const startedAt = Date.now();
39614
39614
  diag?.("vault.cloud.listen.start", {});
39615
- const unsubscribe = cloud.user.vault.watch(uid, (vault) => {
39615
+ const unsubscribe = cloud.user.vault.watch(uid, (vault, info = {}) => {
39616
39616
  if (state.uid !== uid)
39617
39617
  return;
39618
39618
  diag?.("vault.cloud.snapshot", {
39619
39619
  elapsedMs: Date.now() - startedAt,
39620
- hasVault: !!vault
39620
+ hasVault: !!vault,
39621
+ fromCache: !!info.fromCache
39622
+ });
39623
+ emit2({
39624
+ vault: vault || null,
39625
+ vaultReady: state.vaultReady || !info.fromCache,
39626
+ vaultError: null
39621
39627
  });
39622
- emit2({ vault: vault || null, vaultReady: true, vaultError: null });
39623
39628
  }, (error) => {
39624
39629
  if (state.uid !== uid)
39625
39630
  return;
package/dist/cli.js CHANGED
@@ -43598,14 +43598,19 @@ function openAccount(options = {}) {
43598
43598
  return;
43599
43599
  const startedAt = Date.now();
43600
43600
  diag?.("vault.cloud.listen.start", {});
43601
- const unsubscribe = cloud.user.vault.watch(uid, (vault) => {
43601
+ const unsubscribe = cloud.user.vault.watch(uid, (vault, info = {}) => {
43602
43602
  if (state.uid !== uid)
43603
43603
  return;
43604
43604
  diag?.("vault.cloud.snapshot", {
43605
43605
  elapsedMs: Date.now() - startedAt,
43606
- hasVault: !!vault
43606
+ hasVault: !!vault,
43607
+ fromCache: !!info.fromCache
43608
+ });
43609
+ emit2({
43610
+ vault: vault || null,
43611
+ vaultReady: state.vaultReady || !info.fromCache,
43612
+ vaultError: null
43607
43613
  });
43608
- emit2({ vault: vault || null, vaultReady: true, vaultError: null });
43609
43614
  }, (error) => {
43610
43615
  if (state.uid !== uid)
43611
43616
  return;
@@ -54062,7 +54067,7 @@ var package_default;
54062
54067
  var init_package2 = __esm(() => {
54063
54068
  package_default = {
54064
54069
  name: "veyl",
54065
- version: "0.65.1",
54070
+ version: "0.65.2",
54066
54071
  packageManager: "bun@1.4.0",
54067
54072
  private: true,
54068
54073
  license: "UNLICENSED",
@@ -188179,8 +188184,12 @@ function createFirebaseCloud({ db, auth: auth2, getAuth: getAuth2, functions: fu
188179
188184
  }
188180
188185
  function watchVault(uid, onUpdate, onError) {
188181
188186
  requireUid(uid);
188182
- return onSnapshot(doc(db, "seeds", uid), (snap) => {
188183
- onUpdate?.(readCloudBytes(snap.data()?.es ?? null, "vault bytes"), { exists: snap.exists() });
188187
+ return onSnapshot(doc(db, "seeds", uid), { includeMetadataChanges: true }, (snap) => {
188188
+ onUpdate?.(readCloudBytes(snap.data()?.es ?? null, "vault bytes"), {
188189
+ exists: snap.exists(),
188190
+ fromCache: snap.metadata.fromCache,
188191
+ pending: snap.metadata.hasPendingWrites
188192
+ });
188184
188193
  }, onError);
188185
188194
  }
188186
188195
  async function acceptAgreement(uid, agreement) {
package/dist/index.js CHANGED
@@ -43597,14 +43597,19 @@ function openAccount(options = {}) {
43597
43597
  return;
43598
43598
  const startedAt = Date.now();
43599
43599
  diag?.("vault.cloud.listen.start", {});
43600
- const unsubscribe = cloud.user.vault.watch(uid, (vault) => {
43600
+ const unsubscribe = cloud.user.vault.watch(uid, (vault, info = {}) => {
43601
43601
  if (state.uid !== uid)
43602
43602
  return;
43603
43603
  diag?.("vault.cloud.snapshot", {
43604
43604
  elapsedMs: Date.now() - startedAt,
43605
- hasVault: !!vault
43605
+ hasVault: !!vault,
43606
+ fromCache: !!info.fromCache
43607
+ });
43608
+ emit2({
43609
+ vault: vault || null,
43610
+ vaultReady: state.vaultReady || !info.fromCache,
43611
+ vaultError: null
43606
43612
  });
43607
- emit2({ vault: vault || null, vaultReady: true, vaultError: null });
43608
43613
  }, (error) => {
43609
43614
  if (state.uid !== uid)
43610
43615
  return;
@@ -54061,7 +54066,7 @@ var package_default;
54061
54066
  var init_package2 = __esm(() => {
54062
54067
  package_default = {
54063
54068
  name: "veyl",
54064
- version: "0.65.1",
54069
+ version: "0.65.2",
54065
54070
  packageManager: "bun@1.4.0",
54066
54071
  private: true,
54067
54072
  license: "UNLICENSED",
@@ -188178,8 +188183,12 @@ function createFirebaseCloud({ db, auth: auth2, getAuth: getAuth2, functions: fu
188178
188183
  }
188179
188184
  function watchVault(uid, onUpdate, onError) {
188180
188185
  requireUid(uid);
188181
- return onSnapshot(doc(db, "seeds", uid), (snap) => {
188182
- onUpdate?.(readCloudBytes(snap.data()?.es ?? null, "vault bytes"), { exists: snap.exists() });
188186
+ return onSnapshot(doc(db, "seeds", uid), { includeMetadataChanges: true }, (snap) => {
188187
+ onUpdate?.(readCloudBytes(snap.data()?.es ?? null, "vault bytes"), {
188188
+ exists: snap.exists(),
188189
+ fromCache: snap.metadata.fromCache,
188190
+ pending: snap.metadata.hasPendingWrites
188191
+ });
188183
188192
  }, onError);
188184
188193
  }
188185
188194
  async function acceptAgreement(uid, agreement) {
package/docs/api.md CHANGED
@@ -154,7 +154,7 @@ unsubscribe();
154
154
  await account.close();
155
155
  ```
156
156
 
157
- `openAccount()` owns authenticated user observation, username and avatar publication, vault observation and creation, vault unlock/lock, encrypted settings/network selection, presence, late wallet readiness, public Bitcoin data, support/report commands, chat and peer/profile composition, account switching, and secret-bearing session teardown. Focused-chat presence is separately owned by the chat session's encrypted ephemeral live transport. The account snapshot exposes `user`, `vault`, `vaultReady`, `vaultError`, `session`, `wallet`, `walletError`, `network`, and `lockState`; stable domain owners such as `bitcoin` and `support` live directly on the returned account owner. Graphical password-change flows call `verifyVaultPasswordForChange(currentPassword)` before revealing the new-password step, then call the atomic `changeVaultPassword({ currentPassword, newPassword })` command. Both are account-bound local decryptions; the first immediately clears its temporary seed, while the second preserves and verifies the existing Vault Signature identity before replacing the authoritative ciphertext.
157
+ `openAccount()` owns authenticated user observation, username and avatar publication, vault observation and creation, vault unlock/lock, encrypted settings/network selection, presence, late wallet readiness, public Bitcoin data, support/report commands, chat and peer/profile composition, account switching, and secret-bearing session teardown. Focused-chat presence is separately owned by the chat session's encrypted ephemeral live transport. The account snapshot exposes `user`, `vault`, `vaultReady`, `vaultError`, `session`, `wallet`, `walletError`, `network`, and `lockState`; `vaultReady` becomes true only after the backend authorizes and confirms the current vault snapshot, while a cached snapshot may warm `vault` without authorizing a guarded route. Stable domain owners such as `bitcoin` and `support` live directly on the returned account owner. Graphical password-change flows call `verifyVaultPasswordForChange(currentPassword)` before revealing the new-password step, then call the atomic `changeVaultPassword({ currentPassword, newPassword })` command. Both are account-bound local decryptions; the first immediately clears its temporary seed, while the second preserves and verifies the existing Vault Signature identity before replacing the authoritative ciphertext.
158
158
 
159
159
  `account.profile` owns the server mutation after a platform has prepared avatar bytes or collected a username. Browser canvas work and native image manipulation remain platform-local; both then call the same `setAvatar`, `clearAvatar`, or `setUsername` command. Successful avatar commands update the shared user owner before returning.
160
160
 
package/package.json CHANGED
@@ -42,5 +42,5 @@
42
42
  "start": "node src/cli.js",
43
43
  "lint": "eslint src --quiet"
44
44
  },
45
- "version": "0.65.1"
45
+ "version": "0.65.2"
46
46
  }