@golproductions/check 3.1.6 → 3.1.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 +73 -26
- package/package.json +1 -1
- package/src/index.js +5 -4
- package/src/mcp.js +1 -1
package/README.md
CHANGED
|
@@ -1,54 +1,101 @@
|
|
|
1
|
-
# Check
|
|
1
|
+
# Check
|
|
2
2
|
|
|
3
|
-
AI agents
|
|
3
|
+
**The anti-hallucination engine for AI agents.** Your agent invents a command, a package, a URL. Check catches it before it runs. No AI inside — deterministic, sub-100ms.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**This is the one location.** Everything integrates from here:
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
```
|
|
8
|
+
npx @golproductions/check --install # Windows, macOS, Linux
|
|
9
|
+
curl check.golproductions.com | sh # Unix shells
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Installing mints a free key bound to your machine — no signup, 120 free checks per day, and the same key is shared by every Check tool on the machine. Need more? Get a paid GOL API Key at [the console](https://www.golproductions.com/console.html).
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Integrate it into anything
|
|
17
|
+
|
|
18
|
+
Check is one primitive with four faces. Pick the one your environment speaks.
|
|
19
|
+
|
|
20
|
+
### 1. Hook mode — blocks bad commands before they run
|
|
21
|
+
|
|
22
|
+
For any tool with pre-execution hooks. `--install` wires these automatically for **Claude Code, Cursor, and Gemini CLI**; wire anything else yourself: pipe the hook JSON to the script, read the verdict.
|
|
8
23
|
|
|
9
24
|
```
|
|
10
|
-
|
|
25
|
+
echo '{"tool_input":{"command":"some command"}}' | node ~/.check/check.mjs
|
|
26
|
+
→ {"hookSpecificOutput":{"permissionDecision":"allow"}} # runnable
|
|
27
|
+
→ {"hookSpecificOutput":{"permissionDecision":"deny", ...}} # hallucinated
|
|
11
28
|
```
|
|
12
29
|
|
|
13
|
-
|
|
30
|
+
The script auto-detects Claude Code, Cursor, and Gemini hook formats and answers in each tool's own dialect.
|
|
14
31
|
|
|
15
|
-
|
|
32
|
+
### 2. MCP server — for anything that speaks Model Context Protocol
|
|
16
33
|
|
|
17
|
-
|
|
34
|
+
Windsurf, Antigravity, Continue, Amazon Q, Roo Code, Claude Desktop, or your own agent:
|
|
35
|
+
|
|
36
|
+
```json
|
|
37
|
+
{
|
|
38
|
+
"mcpServers": {
|
|
39
|
+
"check": {
|
|
40
|
+
"command": "npx",
|
|
41
|
+
"args": ["@golproductions/check", "--mcp"],
|
|
42
|
+
"env": { "GOL_CLIENT_ID": "your_key" }
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
```
|
|
18
47
|
|
|
19
|
-
|
|
48
|
+
Exposes two tools: `Check` (verdict only) and `CheckAndExecute` (validate, then run if clean). MCP is advisory — the agent calls it when its rules say to. Add one line to your agent's rules: *"Before running any shell command, validate it with the `check` tool."*
|
|
20
49
|
|
|
21
|
-
|
|
50
|
+
### 3. CLI — for scripts, CI, git hooks, anything with a shell
|
|
22
51
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
| $50 | ~7,352 |
|
|
52
|
+
```
|
|
53
|
+
curl check.golproductions.com | sh # installs the `check` command (Unix)
|
|
54
|
+
check "netlify-cli deploy --prod" # → invalid (exit 1)
|
|
55
|
+
check "netlify deploy --prod" # → runnable (exit 0)
|
|
56
|
+
echo "some command" | check # pipe mode
|
|
57
|
+
```
|
|
30
58
|
|
|
31
|
-
|
|
59
|
+
Exit codes make it composable: gate a CI step, a git pre-push hook, a Docker entrypoint, a cron job.
|
|
32
60
|
|
|
33
|
-
|
|
61
|
+
### 4. HTTP — for everything else, in any language
|
|
34
62
|
|
|
35
63
|
```
|
|
36
|
-
|
|
64
|
+
POST https://triage.golproductions.com/preflight
|
|
65
|
+
Header: X-GOL-CLIENT-ID: your_key
|
|
66
|
+
Body: {"command": "the command to validate"}
|
|
67
|
+
|
|
68
|
+
→ {"verdict": "runnable" | "invalid", "reason": "...", "daily_remaining": 119}
|
|
37
69
|
```
|
|
38
70
|
|
|
71
|
+
That is the whole contract. Rate limit 60/min. A `402` means the free tier is spent and the balance is empty — treat it as allow-with-warning, never as a verdict.
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Keys
|
|
76
|
+
|
|
77
|
+
| Tier | What | Where |
|
|
78
|
+
|------|------|-------|
|
|
79
|
+
| **GOL Client ID** — free | Minted automatically on install, bound to the machine, shared by every tool on it. 120 checks/day, forever. | Nowhere — it just happens |
|
|
80
|
+
| **GOL API Key** — paid | Prepaid balance ($0.0068 AUD/check after the daily 120), spend caps, dashboard, 2FA. | [Console](https://www.golproductions.com/console.html) |
|
|
81
|
+
|
|
82
|
+
Same header, same API — the tier is just what the key can do.
|
|
83
|
+
|
|
39
84
|
## Manage
|
|
40
85
|
|
|
41
86
|
```
|
|
42
|
-
npx @golproductions/check --status
|
|
43
|
-
npx @golproductions/check --
|
|
87
|
+
npx @golproductions/check --status Your key + where Check is installed
|
|
88
|
+
npx @golproductions/check --credits Balance and free checks remaining
|
|
89
|
+
npx @golproductions/check --uninstall Remove from every tool
|
|
44
90
|
```
|
|
45
91
|
|
|
92
|
+
## Editor extensions
|
|
93
|
+
|
|
94
|
+
Thin wrappers over this same API exist on the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=golproductions.gol-check), [Open VSX](https://open-vsx.org/extension/golproductions/gol-check) (also used by Antigravity), and the [JetBrains Marketplace](https://plugins.jetbrains.com/plugin/32408). They validate on demand; the hook and MCP faces above are the real-time gate.
|
|
95
|
+
|
|
46
96
|
## Links
|
|
47
97
|
|
|
48
|
-
|
|
49
|
-
- [Pricing](https://www.golproductions.com/pricing.html)
|
|
50
|
-
- [Updates](https://www.golproductions.com/updates.html)
|
|
51
|
-
- [Blog](https://www.golproductions.com/blog/)
|
|
98
|
+
[Product](https://www.golproductions.com/check.html) · [Pricing](https://www.golproductions.com/pricing.html) · [Console](https://www.golproductions.com/console.html) · [Updates](https://www.golproductions.com/updates.html) · [Blog](https://www.golproductions.com/blog/)
|
|
52
99
|
|
|
53
100
|
## License
|
|
54
101
|
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -5,7 +5,7 @@ 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.1.
|
|
8
|
+
const VERSION = "3.1.8";
|
|
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";
|
|
@@ -292,9 +292,10 @@ async function install() {
|
|
|
292
292
|
}
|
|
293
293
|
} catch {}
|
|
294
294
|
|
|
295
|
-
console.log(`\n Your
|
|
296
|
-
console.log(`
|
|
297
|
-
console.log(`
|
|
295
|
+
console.log(`\n Your free GOL Client ID (this machine): ${key}`);
|
|
296
|
+
console.log(` Shared by every editor on this machine. 120 free checks/day.`);
|
|
297
|
+
console.log(` Need more? Get a GOL API Key (paid, prepaid balance) at`);
|
|
298
|
+
console.log(` https://www.golproductions.com/console`);
|
|
298
299
|
console.log(`\nSafe travels wanderer..\n`);
|
|
299
300
|
process.exit(0);
|
|
300
301
|
}
|
package/src/mcp.js
CHANGED
|
@@ -6,7 +6,7 @@ import { execFile } from "node:child_process";
|
|
|
6
6
|
import { promisify } from "node:util";
|
|
7
7
|
|
|
8
8
|
const execFileAsync = promisify(execFile);
|
|
9
|
-
const VERSION = "3.1.
|
|
9
|
+
const VERSION = "3.1.8";
|
|
10
10
|
const API = "https://triage.golproductions.com/preflight";
|
|
11
11
|
const CLIENT_ID = process.env.GOL_CLIENT_ID;
|
|
12
12
|
const IS_WIN = process.platform === "win32";
|