@golproductions/check 3.1.8 → 3.2.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.
- package/README.md +11 -11
- package/package.json +1 -1
- package/src/index.js +6 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Check
|
|
2
2
|
|
|
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
|
|
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
|
|
|
@@ -9,7 +9,7 @@ npx @golproductions/check --install # Windows, macOS, Linux
|
|
|
9
9
|
curl check.golproductions.com | sh # Unix shells
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Installing mints a free key bound to your machine
|
|
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
13
|
|
|
14
14
|
---
|
|
15
15
|
|
|
@@ -17,7 +17,7 @@ Installing mints a free key bound to your machine — no signup, 120 free checks
|
|
|
17
17
|
|
|
18
18
|
Check is one primitive with four faces. Pick the one your environment speaks.
|
|
19
19
|
|
|
20
|
-
### 1. Hook mode
|
|
20
|
+
### 1. Hook mode: blocks bad commands before they run
|
|
21
21
|
|
|
22
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.
|
|
23
23
|
|
|
@@ -29,7 +29,7 @@ echo '{"tool_input":{"command":"some command"}}' | node ~/.check/check.mjs
|
|
|
29
29
|
|
|
30
30
|
The script auto-detects Claude Code, Cursor, and Gemini hook formats and answers in each tool's own dialect.
|
|
31
31
|
|
|
32
|
-
### 2. MCP server
|
|
32
|
+
### 2. MCP server: for anything that speaks Model Context Protocol
|
|
33
33
|
|
|
34
34
|
Windsurf, Antigravity, Continue, Amazon Q, Roo Code, Claude Desktop, or your own agent:
|
|
35
35
|
|
|
@@ -45,9 +45,9 @@ Windsurf, Antigravity, Continue, Amazon Q, Roo Code, Claude Desktop, or your own
|
|
|
45
45
|
}
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
Exposes two tools: `Check` (verdict only) and `CheckAndExecute` (validate, then run if clean). MCP is advisory
|
|
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."*
|
|
49
49
|
|
|
50
|
-
### 3. CLI
|
|
50
|
+
### 3. CLI: for scripts, CI, git hooks, anything with a shell
|
|
51
51
|
|
|
52
52
|
```
|
|
53
53
|
curl check.golproductions.com | sh # installs the `check` command (Unix)
|
|
@@ -58,7 +58,7 @@ echo "some command" | check # pipe mode
|
|
|
58
58
|
|
|
59
59
|
Exit codes make it composable: gate a CI step, a git pre-push hook, a Docker entrypoint, a cron job.
|
|
60
60
|
|
|
61
|
-
### 4. HTTP
|
|
61
|
+
### 4. HTTP: for everything else, in any language
|
|
62
62
|
|
|
63
63
|
```
|
|
64
64
|
POST https://triage.golproductions.com/preflight
|
|
@@ -68,7 +68,7 @@ Body: {"command": "the command to validate"}
|
|
|
68
68
|
→ {"verdict": "runnable" | "invalid", "reason": "...", "daily_remaining": 119}
|
|
69
69
|
```
|
|
70
70
|
|
|
71
|
-
That is the whole contract. Rate limit 60/min. A `402` means the free tier is spent and the balance is empty
|
|
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
72
|
|
|
73
73
|
---
|
|
74
74
|
|
|
@@ -76,10 +76,10 @@ That is the whole contract. Rate limit 60/min. A `402` means the free tier is sp
|
|
|
76
76
|
|
|
77
77
|
| Tier | What | Where |
|
|
78
78
|
|------|------|-------|
|
|
79
|
-
| **GOL Client ID**
|
|
80
|
-
| **GOL API Key**
|
|
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
81
|
|
|
82
|
-
Same header, same API
|
|
82
|
+
Same header, same API. The tier is just what the key can do.
|
|
83
83
|
|
|
84
84
|
## Manage
|
|
85
85
|
|
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.
|
|
8
|
+
const VERSION = "3.2.0";
|
|
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";
|
|
@@ -764,7 +764,11 @@ async function main() {
|
|
|
764
764
|
|
|
765
765
|
if (d.verdict === "runnable") { out(f, true); }
|
|
766
766
|
else { out(f, false, d.reason || "denied — address the issue before continuing"); }
|
|
767
|
-
} catch {
|
|
767
|
+
} catch {
|
|
768
|
+
// Network failure or timeout: fail OPEN. An unreachable validation
|
|
769
|
+
// service must never block the user's work (Terms, section 5).
|
|
770
|
+
outCreditsExhausted(f, "check: validation service unreachable, command ran unverified. Check resumes automatically.");
|
|
771
|
+
}
|
|
768
772
|
}
|
|
769
773
|
|
|
770
774
|
main();
|