plazbot-cli 0.1.4 → 0.2.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/.claude/settings.local.json +2 -1
- package/dist/commands/agent/ai-config.js +2 -6
- package/dist/commands/agent/delete.js +3 -3
- package/dist/commands/agent/enable-widget.js +1 -1
- package/dist/commands/agent/files.js +4 -4
- package/dist/commands/agent/get.js +1 -2
- package/dist/commands/agent/list.js +6 -6
- package/dist/commands/agent/set.js +3 -3
- package/dist/commands/agent/templates.js +763 -172
- package/dist/commands/agent/tools.js +3 -9
- package/dist/commands/portal/add-agent.js +4 -4
- package/dist/commands/portal/list.js +5 -4
- package/package.json +2 -2
- package/src/commands/agent/ai-config.ts +2 -6
- package/src/commands/agent/delete.ts +3 -3
- package/src/commands/agent/enable-widget.ts +1 -1
- package/src/commands/agent/files.ts +5 -5
- package/src/commands/agent/get.ts +1 -2
- package/src/commands/agent/list.ts +7 -7
- package/src/commands/agent/set.ts +3 -3
- package/src/commands/agent/templates.ts +798 -173
- package/src/commands/agent/tools.ts +3 -9
- package/src/commands/portal/add-agent.ts +4 -4
- package/src/commands/portal/list.ts +5 -4
|
@@ -60,9 +60,7 @@ exports.aiConfigCommand = new commander_1.Command('ai-config')
|
|
|
60
60
|
if (action === 'exit')
|
|
61
61
|
return;
|
|
62
62
|
if (action === 'reset') {
|
|
63
|
-
const resetConfig = { ...agentData, customAIConfig: false, aiProviders: [] };
|
|
64
|
-
delete resetConfig.id;
|
|
65
|
-
delete resetConfig._id;
|
|
63
|
+
const { id, _id, ...resetConfig } = { ...agentData, customAIConfig: false, aiProviders: [] };
|
|
66
64
|
const resetSpinner = (0, ui_1.createSpinner)('Reseteando configuracion...');
|
|
67
65
|
resetSpinner.start();
|
|
68
66
|
await agent.updateAgent(agentId, resetConfig);
|
|
@@ -80,7 +78,7 @@ exports.aiConfigCommand = new commander_1.Command('ai-config')
|
|
|
80
78
|
{ type: 'number', name: 'temperature', message: 'Temperatura (0-2):', default: 0.7 },
|
|
81
79
|
{ type: 'number', name: 'maxTokens', message: 'Max tokens (1024-16384):', default: 4096 },
|
|
82
80
|
]);
|
|
83
|
-
const updatedConfig = {
|
|
81
|
+
const { id: _uid, _id: _oid, ...updatedConfig } = {
|
|
84
82
|
...agentData,
|
|
85
83
|
customAIConfig: true,
|
|
86
84
|
aiProviders: [{
|
|
@@ -92,8 +90,6 @@ exports.aiConfigCommand = new commander_1.Command('ai-config')
|
|
|
92
90
|
isDefault: true,
|
|
93
91
|
}],
|
|
94
92
|
};
|
|
95
|
-
delete updatedConfig.id;
|
|
96
|
-
delete updatedConfig._id;
|
|
97
93
|
const updateSpinner = (0, ui_1.createSpinner)('Guardando configuracion...');
|
|
98
94
|
updateSpinner.start();
|
|
99
95
|
await agent.updateAgent(agentId, updatedConfig);
|
|
@@ -27,9 +27,9 @@ exports.deleteCommand = new commander_1.Command('delete')
|
|
|
27
27
|
const agentDetails = await agent.getAgentById({ id: agentId });
|
|
28
28
|
logger_1.logger.warning('\nVas a eliminar el siguiente agente:');
|
|
29
29
|
logger_1.logger.divider();
|
|
30
|
-
logger_1.logger.info(`ID: ${agentDetails.
|
|
31
|
-
logger_1.logger.info(`Nombre: ${agentDetails.
|
|
32
|
-
logger_1.logger.info(`Descripción: ${agentDetails.
|
|
30
|
+
logger_1.logger.info(`ID: ${agentDetails.id}`);
|
|
31
|
+
logger_1.logger.info(`Nombre: ${agentDetails.name}`);
|
|
32
|
+
logger_1.logger.info(`Descripción: ${agentDetails.description}`);
|
|
33
33
|
logger_1.logger.divider();
|
|
34
34
|
// Crear interfaz para confirmación
|
|
35
35
|
const rl = readline_1.default.createInterface({
|
|
@@ -24,7 +24,7 @@ exports.enableCommand = new commander_1.Command('enable-widget')
|
|
|
24
24
|
const agentDetails = await agent.getAgentById({ id: agentId });
|
|
25
25
|
logger_1.logger.info('\n🔧 Estado actual del widget:');
|
|
26
26
|
logger_1.logger.divider();
|
|
27
|
-
logger_1.logger.info(`Agente: ${agentDetails.
|
|
27
|
+
logger_1.logger.info(`Agente: ${agentDetails.name}`);
|
|
28
28
|
logger_1.logger.divider();
|
|
29
29
|
// Cambiar estado
|
|
30
30
|
const newState = !options.disable; // Si --disable está presente, newState será false
|
|
@@ -73,10 +73,10 @@ filesGroup.command('add')
|
|
|
73
73
|
tags,
|
|
74
74
|
});
|
|
75
75
|
spinner.succeed('Archivo agregado');
|
|
76
|
-
if (result?.fileId
|
|
77
|
-
logger_1.logger.label('File ID', result.fileId
|
|
76
|
+
if (result?.fileId) {
|
|
77
|
+
logger_1.logger.label('File ID', result.fileId);
|
|
78
78
|
logger_1.logger.dim('El archivo esta siendo procesado. Verifica con:');
|
|
79
|
-
logger_1.logger.dim(`plazbot agent files status ${result.fileId
|
|
79
|
+
logger_1.logger.dim(`plazbot agent files status ${result.fileId}`);
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
catch (error) {
|
|
@@ -105,7 +105,7 @@ filesGroup.command('status')
|
|
|
105
105
|
spinner.stop();
|
|
106
106
|
logger_1.logger.title('Estado del archivo');
|
|
107
107
|
logger_1.logger.label('File ID', fileId);
|
|
108
|
-
logger_1.logger.label('Estado', result?.status
|
|
108
|
+
logger_1.logger.label('Estado', result?.status ? 'Completado' : 'En proceso');
|
|
109
109
|
}
|
|
110
110
|
catch (error) {
|
|
111
111
|
const message = error instanceof Error ? error.message : 'Error desconocido';
|
|
@@ -21,8 +21,7 @@ exports.getCommand = new commander_1.Command('get')
|
|
|
21
21
|
...(options.dev && { customUrl: "http://localhost:5090" })
|
|
22
22
|
});
|
|
23
23
|
// Obtener detalles del agente
|
|
24
|
-
const
|
|
25
|
-
const agentData = agentDetails.agent;
|
|
24
|
+
const agentData = await agent.getAgentById({ id: agentId });
|
|
26
25
|
logger_1.logger.info('\nDetalles del Agente:');
|
|
27
26
|
logger_1.logger.doubleDivider();
|
|
28
27
|
// Información básica
|
|
@@ -27,12 +27,12 @@ exports.listCommand = new commander_1.Command('list')
|
|
|
27
27
|
}
|
|
28
28
|
logger_1.logger.info('\nLista de Agentes:');
|
|
29
29
|
logger_1.logger.doubleDivider();
|
|
30
|
-
agents.forEach((
|
|
31
|
-
logger_1.logger.info(`${index + 1}. ID: ${
|
|
32
|
-
logger_1.logger.info(` Nombre: ${
|
|
33
|
-
logger_1.logger.info(` Estado: ${
|
|
34
|
-
logger_1.logger.info(` Descripción: ${
|
|
35
|
-
logger_1.logger.info(` Creado: ${new Date(
|
|
30
|
+
agents.forEach((a, index) => {
|
|
31
|
+
logger_1.logger.info(`${index + 1}. ID: ${a.id}`);
|
|
32
|
+
logger_1.logger.info(` Nombre: ${a.name}`);
|
|
33
|
+
logger_1.logger.info(` Estado: ${a.enable ? '✅ Activo' : '❌ Inactivo'}`);
|
|
34
|
+
logger_1.logger.info(` Descripción: ${a.description}`);
|
|
35
|
+
logger_1.logger.info(` Creado: ${a.createdAt ? new Date(a.createdAt).toLocaleString() : 'N/A'}`);
|
|
36
36
|
logger_1.logger.divider();
|
|
37
37
|
});
|
|
38
38
|
if (options.dev) {
|
|
@@ -66,7 +66,7 @@ setGroup.command('instructions')
|
|
|
66
66
|
{ type: 'input', name: 'personality', message: 'Personalidad:', default: current.personality || '' },
|
|
67
67
|
{ type: 'input', name: 'objective', message: 'Objetivo:', default: current.objective || '' },
|
|
68
68
|
{ type: 'list', name: 'language', message: 'Idioma:', choices: ['Espanol', 'English', 'Portugues'], default: current.language || 'Espanol' },
|
|
69
|
-
{ type: 'confirm', name: '
|
|
69
|
+
{ type: 'confirm', name: 'emojis', message: 'Usar emojis?', default: current.emojis === true },
|
|
70
70
|
]);
|
|
71
71
|
const instructions = {
|
|
72
72
|
...current,
|
|
@@ -75,7 +75,7 @@ setGroup.command('instructions')
|
|
|
75
75
|
personality: answers.personality,
|
|
76
76
|
objective: answers.objective,
|
|
77
77
|
language: answers.language,
|
|
78
|
-
|
|
78
|
+
emojis: answers.emojis,
|
|
79
79
|
};
|
|
80
80
|
const spinner = (0, ui_1.createSpinner)('Guardando instrucciones...');
|
|
81
81
|
spinner.start();
|
|
@@ -111,7 +111,7 @@ setGroup.command('persona')
|
|
|
111
111
|
const answers = await inquirer_1.default.prompt([
|
|
112
112
|
{ type: 'input', name: 'name', message: 'Nombre del personaje:', default: current.name || '' },
|
|
113
113
|
{ type: 'input', name: 'role', message: 'Rol:', default: current.role || '' },
|
|
114
|
-
{ type: 'confirm', name: '
|
|
114
|
+
{ type: 'confirm', name: 'speaksInFirstPerson', message: 'Hablar en primera persona?', default: current.speaksInFirstPerson !== false },
|
|
115
115
|
]);
|
|
116
116
|
const spinner = (0, ui_1.createSpinner)('Guardando persona...');
|
|
117
117
|
spinner.start();
|