talos-mcp 0.22.0

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 +46 -0
  2. package/package.json +22 -0
package/bin/run.js ADDED
@@ -0,0 +1,46 @@
1
+ #!/usr/bin/env node
2
+
3
+ "use strict";
4
+
5
+ const { spawnSync } = require("child_process");
6
+ const path = require("path");
7
+ const fs = require("fs");
8
+
9
+ const PLATFORMS = {
10
+ "darwin-arm64": "@talos-mcp/darwin-arm64",
11
+ "darwin-x64": "@talos-mcp/darwin-x64",
12
+ "linux-arm64": "@talos-mcp/linux-arm64",
13
+ "linux-x64": "@talos-mcp/linux-x64",
14
+ };
15
+
16
+ const platformKey = `${process.platform}-${process.arch}`;
17
+ const pkg = PLATFORMS[platformKey];
18
+
19
+ if (!pkg) {
20
+ process.stderr.write(
21
+ `talos-mcp: unsupported platform ${platformKey}.\n` +
22
+ `Supported: ${Object.keys(PLATFORMS).join(", ")}.\n` +
23
+ `Build from source: https://github.com/Nosmoht/talos-mcp-server\n`
24
+ );
25
+ process.exit(1);
26
+ }
27
+
28
+ let binPath;
29
+ try {
30
+ const pkgDir = path.dirname(require.resolve(`${pkg}/package.json`));
31
+ binPath = path.join(pkgDir, "bin", "talos-mcp");
32
+ } catch (_) {
33
+ process.stderr.write(
34
+ `talos-mcp: platform package ${pkg} is not installed.\n` +
35
+ `Try: npm install ${pkg}\n`
36
+ );
37
+ process.exit(1);
38
+ }
39
+
40
+ if (!fs.existsSync(binPath)) {
41
+ process.stderr.write(`talos-mcp: binary not found at ${binPath}\n`);
42
+ process.exit(1);
43
+ }
44
+
45
+ const result = spawnSync(binPath, process.argv.slice(2), { stdio: "inherit" });
46
+ process.exit(result.status ?? 1);
package/package.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "talos-mcp",
3
+ "version": "0.22.0",
4
+ "description": "MCP server for Talos Linux cluster management via native gRPC API",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/Nosmoht/talos-mcp-server"
9
+ },
10
+ "bin": {
11
+ "talos-mcp": "bin/run.js"
12
+ },
13
+ "files": [
14
+ "bin/run.js"
15
+ ],
16
+ "optionalDependencies": {
17
+ "@talos-mcp/linux-x64": "0.22.0",
18
+ "@talos-mcp/linux-arm64": "0.22.0",
19
+ "@talos-mcp/darwin-x64": "0.22.0",
20
+ "@talos-mcp/darwin-arm64": "0.22.0"
21
+ }
22
+ }