@dotrino/remote-agent 0.4.0 → 0.4.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/node-globals.js +19 -2
- package/package.json +2 -2
package/node-globals.js
CHANGED
|
@@ -34,7 +34,24 @@ let _installed = false
|
|
|
34
34
|
export function installNodeGlobals (dir) {
|
|
35
35
|
if (_installed) return
|
|
36
36
|
if (typeof globalThis.WebSocket === 'undefined') globalThis.WebSocket = WebSocket
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
|
|
38
|
+
// Node ≥22 expone un `localStorage` NO funcional sin `--localstorage-file`, así
|
|
39
|
+
// que aquí se pone el shim de archivo igual. Pero se pone con `defineProperty` y
|
|
40
|
+
// NO asignando:
|
|
41
|
+
//
|
|
42
|
+
// · lo que Node define es un ACCESOR (getter/setter nativos), y asignarle
|
|
43
|
+
// revienta con «Cannot assign to read only property 'localStorage'» — medido
|
|
44
|
+
// en Node 25.9. Con la asignación, cualquier agente headless dejaba de
|
|
45
|
+
// arrancar su plano de control en un Node moderno, y el mensaje no decía nada
|
|
46
|
+
// de esto;
|
|
47
|
+
// · el descriptor tampoco se LEE (nada de `globalThis.localStorage`): tocar el
|
|
48
|
+
// getter nativo sin el flag emite un warning por consola.
|
|
49
|
+
//
|
|
50
|
+
// Es lo mismo que hace `@dotrino/vault`, que ya se topó con esto.
|
|
51
|
+
Object.defineProperty(globalThis, 'localStorage', {
|
|
52
|
+
configurable: true,
|
|
53
|
+
writable: true,
|
|
54
|
+
value: fileLocalStorage(path.join(dir, 'transport.json'))
|
|
55
|
+
})
|
|
39
56
|
_installed = true
|
|
40
57
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dotrino/remote-agent",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.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",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"src"
|
|
20
20
|
],
|
|
21
21
|
"scripts": {
|
|
22
|
-
"test": "node
|
|
22
|
+
"test": "node --test 'test/**/*.test.js'",
|
|
23
23
|
"type-check": "tsc --noEmit"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|