@golproductions/check 3.1.7 → 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 CHANGED
@@ -1,54 +1,101 @@
1
- # Check -- The Universal Anti-Hallucination Engine
1
+ # Check
2
2
 
3
- AI agents hallucinate. Check catches it before it reaches your project.
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
- No AI inside. Deterministic. Sub-100ms.
5
+ **This is the one location.** Everything integrates from here:
6
6
 
7
- ## Install
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
- npx @golproductions/check --install
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
- One command. It auto-detects your AI tools, wires them up, and activates a free key on first run. No signup, no API key to paste, no browser.
30
+ The script auto-detects Claude Code, Cursor, and Gemini hook formats and answers in each tool's own dialect.
14
31
 
15
- ## Supported environments
32
+ ### 2. MCP server — for anything that speaks Model Context Protocol
16
33
 
17
- Claude Code, Cursor, Gemini CLI, Windsurf, Devin Desktop, Continue, Amazon Q, Roo Code, Claude Desktop, JetBrains, VS Code, Neovim, Emacs, Sublime Text, Zed, and any MCP client.
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
- ## Pricing
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
- 120 free checks every day. After that, $0.0068 AUD per check. No subscription. Credits never expire.
50
+ ### 3. CLI — for scripts, CI, git hooks, anything with a shell
22
51
 
23
- | Tier | Checks |
24
- |------|--------|
25
- | Free | 120 / day |
26
- | $5 | ~735 |
27
- | $10 | ~1,470 |
28
- | $25 | ~3,676 |
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
- ## Bring your own key (optional)
59
+ Exit codes make it composable: gate a CI step, a git pre-push hook, a Docker entrypoint, a cron job.
32
60
 
33
- A key is minted for you automatically. If you already have a Client ID, or want the same one across machines, set it and Check uses that instead:
61
+ ### 4. HTTP — for everything else, in any language
34
62
 
35
63
  ```
36
- export GOL_CLIENT_ID=your_key
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 Show your client ID and where Check is installed
43
- npx @golproductions/check --uninstall Remove Check from every tool
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
- - [Product page](https://www.golproductions.com/check.html)
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@golproductions/check",
3
- "version": "3.1.7",
3
+ "version": "3.1.8",
4
4
  "description": "The universal anti-hallucination engine for AI coding agents. Catches what is not real before it reaches your project.",
5
5
  "bin": {
6
6
  "check": "src/index.js",
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.7";
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";
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.7";
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";