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.
Files changed (2) hide show
  1. package/cli.js +15 -12
  2. 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 V2) ---
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
- let memoryScript = cache.module.dataSchema
270
- ? `\n[SCRIPT MÉMOIRE DU MODULE ${modName}]\n${cache.module.dataSchema}\n`
271
- : `\n[SCRIPT MÉMOIRE DU MODULE ${modName}]\nAucun schéma enregistré pour ce module.\n`;
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 (DOGME DU MÉTAL APPLIQUÉ)
275
- // On injecte le Schéma ET le code Kotlin, mais ON EXCLUT TOTALEMENT LE MOCK !
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 (À modifier)
279
- // Ici on est obligé d'envoyer le Mock car Alex DOIT le mettre à jour.
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 module existant.\n${memoryScript}\n[CODE NATIF EXISTANT]\n${cache.module.code}\n[MOCK JSX EXISTANT]\n${cache.module.mockCode}\n--- FIN DU CONTEXTE ---\n`;
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`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fleetbo-cockpit-cli",
3
- "version": "1.0.69",
3
+ "version": "1.0.71",
4
4
  "description": "Fleetbo CLI - Build native mobile apps with React",
5
5
  "author": "Fleetbo",
6
6
  "license": "MIT",