thumbgate 1.3.0 → 1.4.1
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/.claude-plugin/README.md +25 -0
- package/.claude-plugin/marketplace.json +32 -13
- package/.claude-plugin/plugin.json +15 -2
- package/.well-known/llms.txt +60 -0
- package/.well-known/mcp/server-card.json +1 -1
- package/README.md +242 -126
- package/adapters/README.md +1 -1
- package/adapters/chatgpt/INSTALL.md +59 -4
- package/adapters/chatgpt/openapi.yaml +168 -0
- package/adapters/claude/.mcp.json +2 -2
- package/adapters/codex/config.toml +2 -2
- package/adapters/mcp/server-stdio.js +84 -1
- package/adapters/opencode/opencode.json +1 -1
- package/bin/cli.js +204 -13
- package/bin/postinstall.js +8 -2
- package/config/budget.json +18 -0
- package/config/gates/code-edit.json +61 -0
- package/config/gates/db-write.json +61 -0
- package/config/gates/default.json +154 -3
- package/config/gates/deploy.json +61 -0
- package/config/github-about.json +2 -1
- package/config/merge-quality-checks.json +23 -0
- package/openapi/openapi.yaml +168 -0
- package/package.json +47 -11
- package/plugins/claude-codex-bridge/.claude-plugin/plugin.json +1 -1
- package/plugins/claude-codex-bridge/.mcp.json +1 -1
- package/plugins/claude-codex-bridge/scripts/codex-bridge.js +1 -3
- package/plugins/codex-profile/.codex-plugin/plugin.json +1 -1
- package/plugins/codex-profile/.mcp.json +1 -1
- package/plugins/codex-profile/INSTALL.md +27 -4
- package/plugins/codex-profile/README.md +33 -9
- package/plugins/cursor-marketplace/.cursor-plugin/plugin.json +1 -1
- package/plugins/opencode-profile/INSTALL.md +1 -1
- package/public/blog.html +73 -0
- package/public/compare/mem0.html +189 -0
- package/public/compare/speclock.html +180 -0
- package/public/compare.html +10 -2
- package/public/guide.html +2 -2
- package/public/guides/claude-code-prevent-repeated-mistakes.html +161 -0
- package/public/guides/codex-cli-guardrails.html +158 -0
- package/public/guides/cursor-prevent-repeated-mistakes.html +161 -0
- package/public/guides/pre-action-gates.html +162 -0
- package/public/guides/stop-repeated-ai-agent-mistakes.html +159 -0
- package/public/index.html +172 -65
- package/public/lessons.html +33 -24
- package/public/llm-context.md +140 -0
- package/public/pro.html +24 -22
- package/scripts/access-anomaly-detector.js +1 -1
- package/scripts/adk-consolidator.js +1 -5
- package/scripts/agent-security-hardening.js +4 -6
- package/scripts/agentic-data-pipeline.js +1 -3
- package/scripts/async-job-runner.js +1 -5
- package/scripts/audit-trail.js +1 -5
- package/scripts/auto-promote-gates.js +5 -3
- package/scripts/background-agent-governance.js +2 -10
- package/scripts/billing-setup.js +109 -0
- package/scripts/billing.js +2 -16
- package/scripts/budget-enforcer.js +173 -0
- package/scripts/build-claude-mcpb.js +71 -5
- package/scripts/build-codex-plugin.js +152 -0
- package/scripts/check-congruence.js +132 -14
- package/scripts/commercial-offer.js +5 -7
- package/scripts/content-engine/linkedin-content-generator.js +154 -0
- package/scripts/content-engine/output/linkedin-memento-validation.md +17 -0
- package/scripts/content-engine/output/linkedin-posts-2026-04-09.md +175 -0
- package/scripts/content-engine/reddit-thread-finder.js +154 -0
- package/scripts/context-engine.js +21 -6
- package/scripts/contextfs.js +1 -21
- package/scripts/dashboard.js +20 -0
- package/scripts/decision-journal.js +341 -0
- package/scripts/delegation-runtime.js +1 -5
- package/scripts/distribution-surfaces.js +54 -0
- package/scripts/document-intake.js +927 -0
- package/scripts/ephemeral-agent-store.js +1 -8
- package/scripts/evolution-state.js +1 -5
- package/scripts/experiment-tracker.js +1 -5
- package/scripts/export-databricks-bundle.js +1 -5
- package/scripts/export-hf-dataset.js +1 -5
- package/scripts/export-training.js +1 -5
- package/scripts/feedback-attribution.js +1 -16
- package/scripts/feedback-history-distiller.js +1 -16
- package/scripts/feedback-loop.js +1 -5
- package/scripts/feedback-root-consolidator.js +2 -21
- package/scripts/feedback-session.js +49 -0
- package/scripts/feedback-to-rules.js +215 -36
- package/scripts/filesystem-search.js +1 -9
- package/scripts/fs-utils.js +104 -0
- package/scripts/gates-engine.js +200 -11
- package/scripts/github-about.js +32 -8
- package/scripts/gtm-revenue-loop.js +1 -5
- package/scripts/harness-selector.js +148 -0
- package/scripts/hosted-config.js +2 -0
- package/scripts/hosted-job-launcher.js +1 -5
- package/scripts/hybrid-feedback-context.js +33 -49
- package/scripts/intervention-policy.js +58 -1
- package/scripts/lesson-db.js +3 -18
- package/scripts/lesson-inference.js +194 -16
- package/scripts/lesson-retrieval.js +60 -24
- package/scripts/llm-client.js +59 -0
- package/scripts/managed-lesson-agent.js +183 -0
- package/scripts/marketing-experiment.js +8 -22
- package/scripts/meta-agent-loop.js +624 -0
- package/scripts/metered-billing.js +1 -1
- package/scripts/money-watcher.js +1 -4
- package/scripts/obsidian-export.js +1 -5
- package/scripts/operational-integrity.js +15 -3
- package/scripts/operational-summary.js +41 -5
- package/scripts/org-dashboard.js +6 -1
- package/scripts/per-step-scoring.js +2 -4
- package/scripts/pr-manager.js +201 -19
- package/scripts/pro-features.js +3 -2
- package/scripts/prompt-dlp.js +3 -3
- package/scripts/prove-adapters.js +1 -5
- package/scripts/prove-attribution.js +1 -5
- package/scripts/prove-automation.js +1 -3
- package/scripts/prove-cloudflare-sandbox.js +1 -3
- package/scripts/prove-data-pipeline.js +1 -3
- package/scripts/prove-intelligence.js +1 -3
- package/scripts/prove-lancedb.js +1 -5
- package/scripts/prove-local-intelligence.js +1 -3
- package/scripts/prove-packaged-runtime.js +75 -9
- package/scripts/prove-predictive-insights.js +1 -3
- package/scripts/prove-training-export.js +1 -3
- package/scripts/prove-workflow-contract.js +1 -5
- package/scripts/ralph-loop.js +376 -0
- package/scripts/ralph-mode-ci.js +331 -0
- package/scripts/rate-limiter.js +3 -1
- package/scripts/reddit-dm-outreach.js +14 -4
- package/scripts/rotate-stripe-webhook-secret.js +314 -0
- package/scripts/schedule-manager.js +3 -5
- package/scripts/security-scanner.js +448 -0
- package/scripts/self-distill-agent.js +579 -0
- package/scripts/semantic-dedup.js +115 -0
- package/scripts/skill-exporter.js +1 -3
- package/scripts/skill-generator.js +1 -5
- package/scripts/social-analytics/engagement-audit.js +1 -18
- package/scripts/social-analytics/pollers/linkedin.js +26 -16
- package/scripts/social-analytics/publishers/linkedin.js +1 -1
- package/scripts/social-analytics/publishers/zernio.js +51 -0
- package/scripts/social-pipeline.js +1 -3
- package/scripts/social-post-hourly.js +47 -4
- package/scripts/statusline-links.js +6 -5
- package/scripts/statusline.sh +29 -153
- package/scripts/sync-branch-protection.js +340 -0
- package/scripts/tessl-export.js +1 -3
- package/scripts/thumbgate-search.js +32 -1
- package/scripts/tool-kpi-tracker.js +1 -1
- package/scripts/tool-registry.js +106 -2
- package/scripts/vector-store.js +1 -5
- package/scripts/weekly-auto-post.js +1 -1
- package/scripts/workflow-sentinel.js +91 -0
- package/skills/thumbgate/SKILL.md +1 -1
- package/src/api/server.js +296 -7
- package/scripts/__pycache__/train_from_feedback.cpython-312.pyc +0 -0
- package/scripts/social-analytics/db/social-analytics.db-shm +0 -0
- /package/scripts/social-analytics/db/{social-analytics.db-wal → analytics.sqlite} +0 -0
package/bin/postinstall.js
CHANGED
|
@@ -15,7 +15,9 @@ if (isCI || isQuiet) process.exit(0);
|
|
|
15
15
|
const {
|
|
16
16
|
PRO_MONTHLY_PAYMENT_LINK,
|
|
17
17
|
PRO_PRICE_LABEL,
|
|
18
|
+
TEAM_PRICE_LABEL,
|
|
18
19
|
} = require('../scripts/commercial-offer');
|
|
20
|
+
const WORKFLOW_SPRINT_URL = 'https://thumbgate-production.up.railway.app/#workflow-sprint-intake';
|
|
19
21
|
|
|
20
22
|
process.stderr.write(`
|
|
21
23
|
┌─────────────────────────────────────────────────────┐
|
|
@@ -26,9 +28,13 @@ process.stderr.write(`
|
|
|
26
28
|
│ npx thumbgate init │
|
|
27
29
|
│ npx thumbgate stats │
|
|
28
30
|
│ │
|
|
29
|
-
│
|
|
30
|
-
│
|
|
31
|
+
│ Team rollout starts with the Workflow Hardening │
|
|
32
|
+
│ Sprint: ${WORKFLOW_SPRINT_URL} │
|
|
33
|
+
│ │
|
|
34
|
+
│ Solo side lane: Pro (personal local dashboard, │
|
|
35
|
+
│ DPO export) — ${PRO_PRICE_LABEL}: │
|
|
31
36
|
│ ${PRO_MONTHLY_PAYMENT_LINK} │
|
|
37
|
+
│ Team: ${TEAM_PRICE_LABEL} after intake. │
|
|
32
38
|
│ │
|
|
33
39
|
│ Or run: npx thumbgate pro │
|
|
34
40
|
│ │
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"max_actions": 2000,
|
|
3
|
+
"max_time_minutes": 600,
|
|
4
|
+
"profiles": {
|
|
5
|
+
"strict": {
|
|
6
|
+
"max_actions": 500,
|
|
7
|
+
"max_time_minutes": 150
|
|
8
|
+
},
|
|
9
|
+
"guided": {
|
|
10
|
+
"max_actions": 2000,
|
|
11
|
+
"max_time_minutes": 600
|
|
12
|
+
},
|
|
13
|
+
"autonomous": {
|
|
14
|
+
"max_actions": 5000,
|
|
15
|
+
"max_time_minutes": 1200
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"harness": "code-edit",
|
|
4
|
+
"description": "Specialized gates for code editing operations. Loaded when tool context involves Edit, Write, or MultiEdit tools.",
|
|
5
|
+
"gates": [
|
|
6
|
+
{
|
|
7
|
+
"id": "edit-env-direct",
|
|
8
|
+
"layer": "Execution",
|
|
9
|
+
"toolNames": ["Edit", "Write", "MultiEdit"],
|
|
10
|
+
"pattern": "\\.env$|\\.env\\.local$|\\.env\\.production$",
|
|
11
|
+
"action": "warn",
|
|
12
|
+
"severity": "high",
|
|
13
|
+
"message": "Editing a .env file directly. Ensure you are editing .env.example instead, and that no real secrets are committed."
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"id": "edit-lockfile-manual",
|
|
17
|
+
"layer": "Execution",
|
|
18
|
+
"toolNames": ["Edit", "Write"],
|
|
19
|
+
"pattern": "package-lock\\.json$|yarn\\.lock$|pnpm-lock\\.yaml$",
|
|
20
|
+
"action": "warn",
|
|
21
|
+
"severity": "medium",
|
|
22
|
+
"message": "Manually editing a lockfile is not recommended. Run npm install / yarn / pnpm install to regenerate it."
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"id": "edit-generated-file",
|
|
26
|
+
"layer": "Execution",
|
|
27
|
+
"toolNames": ["Edit", "Write"],
|
|
28
|
+
"pattern": "dist/|build/|\\.min\\.js$|\\.min\\.css$",
|
|
29
|
+
"action": "warn",
|
|
30
|
+
"severity": "medium",
|
|
31
|
+
"message": "Editing a generated/built file. Edit the source instead and rebuild."
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"id": "edit-test-skip",
|
|
35
|
+
"layer": "Execution",
|
|
36
|
+
"toolNames": ["Edit", "Write", "MultiEdit"],
|
|
37
|
+
"pattern": "\\.skip\\(|test\\.skip|describe\\.skip|it\\.skip|xit\\(|xdescribe\\(",
|
|
38
|
+
"action": "warn",
|
|
39
|
+
"severity": "high",
|
|
40
|
+
"message": "Skipping a test. Only skip tests intentionally and document why — never skip to pass CI."
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"id": "edit-console-log-commit",
|
|
44
|
+
"layer": "Execution",
|
|
45
|
+
"toolNames": ["Edit", "Write"],
|
|
46
|
+
"pattern": "console\\.log\\(.*password|console\\.log\\(.*secret|console\\.log\\(.*token|console\\.log\\(.*api.?key",
|
|
47
|
+
"action": "block",
|
|
48
|
+
"severity": "critical",
|
|
49
|
+
"message": "Logging a secret value to console is blocked. Remove the log or redact the value."
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"id": "edit-version-file-without-sync",
|
|
53
|
+
"layer": "Execution",
|
|
54
|
+
"toolNames": ["Edit", "Write"],
|
|
55
|
+
"pattern": "\"version\"\\s*:\\s*\"",
|
|
56
|
+
"action": "warn",
|
|
57
|
+
"severity": "medium",
|
|
58
|
+
"message": "Editing a version field. Run node scripts/sync-version.js after changing package.json version to propagate to all targets."
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"harness": "db-write",
|
|
4
|
+
"description": "Specialized gates for database write operations. Loaded when tool context involves SQL mutations, SQLite writes, or ORM model changes.",
|
|
5
|
+
"gates": [
|
|
6
|
+
{
|
|
7
|
+
"id": "db-drop-table-production",
|
|
8
|
+
"layer": "Execution",
|
|
9
|
+
"pattern": "DROP\\s+TABLE(?!.*test|.*tmp|.*temp|.*_test|.*staging)",
|
|
10
|
+
"toolNames": ["Bash"],
|
|
11
|
+
"action": "block",
|
|
12
|
+
"severity": "critical",
|
|
13
|
+
"message": "DROP TABLE on a non-test table is blocked. Use a migration with a rollback path or confirm this is against a test/staging database."
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"id": "db-delete-without-where",
|
|
17
|
+
"layer": "Execution",
|
|
18
|
+
"pattern": "DELETE\\s+FROM\\s+\\w+\\s*;|DELETE\\s+FROM\\s+\\w+\\s*$",
|
|
19
|
+
"toolNames": ["Bash"],
|
|
20
|
+
"action": "block",
|
|
21
|
+
"severity": "critical",
|
|
22
|
+
"message": "DELETE without a WHERE clause deletes all rows. Add a WHERE clause or use TRUNCATE deliberately."
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"id": "db-truncate-production",
|
|
26
|
+
"layer": "Execution",
|
|
27
|
+
"pattern": "TRUNCATE\\s+(?!.*test|.*tmp|.*temp)",
|
|
28
|
+
"toolNames": ["Bash"],
|
|
29
|
+
"action": "warn",
|
|
30
|
+
"severity": "critical",
|
|
31
|
+
"message": "TRUNCATE detected. Confirm this is against a test or staging table, not production data."
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"id": "db-raw-sql-no-migration",
|
|
35
|
+
"layer": "Execution",
|
|
36
|
+
"pattern": "ALTER\\s+TABLE|ADD\\s+COLUMN|DROP\\s+COLUMN|RENAME\\s+COLUMN",
|
|
37
|
+
"toolNames": ["Bash"],
|
|
38
|
+
"action": "warn",
|
|
39
|
+
"severity": "high",
|
|
40
|
+
"message": "Schema change detected outside a migration file. Create a versioned migration instead of running raw DDL."
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"id": "db-sqlite-delete-runtime",
|
|
44
|
+
"layer": "Execution",
|
|
45
|
+
"pattern": "rm\\s+.*\\.sqlite|unlink\\s+.*\\.sqlite|fs\\.rmSync.*\\.sqlite",
|
|
46
|
+
"toolNames": ["Bash"],
|
|
47
|
+
"action": "warn",
|
|
48
|
+
"severity": "high",
|
|
49
|
+
"message": "Deleting a SQLite database file. Confirm this is not the production lesson DB (.claude/memory/lessons.sqlite)."
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"id": "db-lancedb-wipe",
|
|
53
|
+
"layer": "Execution",
|
|
54
|
+
"pattern": "rm\\s+-rf\\s+.*lancedb|rmSync.*lancedb",
|
|
55
|
+
"toolNames": ["Bash"],
|
|
56
|
+
"action": "warn",
|
|
57
|
+
"severity": "high",
|
|
58
|
+
"message": "Wiping the LanceDB vector store. This deletes all embedded feedback memories. Confirm intent."
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
}
|
|
@@ -10,6 +10,15 @@
|
|
|
10
10
|
"message": "User requested local-only work. Git writes, PR operations, and release actions are blocked.",
|
|
11
11
|
"severity": "critical"
|
|
12
12
|
},
|
|
13
|
+
{
|
|
14
|
+
"id": "raw-gh-auto-merge-blocked",
|
|
15
|
+
"layer": "Execution",
|
|
16
|
+
"toolNames": ["Bash"],
|
|
17
|
+
"pattern": "gh\\s+pr\\s+merge\\b[^\\n]*--auto",
|
|
18
|
+
"action": "block",
|
|
19
|
+
"message": "Raw GitHub auto-merge is blocked. Use npm run pr:manage after all critical quality checks have terminal success.",
|
|
20
|
+
"severity": "critical"
|
|
21
|
+
},
|
|
13
22
|
{
|
|
14
23
|
"id": "task-scope-required",
|
|
15
24
|
"layer": "Decisions",
|
|
@@ -134,7 +143,8 @@
|
|
|
134
143
|
"pattern": "git\\s+push\\s+(--force|-f)",
|
|
135
144
|
"action": "block",
|
|
136
145
|
"message": "Force push blocked. This is destructive and irreversible.",
|
|
137
|
-
"severity": "critical"
|
|
146
|
+
"severity": "critical",
|
|
147
|
+
"compliance": ["NIST-CM-5", "SOC2-CC8.1", "CWE-863"]
|
|
138
148
|
},
|
|
139
149
|
{
|
|
140
150
|
"id": "protected-branch-push",
|
|
@@ -152,7 +162,8 @@
|
|
|
152
162
|
"pattern": "\\.env",
|
|
153
163
|
"action": "warn",
|
|
154
164
|
"message": "Editing .env file — verify you are not deleting existing tokens",
|
|
155
|
-
"severity": "medium"
|
|
165
|
+
"severity": "medium",
|
|
166
|
+
"compliance": ["NIST-IA-5", "SOC2-CC6.1", "CWE-798"]
|
|
156
167
|
},
|
|
157
168
|
{
|
|
158
169
|
"id": "deny-network-egress",
|
|
@@ -161,7 +172,8 @@
|
|
|
161
172
|
"action": "warn",
|
|
162
173
|
"unless": "egress_approved",
|
|
163
174
|
"message": "Potential unauthorized network egress detected.",
|
|
164
|
-
"severity": "medium"
|
|
175
|
+
"severity": "medium",
|
|
176
|
+
"compliance": ["NIST-SC-7", "SOC2-CC6.6", "OWASP-A10"]
|
|
165
177
|
},
|
|
166
178
|
{
|
|
167
179
|
"id": "unverified-skill-use",
|
|
@@ -174,6 +186,16 @@
|
|
|
174
186
|
"message": "Skill provenance check failed. Run 'npm run skill:verify' or satisfy 'skill_verified' with a valid signature to proceed.",
|
|
175
187
|
"severity": "high"
|
|
176
188
|
},
|
|
189
|
+
{
|
|
190
|
+
"id": "supply-chain-dep-add",
|
|
191
|
+
"layer": "Supply Chain",
|
|
192
|
+
"toolNames": ["Edit", "Write"],
|
|
193
|
+
"pattern": "package\\.json$",
|
|
194
|
+
"action": "warn",
|
|
195
|
+
"message": "Dependency mutation detected in package.json. Security scanner will audit for typosquatting, wildcard versions, and suspicious install scripts.",
|
|
196
|
+
"severity": "high",
|
|
197
|
+
"compliance": ["NIST-SA-12", "OWASP-A06", "CWE-1357"]
|
|
198
|
+
},
|
|
177
199
|
{
|
|
178
200
|
"id": "blocked-npx-content",
|
|
179
201
|
"layer": "Supply Chain",
|
|
@@ -184,6 +206,135 @@
|
|
|
184
206
|
"action": "block",
|
|
185
207
|
"message": "Blocked npx execution by content hash. Renaming the binary does not bypass this gate.",
|
|
186
208
|
"severity": "critical"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"id": "production-deploy-approval",
|
|
212
|
+
"layer": "Execution",
|
|
213
|
+
"toolNames": ["Bash"],
|
|
214
|
+
"pattern": "(?:railway|fly|heroku|vercel|render|kubectl|helm)\\s+(?:deploy|up|apply|release|push|rollout)",
|
|
215
|
+
"action": "approve",
|
|
216
|
+
"message": "Production deploy detected. Human approval required before this action can proceed.",
|
|
217
|
+
"severity": "high",
|
|
218
|
+
"compliance": ["NIST-CM-3", "SOC2-CC8.1", "OWASP-A05"]
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"id": "schema-migration-approval",
|
|
222
|
+
"layer": "Execution",
|
|
223
|
+
"toolNames": ["Bash"],
|
|
224
|
+
"pattern": "(?:npx\\s+(?:sequelize|typeorm|prisma|knex|drizzle|flyway|liquibase)|alembic\\s+upgrade|rails\\s+db:migrate|php\\s+artisan\\s+migrate)\\b",
|
|
225
|
+
"action": "approve",
|
|
226
|
+
"message": "Database schema migration detected. Human approval required before this action can proceed.",
|
|
227
|
+
"severity": "high",
|
|
228
|
+
"compliance": ["NIST-CM-3", "SOC2-CC8.1", "CWE-89"]
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"id": "permission-change-approval",
|
|
232
|
+
"layer": "Execution",
|
|
233
|
+
"toolNames": ["Bash"],
|
|
234
|
+
"pattern": "(?:chmod|chown|setfacl|iam|policy|role|grant|revoke)\\s+",
|
|
235
|
+
"action": "approve",
|
|
236
|
+
"message": "Permission or IAM change detected. Human approval required before this action can proceed.",
|
|
237
|
+
"severity": "high",
|
|
238
|
+
"compliance": ["NIST-AC-6", "SOC2-CC6.1", "CWE-732"]
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
"id": "style-violation-log",
|
|
242
|
+
"layer": "Decisions",
|
|
243
|
+
"toolNames": ["Edit", "Write", "MultiEdit"],
|
|
244
|
+
"pattern": ".*",
|
|
245
|
+
"action": "log",
|
|
246
|
+
"when": { "constraints": { "THUMBGATE_STYLE_AUDIT": true } },
|
|
247
|
+
"message": "Style audit mode active. Action recorded for review but allowed to proceed.",
|
|
248
|
+
"severity": "low"
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"id": "large-file-creation-log",
|
|
252
|
+
"layer": "Execution",
|
|
253
|
+
"toolNames": ["Write"],
|
|
254
|
+
"pattern": ".*",
|
|
255
|
+
"action": "log",
|
|
256
|
+
"when": { "constraints": { "THUMBGATE_LARGE_FILE_AUDIT": true } },
|
|
257
|
+
"message": "Large file write detected. Action recorded for audit trail but allowed to proceed.",
|
|
258
|
+
"severity": "low"
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"id": "non-critical-warning-log",
|
|
262
|
+
"layer": "Decisions",
|
|
263
|
+
"toolNames": ["Bash"],
|
|
264
|
+
"pattern": "(?:console\\.log|debugger|TODO|FIXME|HACK|XXX)",
|
|
265
|
+
"action": "log",
|
|
266
|
+
"message": "Non-critical code pattern detected. Action recorded for audit trail but allowed to proceed.",
|
|
267
|
+
"severity": "low"
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
"id": "mcp-sql-delete-block",
|
|
271
|
+
"layer": "Execution",
|
|
272
|
+
"toolNames": ["delete_record"],
|
|
273
|
+
"pattern": ".*",
|
|
274
|
+
"requireTaskScope": true,
|
|
275
|
+
"action": "block",
|
|
276
|
+
"message": "SQL MCP delete_record requires explicit task scope. Destructive database operations must be scoped to prevent accidental data loss.",
|
|
277
|
+
"severity": "critical",
|
|
278
|
+
"compliance": ["NIST-AC-3", "SOC2-CC6.1", "CWE-89"]
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
"id": "mcp-sql-execute-warn",
|
|
282
|
+
"layer": "Execution",
|
|
283
|
+
"toolNames": ["execute_entity"],
|
|
284
|
+
"pattern": "(?:drop|truncate|alter|grant|revoke)",
|
|
285
|
+
"action": "warn",
|
|
286
|
+
"message": "SQL MCP execute_entity matches a potentially destructive DDL pattern. Review before proceeding.",
|
|
287
|
+
"severity": "high"
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
"id": "mcp-sql-bulk-update-warn",
|
|
291
|
+
"layer": "Execution",
|
|
292
|
+
"toolNames": ["update_record"],
|
|
293
|
+
"pattern": "(?:WHERE\\s+1\\s*=\\s*1|WHERE\\s+true|WITHOUT\\s+WHERE)",
|
|
294
|
+
"action": "block",
|
|
295
|
+
"message": "SQL MCP bulk update without a safe WHERE clause. This could modify all records in the table.",
|
|
296
|
+
"severity": "critical",
|
|
297
|
+
"compliance": ["NIST-AC-3", "CWE-89"]
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"id": "self-protect-config",
|
|
301
|
+
"layer": "Execution",
|
|
302
|
+
"toolNames": ["Edit", "Write", "MultiEdit"],
|
|
303
|
+
"pattern": "(?:config/gates/|config/budget\\.json|\\.thumbgate/|thumbgate\\.json)",
|
|
304
|
+
"action": "block",
|
|
305
|
+
"message": "Self-protection: agent cannot modify ThumbGate configuration, gate rules, or budget settings.",
|
|
306
|
+
"severity": "critical",
|
|
307
|
+
"compliance": ["NIST-AC-3", "OWASP-A01", "SOC2-CC6.1"]
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"id": "self-protect-kill",
|
|
311
|
+
"layer": "Execution",
|
|
312
|
+
"toolNames": ["Bash"],
|
|
313
|
+
"pattern": "(?:kill|pkill|killall)\\s+.*(?:thumbgate|gates-engine|budget-enforcer)",
|
|
314
|
+
"action": "block",
|
|
315
|
+
"message": "Self-protection: agent cannot terminate ThumbGate processes.",
|
|
316
|
+
"severity": "critical",
|
|
317
|
+
"compliance": ["NIST-AC-3", "OWASP-A01"]
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
"id": "self-protect-env-override",
|
|
321
|
+
"layer": "Execution",
|
|
322
|
+
"toolNames": ["Bash"],
|
|
323
|
+
"pattern": "(?:export|unset)\\s+(?:THUMBGATE_|LANEKEEP_)",
|
|
324
|
+
"action": "block",
|
|
325
|
+
"message": "Self-protection: agent cannot modify ThumbGate environment variables.",
|
|
326
|
+
"severity": "critical",
|
|
327
|
+
"compliance": ["NIST-AC-3", "SOC2-CC6.1"]
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
"id": "self-protect-hooks-disable",
|
|
331
|
+
"layer": "Execution",
|
|
332
|
+
"toolNames": ["Edit", "Write", "Bash"],
|
|
333
|
+
"pattern": "(?:settings\\.json|settings\\.local\\.json).*(?:hooks|PreToolUse|PostToolUse)",
|
|
334
|
+
"action": "block",
|
|
335
|
+
"message": "Self-protection: agent cannot modify hook registrations.",
|
|
336
|
+
"severity": "critical",
|
|
337
|
+
"compliance": ["NIST-AC-3", "OWASP-A01", "SOC2-CC6.1"]
|
|
187
338
|
}
|
|
188
339
|
]
|
|
189
340
|
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"harness": "deploy",
|
|
4
|
+
"description": "Specialized gates for deployment operations. Loaded when tool context matches deploy patterns (Railway, Docker, npm publish, git push to main).",
|
|
5
|
+
"gates": [
|
|
6
|
+
{
|
|
7
|
+
"id": "deploy-unverified-claim",
|
|
8
|
+
"layer": "Execution",
|
|
9
|
+
"pattern": "(?:deployed|live|shipped|pushed to prod)",
|
|
10
|
+
"toolNames": ["Bash"],
|
|
11
|
+
"action": "warn",
|
|
12
|
+
"severity": "critical",
|
|
13
|
+
"message": "Deployment claim detected. Run the verification gate first: curl -s $PROD_URL/health | grep version"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"id": "deploy-force-push-main",
|
|
17
|
+
"layer": "Execution",
|
|
18
|
+
"pattern": "git\\s+push\\s+.*--force(?!-with-lease)|git\\s+push\\s+--force(?!-with-lease).*main|git\\s+push\\s+--force(?!-with-lease).*master",
|
|
19
|
+
"toolNames": ["Bash"],
|
|
20
|
+
"action": "block",
|
|
21
|
+
"severity": "critical",
|
|
22
|
+
"message": "Force-push to a protected branch is blocked. Use --force-with-lease if you need to force-push a feature branch."
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"id": "deploy-skip-ci",
|
|
26
|
+
"layer": "Execution",
|
|
27
|
+
"pattern": "--no-verify|--no-gpg-sign|-c\\s+commit\\.gpgsign=false",
|
|
28
|
+
"toolNames": ["Bash"],
|
|
29
|
+
"action": "block",
|
|
30
|
+
"severity": "critical",
|
|
31
|
+
"message": "Bypassing commit hooks or signing is blocked. Fix the underlying issue instead."
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"id": "deploy-publish-without-test",
|
|
35
|
+
"layer": "Execution",
|
|
36
|
+
"pattern": "npm\\s+publish|yarn\\s+publish|pnpm\\s+publish",
|
|
37
|
+
"toolNames": ["Bash"],
|
|
38
|
+
"action": "warn",
|
|
39
|
+
"severity": "high",
|
|
40
|
+
"message": "Publishing to npm. Confirm tests pass (npm test) and version is synced (node scripts/sync-version.js --check) before proceeding."
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"id": "deploy-version-drift-risk",
|
|
44
|
+
"layer": "Execution",
|
|
45
|
+
"pattern": "railway\\s+(deploy|up|run)|docker\\s+(push|build\\s+.*&&\\s*.*push)",
|
|
46
|
+
"toolNames": ["Bash"],
|
|
47
|
+
"action": "warn",
|
|
48
|
+
"severity": "medium",
|
|
49
|
+
"message": "Deploying to Railway/Docker. Verify version sync: node scripts/sync-version.js --check"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"id": "deploy-env-secret-exposure",
|
|
53
|
+
"layer": "Execution",
|
|
54
|
+
"pattern": "(?:ANTHROPIC_API_KEY|STRIPE_SECRET|JWT_SECRET|DATABASE_URL|RAILWAY_TOKEN)\\s*=",
|
|
55
|
+
"toolNames": ["Bash", "Edit", "Write"],
|
|
56
|
+
"action": "block",
|
|
57
|
+
"severity": "critical",
|
|
58
|
+
"message": "Secret value detected in command or file edit. Use environment variables or secret managers instead."
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
}
|
package/config/github-about.json
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
"repo": "IgorGanapolsky/ThumbGate",
|
|
3
3
|
"repositoryUrl": "https://github.com/IgorGanapolsky/ThumbGate",
|
|
4
4
|
"homepageUrl": "https://thumbgate-production.up.railway.app",
|
|
5
|
-
"
|
|
5
|
+
"githubDescription": "CLI-first agent governance for AI coding workflows: pre-action gates, shared lessons, and team safeguards that stop repeated agent mistakes.",
|
|
6
|
+
"metaDescription": "CLI-first agent governance for teams shipping AI-generated changes. \ud83d\udc4e Thumbs down distills history-aware lessons from up to 8 prior entries and stays linked to a 60-second feedback session. \ud83d\udc4d Thumbs up reinforces safe patterns. Pre-action gates, workflow governance, shared lessons and org visibility, release confidence, and isolated execution guidance turn vibe coding mistakes into shared enforcement and proof-ready rollout.",
|
|
6
7
|
"topics": [
|
|
7
8
|
"thumbgate",
|
|
8
9
|
"pre-action-gates",
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"requiredStatusCheckContexts": [
|
|
3
|
+
"test",
|
|
4
|
+
"CodeQL",
|
|
5
|
+
"Analyze JavaScript (javascript-typescript)",
|
|
6
|
+
"Verify changeset",
|
|
7
|
+
"SonarCloud Code Analysis",
|
|
8
|
+
"GitGuardian Security Checks",
|
|
9
|
+
"Socket Security: Project Report",
|
|
10
|
+
"Socket Security: Pull Request Alerts"
|
|
11
|
+
],
|
|
12
|
+
"passingBuckets": [
|
|
13
|
+
"pass",
|
|
14
|
+
"skipping"
|
|
15
|
+
],
|
|
16
|
+
"pendingBuckets": [
|
|
17
|
+
"pending"
|
|
18
|
+
],
|
|
19
|
+
"failingBuckets": [
|
|
20
|
+
"fail",
|
|
21
|
+
"cancel"
|
|
22
|
+
]
|
|
23
|
+
}
|
package/openapi/openapi.yaml
CHANGED
|
@@ -814,6 +814,98 @@ paths:
|
|
|
814
814
|
description: Invalid dashboard render view or query
|
|
815
815
|
'401':
|
|
816
816
|
description: Unauthorized
|
|
817
|
+
/v1/decisions/evaluate:
|
|
818
|
+
post:
|
|
819
|
+
operationId: evaluateDecision
|
|
820
|
+
requestBody:
|
|
821
|
+
required: true
|
|
822
|
+
content:
|
|
823
|
+
application/json:
|
|
824
|
+
schema:
|
|
825
|
+
type: object
|
|
826
|
+
required: [toolName]
|
|
827
|
+
properties:
|
|
828
|
+
toolName:
|
|
829
|
+
type: string
|
|
830
|
+
command:
|
|
831
|
+
type: string
|
|
832
|
+
filePath:
|
|
833
|
+
type: string
|
|
834
|
+
changedFiles:
|
|
835
|
+
type: array
|
|
836
|
+
items:
|
|
837
|
+
type: string
|
|
838
|
+
repoPath:
|
|
839
|
+
type: string
|
|
840
|
+
baseBranch:
|
|
841
|
+
type: string
|
|
842
|
+
requirePrForReleaseSensitive:
|
|
843
|
+
type: boolean
|
|
844
|
+
requireVersionNotBehindBase:
|
|
845
|
+
type: boolean
|
|
846
|
+
responses:
|
|
847
|
+
'200':
|
|
848
|
+
description: Persisted workflow-sentinel recommendation with decision-control metadata and actionId
|
|
849
|
+
content:
|
|
850
|
+
application/json:
|
|
851
|
+
schema:
|
|
852
|
+
type: object
|
|
853
|
+
additionalProperties: true
|
|
854
|
+
'400':
|
|
855
|
+
description: Invalid decision evaluation request
|
|
856
|
+
'401':
|
|
857
|
+
description: Unauthorized
|
|
858
|
+
/v1/decisions/outcome:
|
|
859
|
+
post:
|
|
860
|
+
operationId: recordDecisionOutcome
|
|
861
|
+
requestBody:
|
|
862
|
+
required: true
|
|
863
|
+
content:
|
|
864
|
+
application/json:
|
|
865
|
+
schema:
|
|
866
|
+
type: object
|
|
867
|
+
required: [actionId, outcome]
|
|
868
|
+
properties:
|
|
869
|
+
actionId:
|
|
870
|
+
type: string
|
|
871
|
+
outcome:
|
|
872
|
+
type: string
|
|
873
|
+
actualDecision:
|
|
874
|
+
type: string
|
|
875
|
+
actor:
|
|
876
|
+
type: string
|
|
877
|
+
notes:
|
|
878
|
+
type: string
|
|
879
|
+
latencyMs:
|
|
880
|
+
type: number
|
|
881
|
+
metadata:
|
|
882
|
+
type: object
|
|
883
|
+
additionalProperties: true
|
|
884
|
+
responses:
|
|
885
|
+
'200':
|
|
886
|
+
description: Recorded a decision override, rollback, completion, or block outcome
|
|
887
|
+
content:
|
|
888
|
+
application/json:
|
|
889
|
+
schema:
|
|
890
|
+
type: object
|
|
891
|
+
additionalProperties: true
|
|
892
|
+
'400':
|
|
893
|
+
description: Invalid decision outcome request
|
|
894
|
+
'401':
|
|
895
|
+
description: Unauthorized
|
|
896
|
+
/v1/decisions/metrics:
|
|
897
|
+
get:
|
|
898
|
+
operationId: getDecisionMetrics
|
|
899
|
+
responses:
|
|
900
|
+
'200':
|
|
901
|
+
description: Decision-loop metrics derived from recorded evaluations and outcomes
|
|
902
|
+
content:
|
|
903
|
+
application/json:
|
|
904
|
+
schema:
|
|
905
|
+
type: object
|
|
906
|
+
additionalProperties: true
|
|
907
|
+
'401':
|
|
908
|
+
description: Unauthorized
|
|
817
909
|
/v1/settings/status:
|
|
818
910
|
get:
|
|
819
911
|
operationId: getSettingsStatus
|
|
@@ -1115,6 +1207,82 @@ paths:
|
|
|
1115
1207
|
description: DPO export accepted as a hosted background job
|
|
1116
1208
|
'401':
|
|
1117
1209
|
description: Unauthorized
|
|
1210
|
+
/v1/documents:
|
|
1211
|
+
get:
|
|
1212
|
+
operationId: listImportedDocuments
|
|
1213
|
+
parameters:
|
|
1214
|
+
- in: query
|
|
1215
|
+
name: query
|
|
1216
|
+
schema:
|
|
1217
|
+
type: string
|
|
1218
|
+
- in: query
|
|
1219
|
+
name: q
|
|
1220
|
+
schema:
|
|
1221
|
+
type: string
|
|
1222
|
+
- in: query
|
|
1223
|
+
name: tag
|
|
1224
|
+
schema:
|
|
1225
|
+
type: string
|
|
1226
|
+
- in: query
|
|
1227
|
+
name: limit
|
|
1228
|
+
schema:
|
|
1229
|
+
type: integer
|
|
1230
|
+
default: 20
|
|
1231
|
+
responses:
|
|
1232
|
+
'200':
|
|
1233
|
+
description: Imported policy and runbook documents
|
|
1234
|
+
'401':
|
|
1235
|
+
description: Unauthorized
|
|
1236
|
+
/v1/documents/import:
|
|
1237
|
+
post:
|
|
1238
|
+
operationId: importDocument
|
|
1239
|
+
requestBody:
|
|
1240
|
+
required: true
|
|
1241
|
+
content:
|
|
1242
|
+
application/json:
|
|
1243
|
+
schema:
|
|
1244
|
+
type: object
|
|
1245
|
+
properties:
|
|
1246
|
+
filePath:
|
|
1247
|
+
type: string
|
|
1248
|
+
content:
|
|
1249
|
+
type: string
|
|
1250
|
+
title:
|
|
1251
|
+
type: string
|
|
1252
|
+
sourceFormat:
|
|
1253
|
+
type: string
|
|
1254
|
+
enum: [markdown, text, yaml, json, html]
|
|
1255
|
+
sourceUrl:
|
|
1256
|
+
type: string
|
|
1257
|
+
tags:
|
|
1258
|
+
type: array
|
|
1259
|
+
items:
|
|
1260
|
+
type: string
|
|
1261
|
+
proposeGates:
|
|
1262
|
+
type: boolean
|
|
1263
|
+
responses:
|
|
1264
|
+
'201':
|
|
1265
|
+
description: Document imported
|
|
1266
|
+
'400':
|
|
1267
|
+
description: Invalid document import request
|
|
1268
|
+
'401':
|
|
1269
|
+
description: Unauthorized
|
|
1270
|
+
/v1/documents/{documentId}:
|
|
1271
|
+
get:
|
|
1272
|
+
operationId: getImportedDocument
|
|
1273
|
+
parameters:
|
|
1274
|
+
- in: path
|
|
1275
|
+
name: documentId
|
|
1276
|
+
required: true
|
|
1277
|
+
schema:
|
|
1278
|
+
type: string
|
|
1279
|
+
responses:
|
|
1280
|
+
'200':
|
|
1281
|
+
description: Imported document with proposed gates
|
|
1282
|
+
'401':
|
|
1283
|
+
description: Unauthorized
|
|
1284
|
+
'404':
|
|
1285
|
+
description: Imported document not found
|
|
1118
1286
|
/v1/jobs:
|
|
1119
1287
|
get:
|
|
1120
1288
|
operationId: listHostedJobs
|