@ngao/search 1.0.0-alpha.1 → 1.0.0-alpha.11

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/dist-bundled/main.js +372 -69
  2. package/package.json +6 -2
@@ -1,3 +1,4 @@
1
+ #!/usr/bin/env node
1
2
  /******/ (() => { // webpackBootstrap
2
3
  /******/ var __webpack_modules__ = ({
3
4
 
@@ -20113,7 +20114,7 @@ function _stringFormat(Class, format, fnOrRegex, _params = {}) {
20113
20114
  * Used by the MCP SDK server to validate tool inputs
20114
20115
  */
20115
20116
  Object.defineProperty(exports, "__esModule", ({ value: true }));
20116
- exports.toolMetadata = exports.toolSchemas = exports.ListIndexedDirsInputSchema = exports.GetReindexStatusInputSchema = exports.StartReindexInputSchema = exports.GetSearchHistoryInputSchema = exports.GetFileStatisticsInputSchema = exports.GetIndexInfoInputSchema = exports.GetStatsInputSchema = exports.IndexInputSchema = exports.SearchInputSchema = void 0;
20117
+ exports.toolMetadata = exports.toolSchemas = exports.NGAO_DOCUMENTATION = exports.GetDocumentationInputSchema = exports.ListIndexedDirsInputSchema = exports.GetReindexStatusInputSchema = exports.StartReindexInputSchema = exports.GetSearchHistoryInputSchema = exports.GetFileStatisticsInputSchema = exports.GetIndexInfoInputSchema = exports.GetStatsInputSchema = exports.IndexInputSchema = exports.SearchInputSchema = void 0;
20117
20118
  const zod_1 = __webpack_require__(7552);
20118
20119
  /**
20119
20120
  * Search tool input schema
@@ -20178,6 +20179,112 @@ exports.GetReindexStatusInputSchema = zod_1.z.object({
20178
20179
  * List indexed dirs tool input schema (no parameters)
20179
20180
  */
20180
20181
  exports.ListIndexedDirsInputSchema = zod_1.z.object({});
20182
+ /**
20183
+ * Get documentation tool input schema (no parameters)
20184
+ */
20185
+ exports.GetDocumentationInputSchema = zod_1.z.object({});
20186
+ /**
20187
+ * NGAO Search Documentation
20188
+ */
20189
+ exports.NGAO_DOCUMENTATION = `
20190
+ # NGAO Search - MCP Server Documentation
20191
+
20192
+ ## Overview
20193
+ NGAO Search is a Model Context Protocol (MCP) server that provides Claude with the ability to search and understand your codebase.
20194
+
20195
+ ## Available Tools
20196
+
20197
+ ### 1. search
20198
+ Search through indexed code and documentation.
20199
+ - **query** (required): Search query (e.g., "authentication handler", "database connection")
20200
+ - **maxResults** (optional): Maximum results (default: 50)
20201
+ - **sessionId** (optional): Session ID for tracking search history
20202
+
20203
+ Example: Search for "user authentication" in your codebase
20204
+
20205
+ ### 2. index
20206
+ Index a directory for searching.
20207
+ - **dirPath** (required): Directory path to index
20208
+
20209
+ Example: Index your project directory to make it searchable
20210
+
20211
+ ### 3. get_stats
20212
+ Get indexing statistics about the current index.
20213
+
20214
+ ### 4. get_index_info
20215
+ Get detailed information about the index including file breakdown by language and type.
20216
+
20217
+ ### 5. get_file_statistics
20218
+ Get per-file statistics.
20219
+ - **filePath** (optional): Specific file path for detailed stats
20220
+
20221
+ ### 6. list_indexed_dirs
20222
+ List all directories that are currently indexed.
20223
+
20224
+ ### 7. get_search_history
20225
+ Get search history for a session.
20226
+ - **sessionId** (required): Session ID to retrieve history for
20227
+
20228
+ ### 8. start_reindex
20229
+ Start a reindex operation to update the index.
20230
+ - **dirPath** (required): Directory to reindex
20231
+ - **mode** (optional): 'full', 'incremental', or 'smart' (default: incremental)
20232
+
20233
+ ### 9. get_reindex_status
20234
+ Check the status of a reindex operation.
20235
+ - **reindexId** (required): Reindex operation ID
20236
+
20237
+ ### 10. get_documentation
20238
+ Get this documentation about NGAO Search capabilities.
20239
+
20240
+ ## Supported Languages
20241
+ - TypeScript/JavaScript
20242
+ - Python
20243
+ - JSON
20244
+ - YAML
20245
+ - Markdown
20246
+
20247
+ ## How to Use
20248
+
20249
+ 1. **Setup**: Run \`npx @ngao/search@alpha --setup\` to configure Claude Desktop integration
20250
+
20251
+ 2. **Ask Claude**: Once setup, you can ask Claude questions about your code:
20252
+ - "How does authentication work in this project?"
20253
+ - "Find all database queries"
20254
+ - "Show me the error handling pattern"
20255
+ - "What's the structure of the config system?"
20256
+
20257
+ 3. **Claude uses NGAO Search**: Behind the scenes, Claude uses the search tools to:
20258
+ - Search your codebase for relevant files
20259
+ - Extract code blocks and documentation
20260
+ - Understand the project structure
20261
+ - Provide accurate, context-aware answers
20262
+
20263
+ ## Configuration
20264
+
20265
+ Project configuration is stored in \`.ngao-search.json\`:
20266
+ \`\`\`json
20267
+ {
20268
+ "port": 3000,
20269
+ "indexDir": ".ngao-search-index",
20270
+ "includePaths": ["**/*.ts", "**/*.js", "**/*.py", "**/*.md"],
20271
+ "excludePaths": ["node_modules/**", "dist/**", ".git/**"]
20272
+ }
20273
+ \`\`\`
20274
+
20275
+ ## Tips for Best Results
20276
+
20277
+ 1. **Index the right directories**: Make sure your project root is indexed
20278
+ 2. **Use specific queries**: "Find authentication handlers" works better than "auth"
20279
+ 3. **Provide context**: Tell Claude what you're working on
20280
+ 4. **Ask follow-ups**: Claude remembers the search context
20281
+
20282
+ ## Troubleshooting
20283
+
20284
+ - **No results**: Try simpler search terms
20285
+ - **Slow searches**: Large projects may take longer initially
20286
+ - **Need to reindex**: Run \`start_reindex\` with your project directory
20287
+ `;
20181
20288
  /**
20182
20289
  * All tool schemas as an object map
20183
20290
  */
@@ -20191,6 +20298,7 @@ exports.toolSchemas = {
20191
20298
  start_reindex: exports.StartReindexInputSchema,
20192
20299
  get_reindex_status: exports.GetReindexStatusInputSchema,
20193
20300
  list_indexed_dirs: exports.ListIndexedDirsInputSchema,
20301
+ get_documentation: exports.GetDocumentationInputSchema,
20194
20302
  };
20195
20303
  /**
20196
20304
  * Tool metadata mapping tool names to descriptions
@@ -20233,6 +20341,10 @@ exports.toolMetadata = {
20233
20341
  description: 'List all indexed directories',
20234
20342
  schema: exports.ListIndexedDirsInputSchema,
20235
20343
  },
20344
+ get_documentation: {
20345
+ description: 'Get NGAO Search documentation and capabilities',
20346
+ schema: exports.GetDocumentationInputSchema,
20347
+ },
20236
20348
  };
20237
20349
 
20238
20350
 
@@ -28821,6 +28933,14 @@ function fromJSONSchema(schema, params) {
28821
28933
  }
28822
28934
 
28823
28935
 
28936
+ /***/ },
28937
+
28938
+ /***/ 3785
28939
+ (module) {
28940
+
28941
+ "use strict";
28942
+ module.exports = require("readline");
28943
+
28824
28944
  /***/ },
28825
28945
 
28826
28946
  /***/ 3835
@@ -33307,6 +33427,121 @@ exports.BlockImpl = BlockImpl;
33307
33427
  "use strict";
33308
33428
  module.exports = require("node:buffer");
33309
33429
 
33430
+ /***/ },
33431
+
33432
+ /***/ 4600
33433
+ (__unused_webpack_module, exports, __webpack_require__) {
33434
+
33435
+ "use strict";
33436
+
33437
+ /**
33438
+ * Unified Entry Point for NGAO Search
33439
+ * Supports multiple transport modes: stdio (MCP) or http (REST)
33440
+ *
33441
+ * Transport selection via environment variable:
33442
+ * - MCP_TRANSPORT=stdio - Start MCP stdio server only (for Claude Desktop)
33443
+ * - MCP_TRANSPORT=http - Start REST HTTP server only (default)
33444
+ * - --setup - Run interactive MCP setup for Claude
33445
+ *
33446
+ * All transports share the same NgaoSearchService instance
33447
+ */
33448
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
33449
+ if (k2 === undefined) k2 = k;
33450
+ var desc = Object.getOwnPropertyDescriptor(m, k);
33451
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
33452
+ desc = { enumerable: true, get: function() { return m[k]; } };
33453
+ }
33454
+ Object.defineProperty(o, k2, desc);
33455
+ }) : (function(o, m, k, k2) {
33456
+ if (k2 === undefined) k2 = k;
33457
+ o[k2] = m[k];
33458
+ }));
33459
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
33460
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
33461
+ }) : function(o, v) {
33462
+ o["default"] = v;
33463
+ });
33464
+ var __importStar = (this && this.__importStar) || function (mod) {
33465
+ if (mod && mod.__esModule) return mod;
33466
+ var result = {};
33467
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
33468
+ __setModuleDefault(result, mod);
33469
+ return result;
33470
+ };
33471
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
33472
+ const ngao_search_service_1 = __webpack_require__(9055);
33473
+ const mcp_transport_1 = __webpack_require__(6716);
33474
+ const rest_transport_1 = __webpack_require__(1256);
33475
+ const logger_1 = __webpack_require__(1789);
33476
+ // Check for --setup flag for interactive setup
33477
+ const args = process.argv.slice(2);
33478
+ const setupMode = args.includes('--setup') || process.env.NGAO_SETUP === 'true';
33479
+ // When setup completes, auto-start in MCP stdio mode for Claude
33480
+ if (setupMode) {
33481
+ process.env.MCP_TRANSPORT = 'stdio';
33482
+ }
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
+ /**
33486
+ * Main async function
33487
+ */
33488
+ async function main() {
33489
+ // Run setup first if requested, then continue to start server
33490
+ if (setupMode) {
33491
+ try {
33492
+ const { setupMCP } = await Promise.resolve().then(() => __importStar(__webpack_require__(5021)));
33493
+ const { projectDir, port } = await setupMCP();
33494
+ // Set environment vars for server startup
33495
+ process.env.NGAO_SEARCH_PROJECT = projectDir;
33496
+ if (port)
33497
+ process.env.NGAO_SEARCH_PORT = port;
33498
+ console.log('\n🚀 Starting NGAO Search MCP server...\n');
33499
+ // Continue to server startup below
33500
+ }
33501
+ catch (error) {
33502
+ console.error('Setup failed:', error);
33503
+ process.exit(1);
33504
+ }
33505
+ }
33506
+ try {
33507
+ // Create shared service instance
33508
+ const service = new ngao_search_service_1.NgaoSearchService();
33509
+ switch (transport) {
33510
+ case 'stdio': {
33511
+ const logger = (0, logger_1.createLogger)('stdio');
33512
+ logger.info('Transport: MCP stdio (Claude Desktop)');
33513
+ logger.info('Initializing NgaoSearchService');
33514
+ const mcpTransport = new mcp_transport_1.McpTransport(service, logger);
33515
+ await mcpTransport.start();
33516
+ logger.info('NGAO Search server started successfully');
33517
+ break;
33518
+ }
33519
+ case 'http': {
33520
+ const logger = (0, logger_1.createLogger)('http');
33521
+ logger.info('Transport: HTTP REST API');
33522
+ logger.info('Initializing NgaoSearchService');
33523
+ const restTransport = new rest_transport_1.RestTransport(service, logger);
33524
+ restTransport.start(httpPort);
33525
+ logger.info('NGAO Search server started successfully');
33526
+ break;
33527
+ }
33528
+ default:
33529
+ console.error(`❌ Unknown transport: ${transport}`);
33530
+ console.error(' Valid options: stdio, http');
33531
+ console.error(' Default: http');
33532
+ process.exit(1);
33533
+ }
33534
+ }
33535
+ catch (error) {
33536
+ console.error('❌ Failed to start NGAO Search server:');
33537
+ console.error(error);
33538
+ process.exit(1);
33539
+ }
33540
+ }
33541
+ // Start the server
33542
+ main();
33543
+
33544
+
33310
33545
  /***/ },
33311
33546
 
33312
33547
  /***/ 4633
@@ -34257,6 +34492,116 @@ function parseLiteralDef(def, refs) {
34257
34492
  exports.parseLiteralDef = parseLiteralDef;
34258
34493
 
34259
34494
 
34495
+ /***/ },
34496
+
34497
+ /***/ 5021
34498
+ (__unused_webpack_module, exports, __webpack_require__) {
34499
+
34500
+ "use strict";
34501
+
34502
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
34503
+ if (k2 === undefined) k2 = k;
34504
+ var desc = Object.getOwnPropertyDescriptor(m, k);
34505
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
34506
+ desc = { enumerable: true, get: function() { return m[k]; } };
34507
+ }
34508
+ Object.defineProperty(o, k2, desc);
34509
+ }) : (function(o, m, k, k2) {
34510
+ if (k2 === undefined) k2 = k;
34511
+ o[k2] = m[k];
34512
+ }));
34513
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
34514
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
34515
+ }) : function(o, v) {
34516
+ o["default"] = v;
34517
+ });
34518
+ var __importStar = (this && this.__importStar) || function (mod) {
34519
+ if (mod && mod.__esModule) return mod;
34520
+ var result = {};
34521
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
34522
+ __setModuleDefault(result, mod);
34523
+ return result;
34524
+ };
34525
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
34526
+ exports.setupMCP = void 0;
34527
+ const fs = __importStar(__webpack_require__(9896));
34528
+ const path = __importStar(__webpack_require__(6928));
34529
+ const readline = __importStar(__webpack_require__(3785));
34530
+ const child_process_1 = __webpack_require__(5317);
34531
+ const rl = readline.createInterface({
34532
+ input: process.stdin,
34533
+ output: process.stdout,
34534
+ });
34535
+ function question(prompt) {
34536
+ return new Promise((resolve) => {
34537
+ rl.question(prompt, (answer) => {
34538
+ resolve(answer);
34539
+ });
34540
+ });
34541
+ }
34542
+ async function setupMCP() {
34543
+ console.log('\n🔧 NGAO Search - MCP Setup for Claude Code\n');
34544
+ // Ask for project directory
34545
+ const projectDir = await question('📁 Enter your project directory path (or press Enter for current): ');
34546
+ 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
+ // Create .ngao-search config in project
34551
+ const projectConfigPath = path.join(resolvedProjectDir, '.ngao-search.json');
34552
+ if (!fs.existsSync(projectConfigPath)) {
34553
+ const projectConfig = {
34554
+ port,
34555
+ indexDir: path.join(resolvedProjectDir, '.ngao-search-index'),
34556
+ includePaths: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx', '**/*.py', '**/*.md'],
34557
+ excludePaths: ['node_modules/**', 'dist/**', '.git/**', '.ngao-search-index/**'],
34558
+ };
34559
+ fs.writeFileSync(projectConfigPath, JSON.stringify(projectConfig, null, 2));
34560
+ console.log(`✅ Project config created: ${projectConfigPath}`);
34561
+ }
34562
+ // Create .mcp-config.json in project for reference
34563
+ const mcpConfigPath = path.join(resolvedProjectDir, '.mcp-config.json');
34564
+ const mcpConfig = {
34565
+ mcpServers: {
34566
+ 'ngao-search': {
34567
+ command: 'npx',
34568
+ args: ['@ngao/search'],
34569
+ env: {
34570
+ NGAO_SEARCH_PROJECT: resolvedProjectDir,
34571
+ MCP_TRANSPORT: 'stdio',
34572
+ },
34573
+ },
34574
+ },
34575
+ };
34576
+ fs.writeFileSync(mcpConfigPath, JSON.stringify(mcpConfig, null, 2));
34577
+ console.log(`✅ MCP config created: ${mcpConfigPath}`);
34578
+ // Register with Claude Code CLI using `claude mcp add`
34579
+ try {
34580
+ console.log('\n📡 Registering with Claude Code CLI...');
34581
+ (0, child_process_1.execSync)(`cd "${resolvedProjectDir}" && claude mcp add -e NGAO_SEARCH_PROJECT="${resolvedProjectDir}" -e MCP_TRANSPORT=stdio -- ngao-search npx @ngao/search`, { stdio: 'pipe' });
34582
+ console.log('✅ MCP server registered with Claude Code CLI');
34583
+ }
34584
+ catch (error) {
34585
+ console.log('⚠️ Could not auto-register with Claude Code CLI.');
34586
+ console.log(' Please run this command manually in your project directory:');
34587
+ console.log(`\n cd "${resolvedProjectDir}"`);
34588
+ console.log(' claude mcp add -e NGAO_SEARCH_PROJECT="' + resolvedProjectDir + '" -e MCP_TRANSPORT=stdio -- ngao-search npx @ngao/search\n');
34589
+ }
34590
+ // Show setup instructions
34591
+ console.log('\n📝 Setup Complete!\n');
34592
+ console.log('✨ NGAO Search is now integrated with Claude Code');
34593
+ console.log('\nℹ️ Configuration Details:');
34594
+ console.log('📍 Project directory: ' + resolvedProjectDir);
34595
+ console.log('🔌 Server port: ' + port);
34596
+ console.log('📌 Project config: ' + projectConfigPath);
34597
+ console.log('📌 MCP config: ' + mcpConfigPath + '\n');
34598
+ console.log('🚀 You can now use NGAO Search in Claude Code!\n');
34599
+ rl.close();
34600
+ return { projectDir: resolvedProjectDir, port };
34601
+ }
34602
+ exports.setupMCP = setupMCP;
34603
+
34604
+
34260
34605
  /***/ },
34261
34606
 
34262
34607
  /***/ 5039
@@ -36321,6 +36666,14 @@ class YAMLParser extends base_file_parser_1.BaseFileParser {
36321
36666
  exports.YAMLParser = YAMLParser;
36322
36667
 
36323
36668
 
36669
+ /***/ },
36670
+
36671
+ /***/ 5317
36672
+ (module) {
36673
+
36674
+ "use strict";
36675
+ module.exports = require("child_process");
36676
+
36324
36677
  /***/ },
36325
36678
 
36326
36679
  /***/ 5333
@@ -43630,6 +43983,7 @@ const mcp_js_1 = __webpack_require__(7011);
43630
43983
  const stdio_js_1 = __webpack_require__(6166);
43631
43984
  const zod_1 = __webpack_require__(7552);
43632
43985
  const tool_registry_1 = __webpack_require__(8223);
43986
+ const tool_schemas_1 = __webpack_require__(2439);
43633
43987
  /**
43634
43988
  * MCP Transport - Handles MCP protocol over stdio
43635
43989
  */
@@ -43772,6 +44126,16 @@ class McpTransport {
43772
44126
  ],
43773
44127
  };
43774
44128
  });
44129
+ this.server.tool('get_documentation', 'Get NGAO Search documentation and capabilities', {}, async () => {
44130
+ return {
44131
+ content: [
44132
+ {
44133
+ type: 'text',
44134
+ text: tool_schemas_1.NGAO_DOCUMENTATION,
44135
+ },
44136
+ ],
44137
+ };
44138
+ });
43775
44139
  }
43776
44140
  /**
43777
44141
  * Route tool calls to service methods
@@ -65974,74 +66338,13 @@ exports.PythonParser = PythonParser;
65974
66338
  /******/ })();
65975
66339
  /******/
65976
66340
  /************************************************************************/
65977
- var __webpack_exports__ = {};
65978
- // This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
65979
- (() => {
65980
- "use strict";
65981
- var exports = __webpack_exports__;
65982
-
65983
- /**
65984
- * Unified Entry Point for NGAO Search
65985
- * Supports multiple transport modes: stdio (MCP) or http (REST)
65986
- *
65987
- * Transport selection via environment variable:
65988
- * - MCP_TRANSPORT=stdio - Start MCP stdio server only (for Claude Desktop)
65989
- * - MCP_TRANSPORT=http - Start REST HTTP server only (default)
65990
- *
65991
- * All transports share the same NgaoSearchService instance
65992
- */
65993
- Object.defineProperty(exports, "__esModule", ({ value: true }));
65994
- const ngao_search_service_1 = __webpack_require__(9055);
65995
- const mcp_transport_1 = __webpack_require__(6716);
65996
- const rest_transport_1 = __webpack_require__(1256);
65997
- const logger_1 = __webpack_require__(1789);
65998
- const transport = (process.env.MCP_TRANSPORT || 'http').toLowerCase();
65999
- const httpPort = process.env.PORT ? parseInt(process.env.PORT, 10) : 0; // 0 = random available port
66000
- /**
66001
- * Main async function
66002
- */
66003
- async function main() {
66004
- try {
66005
- // Create shared service instance
66006
- const service = new ngao_search_service_1.NgaoSearchService();
66007
- switch (transport) {
66008
- case 'stdio': {
66009
- const logger = (0, logger_1.createLogger)('stdio');
66010
- logger.info('Transport: MCP stdio (Claude Desktop)');
66011
- logger.info('Initializing NgaoSearchService');
66012
- const mcpTransport = new mcp_transport_1.McpTransport(service, logger);
66013
- await mcpTransport.start();
66014
- logger.info('NGAO Search server started successfully');
66015
- break;
66016
- }
66017
- case 'http': {
66018
- const logger = (0, logger_1.createLogger)('http');
66019
- logger.info('Transport: HTTP REST API');
66020
- logger.info('Initializing NgaoSearchService');
66021
- const restTransport = new rest_transport_1.RestTransport(service, logger);
66022
- restTransport.start(httpPort);
66023
- logger.info('NGAO Search server started successfully');
66024
- break;
66025
- }
66026
- default:
66027
- console.error(`❌ Unknown transport: ${transport}`);
66028
- console.error(' Valid options: stdio, http');
66029
- console.error(' Default: http');
66030
- process.exit(1);
66031
- }
66032
- }
66033
- catch (error) {
66034
- console.error('❌ Failed to start NGAO Search server:');
66035
- console.error(error);
66036
- process.exit(1);
66037
- }
66038
- }
66039
- // Start the server
66040
- main();
66041
-
66042
- })();
66043
-
66044
- module.exports = __webpack_exports__;
66341
+ /******/
66342
+ /******/ // startup
66343
+ /******/ // Load entry module and return exports
66344
+ /******/ // This entry module is referenced by other modules so it can't be inlined
66345
+ /******/ var __webpack_exports__ = __webpack_require__(4600);
66346
+ /******/ module.exports = __webpack_exports__;
66347
+ /******/
66045
66348
  /******/ })()
66046
66349
  ;
66047
66350
  //# sourceMappingURL=main.js.map
package/package.json CHANGED
@@ -1,9 +1,12 @@
1
1
  {
2
2
  "name": "@ngao/search",
3
- "version": "1.0.0-alpha.1",
3
+ "version": "1.0.0-alpha.11",
4
4
  "description": "NGAO Search - Model Context Protocol Server for Local Code/Document Search with LLM-Friendly Output",
5
5
  "main": "dist/main.js",
6
6
  "types": "dist/index.d.ts",
7
+ "publishConfig": {
8
+ "access": "public"
9
+ },
7
10
  "bin": {
8
11
  "ngao-search": "dist-bundled/main.js"
9
12
  },
@@ -14,7 +17,8 @@
14
17
  "scripts": {
15
18
  "build": "npm run build:backend && npm run clean:dist",
16
19
  "build:backend": "webpack --config webpack.backend.config.js --mode production && tsc --emitDeclarationOnly",
17
- "build:bundled": "BUNDLE=true webpack --config webpack.backend.config.js && npm run clean:dist:bundled",
20
+ "build:bundled": "BUNDLE=true webpack --config webpack.backend.config.js && npm run add:shebang && npm run clean:dist:bundled",
21
+ "add:shebang": "node -e \"const fs=require('fs');const f='dist-bundled/main.js';const c=fs.readFileSync(f,'utf8');if(!c.startsWith('#!')){fs.writeFileSync(f,'#!/usr/bin/env node\\n'+c);console.log('✓ Shebang added');}\"",
18
22
  "clean:dist": "rm -rf dist/backend dist/cli dist/mcp dist/shared dist/index.* dist/**/*.map dist/*.map 2>/dev/null; true",
19
23
  "clean:dist:bundled": "rm -rf dist-bundled/backend dist-bundled/cli dist-bundled/mcp dist-bundled/shared dist-bundled/*.map 2>/dev/null; true",
20
24
  "start": "npm run build && node dist/main.js",