 0_0call:default_api:multi_replace_file_content{"absolutePath":"C:\\Users\\suriya prakash\\OneDrive\\Desktop\\codez48cli\\src\\pilot\\workflows\\website-extraction-workflow.js","replacementChunks":[{"targetContent":"const fs = require('fs');","replacementContent":"const logger = require('../core/logger');\nconst fs = require('fs');","allowMultiple":false},{"targetContent":"        console.log('\\n==================================================');","replacementContent":"        logger.status('\\n==================================================');","allowMultiple":false},{"targetContent":"        console.log('   CODEZ48 PILOT: WEBSITE CODE EXTRACTION & AI REPAIR   ');","replacementContent":"        logger.status('   CODEZ48 PILOT: WEBSITE CODE EXTRACTION & AI REPAIR   ');","allowMultiple":false},{"targetContent":"        console.log('==================================================\\n');","replacementContent":"        logger.status('==================================================\\n');","allowMultiple":false},{"targetContent":"        console.log(`[WORKFLOW0_0  Extracted target URL: \"${targetUrl}\"`);","replacementContent":"        logger.status(`[WORKFLOW0_0  Extracted target URL: \"${targetUrl}\"`);","allowMultiple":false},{"targetContent":"            console.error(`[WORKFLOW ERROR0_0  Scraping failed: ${scrapResult.failureReason}`);","replacementContent":"            logger.error(`[WORKFLOW ERROR0_0  Scraping failed: ${scrapResult.failureReason}`);","allowMultiple":false},{"targetContent":"        console.log(`[ZIP VERIFIED0_0  PKZip archive signature verified successfully (${fs.statSync(zipPath).size} bytes).`);","replacementContent":"        logger.status(`[ZIP VERIFIED0_0  PKZip archive signature verified successfully (${fs.statSync(zipPath).size} bytes).`);","allowMultiple":false},{"targetContent":"        console.log(`[WORKSPACE0_0  Project files successfully extracted to unique folder: ${workspaceDir}`);","replacementContent":"        logger.status(`[WORKSPACE0_0  Project files successfully extracted to unique folder: ${workspaceDir}`);","allowMultiple":false},{"targetContent":"                if (!err) console.log(`[VS CODE0_0  Successfully opened project directory in Visual Studio Code.`);","replacementContent":"                if (!err) logger.status(`[VS CODE0_0  Successfully opened project directory in Visual Studio Code.`);","allowMultiple":false},{"targetContent":"                console.log(`[AI ANALYSIS0_0  Inspected index.html. Referenced scripts: ${scriptMatches.join(', ') || 'None'}`);","replacementContent":"                logger.status(`[AI ANALYSIS0_0  Inspected index.html. Referenced scripts: ${scriptMatches.join(', ') || 'None'}`);","allowMultiple":false},{"targetContent":"                            console.log(`[AI REPAIR0_0  Script \"${scriptSrc}\" is missing or empty. Requesting AI-assisted JavaScript repair...`);","replacementContent":"                            logger.status(`[AI REPAIR0_0  Script \"${scriptSrc}\" is missing or empty. Requesting AI-assisted JavaScript repair...`);","allowMultiple":false},{"targetContent":"                                console.log(`\\x1b[32m[AI REPAIR SUCCESS0_0  Repaired/Generated JavaScript for \"${scriptSrc}\"\\x1b[0m`);","replacementContent":"                                logger.status(`\\x1b[32m[AI REPAIR SUCCESS0_0  Repaired/Generated JavaScript for \"${scriptSrc}\"\\x1b[0m`);","allowMultiple":false},{"targetContent":"        console.log('\\n==================================================');","replacementContent":"        logger.status('\\n==================================================');","allowMultiple":false},{"targetContent":"        console.log('   WEBSITE EXTRACTION & REPAIR COMPLETED SUCCESSFUL ');","replacementContent":"        logger.user('   WEBSITE EXTRACTION & REPAIR COMPLETED SUCCESSFUL ');","allowMultiple":false},{"targetContent":"        console.log('==================================================');","replacementContent":"        logger.status('==================================================');","allowMultiple":false},{"targetContent":"        console.log(` Target URL:      ${targetUrl}`);","replacementContent":"        logger.status(` Target URL:      ${targetUrl}`);","allowMultiple":false},{"targetContent":"        console.log(` Project Folder:  ${workspaceDir}`);","replacementContent":"        logger.status(` Project Folder:  ${workspaceDir}`);","allowMultiple":false},{"targetContent":"        console.log(` ZIP Archive:     ${zipPath}`);","replacementContent":"        logger.status(` ZIP Archive:     ${zipPath}`);","allowMultiple":false},{"targetContent":"        console.log(` VS Code Status:  ${vsCodeOpened ? 'Launched' : 'Skipped/Unavailable'}`);","replacementContent":"        logger.status(` VS Code Status:  ${vsCodeOpened ? 'Launched' : 'Skipped/Unavailable'}`);","allowMultiple":false},{"targetContent":"        console.log(` AI JS Repairs:   ${repairedFiles.length > 0 ? repairedFiles.join(', ') : 'None required'}`);","replacementContent":"        logger.status(` AI JS Repairs:   ${repairedFiles.length > 0 ? repairedFiles.join(', ') : 'None required'}`);","allowMultiple":false},{"targetContent":"        console.log('==================================================\\n');","replacementContent":"        logger.status('==================================================\\n');","allowMultiple":false}0_0 }0_0  0_0call:default_api:multi_replace_file_content{"absolutePath":"C:\\Users\\suriya prakash\\OneDrive\\Desktop\\codez48cli\\src\\pilot\\workflows\\workflow-executor.js","replacementChunks":[{"targetContent":"/**","replacementContent":"const logger = require('../core/logger');\n/**","allowMultiple":false},{"targetContent":"        console.log(`\\x1b[36m[WORKFLOW EXECUTOR0_0  Executing workflow ${plan.workflowId}: \"${plan.goal}\"\\x1b[0m`);","replacementContent":"        logger.status(`\\x1b[36m[WORKFLOW EXECUTOR0_0  Executing workflow ${plan.workflowId}: \"${plan.goal}\"\\x1b[0m`);","allowMultiple":false},{"targetContent":"            console.log(`\\n\\x1b[35m[WORKFLOW STEP ${context.currentStepIndex}/${context.totalSteps}0_0  Action: ${step.action}\\x1b[0m`);","replacementContent":"            logger.status(`\\n\\x1b[35m[WORKFLOW STEP ${context.currentStepIndex}/${context.totalSteps}0_0  Action: ${step.action}\\x1b[0m`);","allowMultiple":false},{"targetContent":"                console.error(`\\x1b[31m[WORKFLOW ERROR0_0  Step ${step.action} failed: ${e.message}\\x1b[0m`);","replacementContent":"                logger.error(`\\x1b[31m[WORKFLOW ERROR0_0  Step ${step.action} failed: ${e.message}\\x1b[0m`);","allowMultiple":false},{"targetContent":"        console.log(`\\n\\x1b[32m[WORKFLOW COMPLETED0_0  Successfully executed workflow ${plan.workflowId}\\x1b[0m`);","replacementContent":"        logger.user(`\\n\\x1b[32m[WORKFLOW COMPLETED0_0  Successfully executed workflow ${plan.workflowId}\\x1b[0m`);","allowMultiple":false}0_0 }0_0  0_0call:default_api:multi_replace_file_content{"absolutePath":"C:\\Users\\suriya prakash\\OneDrive\\Desktop\\codez48cli\\src\\pilot\\workflows\\workflow-planner.js","replacementChunks":[{"targetContent":"/**","replacementContent":"const logger = require('../core/logger');\n/**","allowMultiple":false}0_0 }0_0  0_0call:default_api:multi_replace_file_content{"absolutePath":"C:\\Users\\suriya prakash\\OneDrive\\Desktop\\codez48cli\\src\\scrap\\scrap-engine.js","replacementChunks":[{"targetContent":"const fs = require('fs');","replacementContent":"const logger = require('core/logger');\nconst fs = require('fs');","allowMultiple":false},{"targetContent":"        console.log('\\n==================================================');","replacementContent":"        logger.status('\\n==================================================');","allowMultiple":false},{"targetContent":"        console.log('                 CODEZ48 SCRAP                    ');","replacementContent":"        logger.status('                 CODEZ48 SCRAP                    ');","allowMultiple":false},{"targetContent":"        console.log('==================================================\\n');","replacementContent":"        logger.status('==================================================\\n');","allowMultiple":false},{"targetContent":"        console.log(`[1/60_0  Validating website URL and security constraints: \"${targetUrl}\"...`);","replacementContent":"        logger.status(`[1/60_0  Validating website URL and security constraints: \"${targetUrl}\"...`);","allowMultiple":false},{"targetContent":"            console.error(`[SECURITY BLOCK0_0  Invalid URL, unsupported protocol, or prohibited private/SSRF target: \"${targetUrl}\"`);","replacementContent":"            logger.error(`[SECURITY BLOCK0_0  Invalid URL, unsupported protocol, or prohibited private/SSRF target: \"${targetUrl}\"`);","allowMultiple":false},{"targetContent":"                console.error(`[SECURITY BLOCK0_0  Scraping is restricted on official primary domain: ${validUrl}`);","replacementContent":"                logger.error(`[SECURITY BLOCK0_0  Scraping is restricted on official primary domain: ${validUrl}`);","allowMultiple":false},{"targetContent":"        console.log(`[2/60_0  Accessing site and retrieving HTML: \"${validUrl}\"...`);","replacementContent":"        logger.status(`[2/60_0  Accessing site and retrieving HTML: \"${validUrl}\"...`);","allowMultiple":false},{"targetContent":"                console.error(`[SCRAP ERROR0_0  Server returned HTTP ${httpRes.status} for \"${validUrl}\".`);","replacementContent":"                logger.error(`[SCRAP ERROR0_0  Server returned HTTP ${httpRes.status} for \"${validUrl}\".`);","allowMultiple":false},{"targetContent":"        console.log(`[3/60_0  Discovering linked stylesheets, scripts, images, fonts, and assets...`);","replacementContent":"        logger.status(`[3/60_0  Discovering linked stylesheets, scripts, images, fonts, and assets...`);","allowMultiple":false},{"targetContent":"        console.log(`[DISCOVERY COMPLETE0_0  Found ${discoveredResources.length} linked asset candidates.`);","replacementContent":"        logger.status(`[DISCOVERY COMPLETE0_0  Found ${discoveredResources.length} linked asset candidates.`);","allowMultiple":false},{"targetContent":"        console.log(`[4/60_0  Downloading and saving accessible website files locally...`);","replacementContent":"        logger.status(`[4/60_0  Downloading and saving accessible website files locally...`);","allowMultiple":false},{"targetContent":"        console.log(`[5/60_0  Generating manifest.json and README.txt...`);","replacementContent":"        logger.status(`[5/60_0  Generating manifest.json and README.txt...`);","allowMultiple":false},{"targetContent":"        console.log(`[6/60_0  Packaging project into downloadable ZIP archive...`);","replacementContent":"        logger.status(`[6/60_0  Packaging project into downloadable ZIP archive...`);","allowMultiple":false},{"targetContent":"            console.error(`[ZIP VERIFICATION ERROR0_0  ZIP archive or essential project files verification failed.`);","replacementContent":"            logger.error(`[ZIP VERIFICATION ERROR0_0  ZIP archive or essential project files verification failed.`);","allowMultiple":false},{"targetContent":"        console.log(`[ZIP VERIFIED0_0  Archive verified successfully (PKZip Signature Valid, Size: ${zipSize} bytes).`);","replacementContent":"        logger.status(`[ZIP VERIFIED0_0  Archive verified successfully (PKZip Signature Valid, Size: ${zipSize} bytes).`);","allowMultiple":false},{"targetContent":"        console.log('\\n==================================================');","replacementContent":"        logger.status('\\n==================================================');","allowMultiple":false},{"targetContent":"        console.log('            CODEZ48 SCRAP COMPLETE               ');","replacementContent":"        logger.status('            CODEZ48 SCRAP COMPLETE               ');","allowMultiple":false},{"targetContent":"        console.log('==================================================');","replacementContent":"        logger.status('==================================================');","allowMultiple":false},{"targetContent":"        console.log(` Target Website:     ${validUrl}`);","replacementContent":"        logger.status(` Target Website:     ${validUrl}`);","allowMultiple":false},{"targetContent":"        console.log(` Page Title:         \"${scrapedTitle}\"`);","replacementContent":"        logger.status(` Page Title:         \"${scrapedTitle}\"`);","allowMultiple":false},{"targetContent":"        console.log(` Output Folder:      ${outputFolder}`);","replacementContent":"        logger.status(` Output Folder:      ${outputFolder}`);","allowMultiple":false},{"targetContent":"        console.log(` Saved Files:        ${successfulCount} succeeded, ${failedCount} failed`);","replacementContent":"        logger.status(` Saved Files:        ${successfulCount} succeeded, ${failedCount} failed`);","allowMultiple":false},{"targetContent":"        console.log(` Verified ZIP Path:  ${zipFilePath} (${zipSize} bytes)`);","replacementContent":"        logger.status(` Verified ZIP Path:  ${zipFilePath} (${zipSize} bytes)`);","allowMultiple":false},{"targetContent":"        console.log(` Direct Download:    ${serverDetails.downloadUrl}`);","replacementContent":"        logger.status(` Direct Download:    ${serverDetails.downloadUrl}`);","allowMultiple":false},{"targetContent":"        console.log(` Execution Time:     ${durationSec}s`);","replacementContent":"        logger.status(` Execution Time:     ${durationSec}s`);","allowMultiple":false},{"targetContent":"        console.log('==================================================\\n');","replacementContent":"        logger.status('==================================================\\n');","allowMultiple":false},{"targetContent":"            console.log(`[BROWSER LAUNCH SUPPRESSED0_0  Test mode active. Verified ZIP path: ${zipFilePath}`);","replacementContent":"            logger.status(`[BROWSER LAUNCH SUPPRESSED0_0  Test mode active. Verified ZIP path: ${zipFilePath}`);","allowMultiple":false},{"targetContent":"        console.log(`[BROWSER LAUNCH0_0  Automatically opening verified ZIP archive in File Explorer...`);","replacementContent":"        logger.status(`[BROWSER LAUNCH0_0  Automatically opening verified ZIP archive in File Explorer...`);","allowMultiple":false},{"targetContent":"            console.log(`\\n==================================================`);","replacementContent":"            logger.status(`\\n==================================================`);","allowMultiple":false},{"targetContent":"            console.log(` VERIFIED ZIP ARCHIVE READY FOR DOWNLOAD/USE:`);","replacementContent":"            logger.user(` VERIFIED ZIP ARCHIVE READY FOR DOWNLOAD/USE:`);","allowMultiple":false},{"targetContent":"            console.log(`   ${zipFilePath}`);","replacementContent":"            logger.status(`   ${zipFilePath}`);","allowMultiple":false},{"targetContent":"            console.log(`==================================================\\n`);","replacementContent":"            logger.status(`==================================================\\n`);","allowMultiple":false},{"targetContent":"                    console.error(`[SERVER ERROR0_0  Failed to start preview server: ${err.message}`);","replacementContent":"                    logger.error(`[SERVER ERROR0_0  Failed to start preview server: ${err.message}`);","allowMultiple":false}0_0 }0_0  0_0call:default_api:multi_replace_file_content{"absolutePath":"C:\\Users\\suriya prakash\\OneDrive\\Desktop\\codez48cli\\cli.js","replacementChunks":[{"targetContent":"#!/usr/bin/env node","replacementContent":"const logger = require('./src/core/logger');\n#!/usr/bin/env node","allowMultiple":false},{"targetContent":"        console.error('\\n[ERROR0_0  Not logged in. Please run: codez48 login');","replacementContent":"        logger.error('\\n[ERROR0_0  Not logged in. Please run: codez48 login');","allowMultiple":false},{"targetContent":"        console.error(`\\n[NETWORK ERROR0_0  ${e.message}`);","replacementContent":"        logger.error(`\\n[NETWORK ERROR0_0  ${e.message}`);","allowMultiple":false},{"targetContent":"    console.log('\\n--- Codez48 Secure Login ---');","replacementContent":"    logger.status('\\n--- Codez48 Secure Login ---');","allowMultiple":false},{"targetContent":"    if (!sellerId || !password) return console.log('[ERROR0_0  Both fields are required.');","replacementContent":"    if (!sellerId || !password) return logger.status('[ERROR0_0  Both fields are required.');","allowMultiple":false},{"targetContent":"        console.log(`\\n[SUCCESS0_0  Login successful! Welcome back, ${data.brand}.\\n`);","replacementContent":"        logger.user(`\\n[SUCCESS0_0  Login successful! Welcome back, ${data.brand}.\\n`);","allowMultiple":false},{"targetContent":"        console.log('\\n[FAIL0_0  Authentication failed.\\n');","replacementContent":"        logger.status('\\n[FAIL0_0  Authentication failed.\\n');","allowMultiple":false},{"targetContent":"        if (data.products.length === 0) return console.log('No products found.\\n');","replacementContent":"        if (data.products.length === 0) return logger.status('No products found.\\n');","allowMultiple":false},{"targetContent":"    console.log('\\n--- Add New Product ---');","replacementContent":"    logger.status('\\n--- Add New Product ---');","allowMultiple":false},{"targetContent":"    if (data?.success) console.log(`[SUCCESS0_0  Product Created: ${data.productId}\\n`);","replacementContent":"    if (data?.success) logger.user(`[SUCCESS0_0  Product Created: ${data.productId}\\n`);","allowMultiple":false},{"targetContent":"    if (!target) return console.log('Usage: codez48 open <app-name-or-url>');","replacementContent":"    if (!target) return logger.status('Usage: codez48 open <app-name-or-url>');","allowMultiple":false},{"targetContent":"        console.log(`Opening URL: ${target}`);","replacementContent":"        logger.status(`Opening URL: ${target}`);","allowMultiple":false},{"targetContent":"            if (err) console.error(`[ERROR0_0  Failed to open browser: ${err.message}`);","replacementContent":"            if (err) logger.error(`[ERROR0_0  Failed to open browser: ${err.message}`);","allowMultiple":false},{"targetContent":"    console.log(`Attempting to launch: ${target}...`);","replacementContent":"    logger.status(`Attempting to launch: ${target}...`);","allowMultiple":false},{"targetContent":"                    if (err2) console.error(`[ERROR0_0  Application not found or failed to launch: ${target}`);","replacementContent":"                    if (err2) logger.error(`[ERROR0_0  Application not found or failed to launch: ${target}`);","allowMultiple":false},{"targetContent":"                console.error(`[ERROR0_0  Application not found or failed to launch: ${target}`);","replacementContent":"                logger.error(`[ERROR0_0  Application not found or failed to launch: ${target}`);","allowMultiple":false},{"targetContent":"    console.log('Searching...');","replacementContent":"    logger.status('Searching...');","allowMultiple":false},{"targetContent":"    if (allResults.length === 0) return console.log('No matches found.');","replacementContent":"    if (allResults.length === 0) return logger.status('No matches found.');","allowMultiple":false},{"targetContent":"    allResults.forEach((r, i) => console.log(`${i + 1}. [${r.isDirectory ? 'DIR' : 'FILE'}0_0  ${r.path}`));","replacementContent":"    allResults.forEach((r, i) => logger.status(`${i + 1}. [${r.isDirectory ? 'DIR' : 'FILE'}0_0  ${r.path}`));","allowMultiple":false},{"targetContent":"        console.log('\\n1. Open Location\\n2. Open File/Folder\\n3. Analyze\\n4. Back');","replacementContent":"        logger.status('\\n1. Open Location\\n2. Open File/Folder\\n3. Analyze\\n4. Back');","allowMultiple":false},{"targetContent":"    console.log(`\\nAnalyzing: ${targetPath}...`);","replacementContent":"    logger.status(`\\nAnalyzing: ${targetPath}...`);","allowMultiple":false},{"targetContent":"        console.log('\\x1b[33m[POTENTIALLY SUSPICIOUS0_0 \\x1b[0m');","replacementContent":"        logger.status('\\x1b[33m[POTENTIALLY SUSPICIOUS0_0 \\x1b[0m');","allowMultiple":false},{"targetContent":"        issues.forEach(issue => console.log(`- ${issue}`));","replacementContent":"        issues.forEach(issue => logger.status(`- ${issue}`));","allowMultiple":false},{"targetContent":"        console.log('\\nOptions: 1. Open Location | 2. Remove (Recycle Bin) | 3. Ignore');","replacementContent":"        logger.status('\\nOptions: 1. Open Location | 2. Remove (Recycle Bin) | 3. Ignore');","allowMultiple":false},{"targetContent":"                    if (err) console.error('[ERROR0_0  Failed to remove file.');","replacementContent":"                    if (err) logger.error('[ERROR0_0  Failed to remove file.');","allowMultiple":false},{"targetContent":"                    else console.log('[SUCCESS0_0  Moved to Recycle Bin.');","replacementContent":"                    else logger.user('[SUCCESS0_0  Moved to Recycle Bin.');","allowMultiple":false},{"targetContent":"        console.log('\\x1b[32m[NO OBVIOUS WARNING FOUND0_0 \\x1b[0m');","replacementContent":"        logger.status('\\x1b[32m[NO OBVIOUS WARNING FOUND0_0 \\x1b[0m');","allowMultiple":false},{"targetContent":"                        console.error(`[SECURITY BLOCKED0_0  Unsafe file path: ${action.path}`);","replacementContent":"                        logger.error(`[SECURITY BLOCKED0_0  Unsafe file path: ${action.path}`);","allowMultiple":false},{"targetContent":"                    console.log(`\\x1b[32m[FILE0_0  ${action.type === 'create_file' ? 'Created' : 'Updated'}: ${fullPath}\\x1b[0m`);","replacementContent":"                    logger.status(`\\x1b[32m[FILE0_0  ${action.type === 'create_file' ? 'Created' : 'Updated'}: ${fullPath}\\x1b[0m`);","allowMultiple":false},{"targetContent":"                    console.log(`\\x1b[32m[FOLDER0_0  Created: ${folderPath}\\x1b[0m`);","replacementContent":"                    logger.status(`\\x1b[32m[FOLDER0_0  Created: ${folderPath}\\x1b[0m`);","allowMultiple":false},{"targetContent":"                        console.log('\\n[INFO0_0  No active coding project found. Opening workspace root.');","replacementContent":"                        logger.status('\\n[INFO0_0  No active coding project found. Opening workspace root.');","allowMultiple":false},{"targetContent":"                    console.log(`\\x1b[34m[VSCODE0_0  Opening: ${projectDir}\\x1b[0m`);","replacementContent":"                    logger.status(`\\x1b[34m[VSCODE0_0  Opening: ${projectDir}\\x1b[0m`);","allowMultiple":false},{"targetContent":"                        if (err) console.error('[ERROR0_0  VS Code (code) command not found in PATH.');","replacementContent":"                        if (err) logger.error('[ERROR0_0  VS Code (code) command not found in PATH.');","allowMultiple":false},{"targetContent":"            console.error(`[ACTION ERROR0_0  ${action.type}: ${e.message}`);","replacementContent":"            logger.error(`[ACTION ERROR0_0  ${action.type}: ${e.message}`);","allowMultiple":false},{"targetContent":"    console.log('\\n--- Codez48 Autonomous Software Agent ---');","replacementContent":"    logger.status('\\n--- Codez48 Autonomous Software Agent ---');","allowMultiple":false},{"targetContent":"    console.log('Describe your project goal or ask for edits.');","replacementContent":"    logger.status('Describe your project goal or ask for edits.');","allowMultiple":false},{"targetContent":"    console.log('Press Ctrl+C to exit.\\n');","replacementContent":"    logger.status('Press Ctrl+C to exit.\\n');","allowMultiple":false},{"targetContent":"        console.log('\\nCodez48 AI session ended.');","replacementContent":"        logger.status('\\nCodez48 AI session ended.');","allowMultiple":false},{"targetContent":"    console.log('Connecting to Codez48 Realtime Server...');","replacementContent":"    logger.status('Connecting to Codez48 Realtime Server...');","allowMultiple":false},{"targetContent":"            console.log(`Server Status: ${health.status} | Uptime: ${Math.floor(health.uptime || 0)}s`);","replacementContent":"            logger.status(`Server Status: ${health.status} | Uptime: ${Math.floor(health.uptime || 0)}s`);","allowMultiple":false},{"targetContent":"            console.log('Realtime link established.');","replacementContent":"            logger.status('Realtime link established.');","allowMultiple":false},{"targetContent":"                    console.log(`\\x1b[32m[ROOM ACTIVE0_0  Code: ${roomCode} | Users: ${msg.userCount}\\x1b[0m\\n`);","replacementContent":"                    logger.status(`\\x1b[32m[ROOM ACTIVE0_0  Code: ${roomCode} | Users: ${msg.userCount}\\x1b[0m\\n`);","allowMultiple":false},{"targetContent":"            console.error(`\\n[CONNECTION ERROR0_0  ${err.message}`);","replacementContent":"            logger.error(`\\n[CONNECTION ERROR0_0  ${err.message}`);","allowMultiple":false},{"targetContent":"                console.error(`Root Cause: The server received the request but didn't find the WebSocket handler at this path.`);","replacementContent":"                logger.error(`Root Cause: The server received the request but didn't find the WebSocket handler at this path.`);","allowMultiple":false},{"targetContent":"                console.error(`Suggestion: Verify that the latest backend (commit b3deddb or later) is successfully deployed on Railway.`);","replacementContent":"                logger.error(`Suggestion: Verify that the latest backend (commit b3deddb or later) is successfully deployed on Railway.`);","allowMultiple":false},{"targetContent":"                console.error(`Root Cause: Connection refused. The server might be down.`);","replacementContent":"                logger.error(`Root Cause: Connection refused. The server might be down.`);","allowMultiple":false},{"targetContent":"                console.log(`\\n[DISCONNECTED0_0  Session ended unexpectedly (Code: ${code}, Reason: ${reason || 'None'}).`);","replacementContent":"                logger.status(`\\n[DISCONNECTED0_0  Session ended unexpectedly (Code: ${code}, Reason: ${reason || 'None'}).`);","allowMultiple":false},{"targetContent":"                console.log(`\\n[DISCONNECTED0_0  session ended.`);","replacementContent":"                logger.status(`\\n[DISCONNECTED0_0  session ended.`);","allowMultiple":false},{"targetContent":"    console.log('\\n--- Codez48 Group Chat ---');","replacementContent":"    logger.status('\\n--- Codez48 Group Chat ---');","allowMultiple":false},{"targetContent":"    console.log('1. Create New Chat\\n2. Join Chat\\n3. Exit');","replacementContent":"    logger.status('1. Create New Chat\\n2. Join Chat\\n3. Exit');","allowMultiple":false},{"targetContent":"                console.log(`\\n\\x1b[90m[ROOM0_0  ${msg.name} ${msg.action === 'USER_JOINED' ? 'joined' : 'left'}. Total: ${msg.userCount}\\x1b[0m`);","replacementContent":"                logger.status(`\\n\\x1b[90m[ROOM0_0  ${msg.name} ${msg.action === 'USER_JOINED' ? 'joined' : 'left'}. Total: ${msg.userCount}\\x1b[0m`);","allowMultiple":false},{"targetContent":"        console.log('Unable to connect to Codez48 Chat server.');","replacementContent":"        logger.status('Unable to connect to Codez48 Chat server.');","allowMultiple":false},{"targetContent":"    console.log('\\n--- Codez48 File Share ---');","replacementContent":"    logger.status('\\n--- Codez48 File Share ---');","allowMultiple":false},{"targetContent":"    console.log('1. Create Room\\n2. Join Room\\n3. Exit');","replacementContent":"    logger.status('1. Create Room\\n2. Join Room\\n3. Exit');","allowMultiple":false},{"targetContent":"                    console.log(`Downloading ${msg.file.name}...`);","replacementContent":"                    logger.status(`Downloading ${msg.file.name}...`);","allowMultiple":false},{"targetContent":"                        console.log(`\\x1b[32m[SUCCESS0_0  Saved to: ${dest}\\x1b[0m\\nYou: `);","replacementContent":"                        logger.user(`\\x1b[32m[SUCCESS0_0  Saved to: ${dest}\\x1b[0m\\nYou: `);","allowMultiple":false},{"targetContent":"                        console.log('\\x1b[31m[ERROR0_0  Download failed or expired.\\x1b[0m\\nYou: ');","replacementContent":"                        logger.status('\\x1b[31m[ERROR0_0  Download failed or expired.\\x1b[0m\\nYou: ');","allowMultiple":false},{"targetContent":"                        console.log('[ERROR0_0  Folders cannot be shared directly. Please ZIP the folder first.');","replacementContent":"                        logger.status('[ERROR0_0  Folders cannot be shared directly. Please ZIP the folder first.');","allowMultiple":false},{"targetContent":"                    console.log(`Uploading ${path.basename(filePath)}...`);","replacementContent":"                    logger.status(`Uploading ${path.basename(filePath)}...`);","allowMultiple":false},{"targetContent":"                        console.log('\\x1b[32m[SHARED0_0  File offer sent to room.\\x1b[0m');","replacementContent":"                        logger.status('\\x1b[32m[SHARED0_0  File offer sent to room.\\x1b[0m');","allowMultiple":false},{"targetContent":"                    console.log('[ERROR0_0  File not found.');","replacementContent":"                    logger.status('[ERROR0_0  File not found.');","allowMultiple":false},{"targetContent":"        console.log('Unable to connect to Codez48 Share server.');","replacementContent":"        logger.status('Unable to connect to Codez48 Share server.');","allowMultiple":false},{"targetContent":"    console.log('\\x1b[36m[CLI ENVIRONMENT VALIDATION0_0  Checking system components...\\x1b[0m');","replacementContent":"    logger.status('\\x1b[36m[CLI ENVIRONMENT VALIDATION0_0  Checking system components...\\x1b[0m');","allowMultiple":false},{"targetContent":"    console.log(`- Node.js Version: ${nodeVer}`);","replacementContent":"    logger.status(`- Node.js Version: ${nodeVer}`);","allowMultiple":false},{"targetContent":"        console.log(`- GUI Driver (Win32): ACTIVE (${fg?.title || 'Desktop'} - ${fg?.process || 'unknown'})`);","replacementContent":"        logger.status(`- GUI Driver (Win32): ACTIVE (${fg?.title || 'Desktop'} - ${fg?.process || 'unknown'})`);","allowMultiple":false},{"targetContent":"        console.log(`- Screen Capture: ${screenOk ? 'READY' : 'FALLBACK_MODE'}`);","replacementContent":"        logger.user(`- Screen Capture: ${screenOk ? 'READY' : 'FALLBACK_MODE'}`);","allowMultiple":false},{"targetContent":"    console.log(`- Backend API Endpoint: ${BASE_URL}`);","replacementContent":"    logger.debug(`- Backend API Endpoint: ${BASE_URL}`);","allowMultiple":false},{"targetContent":"    console.log('\\x1b[32m[CLI ENVIRONMENT VALIDATION0_0  System Ready.\\x1b[0m\\n');","replacementContent":"    logger.user('\\x1b[32m[CLI ENVIRONMENT VALIDATION0_0  System Ready.\\x1b[0m\\n');","allowMultiple":false},{"targetContent":"    console.log('\\n--- Codez48 Scrap ---');","replacementContent":"    logger.status('\\n--- Codez48 Scrap ---');","allowMultiple":false},{"targetContent":"        console.error('[SCRAP ERROR0_0  URL cannot be empty.');","replacementContent":"        logger.error('[SCRAP ERROR0_0  URL cannot be empty.');","allowMultiple":false},{"targetContent":"        console.log('[SCRAP SUCCESS0_0  Website source code & resources extracted successfully.');","replacementContent":"        logger.status('[SCRAP SUCCESS0_0  Website source code & resources extracted successfully.');","allowMultiple":false},{"targetContent":"        console.error(`[SCRAP ERROR0_0  Scraping process failed: ${scrapResult.failureReason || scrapResult.error}`);","replacementContent":"        logger.error(`[SCRAP ERROR0_0  Scraping process failed: ${scrapResult.failureReason || scrapResult.error}`);","allowMultiple":false},{"targetContent":"    console.log('\\n--- Codez48 Desktop Pilot ---');","replacementContent":"    logger.status('\\n--- Codez48 Desktop Pilot ---');","allowMultiple":false},{"targetContent":"        console.log('\\nCodez48 Pilot session ended.');","replacementContent":"        logger.status('\\nCodez48 Pilot session ended.');","allowMultiple":false},{"targetContent":"        console.log(`Executing direct Pilot goal: \"${directGoal}\"\\n`);","replacementContent":"        logger.status(`Executing direct Pilot goal: \"${directGoal}\"\\n`);","allowMultiple":false},{"targetContent":"    console.log('Describe your desktop task or app automation goal.');","replacementContent":"    logger.status('Describe your desktop task or app automation goal.');","allowMultiple":false},{"targetContent":"    console.log('Press Ctrl+C to exit.\\n');","replacementContent":"    logger.status('Press Ctrl+C to exit.\\n');","allowMultiple":false},{"targetContent":"            console.log(`\\nAI: ${result.answer}\\n`);","replacementContent":"            logger.user(`\\nAI: ${result.answer}\\n`);","allowMultiple":false},{"targetContent":"        console.log(`CODEZ48 PILOT DIAGNOSTIC RUNTIME IDENTITY:`);","replacementContent":"        logger.status(`CODEZ48 PILOT DIAGNOSTIC RUNTIME IDENTITY:`);","allowMultiple":false},{"targetContent":"        console.log(`Package Name: ${pkg.name} | Version: ${pkg.version}`);","replacementContent":"        logger.status(`Package Name: ${pkg.name} | Version: ${pkg.version}`);","allowMultiple":false},{"targetContent":"        console.log(`Entry Realpath: ${fs.realpathSync(__filename)}`);","replacementContent":"        logger.status(`Entry Realpath: ${fs.realpathSync(__filename)}`);","allowMultiple":false},{"targetContent":"        console.log(`Engine Module: ${fs.realpathSync(path.join(__dirname, 'src/pilot/browser/browser-controller.js'))}`);","replacementContent":"        logger.status(`Engine Module: ${fs.realpathSync(path.join(__dirname, 'src/pilot/browser/browser-controller.js'))}`);","allowMultiple":false},{"targetContent":"        console.log(`HUD Module: ${fs.realpathSync(path.join(__dirname, 'src/pilot/browser/browser-overlay-layer.js'))}`);","replacementContent":"        logger.status(`HUD Module: ${fs.realpathSync(path.join(__dirname, 'src/pilot/browser/browser-overlay-layer.js'))}`);","allowMultiple":false},{"targetContent":"        console.log(`Node Version: ${process.version} | CWD: ${process.cwd()} | Platform: ${process.platform}`);","replacementContent":"        logger.status(`Node Version: ${process.version} | CWD: ${process.cwd()} | Platform: ${process.platform}`);","allowMultiple":false},{"targetContent":"        console.log(`Configured API Key Present: ${getKey() ? 'TRUE [REDACTED0_0 ' : 'FALSE'}`);","replacementContent":"        logger.status(`Configured API Key Present: ${getKey() ? 'TRUE [REDACTED0_0 ' : 'FALSE'}`);","allowMultiple":false},{"targetContent":"            console.log(`[SUPERVOICE0_0  Codez48 Supervoice Studio is running at http://localhost:${port}`);","replacementContent":"            logger.status(`[SUPERVOICE0_0  Codez48 Supervoice Studio is running at http://localhost:${port}`);","allowMultiple":false},{"targetContent":"            console.log(JSON.stringify(voiceProfileManager.listProfiles(), null, 2));","replacementContent":"            logger.status(JSON.stringify(voiceProfileManager.listProfiles(), null, 2));","allowMultiple":false},{"targetContent":"                console.log(`[VOICE RECORD0_0  Opening recorder at http://localhost:${p}`);","replacementContent":"                logger.status(`[VOICE RECORD0_0  Opening recorder at http://localhost:${p}`);","allowMultiple":false},{"targetContent":"                console.log(`[VOICE PREVIEW0_0  Generated preview WAV at: ${r.outputPath}`);","replacementContent":"                logger.status(`[VOICE PREVIEW0_0  Generated preview WAV at: ${r.outputPath}`);","allowMultiple":false},{"targetContent":"            console.log(`[SPEAK0_0  Generated speech WAV at: ${r.outputPath} (Engine: ${r.engine})`);","replacementContent":"            logger.status(`[SPEAK0_0  Generated speech WAV at: ${r.outputPath} (Engine: ${r.engine})`);","allowMultiple":false},{"targetContent":"            console.log(`\\x1b[36m[SUPERVISOR0_0  Codez48 Supervisor is running at ${supervisorUrl}\\x1b[0m`);","replacementContent":"            logger.status(`\\x1b[36m[SUPERVISOR0_0  Codez48 Supervisor is running at ${supervisorUrl}\\x1b[0m`);","allowMultiple":false},{"targetContent":"            console.log('\\x1b[32m[SUPERVISOR0_0  Voice-controlled WhatsApp automation ready. Opening browser...\\x1b[0m');","replacementContent":"            logger.user('\\x1b[32m[SUPERVISOR0_0  Voice-controlled WhatsApp automation ready. Opening browser...\\x1b[0m');","allowMultiple":false},{"targetContent":"            console.log('\\nCODEZ48 CLI v1.3.0\\nUsage: codez48 <command>\\nCommands: login, ai, pilot, open, find, chat, share, list-products, add-product, logout, scrap, supervoice, voices, speak, whatsapp-test\\n');","replacementContent":"            logger.status('\\nCODEZ48 CLI v1.3.0\\nUsage: codez48 <command>\\nCommands: login, ai, pilot, open, find, chat, share, list-products, add-product, logout, scrap, supervoice, voices, speak, whatsapp-test\\n');","allowMultiple":false},{"targetContent":"main().catch(err => { if (err.name !== 'Error [ERR_PROCESS_TERMINATED0_0 ') console.error(err); process.exit(1); });","replacementContent":"main().catch(err => { if (err.name !== 'Error [ERR_PROCESS_TERMINATED0_0 ') logger.error(err); process.exit(1); });","allowMultiple":false}0_0 }0_0 