@deinossrl/dgp-agent 1.4.16 → 1.4.17
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/index.mjs +4 -3
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -203,7 +203,7 @@ async function fetchPlatformConfig() {
|
|
|
203
203
|
let platformConfig = null;
|
|
204
204
|
|
|
205
205
|
// Versión del agente
|
|
206
|
-
const AGENT_VERSION = '1.4.
|
|
206
|
+
const AGENT_VERSION = '1.4.17';
|
|
207
207
|
let AGENT_MODE = 'smart'; // Siempre inteligente
|
|
208
208
|
|
|
209
209
|
// Configuración (prioridad: env vars > archivo config > platform config > defaults)
|
|
@@ -953,11 +953,12 @@ async function addCommandLog(type, message) {
|
|
|
953
953
|
}
|
|
954
954
|
|
|
955
955
|
/**
|
|
956
|
-
* Actualiza los logs de un comando en la DB
|
|
956
|
+
* Actualiza los logs de un comando en la DB (guarda en result.logs)
|
|
957
957
|
*/
|
|
958
958
|
async function updateCommandLogs(commandId, logs) {
|
|
959
959
|
const url = `${CONFIG.commandsUrl}?id=eq.${commandId}`;
|
|
960
960
|
|
|
961
|
+
// Guardar en result para que la web lo lea
|
|
961
962
|
await fetch(url, {
|
|
962
963
|
method: 'PATCH',
|
|
963
964
|
headers: {
|
|
@@ -967,7 +968,7 @@ async function updateCommandLogs(commandId, logs) {
|
|
|
967
968
|
'Prefer': 'return=minimal',
|
|
968
969
|
},
|
|
969
970
|
body: JSON.stringify({
|
|
970
|
-
logs: logs,
|
|
971
|
+
result: { logs: logs },
|
|
971
972
|
updated_at: new Date().toISOString(),
|
|
972
973
|
}),
|
|
973
974
|
});
|