@golproductions/check 3.0.5 → 3.0.7
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 +61 -24
- package/package.json +2 -2
- package/src/index.js +44 -3
package/README.md
CHANGED
|
@@ -11,12 +11,12 @@ No AI inside. Deterministic. Same input, same output. Every time.
|
|
|
11
11
|
One command. Every IDE.
|
|
12
12
|
|
|
13
13
|
```
|
|
14
|
-
npx @golproductions/check --install
|
|
14
|
+
npx @golproductions/check --install YOUR_KEY
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
Auto-detects **Claude Code**, **Cursor**,
|
|
17
|
+
Auto-detects and configures **Claude Code**, **Cursor**, **Gemini CLI / Antigravity**, and MCP servers for **Windsurf / Devin Desktop**, **Continue**, **Amazon Q**, and **Roo Code**.
|
|
18
18
|
|
|
19
|
-
Get your free API key (120 free checks) at [golproductions.com](https://www.golproductions.com/check.html)
|
|
19
|
+
Get your free API key (120 free checks) at [golproductions.com/check](https://www.golproductions.com/check.html)
|
|
20
20
|
|
|
21
21
|
## What it catches
|
|
22
22
|
|
|
@@ -28,12 +28,64 @@ Get your free API key (120 free checks) at [golproductions.com](https://www.golp
|
|
|
28
28
|
| **Broken syntax** | AI writes a file with mismatched brackets. **Flagged.** |
|
|
29
29
|
| **Post-write integrity** | After the AI writes a file, imports and function calls are re-verified. **Two checkpoints.** |
|
|
30
30
|
|
|
31
|
+
## Supported environments
|
|
32
|
+
|
|
33
|
+
**Hooks (automatic, pre-execution)**
|
|
34
|
+
|
|
35
|
+
| Environment | Integration |
|
|
36
|
+
|-------------|-------------|
|
|
37
|
+
| Claude Code | PreToolUse hook |
|
|
38
|
+
| Cursor | beforeShellExecution hook |
|
|
39
|
+
| Gemini CLI / Antigravity | BeforeTool hook |
|
|
40
|
+
|
|
41
|
+
**MCP Server (agent-driven)**
|
|
42
|
+
|
|
43
|
+
| Environment | Integration |
|
|
44
|
+
|-------------|-------------|
|
|
45
|
+
| Claude Code | MCP server |
|
|
46
|
+
| Cursor | MCP server |
|
|
47
|
+
| Windsurf / Devin Desktop | MCP server |
|
|
48
|
+
| Continue | MCP server |
|
|
49
|
+
| Amazon Q | MCP server |
|
|
50
|
+
| Roo Code | MCP server |
|
|
51
|
+
| Claude Desktop | MCP server |
|
|
52
|
+
| Any MCP client | MCP server |
|
|
53
|
+
|
|
54
|
+
**Editor plugins**
|
|
55
|
+
|
|
56
|
+
| Editor | Install |
|
|
57
|
+
|--------|---------|
|
|
58
|
+
| VS Code / Cursor / Devin Desktop | [Open VSX](https://open-vsx.org/extension/golproductions/gol-check) |
|
|
59
|
+
| JetBrains (IntelliJ, WebStorm, PyCharm, GoLand, Rider, PHPStorm, RubyMine) | [JetBrains Marketplace](https://plugins.jetbrains.com/plugin/com.golproductions.check) |
|
|
60
|
+
| Neovim | [check.nvim](https://github.com/golproductions/check.nvim) |
|
|
61
|
+
| Emacs | [check.el](https://github.com/golproductions/check.el) |
|
|
62
|
+
| Sublime Text | [GOLCheck](https://github.com/golproductions/check-sublime) |
|
|
63
|
+
| Zed | [check-zed](https://github.com/golproductions/check-zed) |
|
|
64
|
+
|
|
65
|
+
**Direct API**
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
POST https://triage.golproductions.com/preflight
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## MCP Server
|
|
72
|
+
|
|
73
|
+
Run Check as an MCP server for direct agent integration:
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
npx @golproductions/check check-mcp
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Exposes two tools:
|
|
80
|
+
- **Check** — validates a command, returns `RUNNABLE` or `INVALID`
|
|
81
|
+
- **CheckAndExecute** — validates then executes, blocking invalid commands before they reach the shell
|
|
82
|
+
|
|
31
83
|
## How it works
|
|
32
84
|
|
|
33
85
|
```
|
|
34
|
-
AI
|
|
86
|
+
AI generates code
|
|
35
87
|
↓
|
|
36
|
-
Check intercepts (pre-execution
|
|
88
|
+
Check intercepts (pre-execution)
|
|
37
89
|
↓
|
|
38
90
|
Verifies against your actual project
|
|
39
91
|
↓
|
|
@@ -42,18 +94,18 @@ Real → allowed | Not real → blocked
|
|
|
42
94
|
After file write → second verification pass
|
|
43
95
|
```
|
|
44
96
|
|
|
45
|
-
|
|
97
|
+
Sub-100ms. Your AI never knows it's there.
|
|
46
98
|
|
|
47
99
|
## Why not just use another guardrail?
|
|
48
100
|
|
|
49
|
-
| | Check | Security firewalls
|
|
101
|
+
| | Check | Security firewalls | LLM guardrails | Eval platforms |
|
|
50
102
|
|---|---|---|---|---|
|
|
51
103
|
| **Checks code correctness** | Yes | No — checks safety | No — checks format | No — scores after |
|
|
52
104
|
| **Knows your project** | Yes | No | No | No |
|
|
53
105
|
| **Pre-execution** | Yes | Yes | Varies | No |
|
|
54
106
|
| **Post-write verification** | Yes | No | No | No |
|
|
55
107
|
| **No AI inside** | Yes | Varies | Uses LLMs | Uses LLMs |
|
|
56
|
-
| **Per-check pricing** | $0.0068 AUD | Free (self-hosted) | Enterprise
|
|
108
|
+
| **Per-check pricing** | $0.0068 AUD | Free (self-hosted) | Enterprise | SaaS |
|
|
57
109
|
|
|
58
110
|
Every other tool checks the AI. **Check checks the code.**
|
|
59
111
|
|
|
@@ -69,27 +121,12 @@ Every other tool checks the AI. **Check checks the code.**
|
|
|
69
121
|
| $25 | ~3,676 | $0.0068 |
|
|
70
122
|
| $50 | ~7,352 | $0.0068 |
|
|
71
123
|
|
|
72
|
-
## MCP Server
|
|
73
|
-
|
|
74
|
-
Check also runs as an MCP (Model Context Protocol) server for direct integration:
|
|
75
|
-
|
|
76
|
-
```
|
|
77
|
-
check-mcp
|
|
78
|
-
```
|
|
79
|
-
|
|
80
124
|
## Links
|
|
81
125
|
|
|
82
126
|
- [Product page](https://www.golproductions.com/check.html)
|
|
83
127
|
- [Pricing](https://www.golproductions.com/pricing.html)
|
|
84
128
|
- [Updates](https://www.golproductions.com/updates.html)
|
|
85
|
-
|
|
86
|
-
## Supported IDEs
|
|
87
|
-
|
|
88
|
-
- Claude Code
|
|
89
|
-
- Cursor
|
|
90
|
-
- Antigravity
|
|
91
|
-
|
|
92
|
-
More coming: Windsurf, Cline, Continue, Zed, Aider, JetBrains, GitHub Copilot.
|
|
129
|
+
- [Blog](https://www.golproductions.com/blog/)
|
|
93
130
|
|
|
94
131
|
## License
|
|
95
132
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@golproductions/check",
|
|
3
|
-
"version": "3.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "3.0.7",
|
|
4
|
+
"description": "Anti-hallucination firewall for AI agents. Validates commands, imports, and function calls before execution. Supports Claude Code, Cursor, Gemini CLI, Windsurf, JetBrains, Neovim, Emacs, Sublime Text, Zed, and any MCP client.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"check": "src/index.js",
|
|
7
7
|
"check-mcp": "src/mcp.js"
|
package/src/index.js
CHANGED
|
@@ -5,12 +5,30 @@ import { homedir, platform, arch } from "node:os";
|
|
|
5
5
|
import { pipeline } from "node:stream/promises";
|
|
6
6
|
import { Readable } from "node:stream";
|
|
7
7
|
|
|
8
|
-
const VERSION = "3.0.
|
|
8
|
+
const VERSION = "3.0.7";
|
|
9
9
|
const BINARY_VERSION = "3.0.0";
|
|
10
10
|
const API = "https://triage.golproductions.com/preflight";
|
|
11
11
|
const CDN = "https://pub-e55366a7f5994be9be04f0e205179f4a.r2.dev/releases";
|
|
12
12
|
const CLIENT_ID = process.env.GOL_CLIENT_ID || "";
|
|
13
13
|
|
|
14
|
+
async function validateKey(key) {
|
|
15
|
+
try {
|
|
16
|
+
const res = await fetch(API, {
|
|
17
|
+
method: "POST",
|
|
18
|
+
headers: { "Content-Type": "application/json", "X-GOL-CLIENT-ID": key, "User-Agent": "c/" + VERSION },
|
|
19
|
+
body: JSON.stringify({ command: "echo check-install-verify", cwd: process.cwd(), v: VERSION }),
|
|
20
|
+
signal: AbortSignal.timeout(10000),
|
|
21
|
+
});
|
|
22
|
+
if (res.ok) return { valid: true, expired: false };
|
|
23
|
+
let body = {};
|
|
24
|
+
try { body = await res.json(); } catch {}
|
|
25
|
+
const expired = /expir/i.test(body.reason || body.error || body.message || "");
|
|
26
|
+
return { valid: false, expired };
|
|
27
|
+
} catch {
|
|
28
|
+
return { valid: false, expired: false };
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
14
32
|
async function downloadBinary(dest) {
|
|
15
33
|
const os = platform() === "win32" ? "win" : platform() === "darwin" ? "macos" : "linux";
|
|
16
34
|
const cpu = arch() === "arm64" ? "arm64" : "x64";
|
|
@@ -23,7 +41,30 @@ async function downloadBinary(dest) {
|
|
|
23
41
|
}
|
|
24
42
|
|
|
25
43
|
async function install() {
|
|
26
|
-
const key = process.argv[3] || process.env.GOL_CLIENT_ID || "
|
|
44
|
+
const key = process.argv[3] || process.env.GOL_CLIENT_ID || "";
|
|
45
|
+
|
|
46
|
+
if (!key || key === "your_key") {
|
|
47
|
+
console.log("\n Check requires a valid Client ID to install.\n");
|
|
48
|
+
console.log(" Get your key (free): https://golproductions.com/check\n");
|
|
49
|
+
console.log(" Then run:");
|
|
50
|
+
console.log(" npx @golproductions/check --install YOUR_KEY\n");
|
|
51
|
+
process.exit(1);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const result = await validateKey(key);
|
|
55
|
+
if (!result.valid) {
|
|
56
|
+
if (result.expired) {
|
|
57
|
+
console.log("\n Your Client ID has expired: " + key);
|
|
58
|
+
console.log("\n Renew your key at: https://golproductions.com/check\n");
|
|
59
|
+
} else {
|
|
60
|
+
console.log("\n Invalid Client ID: " + key);
|
|
61
|
+
console.log("\n Get a valid key at: https://golproductions.com/check\n");
|
|
62
|
+
}
|
|
63
|
+
process.exit(1);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
console.log("\n Key verified. Installing Check...\n");
|
|
67
|
+
|
|
27
68
|
const home = homedir();
|
|
28
69
|
let installed = 0;
|
|
29
70
|
|
|
@@ -249,7 +290,7 @@ async function main() {
|
|
|
249
290
|
f = detect(p);
|
|
250
291
|
const c = cmd(p, f);
|
|
251
292
|
if (!c) { out(f, true); return; }
|
|
252
|
-
if (!CLIENT_ID) { process.stderr.write("check: GOL_CLIENT_ID not set. Get your key at https://
|
|
293
|
+
if (!CLIENT_ID) { process.stderr.write("check: GOL_CLIENT_ID not set. Get your key at https://golproductions.com/check\n"); out(f, true); return; }
|
|
253
294
|
const controller = new AbortController();
|
|
254
295
|
const timer = setTimeout(() => controller.abort(), 5000);
|
|
255
296
|
const res = await fetch(API, {
|