fleetbo-cockpit-cli 1.0.66 → 1.0.68

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 +14 -14
  2. package/package.json +1 -1
package/cli.js CHANGED
@@ -253,22 +253,22 @@ if (command === 'alex') {
253
253
  process.stdout.write(` \x1b[32mFOUND METAL\x1b[0m\n`);
254
254
 
255
255
  const intent = getContextIntent(prompt);
256
- const contextTitle = intent === "MODIFICATION"
257
- ? "EXISTING METAL (TO MODIFY)"
258
- : "REFERENCE METAL (FOR DATA PARITY)";
259
-
260
- // 🟢 NEW: Data Schema extraction and formatting
261
- let schemaInstruction = "";
262
- if (cache.module.dataSchema && Array.isArray(cache.module.dataSchema)) {
263
- schemaInstruction = "\n[STRICT DATA CONTRACT]\nThe reference module uses this configuration. You MUST strictly use these collections and keys:\n";
264
- cache.module.dataSchema.forEach(schema => {
265
- schemaInstruction += `- Collection '${schema.collection}': fields [${schema.fields.join(', ')}]\n`;
266
- });
256
+
257
+ // Récupération du Script Mémoire (généré par le Layer 7.7)
258
+ let memoryScript = cache.module.dataSchema
259
+ ? `\n[SCRIPT MÉMOIRE DU MODULE]\n${cache.module.dataSchema}\n`
260
+ : "\n[SCRIPT MÉMOIRE DU MODULE]\nAucun schéma enregistré pour ce module.\n";
261
+
262
+ if (intent === "MODIFICATION") {
263
+ // CAS LOURD : Le pilote veut modifier le code existant
264
+ contextInjection = `\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`;
265
+ } else {
266
+ // CAS LÉGER : Le pilote veut juste s'inspirer ou lier les données
267
+ // ON N'ENVOIE PAS LE CODE SOURCE ! Uniquement le Script Mémoire.
268
+ contextInjection = `\n--- CONTEXTE : RÉFÉRENCE DE DONNÉES (${modName}) ---\nDOGME: Tu dois t'aligner sur la logique de ce module. NE LIS QUE CE SCRIPT MÉMOIRE pour comprendre comment les données ont été nommées et sauvegardées.\n${memoryScript}\n--- FIN DU CONTEXTE ---\n`;
267
269
  }
268
-
269
- contextInjection = `\n--- SOVEREIGN CONTEXT: ${contextTitle} (${modName}) ---\nDOGMA: The Metal is the absolute source of truth.\n${schemaInstruction}\n\n[EXISTING NATIVE CODE]\n${cache.module.code}\n--- END OF CONTEXT ---\n`;
270
270
 
271
- prompt = contextInjection + "\n\n[PILOT INSTRUCTION]\n" + prompt;
271
+ prompt = contextInjection + "\n\n[INSTRUCTION DU PILOTE]\n" + prompt;
272
272
  break;
273
273
  } else {
274
274
  process.stdout.write(` \x1b[31mNOT FOUND\x1b[0m\n`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fleetbo-cockpit-cli",
3
- "version": "1.0.66",
3
+ "version": "1.0.68",
4
4
  "description": "Fleetbo CLI - Build native mobile apps with React",
5
5
  "author": "Fleetbo",
6
6
  "license": "MIT",