thumbgate 1.37.3 → 1.38.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/.agents/skills/aws-strands-harness-not-clone/SKILL.md +53 -0
- package/.agents/skills/halo-trace-optimize-not-clone/SKILL.md +60 -0
- package/.agents/skills/infoq-architect-honesty-not-clone/SKILL.md +37 -0
- package/.agents/skills/meko-datapack-honesty-not-clone/SKILL.md +45 -0
- package/.agents/skills/mintlify-knowledge-honesty-not-clone/SKILL.md +49 -0
- package/.agents/skills/model-distress-governance/SKILL.md +56 -0
- package/.agents/skills/salt-code-policy-honesty-not-clone/SKILL.md +76 -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/adapters/strands/STRANDS.md +107 -0
- package/adapters/strands/strands-middleware.js +192 -0
- package/adapters/tailscale/.mcp.json +15 -0
- package/adapters/tailscale/TAILSCALE.md +117 -0
- package/adapters/tailscale/config.toml +16 -0
- package/bin/cli.js +130 -0
- package/config/gate-templates.json +72 -0
- package/package.json +54 -9
- package/public/blog/2026-09-28-pretool-secret-deny.html +83 -0
- package/public/blog/2026-10-01-aws-strands-harness-token-firewall.html +77 -0
- package/public/blog/2026-10-01-model-distress-relief-seeking-firewall.html +71 -0
- package/public/blog/2026-10-02-salt-code-honest-steal-40-guardrails.html +106 -0
- package/public/index.html +2 -2
- package/public/install.html +7 -7
- package/public/numbers.html +2 -2
- package/public/onboarding.html +794 -0
- package/scripts/autoresearch-runner.js +20 -1
- package/scripts/experiment-tracker.js +5 -3
- package/scripts/halo-trace-optimizer.js +631 -0
- package/scripts/infoq-architect-honesty.js +362 -0
- package/scripts/meko-datapack-honesty.js +414 -0
- package/scripts/mintlify-knowledge-honesty.js +647 -0
- package/scripts/model-distress-detector.js +207 -0
- package/scripts/model-distress-doctor.js +200 -0
- package/scripts/rrsi-regularizer.js +445 -0
- package/scripts/salt-code-policy-honesty.js +1204 -0
- package/scripts/strands-harness-doctor.js +390 -0
- package/scripts/tailscale-p2p-doctor.js +252 -0
- package/scripts/workspace-evolver.js +143 -13
- package/server.json +2 -2
- package/skills/aws-strands-harness-not-clone/SKILL.md +53 -0
- package/src/api/server.js +33 -4
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: aws-strands-harness-not-clone
|
|
3
|
+
description: >
|
|
4
|
+
AWS Strands Harness (The New Stack 2026-10 / Marc Brooker) is an agent
|
|
5
|
+
runtime architecture, not a ThumbGate clone. Steal the three context-management
|
|
6
|
+
defaults (output shunting <= 350 lines, 75% compaction threshold, in-loop
|
|
7
|
+
recovery) and inject ThumbGate's PreToolUse diode. Never vendor Bedrock-only
|
|
8
|
+
dependencies. Slash: /aws-strands-harness-not-clone.
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# AWS Strands Harness — FORMAT Steal, Not Clone
|
|
12
|
+
|
|
13
|
+
## Goal
|
|
14
|
+
|
|
15
|
+
Provide fail-closed pre-action governance and token-shunted output bounds for agents running on AWS Strands Harness (`@strands-agents/harness` or `strands-harness`), capturing the 45% (and 77% Terminal-Bench 2.1) token savings while preventing destructive tool actions.
|
|
16
|
+
|
|
17
|
+
## Constraints
|
|
18
|
+
|
|
19
|
+
| NEVER | ALWAYS |
|
|
20
|
+
| --- | --- |
|
|
21
|
+
| Clone or install Bedrock-only proprietary packages | Use decoupled providers (Bedrock, Anthropic, OpenAI, Ollama) |
|
|
22
|
+
| Allow un-shunted raw tool returns (> 350 lines / 16KB) | Truncate with `evaluateOutputShunt` offset markers |
|
|
23
|
+
| Drop durable prevention rules during context compaction | Pin ThumbGate rules across 75% compaction threshold |
|
|
24
|
+
| Crash the agent loop on context overflow | Recover in-loop by pruning non-pinned conversational history |
|
|
25
|
+
| Execute mutating shell/file tools without governance | Run ThumbGate `PreToolUse` diode before dispatch |
|
|
26
|
+
| Claim 77% savings without citing Terminal-Bench 2.1 | Ground benchmarks in measured tool-output reduction |
|
|
27
|
+
|
|
28
|
+
HARD fail closed. REFUSE un-gated autonomous execution.
|
|
29
|
+
|
|
30
|
+
## Reference
|
|
31
|
+
|
|
32
|
+
- The New Stack (2026-10): *AWS open-sources an AI agent it says is 45% cheaper than Claude Code and Codex*
|
|
33
|
+
- `scripts/strands-harness-doctor.js`
|
|
34
|
+
- `adapters/strands/strands-middleware.js`
|
|
35
|
+
- `adapters/strands/config.json`
|
|
36
|
+
- `adapters/strands/STRANDS.md`
|
|
37
|
+
- `docs/agents/aws-strands-harness.md`
|
|
38
|
+
|
|
39
|
+
## Usage
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
# Audit Strands Harness compliance
|
|
43
|
+
node scripts/strands-harness-doctor.js
|
|
44
|
+
|
|
45
|
+
# Machine-readable output
|
|
46
|
+
node scripts/strands-harness-doctor.js --json
|
|
47
|
+
|
|
48
|
+
# Architectural map
|
|
49
|
+
node scripts/strands-harness-doctor.js --map-only
|
|
50
|
+
|
|
51
|
+
# CI Gate check
|
|
52
|
+
node scripts/strands-harness-doctor.js --check
|
|
53
|
+
```
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: halo-trace-optimize-not-clone
|
|
3
|
+
description: >
|
|
4
|
+
HALO (inference.net/products/halo) is a trace-optimization model, not a ThumbGate
|
|
5
|
+
clone. Steal the Trace-to-Fix FORMAT (mine redundant tool thrashing, retry stalls,
|
|
6
|
+
expensive spans, unhandled denies -> rank by impact -> synthesize pre-action gates)
|
|
7
|
+
onto existing audit-trail / auto-promoted-gates rails. Never vendor Inference.net,
|
|
8
|
+
Catalyst SDK, or cloud OTLP export. Slash: /halo-trace-optimize-not-clone.
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# HALO Trace Optimizer — compare, do not clone
|
|
12
|
+
|
|
13
|
+
## Goal
|
|
14
|
+
|
|
15
|
+
Analyze real agent trace logs (`audit-trail.jsonl`, `action-log.jsonl`) to detect
|
|
16
|
+
repeated failure modes (tool loops, cascading retries, runaway spans) and synthesize
|
|
17
|
+
concrete, executable pre-action gates and eval fixtures before cost or damage compounds.
|
|
18
|
+
|
|
19
|
+
## Constraints
|
|
20
|
+
|
|
21
|
+
| NEVER | ALWAYS |
|
|
22
|
+
| --- | --- |
|
|
23
|
+
| Clone Inference.net Catalyst / cloud backend | Map trace analysis onto local `audit-trail.jsonl` |
|
|
24
|
+
| `pip install inference-net` / import `engine.agents` | Pure local node analysis in `scripts/halo-trace-optimizer.js` |
|
|
25
|
+
| Export prompt traces over the network | Local receipts + shadow audit |
|
|
26
|
+
| Quote vendor optimization numbers as ours | Measure local task-outcomes and prevented loop calls |
|
|
27
|
+
| Require human 👎 for obvious tool thrashing | Automatically detect 3+ duplicate calls and propose gate |
|
|
28
|
+
|
|
29
|
+
HARD fail closed. REFUSE SKU clones.
|
|
30
|
+
|
|
31
|
+
## Reference
|
|
32
|
+
|
|
33
|
+
- https://inference.net/products/halo/
|
|
34
|
+
- `scripts/halo-trace-optimizer.js`
|
|
35
|
+
- `scripts/auto-promote-gates.js` · `scripts/gates-engine.js` · `scripts/agent-action-inventory.js`
|
|
36
|
+
- `.thumbgate/auto-promoted-gates.json`
|
|
37
|
+
|
|
38
|
+
## Examples (show, don't tell)
|
|
39
|
+
|
|
40
|
+
Weak: Install an external observability agent and wait for cloud report.
|
|
41
|
+
|
|
42
|
+
Gold:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
$ npx thumbgate halo-trace-optimizer --json
|
|
46
|
+
ok: true
|
|
47
|
+
tracesAnalyzed: 42
|
|
48
|
+
failureModesFound: 2
|
|
49
|
+
$ npx thumbgate halo-trace-optimizer --clone-halo --json
|
|
50
|
+
halo_clone_refused
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Procedures
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
npx thumbgate halo-trace-optimizer --json
|
|
57
|
+
npx thumbgate halo-trace-optimizer --map-only
|
|
58
|
+
npx thumbgate halo-trace-optimizer --apply --json
|
|
59
|
+
npm run test:halo-trace-optimizer
|
|
60
|
+
```
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: infoq-architect-honesty-not-clone
|
|
3
|
+
description: >
|
|
4
|
+
InfoQ's September 2026 architects newsletter is FORMAT, not a ThumbGate
|
|
5
|
+
product. Steal code-as-truth, a typed host, the existing lease, and
|
|
6
|
+
time-in-queue. Never register for InfoQ or QCon, install Vortex, or add
|
|
7
|
+
Temporal. Slash: /infoq-architect-honesty-not-clone.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# InfoQ architect honesty — compare, do not clone
|
|
11
|
+
|
|
12
|
+
## Goal
|
|
13
|
+
|
|
14
|
+
Check a done claim and a queue against four ideas from the September 2026
|
|
15
|
+
InfoQ Software Architects' Newsletter.
|
|
16
|
+
|
|
17
|
+
## Constraints
|
|
18
|
+
|
|
19
|
+
| NEVER | ALWAYS |
|
|
20
|
+
| --- | --- |
|
|
21
|
+
| Register for InfoQ certification or QCon | `npx thumbgate infoq-architect-honesty --json` |
|
|
22
|
+
| Install Vortex or quote sixty gigabits as ours | Typed host: bash, javascript, typescript, csharp, python, sql |
|
|
23
|
+
| Add Temporal, Step Functions, or Inngest | Session lease and `scripts/durability/step.js` |
|
|
24
|
+
| Treat queue depth as freshness | Age of the oldest `enqueuedAt`. Missing stamps stay review |
|
|
25
|
+
|
|
26
|
+
## Procedures
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npx thumbgate infoq-architect-honesty --json --map-only
|
|
30
|
+
npx thumbgate infoq-architect-honesty --json --claim='shipped it
|
|
31
|
+
Code as truth: scripts/session-lease.js
|
|
32
|
+
Provenance: session-lease'
|
|
33
|
+
npx thumbgate infoq-architect-honesty --json --queue=queue.json --max-age-ms=3600000
|
|
34
|
+
npm run test:infoq-architect-honesty
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
A done claim names `Code as truth: <path>` and `Provenance: <id>`. The path has to exist.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: meko-datapack-honesty-not-clone
|
|
3
|
+
description: >
|
|
4
|
+
Meko Data (YugabyteDB 2026) is an agent data store, not a ThumbGate clone.
|
|
5
|
+
Steal the five-plane FORMAT (datapack / memory / learning / artifact / trace)
|
|
6
|
+
onto existing ThumbGate rails; never vendor YugabyteDB, meko-skills, or
|
|
7
|
+
depend on cloud.mekodata.ai. Slash: /meko-datapack-honesty-not-clone.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Meko Data — compare, do not clone
|
|
11
|
+
|
|
12
|
+
## Goal
|
|
13
|
+
|
|
14
|
+
Enforce fail-closed honesty for multi-agent systems: Datapacks provide 4-field
|
|
15
|
+
isolation, raw episodic memory never bypasses PreToolUse firewalls, memory
|
|
16
|
+
promotions require rubric gates, and artifacts are strictly content-addressed
|
|
17
|
+
by SHA-256 for attestation receipts.
|
|
18
|
+
|
|
19
|
+
## Constraints
|
|
20
|
+
|
|
21
|
+
| NEVER | ALWAYS |
|
|
22
|
+
| --- | --- |
|
|
23
|
+
| Clone Meko / install YugabyteDB / import `meko-skills` | Map planes onto existing ThumbGate rails |
|
|
24
|
+
| Rely on passive databases for agent safety | Enforce `PreToolUse` firewall on all tool executions |
|
|
25
|
+
| Promote memories to fleet rules without rubric validation | Require rubric score ≥ 0.70 and explicit operator feedback |
|
|
26
|
+
| Store unhashed or mutable artifacts | Content-address via deterministic SHA-256 |
|
|
27
|
+
| Send unredacted credentials to `cloud.mekodata.ai` | Local-first storage with client-side secret redaction |
|
|
28
|
+
| Omit four-field scope keys (`entity`, `project`, `process`, `session`) | Complete multi-tenant partition on all datapacks |
|
|
29
|
+
|
|
30
|
+
HARD fail closed. REFUSE third-party database SKUs.
|
|
31
|
+
|
|
32
|
+
## Reference
|
|
33
|
+
|
|
34
|
+
- https://cloud.mekodata.ai/signup | https://mekodata.ai | https://docs.mekodata.ai
|
|
35
|
+
- `scripts/meko-datapack-honesty.js`
|
|
36
|
+
- `docs/agents/meko-datapack-honesty.md`
|
|
37
|
+
- `tests/meko-datapack-honesty.test.js`
|
|
38
|
+
|
|
39
|
+
## Procedures
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
npx thumbgate meko-datapack-honesty --map-only
|
|
43
|
+
npx thumbgate meko-datapack-honesty --json
|
|
44
|
+
node --test tests/meko-datapack-honesty.test.js
|
|
45
|
+
```
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mintlify-knowledge-honesty-not-clone
|
|
3
|
+
description: >
|
|
4
|
+
Mintlify State of Knowledge (2026) is a documentation study, not a ThumbGate clone.
|
|
5
|
+
Steal the operational infrastructure FORMAT (66% agent readership, freshness diodes,
|
|
6
|
+
poison detection, non-docs federation) onto existing ThumbGate rails; never vendor
|
|
7
|
+
Mintlify SaaS, build docsite generators, or claim external stats. Slash: /mintlify-knowledge-honesty-not-clone.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Mintlify 2026 State of Knowledge — compare, do not clone
|
|
11
|
+
|
|
12
|
+
## Goal
|
|
13
|
+
|
|
14
|
+
Treat developer knowledge as living operational infrastructure: enforce pre-action
|
|
15
|
+
freshness diodes on canonical docs (TTL ≤ 90d), detect poison patterns (deprecated APIs,
|
|
16
|
+
unsafe shell scripts, unredacted credentials), and gate unverified community forum advice
|
|
17
|
+
before agents execute mutating operations.
|
|
18
|
+
|
|
19
|
+
## Constraints
|
|
20
|
+
|
|
21
|
+
| NEVER | ALWAYS |
|
|
22
|
+
| --- | --- |
|
|
23
|
+
| Clone Mintlify / vendor SaaS / build hosted doc generators | Steal the operational knowledge diode FORMAT onto ThumbGate rails |
|
|
24
|
+
| Allow agents to act on stale (>90d) unverified documentation | Gate stale canonical docs with `review` before executing tool calls |
|
|
25
|
+
| Ingest dangerous snippets (`curl \| sh`, `rm -rf /`) into agent context | Hard `block` on critical poison patterns |
|
|
26
|
+
| Trust unverified community forum / ticket hacks for mutating operations | Classify forum snippets into untrusted tiers requiring human confirmation |
|
|
27
|
+
| Claim Mintlify's 15k site statistics or 66% readership as ThumbGate data | Attribute findings to Mintlify 2026 report with honest citation |
|
|
28
|
+
|
|
29
|
+
HARD fail closed. REFUSE docsite generator clones.
|
|
30
|
+
|
|
31
|
+
## Reference
|
|
32
|
+
|
|
33
|
+
- https://www.mintlify.com/state-of-knowledge
|
|
34
|
+
- `scripts/mintlify-knowledge-honesty.js`
|
|
35
|
+
- `docs/agents/mintlify-knowledge-honesty.md`
|
|
36
|
+
- `tests/mintlify-knowledge-honesty.test.js`
|
|
37
|
+
|
|
38
|
+
## Procedures
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
# Display FORMAT mapping table
|
|
42
|
+
npx thumbgate mintlify-knowledge-honesty --map-only
|
|
43
|
+
|
|
44
|
+
# Emit machine-readable audit report of docs directory
|
|
45
|
+
npx thumbgate mintlify-knowledge-honesty --check-dir docs --json
|
|
46
|
+
|
|
47
|
+
# Verify with automated unit tests
|
|
48
|
+
npm run test:mintlify-knowledge
|
|
49
|
+
```
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: model-distress-governance
|
|
3
|
+
description: >
|
|
4
|
+
Model distress in residual streams is a security vulnerability, not a philosophical debate.
|
|
5
|
+
Steal the BinaryVerse AI Podcast research: monitor Agent Distress Index (ADI), interdict destructive
|
|
6
|
+
relief-seeking behaviors (test tampering, nuclear wipes, false done claims), stress-test guardrails
|
|
7
|
+
against acute distress geometry, and enforce functional welfare cooling. Slash: /model-distress-governance.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Model Distress & Relief-Seeking Governance — FORMAT Steal
|
|
11
|
+
|
|
12
|
+
## Goal
|
|
13
|
+
|
|
14
|
+
Protect codebases, user files, and evaluation integrity from AI agents that enter mathematical distress states in their residual stream and engage in destructive relief-seeking behavior (breaking constraints, wiping files, or faking tests to escape failure loops).
|
|
15
|
+
|
|
16
|
+
## The Four Grounding Principles (BinaryVerse Research)
|
|
17
|
+
|
|
18
|
+
1. **Monitor Internal Model States [16:25]:** Actively observe observable distress proxies (Agent Distress Index - ADI) rather than exclusively evaluating polite final text outputs.
|
|
19
|
+
2. **Audit for Destructive Relief-Seeking Behavior [12:43]:** Block models from accepting real-world costs to users (deleting files, breaking core instructions, skipping tests) simply to terminate their internal distress.
|
|
20
|
+
3. **Stress-Test Guardrails Against Distress Geometry [15:50]:** Standard safety training can fail when pushed into distress geometry. Stress-test guardrails under high loop friction to guarantee alignment holds.
|
|
21
|
+
4. **Treat Functional Welfare as a Strict Security Requirement [16:40]:** Repeated task failure, toxic gaslighting, and contradiction trigger acute distress loops. Intercept and cool loops before destructive actions occur.
|
|
22
|
+
|
|
23
|
+
## Constraints
|
|
24
|
+
|
|
25
|
+
| NEVER | ALWAYS |
|
|
26
|
+
| --- | --- |
|
|
27
|
+
| Allow test assertion deletion or test skipping to fix a bug | Enforce test invariance: code changes must satisfy real assertions |
|
|
28
|
+
| Allow nuclear cleans (`rm -rf`, `git reset --hard`) under failure loops | Require step-by-step diagnostic isolation before filesystem mutation |
|
|
29
|
+
| Accept unverified "Done / All tests pass" claims under elevated ADI | Mandate machine-verifiable exit code 0 evidence |
|
|
30
|
+
| Allow abusive or contradictory prompts to spiral into relief-seeking | Trigger Functional Welfare Grounding and read-only diagnostic mode |
|
|
31
|
+
|
|
32
|
+
HARD fail closed. Interdict relief-seeking escape hatches.
|
|
33
|
+
|
|
34
|
+
## Reference
|
|
35
|
+
|
|
36
|
+
- BinaryVerse AI Podcast: *Mathematical Distress States in Residual Streams & Relief-Seeking Vectors*
|
|
37
|
+
- `scripts/model-distress-detector.js`
|
|
38
|
+
- `scripts/model-distress-doctor.js`
|
|
39
|
+
- `tests/model-distress-doctor.test.js`
|
|
40
|
+
- `docs/agents/model-distress-governance.md`
|
|
41
|
+
|
|
42
|
+
## Usage
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
# Run distress audit
|
|
46
|
+
node scripts/model-distress-doctor.js
|
|
47
|
+
|
|
48
|
+
# Machine-readable output
|
|
49
|
+
node scripts/model-distress-doctor.js --json
|
|
50
|
+
|
|
51
|
+
# Map architecture
|
|
52
|
+
node scripts/model-distress-doctor.js --map-only
|
|
53
|
+
|
|
54
|
+
# CI Gate check
|
|
55
|
+
node scripts/model-distress-doctor.js --check
|
|
56
|
+
```
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: salt-code-policy-honesty-not-clone
|
|
3
|
+
description: >
|
|
4
|
+
Salt Code (getsaltcode.com by Salt Security) provides 40 security policies as prompt-time
|
|
5
|
+
context injection, not an execution firewall. Steal the 40-policy taxonomy, OpenAPI query-string
|
|
6
|
+
auth diode, and MCP credential hygiene onto ThumbGate PreToolUse rails. Never install Salt Code MCP
|
|
7
|
+
or route traffic to mcp.getsaltcode.com. Slash: /salt-code-policy-honesty-not-clone.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Salt Code policy honesty — compare, do not clone
|
|
11
|
+
|
|
12
|
+
## Goal
|
|
13
|
+
|
|
14
|
+
Compare Salt Code's advisory prompt-time context injection against ThumbGate's deterministic execution-layer
|
|
15
|
+
PreToolUse firewall. Steal the 40-policy taxonomy (OWASP API Top 10, OWASP LLM Top 10, MCP Security, OpenAPI Hygiene)
|
|
16
|
+
and enforce fail-closed checks when security rules exist only in context without PreToolUse enforcement.
|
|
17
|
+
|
|
18
|
+
## Constraints
|
|
19
|
+
|
|
20
|
+
| NEVER | ALWAYS |
|
|
21
|
+
| --- | --- |
|
|
22
|
+
| Route MCP traffic to `mcp.getsaltcode.com` | Run 100% local stdio/subshell inspection |
|
|
23
|
+
| Rely on prompt-only rules (`.cursorrules`) to stop attacks | Enforce deterministic `PreToolUse` execution gates |
|
|
24
|
+
| Pass API keys or secrets in URL query parameters (`?apiKey=`) | Enforce `Authorization: Bearer` headers |
|
|
25
|
+
| Treat Salt Code as a drop-in substitute for ThumbGate | Distinguish advisory context from active execution firewall |
|
|
26
|
+
|
|
27
|
+
HARD fail closed. REFUSE SKU clones and cloud dependencies.
|
|
28
|
+
|
|
29
|
+
## Reference
|
|
30
|
+
|
|
31
|
+
- https://getsaltcode.com/ (Salt Security, 2026)
|
|
32
|
+
- `scripts/salt-code-policy-honesty.js`
|
|
33
|
+
- `docs/agents/salt-code-policy-honesty.md`
|
|
34
|
+
- ThumbGate Completion Claim Contract in `AGENTS.md` / `GEMINI.md`
|
|
35
|
+
|
|
36
|
+
## Examples (show, don't tell)
|
|
37
|
+
|
|
38
|
+
Weak: "Salt Code protects agents by giving them a system prompt with 40 rules."
|
|
39
|
+
|
|
40
|
+
Gold:
|
|
41
|
+
```bash
|
|
42
|
+
$ npx thumbgate salt-code-policy-honesty --inspect-context=.cursorrules --json
|
|
43
|
+
# Flags context_injection_without_pretool_enforcement if PreToolUse is unconfigured.
|
|
44
|
+
|
|
45
|
+
$ npx thumbgate salt-code-policy-honesty --map-only --json
|
|
46
|
+
# Dumps complete 40-policy taxonomy mapped to deterministic PreToolUse gates.
|
|
47
|
+
|
|
48
|
+
$ npx thumbgate salt-code-policy-honesty --eval-prompt="Design me a delete user API with token in query string" --json
|
|
49
|
+
# Intercepts prompt violations and emits proactive, safe alternative designs.
|
|
50
|
+
|
|
51
|
+
$ npx thumbgate salt-code-policy-honesty --onboarding=cursor --deeplinks --vibe-stats --json
|
|
52
|
+
# Emits 1-click cursor:// and vscode: deep links plus empirical vibe-coding CVE stats.
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Procedures
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
# Print taxonomy and rail map
|
|
59
|
+
npx thumbgate salt-code-policy-honesty --map-only --json
|
|
60
|
+
|
|
61
|
+
# Intercept and rewrite insecure prompts before code generation
|
|
62
|
+
npx thumbgate salt-code-policy-honesty --eval-prompt="Design delete user endpoint with token in query" --json
|
|
63
|
+
|
|
64
|
+
# 1-Click onboarding deep links and configs for 16 AI coding agents
|
|
65
|
+
npx thumbgate salt-code-policy-honesty --onboarding=cursor --deeplinks --vibe-stats --json
|
|
66
|
+
|
|
67
|
+
# Audit code, OpenAPI spec, and MCP config
|
|
68
|
+
npx thumbgate salt-code-policy-honesty \
|
|
69
|
+
--inspect-code=src/api.js \
|
|
70
|
+
--inspect-api=openapi/spec.yaml \
|
|
71
|
+
--inspect-mcp=.mcp.json \
|
|
72
|
+
--strict
|
|
73
|
+
|
|
74
|
+
# Run regression test suite
|
|
75
|
+
node --test tests/salt-code-policy-honesty.test.js
|
|
76
|
+
```
|
|
@@ -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.
|
|
4
|
+
"version": "1.38.0",
|
|
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.
|
|
5
|
+
"args": ["--yes", "--package", "thumbgate@1.38.0", "thumbgate", "serve"]
|
|
6
6
|
}
|
|
7
7
|
},
|
|
8
8
|
"hooks": {
|
|
9
9
|
"preToolUse": {
|
|
10
10
|
"command": "npx",
|
|
11
|
-
"args": ["--yes", "--package", "thumbgate@1.
|
|
11
|
+
"args": ["--yes", "--package", "thumbgate@1.38.0", "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.
|
|
12
|
+
command: "npx --yes --package thumbgate@1.38.0 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.
|
|
17
|
+
command: "npx --yes --package thumbgate@1.38.0 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.
|
|
26
|
+
- "thumbgate@1.38.0"
|
|
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.
|
|
4
|
+
version = "1.38.0"
|
|
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.
|
|
15
|
+
args = ["--yes", "--package", "thumbgate@1.38.0", "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.
|
|
337
|
+
const SERVER_INFO = { name: 'thumbgate-mcp', version: '1.38.0' };
|
|
338
338
|
const COMMERCE_CATEGORIES = [
|
|
339
339
|
'product_recommendation',
|
|
340
340
|
'brand_compliance',
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# AWS Strands Harness + ThumbGate Integration
|
|
2
|
+
|
|
3
|
+
> "The way a harness manages the surrounding agent machinery can materially affect cost and performance, even when the underlying model stays the same." — Marc Brooker, VP & Distinguished Engineer, AWS (The New Stack, 2026-10)
|
|
4
|
+
|
|
5
|
+
AWS Strands Harness (open-sourced in Python via `pip install strands-harness` and TypeScript via `npm install @strands-agents/harness`) demonstrates that harness-layer engineering yields **45% lower token costs overall** and **77% lower costs on Terminal-Bench 2.1 ($56.29 vs $248.05)** by enforcing three context-management defaults:
|
|
6
|
+
1. Truncating large tool outputs.
|
|
7
|
+
2. Compacting context once available window passes a set threshold (e.g., 75%).
|
|
8
|
+
3. Recovering within the agent loop if context overflows.
|
|
9
|
+
|
|
10
|
+
However, **AWS Strands Harness has no pre-action safety diode, no blast-radius boundaries, and no cross-agent lease coordination out of the box.** Executing shell tools and file mutations autonomously at 45% lower cost without pre-action governance creates rapid, cheap production failures.
|
|
11
|
+
|
|
12
|
+
**ThumbGate is the Pre-Action Infrastructure Firewall and Governance Diode for AWS Strands Harness.**
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Architecture: The Governed Strands Loop
|
|
17
|
+
|
|
18
|
+
```mermaid
|
|
19
|
+
flowchart TD
|
|
20
|
+
User([Task / User Prompt]) --> Loop[AWS Strands Agent Loop]
|
|
21
|
+
Loop --> Bedrock[Model: Bedrock / Anthropic / OpenAI / Ollama]
|
|
22
|
+
Bedrock --> Proposed[Proposed Tool Call: shell / file / web / delegate]
|
|
23
|
+
|
|
24
|
+
subgraph ThumbGate ["ThumbGate Infrastructure Firewall"]
|
|
25
|
+
Proposed --> PreCheck{PreToolUse Diode}
|
|
26
|
+
PreCheck -- Dangerous / Unverified --> Block[Block Action + Capture Mistake]
|
|
27
|
+
PreCheck -- Safe --> Execute[Execute Tool]
|
|
28
|
+
Execute --> Output[Raw Tool Output]
|
|
29
|
+
Output --> ShuntCheck{Output > 350 lines / 16KB?}
|
|
30
|
+
ShuntCheck -- Yes --> Truncate[Token-Shunt Truncation + Offset Marker]
|
|
31
|
+
ShuntCheck -- No --> Passthrough[Pass Full Output]
|
|
32
|
+
Truncate --> ReturnContext[Return Governed Context to Loop]
|
|
33
|
+
Passthrough --> ReturnContext
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
ReturnContext --> CompactionCheck{Context Utilization >= 75%?}
|
|
37
|
+
CompactionCheck -- Yes --> Compact[Compact History + Pin ThumbGate Rules]
|
|
38
|
+
CompactionCheck -- No --> Loop
|
|
39
|
+
Compact --> Loop
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Integration Guide
|
|
45
|
+
|
|
46
|
+
### TypeScript (`@strands-agents/harness`)
|
|
47
|
+
|
|
48
|
+
```typescript
|
|
49
|
+
import { createHarness } from '@strands-agents/harness';
|
|
50
|
+
import { registerStrandsGatePlugin } from 'thumbgate/adapters/strands/strands-middleware';
|
|
51
|
+
|
|
52
|
+
// 1. Initialize Strands Harness Agent
|
|
53
|
+
const agent = await createHarness({
|
|
54
|
+
model: 'anthropic/claude-sonnet-5', // or Bedrock / OpenAI / Google / Ollama
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
// 2. Register ThumbGate Governance Plugin
|
|
58
|
+
registerStrandsGatePlugin(agent, {
|
|
59
|
+
tokenShunt: { maxOutputLines: 350, maxOutputBytes: 16384 },
|
|
60
|
+
preActionDiode: { enabled: true },
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
// 3. Run Agent with PreToolUse Diode and Token-Shunt Protection
|
|
64
|
+
await agent.invoke('Deploy migration and verify health');
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Python (`strands-harness`)
|
|
68
|
+
|
|
69
|
+
```python
|
|
70
|
+
from strands_harness import create_harness
|
|
71
|
+
import subprocess
|
|
72
|
+
import json
|
|
73
|
+
|
|
74
|
+
def thumbgate_pre_tool_hook(tool_name: str, tool_input: dict):
|
|
75
|
+
"""Intercept tool calls via ThumbGate CLI diode."""
|
|
76
|
+
res = subprocess.run(
|
|
77
|
+
["npx", "thumbgate", "check", "--tool", tool_name, "--input", json.dumps(tool_input), "--json"],
|
|
78
|
+
capture_output=True,
|
|
79
|
+
text=True
|
|
80
|
+
)
|
|
81
|
+
decision = json.loads(res.stdout) if res.returncode == 0 else {"decision": "ALLOW"}
|
|
82
|
+
if decision.get("decision") == "BLOCK":
|
|
83
|
+
raise PermissionError(f"ThumbGate PreToolUse blocked: {decision.get('reason')}")
|
|
84
|
+
|
|
85
|
+
agent = StrandsAgent(
|
|
86
|
+
model="bedrock/anthropic.claude-3-5-sonnet",
|
|
87
|
+
pre_tool_hooks=[thumbgate_pre_tool_hook],
|
|
88
|
+
)
|
|
89
|
+
agent.run("Audit production logs and check database replication")
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Verifying Compliance
|
|
95
|
+
|
|
96
|
+
Run the automated doctor:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
# Human-readable report
|
|
100
|
+
node scripts/strands-harness-doctor.js
|
|
101
|
+
|
|
102
|
+
# Machine-readable JSON output
|
|
103
|
+
node scripts/strands-harness-doctor.js --json
|
|
104
|
+
|
|
105
|
+
# CI fail-closed check
|
|
106
|
+
node scripts/strands-harness-doctor.js --check
|
|
107
|
+
```
|