estoppl 0.1.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 (3) hide show
  1. package/install.js +48 -0
  2. package/package.json +38 -0
  3. package/run.js +11 -0
package/install.js ADDED
@@ -0,0 +1,48 @@
1
+ const { execSync } = require("child_process");
2
+ const fs = require("fs");
3
+ const path = require("path");
4
+
5
+ const VERSION = require("./package.json").version;
6
+ const REPO = "estoppl/estoppl";
7
+
8
+ const PLATFORM_MAP = {
9
+ "darwin-arm64": "estoppl-darwin-aarch64",
10
+ "darwin-x64": "estoppl-darwin-x86_64",
11
+ "linux-arm64": "estoppl-linux-aarch64",
12
+ "linux-x64": "estoppl-linux-x86_64",
13
+ };
14
+
15
+ const key = `${process.platform}-${process.arch}`;
16
+ const artifact = PLATFORM_MAP[key];
17
+ if (!artifact) {
18
+ console.error(
19
+ `estoppl: unsupported platform ${key}. Supported: ${Object.keys(PLATFORM_MAP).join(", ")}`
20
+ );
21
+ process.exit(1);
22
+ }
23
+
24
+ const url = `https://github.com/${REPO}/releases/download/v${VERSION}/${artifact}.tar.gz`;
25
+ const binDir = path.join(__dirname, "bin");
26
+ fs.mkdirSync(binDir, { recursive: true });
27
+
28
+ const binPath = path.join(binDir, "estoppl");
29
+
30
+ // Skip download if binary already exists (e.g. re-running postinstall)
31
+ if (fs.existsSync(binPath)) {
32
+ process.exit(0);
33
+ }
34
+
35
+ console.log(`Downloading estoppl v${VERSION} for ${key}...`);
36
+
37
+ try {
38
+ execSync(`curl -sL "${url}" | tar xz -C "${binDir}"`, { stdio: "inherit" });
39
+ fs.renameSync(path.join(binDir, artifact), binPath);
40
+ fs.chmodSync(binPath, 0o755);
41
+ console.log("estoppl installed successfully.");
42
+ } catch (err) {
43
+ console.error(`Failed to download estoppl: ${err.message}`);
44
+ console.error(
45
+ `You can download manually from https://github.com/${REPO}/releases`
46
+ );
47
+ process.exit(1);
48
+ }
package/package.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "estoppl",
3
+ "version": "0.1.0",
4
+ "description": "Compliance proxy for AI agent tool calls (MCP) — intercepts, signs, and logs",
5
+ "license": "Apache-2.0",
6
+ "bin": {
7
+ "estoppl": "run.js"
8
+ },
9
+ "scripts": {
10
+ "postinstall": "node install.js"
11
+ },
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "https://github.com/estoppl/estoppl"
15
+ },
16
+ "homepage": "https://estoppl.ai",
17
+ "keywords": [
18
+ "mcp",
19
+ "ai-agents",
20
+ "audit",
21
+ "compliance",
22
+ "proxy",
23
+ "model-context-protocol"
24
+ ],
25
+ "os": [
26
+ "darwin",
27
+ "linux"
28
+ ],
29
+ "cpu": [
30
+ "x64",
31
+ "arm64"
32
+ ],
33
+ "files": [
34
+ "install.js",
35
+ "run.js",
36
+ "bin/"
37
+ ]
38
+ }
package/run.js ADDED
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env node
2
+ const { execFileSync } = require("child_process");
3
+ const path = require("path");
4
+
5
+ const bin = path.join(__dirname, "bin", "estoppl");
6
+
7
+ try {
8
+ execFileSync(bin, process.argv.slice(2), { stdio: "inherit" });
9
+ } catch (err) {
10
+ process.exit(err.status || 1);
11
+ }