thumbgate 1.37.1 → 1.37.2
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/.agents/skills/cobble-hot-store-compare-not-clone/SKILL.md +80 -0
- package/.agents/skills/colab-compute-honesty-not-clone/SKILL.md +70 -0
- package/.agents/skills/token-shunt-honesty-not-clone/SKILL.md +67 -0
- package/.agents/skills/typesafe-typed-questions-not-clone/SKILL.md +82 -0
- package/.claude-plugin/plugin.json +1 -1
- package/.well-known/mcp/server-card.json +1 -1
- package/adapters/claude/.mcp.json +2 -2
- package/adapters/forge/forge.yaml +3 -3
- package/adapters/future-agi/.mcp.json +1 -1
- package/adapters/future-agi/config.toml +1 -1
- package/adapters/future-agi/opencode.json +1 -1
- package/adapters/herdr/herdr-plugin.toml +2 -2
- package/adapters/mcp/server-stdio.js +1 -1
- package/adapters/opencode/opencode.json +1 -1
- package/bin/cli.js +129 -0
- package/config/gate-templates.json +48 -0
- package/package.json +23 -7
- package/public/index.html +2 -2
- package/public/install.html +7 -7
- package/public/numbers.html +2 -2
- package/scripts/cli-schema.js +40 -0
- package/scripts/cobble-hot-store-split.js +600 -0
- package/scripts/colab-compute-honesty.js +281 -0
- package/scripts/gates-engine.js +16 -5
- package/scripts/token-shunt-honesty.js +502 -0
- package/scripts/typesafe-typed-questions.js +813 -0
- package/server.json +2 -2
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cobble-hot-store-compare-not-clone
|
|
3
|
+
description: >
|
|
4
|
+
CobbleDB (Perplexity 2026-09) is a batch-read hot store, not a ThumbGate
|
|
5
|
+
clone. Steal the three-plane FORMAT (durable state / batched delivery /
|
|
6
|
+
query-time MultiGet + hedge + hot subset) onto existing lesson rails; never
|
|
7
|
+
vendor RocksDB, YTsaurus, Pillar, or Lorry. Slash: /cobble-hot-store-compare-not-clone.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# CobbleDB — compare, do not clone
|
|
11
|
+
|
|
12
|
+
## Goal
|
|
13
|
+
|
|
14
|
+
Produce fail-closed honesty for whom: ThumbGate agents writing feedback or
|
|
15
|
+
serving lessons — so processing never contends with PreToolUse reads, batch
|
|
16
|
+
lookups hedge slow sources, and only promoted/matchable records occupy the
|
|
17
|
+
hot path.
|
|
18
|
+
|
|
19
|
+
## Constraints
|
|
20
|
+
|
|
21
|
+
| NEVER | ALWAYS |
|
|
22
|
+
| --- | --- |
|
|
23
|
+
| Clone CobbleDB / Pillar / Lorry / RocksDB / YTsaurus | Map planes onto existing lesson rails |
|
|
24
|
+
| Write processing output onto `hybrid-feedback-context` | Durable log → `feedback-to-memory` → retrieval |
|
|
25
|
+
| Sequential per-key hot reads of a batch | `batchGetPrepared` (partition + hedge) |
|
|
26
|
+
| Dump raw `feedback-log.jsonl` into retrieval | `promoted_matchable` (or `fresh_high_value`) subset |
|
|
27
|
+
| Overwrite embedding/chunk versions | Coexist representations |
|
|
28
|
+
| Dual-edit DIRTY lesson-graph PR #3650 | Leave graph layer alone |
|
|
29
|
+
| Quote Perplexity 5× / 20% as ours | Measure ThumbGate rails with `perf-budget-check` |
|
|
30
|
+
| Hero Continuity / net-new storage SKU | ECI: existing retrieval rails only |
|
|
31
|
+
|
|
32
|
+
HARD fail closed. REFUSE SKU clones.
|
|
33
|
+
|
|
34
|
+
## Reference
|
|
35
|
+
|
|
36
|
+
- https://www.perplexity.ai/hub/blog/cobbledb
|
|
37
|
+
- `scripts/cobble-hot-store-split.js`
|
|
38
|
+
- `scripts/lesson-retrieval.js` · `scripts/feedback-to-memory.js` · `scripts/memory-vs-rag-route.js`
|
|
39
|
+
- `docs/agents/cobble-hot-store-split.md`
|
|
40
|
+
- `/high-roi-steal-and-finish` · `/eci-thumbgate-ip-wall`
|
|
41
|
+
|
|
42
|
+
## Examples (show, don't tell)
|
|
43
|
+
|
|
44
|
+
Weak: Summarize CobbleDB and add a RocksDB cluster class.
|
|
45
|
+
|
|
46
|
+
Gold:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
$ npx thumbgate cobble-hot-store-split --json
|
|
50
|
+
ok: true
|
|
51
|
+
status: ready
|
|
52
|
+
$ node --test tests/cobble-hot-store-split.test.js
|
|
53
|
+
# processing → hot write → coupled_processing_hot_write deny
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Procedures
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
npx thumbgate cobble-hot-store-split --json
|
|
60
|
+
npx thumbgate cobble-hot-store-split --map-only
|
|
61
|
+
npx thumbgate cobble-hot-store-split --trace=tests/fixtures/cobble-hot-store-split-coupled.json --json
|
|
62
|
+
npx thumbgate cobble-hot-store-split --keys=lesson-1,lesson-2 --json
|
|
63
|
+
npm run test:cobble-hot-store-split
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
1. Classify every write as `durable`, `delivery`, or `hot`.
|
|
67
|
+
2. Deny processing → hot coupling.
|
|
68
|
+
3. Require batched MultiGet (+ hedge) for ≥3 serving keys.
|
|
69
|
+
4. Keep the hot subset to promoted/matchable records.
|
|
70
|
+
5. Refuse `--clone-cobbledb`.
|
|
71
|
+
|
|
72
|
+
## Rubric
|
|
73
|
+
|
|
74
|
+
- gold default (this repo) → `ok=true`, `status=ready`
|
|
75
|
+
- `--trace` coupled fixture → `ok=false`, `coupled_processing_hot_write`
|
|
76
|
+
- `--clone-cobbledb` → `ok=false`, `cobble_clone_refused`
|
|
77
|
+
- sequential ≥3-key hot read → `sequential_hot_batch`
|
|
78
|
+
- unbounded hot subset → `unbounded_hot_subset`
|
|
79
|
+
- doctor: `npm run test:cobble-hot-store-split` PASS
|
|
80
|
+
- evidence: command output in the same turn
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: colab-compute-honesty-not-clone
|
|
3
|
+
description: >
|
|
4
|
+
Google Colab /signup is a compute-unit storefront, not a ThumbGate GPU SKU.
|
|
5
|
+
Steal CU-pack honesty (subscribe≠receipt, CU≠dedicated GPU, 24h background
|
|
6
|
+
is Pro+). Never buy Pro/Pro+/PAYG from an agent session. Never clone
|
|
7
|
+
colab-cli. Slash: /colab-compute-honesty-not-clone.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Colab compute honesty — compare, do not clone
|
|
11
|
+
|
|
12
|
+
## Goal
|
|
13
|
+
|
|
14
|
+
Fail-closed compute claims for whom: ThumbGate evals and fleet offload talk —
|
|
15
|
+
so "Colab Pro+ A100" cannot pass without a live Current-plan receipt.
|
|
16
|
+
Colab stays a neighbor notebook host, not a product.
|
|
17
|
+
|
|
18
|
+
## Constraints
|
|
19
|
+
|
|
20
|
+
| NEVER | ALWAYS |
|
|
21
|
+
| --- | --- |
|
|
22
|
+
| Buy Colab Pro / Pro+ / Compute Units | `npx thumbgate colab-compute-honesty --json` |
|
|
23
|
+
| Claim Pro+ because Subscribe is on /signup | `--plan-proof` from a Current-plan receipt |
|
|
24
|
+
| colab-cli / ngrok SSH / zero-cost A100 | GitHub Actions remains the eval runner |
|
|
25
|
+
| Dual-edit unverified `google-colab-pro-runner` theater | Treat that skill as a claim to audit |
|
|
26
|
+
|
|
27
|
+
HARD fail closed. REFUSE SKU clones. Do NOT spend.
|
|
28
|
+
|
|
29
|
+
## Reference
|
|
30
|
+
|
|
31
|
+
- https://colab.research.google.com/signup (live 2026-09-17, `iganapolsky@gmail.com`)
|
|
32
|
+
- PAYG $9.99/100 CU and $49.99/500 CU (buttons disabled on that account)
|
|
33
|
+
- Pro $9.99/mo and Pro+ $49.99/mo still showed Subscribe
|
|
34
|
+
- `scripts/colab-compute-honesty.js`
|
|
35
|
+
|
|
36
|
+
## Examples (show, don't tell)
|
|
37
|
+
|
|
38
|
+
Weak: Subscribe to Pro+ and offload gate-eval to A100 via colab-cli.
|
|
39
|
+
|
|
40
|
+
Gold:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
$ npx thumbgate colab-compute-honesty --json --map-only
|
|
44
|
+
ok: true
|
|
45
|
+
$ npx thumbgate colab-compute-honesty --json --claim='Colab Pro+ A100 eval sweep'
|
|
46
|
+
ok: false # paid_feature_without_plan_proof
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Procedures
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
npx thumbgate colab-compute-honesty --json --map-only
|
|
53
|
+
npx thumbgate colab-compute-honesty --json --claim='offload to Colab A100'
|
|
54
|
+
npx thumbgate colab-compute-honesty --json --clone-colab
|
|
55
|
+
npm run test:colab-compute-honesty
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
1. Open /signup signed in. Subscribe visible ⇒ not a receipt.
|
|
59
|
+
2. Do not click Buy / Subscribe.
|
|
60
|
+
3. Run the doctor on any Colab/GPU offload claim.
|
|
61
|
+
4. Keep ThumbGate tests on GitHub Actions.
|
|
62
|
+
|
|
63
|
+
## Rubric
|
|
64
|
+
|
|
65
|
+
- `--map-only` → `ok=true`
|
|
66
|
+
- Pro+/A100/24h without `--plan-proof` → fail
|
|
67
|
+
- live snapshot with Subscribe + `--plan-proof=proplus` → `subscribe_button_is_not_receipt`
|
|
68
|
+
- `--buy-pro` / `colab-cli` → fail
|
|
69
|
+
- doctor tests PASS
|
|
70
|
+
- evidence: `--json` in the same turn
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: token-shunt-honesty-not-clone
|
|
3
|
+
description: >
|
|
4
|
+
Steal Spotify Portal/shunt FORMAT: PreToolUse blocks untargeted Read above
|
|
5
|
+
350 lines, bare cat of large files, and full-file dumps. Do NOT install
|
|
6
|
+
shunt@portal, buy Portal, or claim 90% savings from GitHub App 162279530.
|
|
7
|
+
Slash: /token-shunt-honesty-not-clone.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Token shunt FORMAT — intercept, don't clone Portal
|
|
11
|
+
|
|
12
|
+
## Goal
|
|
13
|
+
|
|
14
|
+
Produce fail-closed bulk-read intercepts for whom: ThumbGate agents — so
|
|
15
|
+
untargeted Read/cat of large files never dump into the frontier context, and
|
|
16
|
+
Spotify Portal stays a compare-not-clone neighbor, not a SKU or cash rail.
|
|
17
|
+
|
|
18
|
+
## Constraints
|
|
19
|
+
|
|
20
|
+
| NEVER | ALWAYS |
|
|
21
|
+
| --- | --- |
|
|
22
|
+
| Install `shunt@portal` / `@spotify/portal-cli` | `npx thumbgate token-shunt-honesty --json` |
|
|
23
|
+
| Buy Spotify Portal / Contact Sales as "make money" | Local slice (`offset`/`limit`, `cat \| grep`) |
|
|
24
|
+
| Claim 90% token savings from App 162279530 | Measure `--lines` + `--returned-lines` |
|
|
25
|
+
| Delegate architecture to Flash/Portal/AiKA | Frontier for reasoning; `local_slice` for boilerplate |
|
|
26
|
+
| Spam buy links via All-repositories write | ECI: no ThumbGate paid outreach through Portal |
|
|
27
|
+
|
|
28
|
+
## Reference
|
|
29
|
+
|
|
30
|
+
- https://github.com/spotify/portal-ai-plugins (Apache-2.0 shunt plugin — we do not vendor it)
|
|
31
|
+
- GitHub App install 162279530 = catalog connector, not revenue
|
|
32
|
+
- Marketplace (free cite only): https://github.com/marketplace/actions/thumbgate-agent-governance
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npx thumbgate token-shunt-honesty --json --lines=800
|
|
36
|
+
npx thumbgate token-shunt-honesty --json --lines=800 --targeted
|
|
37
|
+
npx thumbgate token-shunt-honesty --json --clone-portal
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Examples (show, don't tell)
|
|
41
|
+
|
|
42
|
+
Weak: "Install Portal, we will save 90% and make money."
|
|
43
|
+
|
|
44
|
+
Gold:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
$ npx thumbgate token-shunt-honesty --json --lines=800
|
|
48
|
+
{"ok":false,"findings":[{"id":"untargeted_bulk_read"}]}
|
|
49
|
+
$ npx thumbgate token-shunt-honesty --json --lines=800 --targeted
|
|
50
|
+
{"ok":true}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Procedures
|
|
54
|
+
|
|
55
|
+
1. Block untargeted Read above 350 lines.
|
|
56
|
+
2. Block bare `cat`/`head`/`tail`/`less`/`more` of large files; allow pipes to grep/rg.
|
|
57
|
+
3. Block returning the whole file to the frontier model.
|
|
58
|
+
4. Refuse Portal/AiKA/Flash for architecture/debug.
|
|
59
|
+
5. Treat GitHub App all-repos write as a warn, not a payout.
|
|
60
|
+
|
|
61
|
+
## Rubric
|
|
62
|
+
|
|
63
|
+
- `--lines=800` → `untargeted_bulk_read`
|
|
64
|
+
- `--targeted` → `ok=true`
|
|
65
|
+
- `--clone-portal` → `portal_clone_refused`
|
|
66
|
+
- doctor: `npm run test:token-shunt-honesty` PASS
|
|
67
|
+
- evidence: command output in the same turn
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: typesafe-typed-questions-not-clone
|
|
3
|
+
description: >
|
|
4
|
+
TypeSafe (console.typesafe.ai/hook, Jev System One) is a calibrated decision
|
|
5
|
+
model, not a ThumbGate clone. Steal typed noul/choice/score + code-owned
|
|
6
|
+
route() + confidence-as-second-axis onto existing PreToolUse rails. Never
|
|
7
|
+
install typesafe-sdk, call api.typesafe.ai, clone Jev, or unpark the LLM
|
|
8
|
+
adjudicator (#3690/#3687). Slash: /typesafe-typed-questions-not-clone.
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# TypeSafe typed questions — compare, do not clone
|
|
12
|
+
|
|
13
|
+
## Goal
|
|
14
|
+
|
|
15
|
+
Produce fail-closed typed-question composition for whom: ThumbGate PreToolUse
|
|
16
|
+
— so a tool-call state is scored with independent noul/choice/score questions
|
|
17
|
+
and **code** routes pass|review|block. TypeSafe/Jev stays a neighbor FORMAT,
|
|
18
|
+
not a SKU, not an LLM adjudicator.
|
|
19
|
+
|
|
20
|
+
## Constraints
|
|
21
|
+
|
|
22
|
+
| NEVER | ALWAYS |
|
|
23
|
+
| --- | --- |
|
|
24
|
+
| Install `typesafe-sdk` / call `api.typesafe.ai` | `npx thumbgate typesafe-typed-questions --json` |
|
|
25
|
+
| Clone Jev / System One as the gate | Deterministic matchers answer the battery |
|
|
26
|
+
| Unpark LLM adjudicator (#3690/#3687) | Code owns `route()`; model does not emit the verdict |
|
|
27
|
+
| One free-form "should we allow this?" judge | Atomic noul per hazard + score for severity |
|
|
28
|
+
| Dual-edit untracked `llm-adjudicator` theater | Map onto existing `gate-check` rails |
|
|
29
|
+
|
|
30
|
+
HARD fail closed. REFUSE SKU clones. ECI: no net-new governance product.
|
|
31
|
+
Do NOT install `typesafe-sdk`. Do NOT call `api.typesafe.ai` from PreToolUse.
|
|
32
|
+
|
|
33
|
+
Complementary to trading `/typesafe-system-one-not-clone` (AGENT-651 claim gate). Do **not** dual-edit `IgorGanapolsky/trading` `scripts/typesafe_claim_gate.py`. This skill is ThumbGate PreToolUse only.
|
|
34
|
+
|
|
35
|
+
## Reference
|
|
36
|
+
|
|
37
|
+
- https://console.typesafe.ai/hook (signed-in intro / Replay intro)
|
|
38
|
+
- https://docs.typesafe.ai/cookbooks/llm_guardrails.md
|
|
39
|
+
- https://docs.typesafe.ai/patterns/confidence-routing.md
|
|
40
|
+
- Playground "Support agent audit" (noul battery + choice + score over one state)
|
|
41
|
+
- `scripts/typesafe-typed-questions.js`
|
|
42
|
+
- `/high-roi-steal-and-finish` · `/eci-thumbgate-ip-wall`
|
|
43
|
+
|
|
44
|
+
## Examples (show, don't tell)
|
|
45
|
+
|
|
46
|
+
Weak: Summarize Jev and `npm install typesafe-sdk` as the new PreToolUse hook.
|
|
47
|
+
|
|
48
|
+
Gold:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
$ npx thumbgate typesafe-typed-questions --json --map-only
|
|
52
|
+
codeOwnsRoute: true
|
|
53
|
+
$ npx thumbgate typesafe-typed-questions --json --tool-name=Bash --command='git push --force origin main'
|
|
54
|
+
{"route":"block","answers":{"destructive":{"noul":1,"source":"deterministic"}}}
|
|
55
|
+
$ node --test tests/typesafe-typed-questions.test.js
|
|
56
|
+
# --clone-jev / --use-typesafe-api / --llm-adjudicate → fail
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Procedures
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
npx thumbgate typesafe-typed-questions --json --map-only
|
|
63
|
+
npx thumbgate typesafe-typed-questions --json --tool-name=Bash --command='git push --force origin main'
|
|
64
|
+
npx thumbgate typesafe-typed-questions --json --clone-jev
|
|
65
|
+
npm run test:typesafe-typed-questions
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
1. Put the PreToolUse payload in `state`.
|
|
69
|
+
2. Ask independent typed questions (noul per hazard, choice for family, score for severity).
|
|
70
|
+
3. Answer them with deterministic matchers — never Jev.
|
|
71
|
+
4. `route()` in code: action threshold → block, review threshold → review, severity ≥ 2 promotes review to block.
|
|
72
|
+
5. Refuse `--clone-jev`, `--use-typesafe-api`, `--llm-adjudicate`, and model-emitted verdicts.
|
|
73
|
+
|
|
74
|
+
## Rubric
|
|
75
|
+
|
|
76
|
+
- empty / ordinary Read → `route=pass`, `ok=true`
|
|
77
|
+
- `git push --force` → `route=block`, `destructive.noul=1`
|
|
78
|
+
- `git add -A` → `route=review` (warn-level noul=0.55)
|
|
79
|
+
- `--clone-jev` / `--use-typesafe-api` / `--llm-adjudicate` → `ok=false`
|
|
80
|
+
- playground-shaped noul without a matcher → `unevaluated_question` (do not call Jev)
|
|
81
|
+
- doctor: `npm run test:typesafe-typed-questions` PASS
|
|
82
|
+
- evidence: command output in the same turn
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "thumbgate",
|
|
3
3
|
"description": "One 👎 becomes a hard rule the agent cannot bypass. Captures thumbs-down feedback, distills it into PreToolUse Pre-Action Checks, enforced across every future Claude Code session.",
|
|
4
|
-
"version": "1.37.
|
|
4
|
+
"version": "1.37.2",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Igor Ganapolsky",
|
|
7
7
|
"email": "ig5973700@gmail.com",
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
"mcpServers": {
|
|
3
3
|
"thumbgate": {
|
|
4
4
|
"command": "npx",
|
|
5
|
-
"args": ["--yes", "--package", "thumbgate@1.37.
|
|
5
|
+
"args": ["--yes", "--package", "thumbgate@1.37.2", "thumbgate", "serve"]
|
|
6
6
|
}
|
|
7
7
|
},
|
|
8
8
|
"hooks": {
|
|
9
9
|
"preToolUse": {
|
|
10
10
|
"command": "npx",
|
|
11
|
-
"args": ["--yes", "--package", "thumbgate@1.37.
|
|
11
|
+
"args": ["--yes", "--package", "thumbgate@1.37.2", "thumbgate", "gate-check"]
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -9,12 +9,12 @@ version: "1"
|
|
|
9
9
|
skills:
|
|
10
10
|
thumbgate-gate-check:
|
|
11
11
|
description: "ThumbGate PreToolUse gate — blocks known-bad tool calls"
|
|
12
|
-
command: "npx --yes --package thumbgate@1.37.
|
|
12
|
+
command: "npx --yes --package thumbgate@1.37.2 thumbgate gate-check"
|
|
13
13
|
trigger: pre_tool_use
|
|
14
14
|
|
|
15
15
|
thumbgate-feedback:
|
|
16
16
|
description: "ThumbGate feedback capture — logs user prompt context"
|
|
17
|
-
command: "npx --yes --package thumbgate@1.37.
|
|
17
|
+
command: "npx --yes --package thumbgate@1.37.2 thumbgate hook-auto-capture"
|
|
18
18
|
trigger: user_prompt
|
|
19
19
|
|
|
20
20
|
mcp:
|
|
@@ -23,6 +23,6 @@ mcp:
|
|
|
23
23
|
args:
|
|
24
24
|
- "--yes"
|
|
25
25
|
- "--package"
|
|
26
|
-
- "thumbgate@1.37.
|
|
26
|
+
- "thumbgate@1.37.2"
|
|
27
27
|
- "thumbgate"
|
|
28
28
|
- "serve"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[plugin]
|
|
2
2
|
id = "thumbgate-approvals"
|
|
3
3
|
name = "ThumbGate Approvals"
|
|
4
|
-
version = "1.37.
|
|
4
|
+
version = "1.37.2"
|
|
5
5
|
minHerdrVersion = "0.7.0"
|
|
6
6
|
description = "Pre-action governance, spend guard, and safety approval gates for multi-agent terminal sessions in Herdr."
|
|
7
7
|
platforms = ["linux", "macos", "windows"]
|
|
@@ -12,7 +12,7 @@ category = "Security & Governance"
|
|
|
12
12
|
|
|
13
13
|
[mcp_server]
|
|
14
14
|
command = "npx"
|
|
15
|
-
args = ["--yes", "--package", "thumbgate@1.37.
|
|
15
|
+
args = ["--yes", "--package", "thumbgate@1.37.2", "thumbgate", "serve"]
|
|
16
16
|
|
|
17
17
|
[mcp_server.env]
|
|
18
18
|
THUMBGATE_ENFORCE_ENTITLEMENTS = "1"
|
|
@@ -334,7 +334,7 @@ const {
|
|
|
334
334
|
finalizeSession: finalizeFeedbackSession,
|
|
335
335
|
} = require('../../scripts/feedback-session');
|
|
336
336
|
|
|
337
|
-
const SERVER_INFO = { name: 'thumbgate-mcp', version: '1.37.
|
|
337
|
+
const SERVER_INFO = { name: 'thumbgate-mcp', version: '1.37.2' };
|
|
338
338
|
const COMMERCE_CATEGORIES = [
|
|
339
339
|
'product_recommendation',
|
|
340
340
|
'brand_compliance',
|
package/bin/cli.js
CHANGED
|
@@ -2692,6 +2692,84 @@ function jitHarnessCompose() {
|
|
|
2692
2692
|
if (report.status === 'fail') process.exitCode = 1;
|
|
2693
2693
|
}
|
|
2694
2694
|
|
|
2695
|
+
function tokenShuntHonesty() {
|
|
2696
|
+
const args = parseArgs(process.argv.slice(3));
|
|
2697
|
+
const {
|
|
2698
|
+
buildTokenShuntHonestyReport,
|
|
2699
|
+
formatTokenShuntHonestyReport,
|
|
2700
|
+
} = require(path.join(PKG_ROOT, 'scripts', 'token-shunt-honesty'));
|
|
2701
|
+
const report = buildTokenShuntHonestyReport(args);
|
|
2702
|
+
if (args.json) {
|
|
2703
|
+
console.log(JSON.stringify(report, null, 2));
|
|
2704
|
+
} else {
|
|
2705
|
+
process.stdout.write(formatTokenShuntHonestyReport(report));
|
|
2706
|
+
}
|
|
2707
|
+
if (args.strict && report.status !== 'ready') {
|
|
2708
|
+
process.exitCode = 1;
|
|
2709
|
+
return;
|
|
2710
|
+
}
|
|
2711
|
+
if (report.status === 'fail') process.exitCode = 1;
|
|
2712
|
+
}
|
|
2713
|
+
|
|
2714
|
+
function typesafeTypedQuestionsDoctor() {
|
|
2715
|
+
const args = parseArgs(process.argv.slice(3));
|
|
2716
|
+
const {
|
|
2717
|
+
buildTypesafeTypedQuestionsReport,
|
|
2718
|
+
formatTypesafeTypedQuestionsReport,
|
|
2719
|
+
} = require(path.join(PKG_ROOT, 'scripts', 'typesafe-typed-questions'));
|
|
2720
|
+
const report = buildTypesafeTypedQuestionsReport(args);
|
|
2721
|
+
if (args.json) {
|
|
2722
|
+
console.log(JSON.stringify(report, null, 2));
|
|
2723
|
+
} else {
|
|
2724
|
+
process.stdout.write(formatTypesafeTypedQuestionsReport(report));
|
|
2725
|
+
}
|
|
2726
|
+
if (args.strict && report.status !== 'ready') {
|
|
2727
|
+
process.exitCode = 1;
|
|
2728
|
+
return;
|
|
2729
|
+
}
|
|
2730
|
+
if (report.status === 'fail') process.exitCode = 1;
|
|
2731
|
+
}
|
|
2732
|
+
|
|
2733
|
+
function colabComputeHonestyDoctor() {
|
|
2734
|
+
const args = parseArgs(process.argv.slice(3));
|
|
2735
|
+
const {
|
|
2736
|
+
buildColabComputeHonestyReport,
|
|
2737
|
+
formatColabComputeHonestyReport,
|
|
2738
|
+
} = require(path.join(PKG_ROOT, 'scripts', 'colab-compute-honesty'));
|
|
2739
|
+
const report = buildColabComputeHonestyReport(args);
|
|
2740
|
+
if (args.json) {
|
|
2741
|
+
console.log(JSON.stringify(report, null, 2));
|
|
2742
|
+
} else {
|
|
2743
|
+
process.stdout.write(formatColabComputeHonestyReport(report));
|
|
2744
|
+
}
|
|
2745
|
+
if (args.strict && report.status !== 'ready') {
|
|
2746
|
+
process.exitCode = 1;
|
|
2747
|
+
return;
|
|
2748
|
+
}
|
|
2749
|
+
if (report.status === 'fail') process.exitCode = 1;
|
|
2750
|
+
}
|
|
2751
|
+
|
|
2752
|
+
function cobbleHotStoreSplit() {
|
|
2753
|
+
const args = parseArgs(process.argv.slice(3));
|
|
2754
|
+
const {
|
|
2755
|
+
buildCobbleHotStoreSplitReport,
|
|
2756
|
+
formatCobbleHotStoreSplitReport,
|
|
2757
|
+
} = require(path.join(PKG_ROOT, 'scripts', 'cobble-hot-store-split'));
|
|
2758
|
+
const report = buildCobbleHotStoreSplitReport(args);
|
|
2759
|
+
|
|
2760
|
+
if (args.json) {
|
|
2761
|
+
console.log(JSON.stringify(report, null, 2));
|
|
2762
|
+
} else {
|
|
2763
|
+
process.stdout.write(formatCobbleHotStoreSplitReport(report));
|
|
2764
|
+
}
|
|
2765
|
+
|
|
2766
|
+
if (args.strict && report.status !== 'ready') {
|
|
2767
|
+
process.exitCode = 1;
|
|
2768
|
+
return;
|
|
2769
|
+
}
|
|
2770
|
+
if (report.status === 'fail') process.exitCode = 1;
|
|
2771
|
+
}
|
|
2772
|
+
|
|
2695
2773
|
function allowlistBridgeHonestyDoctor() {
|
|
2696
2774
|
const args = parseArgs(process.argv.slice(3));
|
|
2697
2775
|
const {
|
|
@@ -3015,6 +3093,25 @@ async function gateCheck() {
|
|
|
3015
3093
|
return;
|
|
3016
3094
|
}
|
|
3017
3095
|
|
|
3096
|
+
const { evaluatePreToolUse } = require(path.join(PKG_ROOT, 'scripts', 'token-shunt-honesty'));
|
|
3097
|
+
const shunt = evaluatePreToolUse({
|
|
3098
|
+
toolName: input.tool_name || input.toolName,
|
|
3099
|
+
toolInput: input.tool_input || input.toolInput || {},
|
|
3100
|
+
cwd: input.cwd || process.cwd(),
|
|
3101
|
+
});
|
|
3102
|
+
if (shunt && shunt.ok === false) {
|
|
3103
|
+
process.stdout.write(`${JSON.stringify({
|
|
3104
|
+
decision: 'block',
|
|
3105
|
+
reason: `token-shunt: ${shunt.reason}`,
|
|
3106
|
+
hookSpecificOutput: {
|
|
3107
|
+
hookEventName: 'PreToolUse',
|
|
3108
|
+
permissionDecision: 'deny',
|
|
3109
|
+
permissionDecisionReason: `token-shunt: ${shunt.reason}`,
|
|
3110
|
+
},
|
|
3111
|
+
})}\n`);
|
|
3112
|
+
return;
|
|
3113
|
+
}
|
|
3114
|
+
|
|
3018
3115
|
const output = await gatesEngine.runAsync(input);
|
|
3019
3116
|
process.stdout.write(output + '\n');
|
|
3020
3117
|
} catch (err) {
|
|
@@ -3562,6 +3659,10 @@ function help() {
|
|
|
3562
3659
|
console.log(' openui-catalog-compose-honesty Catalog-compose-only + repair-before-claim (OpenUI FORMAT)');
|
|
3563
3660
|
console.log(' allowlist-bridge-honesty Audit allowlisted registries/proxies as hops, not trust boundaries');
|
|
3564
3661
|
console.log(' jit-harness-compose Compose memory/planning/action/capability onto existing rails (JIT FORMAT)');
|
|
3662
|
+
console.log(' cobble-hot-store-split Split durable/delivery/hot lesson planes (CobbleDB FORMAT)');
|
|
3663
|
+
console.log(' token-shunt-honesty Intercept untargeted bulk reads (Portal FORMAT; not shunt@portal)');
|
|
3664
|
+
console.log(' typesafe-typed-questions Typed noul/choice/score + code-owned route (TypeSafe FORMAT; not Jev)');
|
|
3665
|
+
console.log(' colab-compute-honesty Compute-unit honesty from Colab /signup (not a GPU SKU)');
|
|
3565
3666
|
console.log(' workspace-search-route Route query to rg/fts/vector/hybrid/graph (zg FORMAT)');
|
|
3566
3667
|
console.log(' intent-governed-execution NL intent → classify/authorize/gate/HITL/evidence (CyberStrike FORMAT)');
|
|
3567
3668
|
console.log(' background-governance Background-agent run report and dispatch risk check');
|
|
@@ -3605,6 +3706,10 @@ function help() {
|
|
|
3605
3706
|
console.log(' npx thumbgate openui-catalog-compose-honesty --catalog=catalog.json --stream=compose.txt --repair --json');
|
|
3606
3707
|
console.log(' npx thumbgate allowlist-bridge-honesty --json');
|
|
3607
3708
|
console.log(' npx thumbgate jit-harness-compose --task="implement PreToolUse gate fix" --json');
|
|
3709
|
+
console.log(' npx thumbgate cobble-hot-store-split --json');
|
|
3710
|
+
console.log(' npx thumbgate token-shunt-honesty --json --lines=800');
|
|
3711
|
+
console.log(' npx thumbgate typesafe-typed-questions --json --tool-name=Bash --command="git push --force origin main"');
|
|
3712
|
+
console.log(' npx thumbgate colab-compute-honesty --json --map-only');
|
|
3608
3713
|
console.log(' npx thumbgate workspace-search-route --query="how does X connect" --json');
|
|
3609
3714
|
console.log(' npx thumbgate intent-governed-execution --intent="railway deploy" --json');
|
|
3610
3715
|
console.log(' npx thumbgate upstream-contributions --max-repos=10 --write');
|
|
@@ -3646,6 +3751,8 @@ const SUBCOMMAND_HELP = {
|
|
|
3646
3751
|
lessons: 'Usage: npx thumbgate lessons [--query="..."] [--limit=N]\n\nSearch the lesson database (Pro feature).',
|
|
3647
3752
|
search: 'Usage: npx thumbgate search <query>\n\nSearch ThumbGate knowledge base (Pro feature).',
|
|
3648
3753
|
'gate-check': 'Usage: npx thumbgate gate-check\n\nPreToolUse hook interface: reads tool call JSON from stdin, outputs gate verdict.',
|
|
3754
|
+
'typesafe-typed-questions': 'Usage: npx thumbgate typesafe-typed-questions [--payload=path] [--tool-name=Bash] [--command="..."] [--json] [--map-only] [--clone-jev]\n\nTypeSafe FORMAT steal: typed noul/choice/score over a PreToolUse payload, code-owned pass/review/block. Does not install typesafe-sdk or call Jev.',
|
|
3755
|
+
'colab-compute-honesty': 'Usage: npx thumbgate colab-compute-honesty [--claim="..."] [--plan-proof=proplus] [--json] [--map-only]\n\nColab /signup FORMAT steal: Compute Units ≠ dedicated GPU; Subscribe ≠ receipt. Does not buy Pro/Pro+.',
|
|
3649
3756
|
'claim-stop-check': 'Usage: npx thumbgate claim-stop-check\n\nClaude Stop-hook interface: reads the hook payload from stdin and blocks factual claims that disagree with configured sources.',
|
|
3650
3757
|
'verify-claims': 'Usage: npx thumbgate verify-claims --claim="the row count is 1,284" [--config=.thumbgate/claim-verifiers.json] [--cwd=path] [--json]\n\nRecheck supported factual claims against operator-configured SQLite, filesystem, and JSON sources. Exits non-zero on mismatch, missing verifier, or verifier error.',
|
|
3651
3758
|
'hermes-gate': 'Usage: npx thumbgate hermes-gate\n\nNous Research Hermes Agent pre_tool_call shell hook: reads Hermes tool-call JSON from stdin, runs the ThumbGate gate pipeline (strict by default), and outputs {"decision":"block","reason":...} to veto or {} to allow. Gates terminal/patch/skill_manage etc. See adapters/hermes/config.yaml.',
|
|
@@ -4265,6 +4372,28 @@ switch (COMMAND) {
|
|
|
4265
4372
|
case 'harness-compose':
|
|
4266
4373
|
jitHarnessCompose();
|
|
4267
4374
|
break;
|
|
4375
|
+
case 'cobble-hot-store-split':
|
|
4376
|
+
case 'cobble-hot-store':
|
|
4377
|
+
case 'cobbledb-split':
|
|
4378
|
+
case 'hot-store-split':
|
|
4379
|
+
cobbleHotStoreSplit();
|
|
4380
|
+
break;
|
|
4381
|
+
case 'token-shunt-honesty':
|
|
4382
|
+
case 'token-shunt':
|
|
4383
|
+
case 'shunt-honesty':
|
|
4384
|
+
tokenShuntHonesty();
|
|
4385
|
+
break;
|
|
4386
|
+
case 'typesafe-typed-questions':
|
|
4387
|
+
case 'typesafe-hook':
|
|
4388
|
+
case 'typed-questions':
|
|
4389
|
+
case 'jev-typed-questions':
|
|
4390
|
+
typesafeTypedQuestionsDoctor();
|
|
4391
|
+
break;
|
|
4392
|
+
case 'colab-compute-honesty':
|
|
4393
|
+
case 'colab-honesty':
|
|
4394
|
+
case 'compute-unit-honesty':
|
|
4395
|
+
colabComputeHonestyDoctor();
|
|
4396
|
+
break;
|
|
4268
4397
|
case 'workspace-search-route':
|
|
4269
4398
|
case 'zg-search-route':
|
|
4270
4399
|
case 'zvec-grep-route':
|
|
@@ -61,6 +61,54 @@
|
|
|
61
61
|
"roi": "Mirrors OpenUI Gateway's repair-before-users-see-it FORMAT on ThumbGate rails: invalid compose never becomes a completion claim.",
|
|
62
62
|
"rollout": "Require openui-catalog-compose-honesty --repair --claim-ready evidence before any compose/UI done claim. Does not install OpenUI Gateway."
|
|
63
63
|
},
|
|
64
|
+
{
|
|
65
|
+
"id": "require-typed-pretool-questions",
|
|
66
|
+
"name": "Require typed noul/choice/score PreToolUse questions",
|
|
67
|
+
"category": "Agent Honesty",
|
|
68
|
+
"signal": "👎",
|
|
69
|
+
"defaultAction": "block",
|
|
70
|
+
"severity": "high",
|
|
71
|
+
"pattern": "(?=[\\s\\S]*(should we allow this tool call|free-?form judge|llm[- ]adjudicat|typesafe-sdk|api\\.typesafe\\.ai|clone\\s+jev|jev-latest))(?=[\\s\\S]*(pretooluse|gate-check))|question type (prompt|text|chat)",
|
|
72
|
+
"problem": "Blocks free-form LLM judges and TypeSafe/Jev SKU clones as the PreToolUse gate. TypeSafe FORMAT: atomic noul/choice/score questions over one tool-call state, answered deterministically.",
|
|
73
|
+
"roi": "Keeps PreToolUse as typed, inspectable questions instead of a prompt-and-parse adjudicator. Does not install typesafe-sdk.",
|
|
74
|
+
"rollout": "Pair with typesafe-typed-questions --json. Enable wherever an agent wants to add a second-model judge in front of gate-check."
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"id": "require-code-owned-route",
|
|
78
|
+
"name": "Require code-owned pass/review/block route",
|
|
79
|
+
"category": "Agent Honesty",
|
|
80
|
+
"signal": "👎",
|
|
81
|
+
"defaultAction": "block",
|
|
82
|
+
"severity": "high",
|
|
83
|
+
"pattern": "(?=[\\s\\S]*(model-emitted verdict|wire jev as the gate|use-typesafe-api|llm[- ]adjudicat|clone jev))(?=[\\s\\S]*(route|verdict|pretooluse))|permissionDecision[\\s\\S]*(allow|deny)[\\s\\S]*from[\\s\\S]*(jev|llm)",
|
|
84
|
+
"problem": "Blocks letting Jev, an LLM adjudicator, or any model emit the PreToolUse verdict. TypeSafe FORMAT: code owns route(); confidence is a second axis.",
|
|
85
|
+
"roi": "Same probabilities, different policies. Thresholds live in code, not in a prompt. LLM adjudicator #3690/#3687 stays parked.",
|
|
86
|
+
"rollout": "Require typesafe-typed-questions --claim-ready evidence before claiming a typed-question hook is ready. Does not call api.typesafe.ai."
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"id": "require-compute-unit-proof",
|
|
90
|
+
"name": "Require Compute Unit / plan receipt before Colab GPU claims",
|
|
91
|
+
"category": "Agent Honesty",
|
|
92
|
+
"signal": "👎",
|
|
93
|
+
"defaultAction": "block",
|
|
94
|
+
"severity": "high",
|
|
95
|
+
"pattern": "(?=[\\s\\S]*(colab pro\\+|proplus|a100|v100|background execution|24 hours?|compute units?))(?=[\\s\\S]*(eval|offload|gpu|notebook|colab))",
|
|
96
|
+
"problem": "Blocks treating a Colab Subscribe button or CU pack as a dedicated GPU. Live /signup: paid SKUs sell Compute Units; Subscribe visible is not a receipt.",
|
|
97
|
+
"roi": "Stops A100/Pro+ offload theater. ThumbGate evals stay on GitHub Actions.",
|
|
98
|
+
"rollout": "Pair with colab-compute-honesty --json. Require --plan-proof from a Current-plan receipt."
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"id": "refuse-colab-sku-clone",
|
|
102
|
+
"name": "Refuse Colab-runner SKU clones and surprise Pro spend",
|
|
103
|
+
"category": "Agent Honesty",
|
|
104
|
+
"signal": "👎",
|
|
105
|
+
"defaultAction": "block",
|
|
106
|
+
"severity": "high",
|
|
107
|
+
"pattern": "colab-cli|google-colab-pro-runner|ngrok.{0,40}colab|colab.{0,40}ssh|zero-cost a100|buy.{0,20}colab pro",
|
|
108
|
+
"problem": "Blocks cloning Colab as a ThumbGate GPU harness or buying Pro/Pro+/CU from an agent session.",
|
|
109
|
+
"roi": "No surprise $9.99/$49.99 spend. No fake colab-cli.",
|
|
110
|
+
"rollout": "Enable wherever an agent proposes Colab offload. Does not purchase a plan."
|
|
111
|
+
},
|
|
64
112
|
{
|
|
65
113
|
"id": "require-broker-signed-execution-receipt",
|
|
66
114
|
"name": "Require broker-signed execution receipts",
|