nucleus-mcp 1.0.2

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/bin/run.js +30 -0
  2. package/package.json +16 -0
package/bin/run.js ADDED
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { spawnSync } = require('child_process');
4
+ const sys = require('sys');
5
+
6
+ const args = process.argv.slice(2);
7
+
8
+ function runCommand(command, args) {
9
+ const result = spawnSync(command, args, { stdio: 'inherit', shell: true });
10
+ if (result.error) {
11
+ return false;
12
+ }
13
+ return result.status === 0;
14
+ }
15
+
16
+ // 1. Try running directly
17
+ const success = runCommand('nucleus-mcp', args);
18
+
19
+ if (!success) {
20
+ console.log('Nucleus-MCP not found. Attempting to install via pip...');
21
+ const installSuccess = runCommand('pip', ['install', 'nucleus-mcp']);
22
+
23
+ if (installSuccess) {
24
+ console.log('Successfully installed nucleus-mcp. Running command...');
25
+ runCommand('nucleus-mcp', args);
26
+ } else {
27
+ console.error('Failed to install nucleus-mcp. Please ensure python3 and pip are installed.');
28
+ process.exit(1);
29
+ }
30
+ }
package/package.json ADDED
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "nucleus-mcp",
3
+ "version": "1.0.2",
4
+ "description": "NPM wrapper for Nucleus MCP - The Sovereign Agent Control Plane",
5
+ "bin": {
6
+ "nucleus-mcp": "./bin/run.js"
7
+ },
8
+ "scripts": {
9
+ "test": "echo \"Error: no test specified\" && exit 1"
10
+ },
11
+ "author": "Nucleus Team",
12
+ "license": "MIT",
13
+ "engines": {
14
+ "node": ">=14.0.0"
15
+ }
16
+ }