@dotrino/remote-agent 0.33.1 → 0.34.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/README.md CHANGED
@@ -23,6 +23,11 @@ Provee lo común — y **solo** eso:
23
23
  - **Autodescubrimiento** de agentes por label (`listVaultDevices` + filtro).
24
24
  - **Auditoría** (`sessions.log` JSONL).
25
25
 
26
+ - **Mensajes grandes**: la sesión saluda al pilar en las dos puntas (`helloTo`), y con
27
+ `@dotrino/proxy-client` ≥ 0.49.0 en las dos lo que no cabe en un mensaje del camino sale en
28
+ partes y llega entero y en orden. La app manda objetos enteros y no trocea nada. Con una punta
29
+ más vieja (las apps nativas, todavía) va entero, como antes (0.34.0).
30
+
26
31
  **No sabe nada de PTY ni de IA.** Cada app define sus payloads de dominio
27
32
  (terminal pasa `{type:'cmd',...}`, ia pasa `{type:'msg',...}`) y su renderer.
28
33
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dotrino/remote-agent",
3
- "version": "0.33.1",
3
+ "version": "0.34.0",
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",
@@ -81,7 +81,7 @@
81
81
  },
82
82
  "devDependencies": {
83
83
  "@dotrino/identity": "0.136.0",
84
- "@dotrino/proxy-client": "0.47.0",
84
+ "@dotrino/proxy-client": "0.49.0",
85
85
  "@dotrino/vault": "0.115.0",
86
86
  "@types/node": "22.20.1",
87
87
  "@types/ws": "8.18.1",
package/src/agent.js CHANGED
@@ -552,6 +552,11 @@ export async function startRemoteAgent (opts = {}) {
552
552
  sessions.set(sid, session)
553
553
  audit('session-open', { sid: sid.slice(0, 8), device: (await pubkeyId(chk.device)).slice(0, 8).toUpperCase() })
554
554
  send(from, { type: ACK, sid, ack, signature: ackSig, cert: link.cert })
555
+ // EL SALUDO DEL PILAR: le dice a la otra punta qué entiende este cliente del transporte, y
556
+ // ella contesta con lo suyo. Con eso el pilar trocea lo grande que se manda por la sesión
557
+ // (proxy-client ≥ 0.49.0, `parts`) solo si la otra punta sabe rearmarlo. No bloquea: si no
558
+ // se puede saludar, todo va entero como antes.
559
+ try { client.helloTo(from) } catch (_) {}
555
560
  if (!opts.quiet) console.log(`[remote-agent] session ${sid.slice(0, 8)} authorized (device ${chk.device?.slice?.(0, 8) || '?'})`)
556
561
  if (opts.onSession) { try { opts.onSession(session) } catch (e) { if (!opts.quiet) console.error('[remote-agent] onSession:', /** @type {Error} */ (e).message) } }
557
562
  }
package/src/client.js CHANGED
@@ -239,6 +239,9 @@ export class RemoteAgentClient {
239
239
  const res = await acked
240
240
  try { await this._checkAck(res, eph) } catch (e) { if (res.from) this._directPeers.delete(res.from); throw e }
241
241
  this.agentToken = res.from || null
242
+ // El saludo del pilar (ver agent.js): con él, lo grande de la sesión sale en partes hacia
243
+ // un agente que las rearma (proxy-client ≥ 0.49.0). Sin él, entero como antes.
244
+ if (this.agentToken) { try { client.helloTo(this.agentToken) } catch (_) {} }
242
245
  }
243
246
 
244
247
  /**