fleetbo-cockpit-cli 1.0.69 → 1.0.71
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/cli.js +15 -12
- package/package.json +1 -1
package/cli.js
CHANGED
|
@@ -241,7 +241,7 @@ if (command === 'alex') {
|
|
|
241
241
|
console.log('\x1b[33m🧠 Alex is thinking...\x1b[0m');
|
|
242
242
|
|
|
243
243
|
try {
|
|
244
|
-
// --- MEMORY SYSTEM (SMART CACHE SCANNER
|
|
244
|
+
// --- MEMORY SYSTEM (SMART CACHE SCANNER V3 - SOUVERAINETÉ DU MÉTAL) ---
|
|
245
245
|
let contextInjection = "";
|
|
246
246
|
const potentialModules = extractPotentialModules(prompt);
|
|
247
247
|
|
|
@@ -266,20 +266,22 @@ if (command === 'alex') {
|
|
|
266
266
|
if (cache.found) {
|
|
267
267
|
process.stdout.write(` \x1b[32mFOUND METAL\x1b[0m\n`);
|
|
268
268
|
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
269
|
+
// ✅ NOUVEAU BLOC : INJECTION DE LA DOUBLE MÉMOIRE
|
|
270
|
+
let memoryScript = "";
|
|
271
|
+
if (cache.module.dataSchema) memoryScript += `\n[SCRIPT MÉMOIRE DONNÉES]\n${cache.module.dataSchema}\n`;
|
|
272
|
+
if (cache.module.uiSchema) memoryScript += `\n[SCRIPT MÉMOIRE UI NATIF]\n${cache.module.uiSchema}\n`;
|
|
273
|
+
|
|
274
|
+
if (!memoryScript) memoryScript = `\n[SCRIPT MÉMOIRE DU MODULE ${modName}]\nAucun schéma enregistré pour ce module.\n`;
|
|
272
275
|
|
|
273
276
|
if (isReferenceOnly) {
|
|
274
|
-
// 🚨 CAS A : INSPIRATION (
|
|
275
|
-
|
|
276
|
-
referenceContexts += `\n--- CONTEXTE : RÉFÉRENCE DE DONNÉES (${modName}) ---\nDOGME : Ne modifie pas ce module. Aligne-toi uniquement sur le code Natif ci-dessous pour extraire les clés de données.\n${memoryScript}\n[CODE NATIF DE RÉFÉRENCE]\n${cache.module.code}\n`;
|
|
277
|
+
// 🚨 CAS A : INSPIRATION (Lecture seule)
|
|
278
|
+
referenceContexts += `\n--- CONTEXTE : MODULE DE RÉFÉRENCE (${modName}) ---\nDOGME : Ne modifie pas ce module (Lecture seule). Tu dois l'utiliser comme modèle. Aligne-toi sur ses Scripts Mémoires (Données et/ou UI) et sur son Code Natif en fonction de ce que le Pilote te demande d'imiter.\n${memoryScript}\n[CODE NATIF DE RÉFÉRENCE]\n${cache.module.code}\n`;
|
|
277
279
|
} else if (!targetModuleContext) {
|
|
278
|
-
// CAS B : CIBLE PRINCIPALE (
|
|
279
|
-
//
|
|
280
|
+
// 🚨 CAS B : CIBLE PRINCIPALE (Modification)
|
|
281
|
+
// LE MOCK EST BANI ! Le Métal est la seule source de vérité.
|
|
280
282
|
const intent = getContextIntent(prompt);
|
|
281
283
|
if (intent === "MODIFICATION") {
|
|
282
|
-
targetModuleContext = `\n--- CONTEXTE : MÉTAL EXISTANT À MODIFIER (${modName}) ---\nDOGME: Tu dois modifier ce
|
|
284
|
+
targetModuleContext = `\n--- CONTEXTE : MÉTAL EXISTANT À MODIFIER (${modName}) ---\nDOGME: Tu dois modifier ce code Natif. Ensuite, tu forgeras un Mock JSX entièrement neuf basé UNIQUEMENT sur ton nouveau code Natif.\n${memoryScript}\n[CODE NATIF EXISTANT]\n${cache.module.code}\n--- FIN DU CONTEXTE ---\n`;
|
|
283
285
|
} else {
|
|
284
286
|
targetModuleContext = `\n--- CONTEXTE : BASE DE TRAVAIL (${modName}) ---\n${memoryScript}\n`;
|
|
285
287
|
}
|
|
@@ -358,7 +360,7 @@ if (command === 'alex') {
|
|
|
358
360
|
|
|
359
361
|
// --- FILE CREATION LOGIC ---
|
|
360
362
|
if (aiData.status === 'success' && aiData.moduleData) {
|
|
361
|
-
let { fileName, code, mockFileName, mockCode, moduleName, instructions, config_offload, dataSchema } = aiData.moduleData;
|
|
363
|
+
let { fileName, code, mockFileName, mockCode, moduleName, instructions, config_offload, dataSchema, uiSchema } = aiData.moduleData;
|
|
362
364
|
|
|
363
365
|
// 🛡️ ANTI-DUMP SHIELD (Prevents terminal flooding)
|
|
364
366
|
if (moduleName) {
|
|
@@ -417,7 +419,8 @@ if (command === 'alex') {
|
|
|
417
419
|
mockFileName: mockFileName,
|
|
418
420
|
mockCode: mockCode,
|
|
419
421
|
config_offload: config_offload || { dependencies: [], permissions: [] },
|
|
420
|
-
dataSchema: dataSchema || null // 👈 LA LIGNE MAGIQUE
|
|
422
|
+
dataSchema: dataSchema || null, // 👈 LA LIGNE MAGIQUE
|
|
423
|
+
uiSchema: uiSchema || null
|
|
421
424
|
}
|
|
422
425
|
});
|
|
423
426
|
process.stdout.write(` \x1b[32mOK\x1b[0m\n`);
|