@deinossrl/dgp-agent 1.4.7 → 1.4.8
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 +31 -13
- 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 y modo del agente
|
|
206
|
-
const AGENT_VERSION = '1.4.
|
|
206
|
+
const AGENT_VERSION = '1.4.8';
|
|
207
207
|
let AGENT_MODE = 'status'; // 'status' | 'deploy' | 'ai'
|
|
208
208
|
|
|
209
209
|
// Configuración (prioridad: env vars > archivo config > platform config > defaults)
|
|
@@ -233,6 +233,27 @@ const colors = {
|
|
|
233
233
|
bold: '\x1b[1m',
|
|
234
234
|
};
|
|
235
235
|
|
|
236
|
+
/**
|
|
237
|
+
* Genera un banner con padding automático
|
|
238
|
+
*/
|
|
239
|
+
function printBanner(lines, color = 'cyan') {
|
|
240
|
+
const maxLen = Math.max(...lines.map(l => l.length));
|
|
241
|
+
const width = maxLen + 10; // padding de 5 a cada lado
|
|
242
|
+
const c = colors[color];
|
|
243
|
+
const r = colors.reset;
|
|
244
|
+
|
|
245
|
+
console.log('');
|
|
246
|
+
console.log(`${c}╔${'═'.repeat(width)}╗${r}`);
|
|
247
|
+
for (const line of lines) {
|
|
248
|
+
const padding = width - line.length - 2;
|
|
249
|
+
const leftPad = Math.floor(padding / 2);
|
|
250
|
+
const rightPad = padding - leftPad;
|
|
251
|
+
console.log(`${c}║${' '.repeat(leftPad + 1)}${line}${' '.repeat(rightPad + 1)}║${r}`);
|
|
252
|
+
}
|
|
253
|
+
console.log(`${c}╚${'═'.repeat(width)}╝${r}`);
|
|
254
|
+
console.log('');
|
|
255
|
+
}
|
|
256
|
+
|
|
236
257
|
function log(message, color = 'reset') {
|
|
237
258
|
const timestamp = new Date().toLocaleTimeString();
|
|
238
259
|
console.log(`${colors.gray}[${timestamp}]${colors.reset} ${colors[color]}${message}${colors.reset}`);
|
|
@@ -475,12 +496,10 @@ async function runAIMode() {
|
|
|
475
496
|
savePid();
|
|
476
497
|
AGENT_MODE = 'ai';
|
|
477
498
|
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
console.log(`${colors.cyan}╚═══════════════════════════════════════════════════════╝${colors.reset}`);
|
|
483
|
-
console.log('');
|
|
499
|
+
printBanner([
|
|
500
|
+
`DGP Agent - AI Mode v${AGENT_VERSION} 🤖`,
|
|
501
|
+
'Powered by Claude'
|
|
502
|
+
], 'cyan');
|
|
484
503
|
|
|
485
504
|
// Intentar cargar config global desde la plataforma si no hay API key local
|
|
486
505
|
if (!CONFIG.anthropicApiKey) {
|
|
@@ -1081,12 +1100,10 @@ async function runAgent(deployMode = false) {
|
|
|
1081
1100
|
savePid();
|
|
1082
1101
|
AGENT_MODE = deployMode ? 'deploy' : 'status';
|
|
1083
1102
|
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
console.log(`${colors.green}╚═══════════════════════════════════════════════════════╝${colors.reset}`);
|
|
1089
|
-
console.log('');
|
|
1103
|
+
printBanner([
|
|
1104
|
+
'DGP Agent - Despliegue-GPT Local Agent',
|
|
1105
|
+
`@deinossrl/dgp-agent v${AGENT_VERSION}`
|
|
1106
|
+
], 'green');
|
|
1090
1107
|
|
|
1091
1108
|
if (!isGitRepo()) {
|
|
1092
1109
|
logError('Not a git repository. Run this command from inside a git repo.');
|
|
@@ -1251,6 +1268,7 @@ ${colors.bold}REQUISITOS PARA DEPLOY${colors.reset}
|
|
|
1251
1268
|
- Permisos sudo para reload nginx (vía sudoers sin password)
|
|
1252
1269
|
|
|
1253
1270
|
${colors.bold}CHANGELOG${colors.reset}
|
|
1271
|
+
${colors.cyan}v1.4.8${colors.reset} - Banner dinámico con padding automático
|
|
1254
1272
|
${colors.cyan}v1.4.7${colors.reset} - Modo AI visible en web, auto-kill agente anterior
|
|
1255
1273
|
${colors.cyan}v1.4.6${colors.reset} - Fix: versión en banner AI Mode
|
|
1256
1274
|
${colors.cyan}v1.4.5${colors.reset} - Modo escucha: recibe tareas AI desde la web
|