@dotrino/vaultd 0.19.0 → 0.21.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dotrino/vaultd",
3
- "version": "0.19.0",
3
+ "version": "0.21.0",
4
4
  "type": "module",
5
5
  "description": "Certificador personal de Dotrino: daemon headless que custodia la clave maestra y delega capacidades a tus dispositivos por el proxy. Tu CA propia.",
6
6
  "bin": {
@@ -19,7 +19,7 @@
19
19
  "node": ">=20"
20
20
  },
21
21
  "dependencies": {
22
- "@dotrino/identity": "^0.39.0",
22
+ "@dotrino/identity": "^0.41.0",
23
23
  "@dotrino/proxy-client": "^0.10.0",
24
24
  "ws": "^8.18.0"
25
25
  },
package/src/ctl.js CHANGED
@@ -329,7 +329,7 @@ async function cmdMembers () {
329
329
  for (const m of acta.members) {
330
330
  const quien = m.label || m.id
331
331
  const marcas = [
332
- m.isMaster ? `${B}manda${Z}` : null,
332
+ m.isMaster ? `${B}Master${Z}` : null,
333
333
  m.isMe ? 'este dispositivo' : null,
334
334
  m.cn ? `servicio «${m.cn}»` : null
335
335
  ].filter(Boolean)
package/src/tui/i18n.js CHANGED
@@ -242,7 +242,7 @@ const es = {
242
242
  errNotApplied: 'El daemon no aplicó el cambio (revisa los logs del servicio).',
243
243
  errNotDeleted: 'El daemon no borró la variable (revisa los logs del servicio).',
244
244
  errPairFailed: 'El daemon no inició el emparejamiento.',
245
- errMasterWithMembers: 'Esta cuenta la manda esta bóveda y tiene otros dispositivos: pásale primero el mando a uno que esté conectado. Si la borras así, se quedan con su llave y sin nadie que pueda volver a firmar el acta.'
245
+ errMasterWithMembers: 'Esta bóveda es el Master de esta cuenta y hay otros dispositivos: pásale primero el Master a uno que esté conectado. Si la borras así, se quedan con su llave y sin nadie que pueda volver a firmar el acta.'
246
246
  }
247
247
 
248
248
  // ---------------------------------- inglés ----------------------------------
@@ -451,7 +451,7 @@ const en = {
451
451
  errNotApplied: 'The daemon did not apply the change (check the service logs).',
452
452
  errNotDeleted: 'The daemon did not delete the variable (check the service logs).',
453
453
  errPairFailed: 'The daemon did not start the pairing.',
454
- errMasterWithMembers: 'This vault is in charge of this account and it has other devices: hand the lead over to one that is online first. If you delete it like this, they keep their key with nobody able to sign the record again.'
454
+ errMasterWithMembers: 'This vault is the Master of this account and it has other devices: hand the Master over to one that is online first. If you delete it like this, they keep their key with nobody able to sign the record again.'
455
455
  }
456
456
 
457
457
  // --------------------------- selección y persistencia -----------------------
package/src/vault.js CHANGED
@@ -229,9 +229,16 @@ export async function startVault ({ dir = dataDir(), proxyUrl, log = console.log
229
229
  // que falta (ventana de retención, §1.3) para que compruebe el encadenamiento en vez
230
230
  // de tragarse un salto a ciegas. Si se salió de la ventana, llega vacía y toca
231
231
  // re-emparejar — que es justo lo que debe pasar.
232
- const chain = typeof p.data?.sinceSeq === 'number'
233
- ? (await identity.actaHistory({ sinceSeq: p.data.sinceSeq }).catch(() => null))?.chain || null
234
- : null
232
+ // El `.catch()` de antes NO protegía de nada: si `actaHistory` no existe, el
233
+ // TypeError es SÍNCRONO y salta antes de que haya promesa que encadenar. Pasó: el
234
+ // método vivía en el núcleo pero no en el envoltorio de Node, así que esta línea
235
+ // tiraba toda la respuesta y ningún navegador ya emparejado —que manda `sinceSeq`
236
+ // siempre— volvía a sincronizar su acta. Un try/catch de verdad, y opcional.
237
+ let chain = null
238
+ if (typeof p.data?.sinceSeq === 'number') {
239
+ try { chain = (await identity.actaHistory?.({ sinceSeq: p.data.sinceSeq }))?.chain || null }
240
+ catch (e) { log('[vault] could not build the record chain:', e.message) }
241
+ }
235
242
  // `sub` (pubkey completa) va incluida: es la DIRECCIÓN de cada dispositivo en el
236
243
  // proxy → permite a las apps AUTODESCUBRIR tus máquinas (p. ej. la terminal
237
244
  // lista tus agentes sin pegar nada). Solo la ve quien presenta un cert tuyo válido.