nscript-mcp 0.3.6 → 0.3.8

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/README.md CHANGED
@@ -1,10 +1,24 @@
1
1
  # nscript-mcp
2
2
 
3
- Install the NScript MCP server with npx -y nscript-mcp@0.3.6 or add it as a project
4
- dependency. The package includes the NScript CLI and MCP server for Linux x86_64/arm64,
5
- macOS Apple Silicon, and Windows x64/arm64.
3
+ Install the NScript MCP server with `npx -y nscript-mcp@0.3.8` or add it as a project
4
+ dependency. The package exposes both `nscript-mcp` and the `nscript` CLI, and includes
5
+ the MCP server and WASM execution guest
6
+ for Linux x86_64/arm64, macOS Apple Silicon, and Windows x64/arm64.
7
+
8
+ Run CLI commands without a separate install with:
9
+
10
+ ```sh
11
+ npx --yes --package=nscript-mcp@0.3.8 nscript deploy --help
12
+ ```
6
13
 
7
14
  The default transport is stdio. Add --http to run the opt-in Streamable HTTP
8
15
  transport. HTTP mode requires NSCRIPT_MCP_BEARER_TOKEN; configure
9
16
  NSCRIPT_MCP_ALLOWED_ORIGINS and, when serving a non-local hostname,
10
17
  NSCRIPT_MCP_ALLOWED_HOSTS.
18
+
19
+ WASM sandbox execution is dry by default. Live relay execution and durable
20
+ bot sessions are disabled until the server administrator sets
21
+ NSCRIPT_MCP_LIVE_ENABLED and configures NSCRIPT_MCP_RELAYS, NSCRIPT_MCP_SIGNERS,
22
+ NSCRIPT_MCP_INPUTS, and NSCRIPT_MCP_STATE_DIR. Durable sessions can refer to
23
+ server-held input values without storing them in session records. See the
24
+ repository MCP guide for the full policy and host configuration.
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -22,8 +22,9 @@ if (!target) {
22
22
  const binDir = path.join(__dirname, target);
23
23
  const cli = path.join(binDir, 'nscript' + executable);
24
24
  const server = path.join(binDir, 'nscript-mcp' + executable);
25
- if (!existsSync(cli) || !existsSync(server)) {
26
- process.stderr.write('nscript-mcp: bundled binaries are missing; reinstall the package\n');
25
+ const wasm = path.join(binDir, 'nscript_wasm.wasm');
26
+ if (!existsSync(cli) || !existsSync(server) || !existsSync(wasm)) {
27
+ process.stderr.write('nscript-mcp: bundled runtime files are missing; reinstall the package\n');
27
28
  process.exit(1);
28
29
  }
29
30
 
package/bin/nscript.js ADDED
@@ -0,0 +1,35 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ const { spawn } = require('node:child_process');
5
+ const { existsSync } = require('node:fs');
6
+ const path = require('node:path');
7
+
8
+ const platform = process.platform;
9
+ const arch = process.arch;
10
+ const executable = platform === 'win32' ? '.exe' : '';
11
+ const target = {
12
+ linux: { x64: 'linux-x64', arm64: 'linux-arm64' },
13
+ darwin: { arm64: 'darwin-arm64' },
14
+ win32: { x64: 'win-x64', arm64: 'win-arm64' }
15
+ }[platform]?.[arch] ?? null;
16
+
17
+ if (!target) {
18
+ process.stderr.write('nscript: unsupported platform ' + platform + '/' + arch + '; supported: linux/x64, linux/arm64, darwin/arm64, win32/x64, win32/arm64\n');
19
+ process.exit(1);
20
+ }
21
+
22
+ const cli = path.join(__dirname, target, 'nscript' + executable);
23
+ if (!existsSync(cli)) {
24
+ process.stderr.write('nscript: bundled CLI is missing; reinstall the package\n');
25
+ process.exit(1);
26
+ }
27
+
28
+ const child = spawn(cli, process.argv.slice(2), { stdio: 'inherit' });
29
+ child.on('error', error => {
30
+ process.stderr.write('nscript: could not start CLI: ' + error.message + '\n');
31
+ process.exitCode = 1;
32
+ });
33
+ child.on('exit', (code, signal) => {
34
+ process.exitCode = signal ? 1 : (code ?? 1);
35
+ });
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,27 +1,34 @@
1
1
  {
2
2
  "name": "nscript-mcp",
3
- "version": "0.3.6",
4
- "description": "MCP server for checking, inspecting, and simulating NScript programs",
3
+ "version": "0.3.8",
4
+ "description": "NScript CLI and MCP server for checking, inspecting, simulating, and sandbox-executing NScript programs",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "https://github.com/imattau/nscript.git"
9
9
  },
10
10
  "bin": {
11
+ "nscript": "bin/nscript.js",
11
12
  "nscript-mcp": "bin/nscript-mcp.js"
12
13
  },
13
14
  "files": [
14
15
  "bin/nscript-mcp.js",
16
+ "bin/nscript.js",
15
17
  "bin/linux-x64/nscript",
16
18
  "bin/linux-x64/nscript-mcp",
19
+ "bin/linux-x64/nscript_wasm.wasm",
17
20
  "bin/linux-arm64/nscript",
18
21
  "bin/linux-arm64/nscript-mcp",
22
+ "bin/linux-arm64/nscript_wasm.wasm",
19
23
  "bin/darwin-arm64/nscript",
20
24
  "bin/darwin-arm64/nscript-mcp",
25
+ "bin/darwin-arm64/nscript_wasm.wasm",
21
26
  "bin/win-x64/nscript.exe",
22
27
  "bin/win-x64/nscript-mcp.exe",
28
+ "bin/win-x64/nscript_wasm.wasm",
23
29
  "bin/win-arm64/nscript.exe",
24
30
  "bin/win-arm64/nscript-mcp.exe",
31
+ "bin/win-arm64/nscript_wasm.wasm",
25
32
  "README.md",
26
33
  "LICENSE"
27
34
  ],