@ngao/search 1.0.0-alpha.11 ā 1.0.0-alpha.12
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/dist-bundled/main.js +4 -11
- package/package.json +1 -1
package/dist-bundled/main.js
CHANGED
|
@@ -33481,7 +33481,6 @@ if (setupMode) {
|
|
|
33481
33481
|
process.env.MCP_TRANSPORT = 'stdio';
|
|
33482
33482
|
}
|
|
33483
33483
|
const transport = (process.env.MCP_TRANSPORT || 'http').toLowerCase();
|
|
33484
|
-
const httpPort = process.env.PORT ? parseInt(process.env.PORT, 10) : 0; // 0 = random available port
|
|
33485
33484
|
/**
|
|
33486
33485
|
* Main async function
|
|
33487
33486
|
*/
|
|
@@ -33490,11 +33489,9 @@ async function main() {
|
|
|
33490
33489
|
if (setupMode) {
|
|
33491
33490
|
try {
|
|
33492
33491
|
const { setupMCP } = await Promise.resolve().then(() => __importStar(__webpack_require__(5021)));
|
|
33493
|
-
const { projectDir
|
|
33492
|
+
const { projectDir } = await setupMCP();
|
|
33494
33493
|
// Set environment vars for server startup
|
|
33495
33494
|
process.env.NGAO_SEARCH_PROJECT = projectDir;
|
|
33496
|
-
if (port)
|
|
33497
|
-
process.env.NGAO_SEARCH_PORT = port;
|
|
33498
33495
|
console.log('\nš Starting NGAO Search MCP server...\n');
|
|
33499
33496
|
// Continue to server startup below
|
|
33500
33497
|
}
|
|
@@ -33521,7 +33518,7 @@ async function main() {
|
|
|
33521
33518
|
logger.info('Transport: HTTP REST API');
|
|
33522
33519
|
logger.info('Initializing NgaoSearchService');
|
|
33523
33520
|
const restTransport = new rest_transport_1.RestTransport(service, logger);
|
|
33524
|
-
restTransport.start(
|
|
33521
|
+
restTransport.start(0); // 0 = randomly assigned available port
|
|
33525
33522
|
logger.info('NGAO Search server started successfully');
|
|
33526
33523
|
break;
|
|
33527
33524
|
}
|
|
@@ -34544,14 +34541,10 @@ async function setupMCP() {
|
|
|
34544
34541
|
// Ask for project directory
|
|
34545
34542
|
const projectDir = await question('š Enter your project directory path (or press Enter for current): ');
|
|
34546
34543
|
const resolvedProjectDir = projectDir.trim() || process.cwd();
|
|
34547
|
-
// Ask for port
|
|
34548
|
-
const portAnswer = await question('š Enter port for MCP server (default: 3000): ');
|
|
34549
|
-
const port = portAnswer.trim() || '3000';
|
|
34550
34544
|
// Create .ngao-search config in project
|
|
34551
34545
|
const projectConfigPath = path.join(resolvedProjectDir, '.ngao-search.json');
|
|
34552
34546
|
if (!fs.existsSync(projectConfigPath)) {
|
|
34553
34547
|
const projectConfig = {
|
|
34554
|
-
port,
|
|
34555
34548
|
indexDir: path.join(resolvedProjectDir, '.ngao-search-index'),
|
|
34556
34549
|
includePaths: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx', '**/*.py', '**/*.md'],
|
|
34557
34550
|
excludePaths: ['node_modules/**', 'dist/**', '.git/**', '.ngao-search-index/**'],
|
|
@@ -34592,12 +34585,12 @@ async function setupMCP() {
|
|
|
34592
34585
|
console.log('⨠NGAO Search is now integrated with Claude Code');
|
|
34593
34586
|
console.log('\nā¹ļø Configuration Details:');
|
|
34594
34587
|
console.log('š Project directory: ' + resolvedProjectDir);
|
|
34595
|
-
console.log('š Server port: '
|
|
34588
|
+
console.log('š Server port: Automatically assigned');
|
|
34596
34589
|
console.log('š Project config: ' + projectConfigPath);
|
|
34597
34590
|
console.log('š MCP config: ' + mcpConfigPath + '\n');
|
|
34598
34591
|
console.log('š You can now use NGAO Search in Claude Code!\n');
|
|
34599
34592
|
rl.close();
|
|
34600
|
-
return { projectDir: resolvedProjectDir
|
|
34593
|
+
return { projectDir: resolvedProjectDir };
|
|
34601
34594
|
}
|
|
34602
34595
|
exports.setupMCP = setupMCP;
|
|
34603
34596
|
|
package/package.json
CHANGED