@dotrino/remote-agent 0.12.0 → 0.12.1
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 +4 -4
- package/src/client.js +2 -1
- package/src/discover.js +5 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dotrino/remote-agent",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.1",
|
|
4
4
|
"description": "Middleware compartido del ecosistema Dotrino para apps de agente remoto cifrado punto a punto (handshake E2E, emparejamiento SAS con vault, revocación, descubrimiento). Lo consumen dotrino-terminal (PTY) y dotrino-ia (chat con IA).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"@dotrino/vault": ">=0.64.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@dotrino/identity": "0.
|
|
55
|
-
"@dotrino/proxy-client": "0.
|
|
56
|
-
"@dotrino/vault": "0.
|
|
54
|
+
"@dotrino/identity": "0.105.0",
|
|
55
|
+
"@dotrino/proxy-client": "0.25.0",
|
|
56
|
+
"@dotrino/vault": "0.75.0"
|
|
57
57
|
}
|
|
58
58
|
}
|
package/src/client.js
CHANGED
|
@@ -169,7 +169,8 @@ export class RemoteAgentClient {
|
|
|
169
169
|
})
|
|
170
170
|
setTimeout(() => { off(); resolve(false) }, timeoutMs)
|
|
171
171
|
})
|
|
172
|
-
|
|
172
|
+
// Efímero, como `probeAgents`: si no está, no se encola ni se le timbra.
|
|
173
|
+
this.client.sendByPubkey(this.agentPubkey, { type: PING, n }, { ephemeral: true })
|
|
173
174
|
return got
|
|
174
175
|
}
|
|
175
176
|
|
package/src/discover.js
CHANGED
|
@@ -73,7 +73,11 @@ export function probeAgents (client, subs, { timeoutMs = 3000 } = {}) {
|
|
|
73
73
|
for (const sub of subs) {
|
|
74
74
|
const n = [...crypto.getRandomValues(new Uint8Array(8))].map((x) => x.toString(16).padStart(2, '0')).join('')
|
|
75
75
|
bySub.set(n, sub)
|
|
76
|
-
|
|
76
|
+
// EFÍMERO: una pregunta de «¿estás ahí?» solo vale en vivo. Sin esto el proxio la
|
|
77
|
+
// ENCOLABA para quien no estaba conectado y le tocaba el timbre: la app preguntaba a
|
|
78
|
+
// todos los aparatos de la cuenta y el teléfono sonaba cada minuto sin ningún pedido
|
|
79
|
+
// detrás (2026-09-30). Quien no contesta ahora, no está; eso es la respuesta.
|
|
80
|
+
try { client.sendByPubkey(sub, { type: PING, n }, { ephemeral: true }) } catch (_) {}
|
|
77
81
|
}
|
|
78
82
|
setTimeout(() => { try { off() } catch (_) {} resolve(found) }, timeoutMs)
|
|
79
83
|
})
|