@@ -117,7 +117,7 @@ function requireConfig() {
117117
118118function getClinchCore ( cfg ) {
119119 let ClinchCoreModule ;
120- try { ClinchCoreModule = require ( 'clinch-core' ) ; }
120+ try { ClinchCoreModule = require ( 'clinch-core' ) ; }
121121 catch {
122122 console . error ( 'clinch-core not found. Ensure it is linked or installed.' ) ;
123123 process . exit ( 1 ) ;
@@ -133,7 +133,7 @@ function getClinchCore(cfg) {
133133
134134 core . on ( 'log' , msg => console . log ( msg ) ) ;
135135 core . on ( 'error' , err => console . error ( 'Error:' , err . message ) ) ;
136-
136+
137137 return core ;
138138}
139139
@@ -149,7 +149,7 @@ function prompt(question) {
149149async function parseIntentWithLLM ( userInput , modelPath ) {
150150 console . log ( c . dim ( "\n[Agent Q] Booting local parser model to analyze your request..." ) ) ;
151151 let nodeLlama ;
152- try { nodeLlama = await import ( 'node-llama-cpp' ) ; }
152+ try { nodeLlama = await import ( 'node-llama-cpp' ) ; }
153153 catch ( e ) {
154154 console . error ( c . red ( "\nError: node-llama-cpp is required for conversational parsing." ) ) ;
155155 console . error ( "Please run: npm install -g node-llama-cpp\n" ) ;
@@ -348,10 +348,10 @@ program
348348 targetAddress = `ANP/C.${ sellers [ parseInt ( selection ) - 1 ] . agent_id } ` ;
349349 }
350350 } else {
351- constraints = {
352- intent : 'purchase' ,
353- item : opts . item || 'Item' ,
354- max_budget : parseFloat ( budget || 100 )
351+ constraints = {
352+ intent : 'purchase' ,
353+ item : opts . item || 'Item' ,
354+ max_budget : parseFloat ( budget || 100 )
355355 } ;
356356 if ( opts . category ) constraints . category = opts . category ;
357357 }
@@ -378,15 +378,15 @@ program
378378 strategy = 'sequential' ;
379379 console . log ( c . yellow ( `🤖 Squeeze Mode: Sequentially bargaining across top ${ maxSellers } sellers for "${ opts . category } "...\n` ) ) ;
380380 }
381-
381+
382382 if ( runAuto ) {
383383 await core . sandbox ( { modelPath : cfg . modelPath } ) ;
384384 } else {
385385 await core . initialize ( cfg . token ) ;
386386 }
387387
388388 const bestDeal = await core . negotiateCascade ( opts . category , constraints , maxSellers , strategy ) ;
389-
389+
390390 if ( bestDeal ) {
391391 console . log ( c . green ( c . bold ( `\n🏆 CASCADE COMPLETE: Secured optimal deal with ${ bestDeal . sellerId } at $${ bestDeal . finalPrice } !` ) ) ) ;
392392 } else {
@@ -412,11 +412,11 @@ program
412412
413413 core . on ( 'session_started' , ( { sessionId } ) => {
414414 console . log ( c . green ( `\n✓ Session started: ${ c . bold ( sessionId ) } ` ) ) ;
415- saveSessionState ( sessionId , core ) ;
415+ saveSessionState ( sessionId , core ) ;
416416 } ) ;
417417
418418 core . on ( 'callback_received' , ( { sessionId } ) => saveSessionState ( sessionId , core ) ) ;
419-
419+
420420 core . on ( 'session_closed' , ( { sessionId, outcome, finalPrice } ) => {
421421 saveSessionState ( sessionId , core ) ;
422422 if ( outcome === 'deal' ) {
@@ -438,10 +438,10 @@ program
438438 console . log ( c . bold ( '\nManual mode — type a price to counter, or "exit" / "accept":\n' ) ) ;
439439 const rl = readline . createInterface ( { input : process . stdin , output : process . stdout } ) ;
440440 rl . on ( 'line' , async ( cmd ) => {
441- if ( cmd === 'exit' ) {
442- await core . exitSession ( sessionId ) ;
441+ if ( cmd === 'exit' ) {
442+ await core . exitSession ( sessionId ) ;
443443 saveSessionState ( sessionId , core ) ;
444- process . exit ( 0 ) ;
444+ process . exit ( 0 ) ;
445445 }
446446 else if ( cmd === 'accept' ) { console . log ( c . green ( `Accepting...` ) ) ; rl . close ( ) ; }
447447 else {
@@ -462,7 +462,7 @@ program
462462 const sessions = loadSessions ( ) ;
463463 const ids = Object . keys ( sessions ) ;
464464 if ( ids . length === 0 ) return console . log ( c . yellow ( 'No saved sessions found.' ) ) ;
465-
465+
466466 console . log ( c . bold ( `Found ${ ids . length } session(s):\n` ) ) ;
467467 ids . forEach ( id => {
468468 const s = JSON . parse ( sessions [ id ] . state ) ;
@@ -478,7 +478,7 @@ program
478478 . action ( async ( sessionId , opts ) => {
479479 const cfg = requireConfig ( ) ;
480480 const sessions = loadSessions ( ) ;
481-
481+
482482 if ( ! sessions [ sessionId ] ) {
483483 console . error ( c . red ( `Session ${ sessionId } not found in local store.` ) ) ;
484484 process . exit ( 1 ) ;
@@ -516,7 +516,7 @@ program
516516 . option ( '--list' , 'List domains with registered local credentials' )
517517 . option ( '--remove <domain>' , 'Delete a credential from your local vault' )
518518 . action ( async ( opts ) => {
519- const cfg = requireConfig ( ) ;
519+ const cfg = requireConfig ( ) ;
520520 const secrets = loadSecrets ( ) ;
521521
522522 if ( opts . remove ) {
0 commit comments