agent-mp 0.5.4 → 0.5.5
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/dist/core/engine.js +16 -8
- package/package.json +1 -1
package/dist/core/engine.js
CHANGED
|
@@ -1007,7 +1007,8 @@ ${fsSnapshot}
|
|
|
1007
1007
|
|
|
1008
1008
|
${existingArch ? `DOCUMENTACION EXISTENTE (actualizar si hay cambios):\n${existingArch.slice(0, 3000)}\n` : 'DOCUMENTACION EXISTENTE: ninguna — crear desde cero.\n'}
|
|
1009
1009
|
INSTRUCCIONES:
|
|
1010
|
-
Analiza el listado de archivos
|
|
1010
|
+
Analiza el listado de archivos y genera documentación completa.
|
|
1011
|
+
DEVUELVE SOLO el contenido del archivo architecture.md como texto markdown. No incluyas explicaciones adicionales.
|
|
1011
1012
|
|
|
1012
1013
|
El archivo DEBE contener:
|
|
1013
1014
|
1. Tabla resumen: | Servicio/Modulo | Stack | Proposito | Entry Point | Archivos clave |
|
|
@@ -1017,17 +1018,24 @@ El archivo DEBE contener:
|
|
|
1017
1018
|
5. Variables de entorno o configuraciones relevantes
|
|
1018
1019
|
6. Comandos de desarrollo comunes (build, test, run)
|
|
1019
1020
|
|
|
1020
|
-
FORMATO DEL ARCHIVO A CREAR (${archPath}):
|
|
1021
|
-
Escribe el contenido completo del archivo architecture.md usando la herramienta write_file.
|
|
1022
|
-
|
|
1023
1021
|
REGLAS:
|
|
1024
|
-
-
|
|
1025
|
-
- NO
|
|
1026
|
-
- NO
|
|
1027
|
-
- NO ejecutes comandos
|
|
1022
|
+
- Devuelve UNICAMENTE el contenido markdown del archivo
|
|
1023
|
+
- NO incluyas texto de explicacion fuera del markdown
|
|
1024
|
+
- NO incluyas bloques de codigo
|
|
1028
1025
|
- Documenta TODO el proyecto (todos los subdirectorios al nivel de DIRECTORIO_TRABAJO, excluyendo .agent)`;
|
|
1029
1026
|
const res = await this.runWithFallback('explorer', prompt, 'Exploracion');
|
|
1030
1027
|
const text = extractCliText(res);
|
|
1028
|
+
// The LLM returns the CONTENT of architecture.md as plain text.
|
|
1029
|
+
// We need to write it to the file ourselves.
|
|
1030
|
+
const cleanText = text
|
|
1031
|
+
.replace(/^```markdown\s*/i, '')
|
|
1032
|
+
.replace(/^```\s*$/gm, '')
|
|
1033
|
+
.replace(/```/g, '')
|
|
1034
|
+
.trim();
|
|
1035
|
+
if (cleanText) {
|
|
1036
|
+
await writeFile(archPath, cleanText);
|
|
1037
|
+
log.ok(`architecture.md written (${cleanText.length} chars)`);
|
|
1038
|
+
}
|
|
1031
1039
|
// Overwrite the single last-run report (no timestamp accumulation)
|
|
1032
1040
|
try {
|
|
1033
1041
|
await writeFile(path.join(contextDir, 'explorer-last.md'), `# Explorer Report\n\nTask: ${effectiveTask}\nDate: ${new Date().toISOString()}\n\n${text}\n`);
|