thumbgate 1.16.12 → 1.16.19
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/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/.well-known/mcp/server-card.json +1 -1
- package/README.md +3 -1
- package/adapters/claude/.mcp.json +2 -2
- package/adapters/mcp/server-stdio.js +26 -1
- package/adapters/opencode/opencode.json +1 -1
- package/bin/cli.js +420 -1
- package/config/gate-templates.json +372 -0
- package/config/mcp-allowlists.json +25 -0
- package/config/model-candidates.json +59 -2
- package/config/model-tiers.json +4 -1
- package/package.json +79 -22
- package/public/compare.html +6 -0
- package/public/index.html +144 -11
- package/public/numbers.html +11 -11
- package/public/pro.html +22 -24
- package/scripts/agent-design-governance.js +211 -0
- package/scripts/agent-reasoning-traces.js +683 -0
- package/scripts/agent-reward-model.js +438 -0
- package/scripts/agent-stack-survival-audit.js +231 -0
- package/scripts/ai-engineering-stack-guardrails.js +256 -0
- package/scripts/billing.js +16 -4
- package/scripts/chatgpt-ads-readiness-pack.js +195 -0
- package/scripts/cli-schema.js +277 -0
- package/scripts/code-graph-guardrails.js +176 -0
- package/scripts/deepseek-v4-runtime-guardrails.js +253 -0
- package/scripts/gemini-embedding-policy.js +198 -0
- package/scripts/inference-cache-policy.js +39 -0
- package/scripts/judge-reward-function.js +396 -0
- package/scripts/llm-behavior-monitor.js +251 -0
- package/scripts/long-running-agent-context-guardrails.js +176 -0
- package/scripts/multimodal-retrieval-plan.js +31 -11
- package/scripts/oss-pr-opportunity-scout.js +240 -0
- package/scripts/proactive-agent-eval-guardrails.js +230 -0
- package/scripts/profile-router.js +5 -4
- package/scripts/prompting-operating-system.js +273 -0
- package/scripts/proxy-pointer-rag-guardrails.js +189 -0
- package/scripts/rag-precision-guardrails.js +202 -0
- package/scripts/rate-limiter.js +1 -1
- package/scripts/reasoning-efficiency-guardrails.js +176 -0
- package/scripts/reward-hacking-guardrails.js +251 -0
- package/scripts/seo-gsd.js +1201 -11
- package/scripts/single-use-credential-gate.js +182 -0
- package/scripts/structured-prompt-driven.js +226 -0
- package/scripts/telemetry-analytics.js +31 -6
- package/scripts/tool-registry.js +92 -0
- package/scripts/upstream-contribution-engine.js +379 -0
- package/scripts/vector-store.js +119 -4
- package/src/api/server.js +333 -100
- package/scripts/agents-sdk-sandbox-plan.js +0 -57
- package/scripts/ai-org-governance.js +0 -98
- package/scripts/artifact-agent-plan.js +0 -81
- package/scripts/enterprise-agent-rollout.js +0 -34
- package/scripts/experience-replay-governance.js +0 -69
- package/scripts/inference-economics.js +0 -53
- package/scripts/knowledge-layer-plan.js +0 -108
- package/scripts/memory-store-governance.js +0 -60
- package/scripts/post-training-governance.js +0 -34
- package/scripts/production-agent-readiness.js +0 -40
- package/scripts/scaling-law-claims.js +0 -60
- package/scripts/student-consistent-training.js +0 -73
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "thumbgate-marketplace",
|
|
3
|
-
"version": "1.16.
|
|
3
|
+
"version": "1.16.19",
|
|
4
4
|
"owner": {
|
|
5
5
|
"name": "Igor Ganapolsky",
|
|
6
6
|
"email": "ig5973700@gmail.com"
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"source": "npm",
|
|
14
14
|
"package": "thumbgate"
|
|
15
15
|
},
|
|
16
|
-
"version": "1.16.
|
|
16
|
+
"version": "1.16.19",
|
|
17
17
|
"author": {
|
|
18
18
|
"name": "Igor Ganapolsky"
|
|
19
19
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "thumbgate",
|
|
3
3
|
"description": "Type 👍 or 👎 on any agent action. ThumbGate captures it, distills a lesson, and blocks the pattern from repeating. One thumbs-down = the agent physically cannot make that mistake again. 33 pre-action checks, budget enforcement, self-protection, and NIST/SOC2 compliance tags.",
|
|
4
|
-
"version": "1.16.
|
|
4
|
+
"version": "1.16.19",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Igor Ganapolsky"
|
|
7
7
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "thumbgate",
|
|
3
|
-
"version": "1.16.
|
|
3
|
+
"version": "1.16.19",
|
|
4
4
|
"description": "ThumbGate — 👍👎 feedback that teaches your AI agent. Thumbs down a mistake, it never happens again.",
|
|
5
5
|
"homepage": "https://thumbgate-production.up.railway.app",
|
|
6
6
|
"transport": "stdio",
|
package/README.md
CHANGED
|
@@ -234,6 +234,8 @@ npx thumbgate doctor # health check
|
|
|
234
234
|
npx thumbgate capture # create a check from text
|
|
235
235
|
npx thumbgate lessons # see what's been learned
|
|
236
236
|
npx thumbgate explore # terminal explorer for lessons, checks, stats
|
|
237
|
+
npx thumbgate background-governance # review background-agent run risk
|
|
238
|
+
npx thumbgate model-candidates --workload=dashboard-analysis --provider=openai --json # evaluate GPT-5.5 routing
|
|
237
239
|
npx thumbgate native-messaging-audit # inspect local browser bridges and extension hosts
|
|
238
240
|
npx thumbgate dashboard # open local dashboard
|
|
239
241
|
npx thumbgate serve # start MCP server on stdio
|
|
@@ -360,7 +362,7 @@ Every Changeset is tied to the exact `main` merge commit and generates Verificat
|
|
|
360
362
|
|
|
361
363
|
---
|
|
362
364
|
|
|
363
|
-
**Popular buyer questions:** **[AI search topical presence](https://thumbgate-production.up.railway.app/guides/ai-search-topical-presence?utm_source=github&utm_medium=readme&utm_campaign=buyer_questions)** · **[Relational knowledge and AI recommendations](https://thumbgate-production.up.railway.app/guides/relational-knowledge-ai-recommendations?utm_source=github&utm_medium=readme&utm_campaign=buyer_questions)** · **[Stop repeated AI agent mistakes](https://thumbgate-production.up.railway.app/guides/stop-repeated-ai-agent-mistakes?utm_source=github&utm_medium=readme&utm_campaign=buyer_questions)** · **[Browser automation safety](https://thumbgate-production.up.railway.app/guides/browser-automation-safety?utm_source=github&utm_medium=readme&utm_campaign=buyer_questions)** · **[Native messaging host security](https://thumbgate-production.up.railway.app/guides/native-messaging-host-security?utm_source=github&utm_medium=readme&utm_campaign=buyer_questions)** · **[Autoresearch agent safety](https://thumbgate-production.up.railway.app/guides/autoresearch-agent-safety?utm_source=github&utm_medium=readme&utm_campaign=buyer_questions)** · **[Cursor guardrails](https://thumbgate-production.up.railway.app/guides/cursor-agent-guardrails?utm_source=github&utm_medium=readme&utm_campaign=buyer_questions)** · **[Codex CLI guardrails](https://thumbgate-production.up.railway.app/guides/codex-cli-guardrails?utm_source=github&utm_medium=readme&utm_campaign=buyer_questions)** · **[Gemini CLI memory + enforcement](https://thumbgate-production.up.railway.app/guides/gemini-cli-feedback-memory?utm_source=github&utm_medium=readme&utm_campaign=buyer_questions)**
|
|
365
|
+
**Popular buyer questions:** **[AI search topical presence](https://thumbgate-production.up.railway.app/guides/ai-search-topical-presence?utm_source=github&utm_medium=readme&utm_campaign=buyer_questions)** · **[Relational knowledge and AI recommendations](https://thumbgate-production.up.railway.app/guides/relational-knowledge-ai-recommendations?utm_source=github&utm_medium=readme&utm_campaign=buyer_questions)** · **[Background agent governance](https://thumbgate-production.up.railway.app/guides/background-agent-governance?utm_source=github&utm_medium=readme&utm_campaign=buyer_questions)** · **[GPT-5.5 model evaluation](https://thumbgate-production.up.railway.app/guides/gpt-5-5-model-evaluation?utm_source=github&utm_medium=readme&utm_campaign=buyer_questions)** · **[Stop repeated AI agent mistakes](https://thumbgate-production.up.railway.app/guides/stop-repeated-ai-agent-mistakes?utm_source=github&utm_medium=readme&utm_campaign=buyer_questions)** · **[Browser automation safety](https://thumbgate-production.up.railway.app/guides/browser-automation-safety?utm_source=github&utm_medium=readme&utm_campaign=buyer_questions)** · **[Native messaging host security](https://thumbgate-production.up.railway.app/guides/native-messaging-host-security?utm_source=github&utm_medium=readme&utm_campaign=buyer_questions)** · **[Autoresearch agent safety](https://thumbgate-production.up.railway.app/guides/autoresearch-agent-safety?utm_source=github&utm_medium=readme&utm_campaign=buyer_questions)** · **[Cursor guardrails](https://thumbgate-production.up.railway.app/guides/cursor-agent-guardrails?utm_source=github&utm_medium=readme&utm_campaign=buyer_questions)** · **[Codex CLI guardrails](https://thumbgate-production.up.railway.app/guides/codex-cli-guardrails?utm_source=github&utm_medium=readme&utm_campaign=buyer_questions)** · **[Gemini CLI memory + enforcement](https://thumbgate-production.up.railway.app/guides/gemini-cli-feedback-memory?utm_source=github&utm_medium=readme&utm_campaign=buyer_questions)** · **[Google Cloud MCP guardrails](https://thumbgate-production.up.railway.app/guides/gcp-mcp-guardrails?utm_source=github&utm_medium=readme&utm_campaign=buyer_questions)** · **[Roo Code alternative: migrate to Cline](https://thumbgate-production.up.railway.app/guides/roo-code-alternative-cline?utm_source=github&utm_medium=readme&utm_campaign=buyer_questions)**
|
|
364
366
|
|
|
365
367
|
**[Workflow Hardening Sprint](https://thumbgate-production.up.railway.app/?utm_source=github&utm_medium=readme&utm_campaign=top_cta#workflow-sprint-intake)** · **[Live Dashboard](https://thumbgate-production.up.railway.app/dashboard?utm_source=github&utm_medium=readme&utm_campaign=top_cta)**
|
|
366
368
|
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
"mcpServers": {
|
|
3
3
|
"thumbgate": {
|
|
4
4
|
"command": "npx",
|
|
5
|
-
"args": ["--yes", "--package", "thumbgate@1.16.
|
|
5
|
+
"args": ["--yes", "--package", "thumbgate@1.16.19", "thumbgate", "serve"]
|
|
6
6
|
}
|
|
7
7
|
},
|
|
8
8
|
"hooks": {
|
|
9
9
|
"preToolUse": {
|
|
10
10
|
"command": "npx",
|
|
11
|
-
"args": ["--yes", "--package", "thumbgate@1.16.
|
|
11
|
+
"args": ["--yes", "--package", "thumbgate@1.16.19", "thumbgate", "gate-check"]
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -132,6 +132,21 @@ const {
|
|
|
132
132
|
const { runLoop: runAutoresearchLoop } = require('../../scripts/autoresearch-runner');
|
|
133
133
|
const { TOOLS } = require('../../scripts/tool-registry');
|
|
134
134
|
const { buildContextFootprintReport } = require('../../scripts/context-footprint');
|
|
135
|
+
const {
|
|
136
|
+
buildAgentDesignGovernancePlan,
|
|
137
|
+
} = require('../../scripts/agent-design-governance');
|
|
138
|
+
const {
|
|
139
|
+
buildProactiveAgentEvalGuardrailsPlan,
|
|
140
|
+
} = require('../../scripts/proactive-agent-eval-guardrails');
|
|
141
|
+
const {
|
|
142
|
+
buildRewardHackingGuardrailsPlan,
|
|
143
|
+
} = require('../../scripts/reward-hacking-guardrails');
|
|
144
|
+
const {
|
|
145
|
+
buildOssPrOpportunityScoutPlan,
|
|
146
|
+
} = require('../../scripts/oss-pr-opportunity-scout');
|
|
147
|
+
const {
|
|
148
|
+
buildChatgptAdsReadinessPack,
|
|
149
|
+
} = require('../../scripts/chatgpt-ads-readiness-pack');
|
|
135
150
|
const { reflect: reflectOnFeedback } = loadOptionalModule(path.join(__dirname, '../../scripts/reflector-agent'), () => ({
|
|
136
151
|
reflect: () => createUnavailableReport('Feedback reflection'),
|
|
137
152
|
}));
|
|
@@ -201,7 +216,7 @@ const {
|
|
|
201
216
|
finalizeSession: finalizeFeedbackSession,
|
|
202
217
|
} = require('../../scripts/feedback-session');
|
|
203
218
|
|
|
204
|
-
const SERVER_INFO = { name: 'thumbgate-mcp', version: '1.16.
|
|
219
|
+
const SERVER_INFO = { name: 'thumbgate-mcp', version: '1.16.19' };
|
|
205
220
|
const COMMERCE_CATEGORIES = [
|
|
206
221
|
'product_recommendation',
|
|
207
222
|
'brand_compliance',
|
|
@@ -1015,6 +1030,16 @@ async function callToolInner(name, args) {
|
|
|
1015
1030
|
perEntryMaxChars: args.perEntryMaxChars,
|
|
1016
1031
|
totalMaxChars: args.totalMaxChars,
|
|
1017
1032
|
}));
|
|
1033
|
+
case 'plan_agent_design_governance':
|
|
1034
|
+
return toTextResult(buildAgentDesignGovernancePlan(args));
|
|
1035
|
+
case 'plan_proactive_agent_eval_guardrails':
|
|
1036
|
+
return toTextResult(buildProactiveAgentEvalGuardrailsPlan(args));
|
|
1037
|
+
case 'plan_reward_hacking_guardrails':
|
|
1038
|
+
return toTextResult(buildRewardHackingGuardrailsPlan(args));
|
|
1039
|
+
case 'plan_oss_pr_opportunity_scout':
|
|
1040
|
+
return toTextResult(buildOssPrOpportunityScoutPlan(args));
|
|
1041
|
+
case 'plan_chatgpt_ads_readiness':
|
|
1042
|
+
return toTextResult(buildChatgptAdsReadinessPack(args));
|
|
1018
1043
|
case 'run_autoresearch': {
|
|
1019
1044
|
const iterations = Math.max(1, Math.min(5, Number(args.iterations || 1)));
|
|
1020
1045
|
const timeoutMs = Math.max(1000, Math.min(600000, Number(args.timeoutMs || 120000)));
|
package/bin/cli.js
CHANGED
|
@@ -12,7 +12,15 @@
|
|
|
12
12
|
* npx thumbgate export-dpo # export DPO training pairs
|
|
13
13
|
* npx thumbgate export-databricks # export Databricks-ready analytics bundle
|
|
14
14
|
* npx thumbgate eval --from-feedback # turn feedback into reusable prompt evals
|
|
15
|
+
* npx thumbgate code-graph-guardrails # map code-graph signals to pre-action checks
|
|
16
|
+
* npx thumbgate proxy-pointer-rag-guardrails # map visual document RAG signals to gates
|
|
17
|
+
* npx thumbgate rag-precision-guardrails # map retrieval tuning regressions to gates
|
|
18
|
+
* npx thumbgate long-running-agent-context-guardrails # map structured-memory gaps to gates
|
|
19
|
+
* npx thumbgate reasoning-efficiency-guardrails # map reasoning compression signals to gates
|
|
20
|
+
* npx thumbgate deepseek-v4-runtime-guardrails # map sparse-attention runtime signals to gates
|
|
21
|
+
* npx thumbgate upstream-contributions # rank upstream repo issues for trust-building PRs
|
|
15
22
|
* npx thumbgate stats # feedback analytics + Revenue-at-Risk
|
|
23
|
+
* npx thumbgate background-governance # background-agent run report + risk check
|
|
16
24
|
* npx thumbgate cfo # local operational billing summary
|
|
17
25
|
* npx thumbgate pro # solo dashboard + exports side lane
|
|
18
26
|
*/
|
|
@@ -1220,6 +1228,112 @@ function modelFit() {
|
|
|
1220
1228
|
console.log(JSON.stringify({ reportPath, report }, null, 2));
|
|
1221
1229
|
}
|
|
1222
1230
|
|
|
1231
|
+
function geminiEmbeddingPlan() {
|
|
1232
|
+
const args = parseArgs(process.argv.slice(3));
|
|
1233
|
+
const {
|
|
1234
|
+
buildGeminiEmbeddingRolloutPlan,
|
|
1235
|
+
} = require(path.join(PKG_ROOT, 'scripts', 'gemini-embedding-policy'));
|
|
1236
|
+
const plan = buildGeminiEmbeddingRolloutPlan({
|
|
1237
|
+
corpusItems: args['corpus-items'] || args.corpusItems,
|
|
1238
|
+
outputDimensionality: args.dim || args.outputDimensionality,
|
|
1239
|
+
task: args.task,
|
|
1240
|
+
useBatchApi: !args['no-batch'],
|
|
1241
|
+
});
|
|
1242
|
+
|
|
1243
|
+
if (args.json) {
|
|
1244
|
+
console.log(JSON.stringify(plan, null, 2));
|
|
1245
|
+
return;
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
console.log(`Gemini Embedding 2 plan — ${plan.task}`);
|
|
1249
|
+
console.log(`Model: ${plan.model}`);
|
|
1250
|
+
console.log(`Dimensions: ${plan.outputDimensionality}`);
|
|
1251
|
+
console.log(`Corpus: ${plan.corpusItems} items (~${plan.estimatedFloat32Mb} MB float32)`);
|
|
1252
|
+
console.log(`Query prefix: ${plan.taskPrefixes.query}`);
|
|
1253
|
+
console.log(`Document prefix: ${plan.taskPrefixes.document}`);
|
|
1254
|
+
console.log(`Batch API: ${plan.economics.batchApi}`);
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
function agentDesignGovernance() {
|
|
1258
|
+
const args = parseArgs(process.argv.slice(3));
|
|
1259
|
+
const {
|
|
1260
|
+
buildAgentDesignGovernancePlan,
|
|
1261
|
+
formatAgentDesignGovernancePlan,
|
|
1262
|
+
} = require(path.join(PKG_ROOT, 'scripts', 'agent-design-governance'));
|
|
1263
|
+
const report = buildAgentDesignGovernancePlan(args);
|
|
1264
|
+
|
|
1265
|
+
if (args.json) {
|
|
1266
|
+
console.log(JSON.stringify(report, null, 2));
|
|
1267
|
+
return;
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
process.stdout.write(formatAgentDesignGovernancePlan(report));
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1273
|
+
function proactiveAgentEvalGuardrails() {
|
|
1274
|
+
const args = parseArgs(process.argv.slice(3));
|
|
1275
|
+
const {
|
|
1276
|
+
buildProactiveAgentEvalGuardrailsPlan,
|
|
1277
|
+
formatProactiveAgentEvalGuardrailsPlan,
|
|
1278
|
+
} = require(path.join(PKG_ROOT, 'scripts', 'proactive-agent-eval-guardrails'));
|
|
1279
|
+
const report = buildProactiveAgentEvalGuardrailsPlan(args);
|
|
1280
|
+
|
|
1281
|
+
if (args.json) {
|
|
1282
|
+
console.log(JSON.stringify(report, null, 2));
|
|
1283
|
+
return;
|
|
1284
|
+
}
|
|
1285
|
+
|
|
1286
|
+
process.stdout.write(formatProactiveAgentEvalGuardrailsPlan(report));
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
function rewardHackingGuardrails() {
|
|
1290
|
+
const args = parseArgs(process.argv.slice(3));
|
|
1291
|
+
const {
|
|
1292
|
+
buildRewardHackingGuardrailsPlan,
|
|
1293
|
+
formatRewardHackingGuardrailsPlan,
|
|
1294
|
+
} = require(path.join(PKG_ROOT, 'scripts', 'reward-hacking-guardrails'));
|
|
1295
|
+
const report = buildRewardHackingGuardrailsPlan(args);
|
|
1296
|
+
|
|
1297
|
+
if (args.json) {
|
|
1298
|
+
console.log(JSON.stringify(report, null, 2));
|
|
1299
|
+
return;
|
|
1300
|
+
}
|
|
1301
|
+
|
|
1302
|
+
process.stdout.write(formatRewardHackingGuardrailsPlan(report));
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
function ossPrOpportunityScout() {
|
|
1306
|
+
const args = parseArgs(process.argv.slice(3));
|
|
1307
|
+
const {
|
|
1308
|
+
buildOssPrOpportunityScoutPlan,
|
|
1309
|
+
formatOssPrOpportunityScoutPlan,
|
|
1310
|
+
} = require(path.join(PKG_ROOT, 'scripts', 'oss-pr-opportunity-scout'));
|
|
1311
|
+
const report = buildOssPrOpportunityScoutPlan(args);
|
|
1312
|
+
|
|
1313
|
+
if (args.json) {
|
|
1314
|
+
console.log(JSON.stringify(report, null, 2));
|
|
1315
|
+
return;
|
|
1316
|
+
}
|
|
1317
|
+
|
|
1318
|
+
process.stdout.write(formatOssPrOpportunityScoutPlan(report));
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1321
|
+
function chatgptAdsReadinessPack() {
|
|
1322
|
+
const args = parseArgs(process.argv.slice(3));
|
|
1323
|
+
const {
|
|
1324
|
+
buildChatgptAdsReadinessPack,
|
|
1325
|
+
formatChatgptAdsReadinessPack,
|
|
1326
|
+
} = require(path.join(PKG_ROOT, 'scripts', 'chatgpt-ads-readiness-pack'));
|
|
1327
|
+
const report = buildChatgptAdsReadinessPack(args);
|
|
1328
|
+
|
|
1329
|
+
if (args.json) {
|
|
1330
|
+
console.log(JSON.stringify(report, null, 2));
|
|
1331
|
+
return;
|
|
1332
|
+
}
|
|
1333
|
+
|
|
1334
|
+
process.stdout.write(formatChatgptAdsReadinessPack(report));
|
|
1335
|
+
}
|
|
1336
|
+
|
|
1223
1337
|
function modelCandidatesCmd() {
|
|
1224
1338
|
const args = parseArgs(process.argv.slice(3));
|
|
1225
1339
|
const { writeModelCandidatesReport, renderModelCandidatesReport } = require(path.join(PKG_ROOT, 'scripts', 'model-candidates'));
|
|
@@ -1598,6 +1712,216 @@ function nativeMessagingAudit() {
|
|
|
1598
1712
|
process.stdout.write(formatNativeMessagingAudit(report));
|
|
1599
1713
|
}
|
|
1600
1714
|
|
|
1715
|
+
function codeGraphGuardrails() {
|
|
1716
|
+
const args = parseArgs(process.argv.slice(3));
|
|
1717
|
+
const {
|
|
1718
|
+
buildCodeGraphGuardrailsPlan,
|
|
1719
|
+
formatCodeGraphGuardrailsPlan,
|
|
1720
|
+
} = require(path.join(PKG_ROOT, 'scripts', 'code-graph-guardrails'));
|
|
1721
|
+
const report = buildCodeGraphGuardrailsPlan(args);
|
|
1722
|
+
|
|
1723
|
+
if (args.json) {
|
|
1724
|
+
console.log(JSON.stringify(report, null, 2));
|
|
1725
|
+
return;
|
|
1726
|
+
}
|
|
1727
|
+
|
|
1728
|
+
process.stdout.write(formatCodeGraphGuardrailsPlan(report));
|
|
1729
|
+
}
|
|
1730
|
+
|
|
1731
|
+
function proxyPointerRagGuardrails() {
|
|
1732
|
+
const args = parseArgs(process.argv.slice(3));
|
|
1733
|
+
const {
|
|
1734
|
+
buildProxyPointerRagGuardrailsPlan,
|
|
1735
|
+
formatProxyPointerRagGuardrailsPlan,
|
|
1736
|
+
} = require(path.join(PKG_ROOT, 'scripts', 'proxy-pointer-rag-guardrails'));
|
|
1737
|
+
const report = buildProxyPointerRagGuardrailsPlan(args);
|
|
1738
|
+
|
|
1739
|
+
if (args.json) {
|
|
1740
|
+
console.log(JSON.stringify(report, null, 2));
|
|
1741
|
+
return;
|
|
1742
|
+
}
|
|
1743
|
+
|
|
1744
|
+
process.stdout.write(formatProxyPointerRagGuardrailsPlan(report));
|
|
1745
|
+
}
|
|
1746
|
+
|
|
1747
|
+
function ragPrecisionGuardrails() {
|
|
1748
|
+
const args = parseArgs(process.argv.slice(3));
|
|
1749
|
+
const {
|
|
1750
|
+
buildRagPrecisionGuardrailsPlan,
|
|
1751
|
+
formatRagPrecisionGuardrailsPlan,
|
|
1752
|
+
} = require(path.join(PKG_ROOT, 'scripts', 'rag-precision-guardrails'));
|
|
1753
|
+
const report = buildRagPrecisionGuardrailsPlan(args);
|
|
1754
|
+
|
|
1755
|
+
if (args.json) {
|
|
1756
|
+
console.log(JSON.stringify(report, null, 2));
|
|
1757
|
+
return;
|
|
1758
|
+
}
|
|
1759
|
+
|
|
1760
|
+
process.stdout.write(formatRagPrecisionGuardrailsPlan(report));
|
|
1761
|
+
}
|
|
1762
|
+
|
|
1763
|
+
function aiEngineeringStackGuardrails() {
|
|
1764
|
+
const args = parseArgs(process.argv.slice(3));
|
|
1765
|
+
const {
|
|
1766
|
+
buildAiEngineeringStackGuardrailsPlan,
|
|
1767
|
+
formatAiEngineeringStackGuardrailsPlan,
|
|
1768
|
+
} = require(path.join(PKG_ROOT, 'scripts', 'ai-engineering-stack-guardrails'));
|
|
1769
|
+
const report = buildAiEngineeringStackGuardrailsPlan(args);
|
|
1770
|
+
|
|
1771
|
+
if (args.json) {
|
|
1772
|
+
console.log(JSON.stringify(report, null, 2));
|
|
1773
|
+
return;
|
|
1774
|
+
}
|
|
1775
|
+
|
|
1776
|
+
process.stdout.write(formatAiEngineeringStackGuardrailsPlan(report));
|
|
1777
|
+
}
|
|
1778
|
+
|
|
1779
|
+
function deepseekV4RuntimeGuardrails() {
|
|
1780
|
+
const args = parseArgs(process.argv.slice(3));
|
|
1781
|
+
const {
|
|
1782
|
+
buildDeepSeekV4RuntimeGuardrailsPlan,
|
|
1783
|
+
formatDeepSeekV4RuntimeGuardrailsPlan,
|
|
1784
|
+
} = require(path.join(PKG_ROOT, 'scripts', 'deepseek-v4-runtime-guardrails'));
|
|
1785
|
+
const report = buildDeepSeekV4RuntimeGuardrailsPlan(args);
|
|
1786
|
+
|
|
1787
|
+
if (args.json) {
|
|
1788
|
+
console.log(JSON.stringify(report, null, 2));
|
|
1789
|
+
return;
|
|
1790
|
+
}
|
|
1791
|
+
|
|
1792
|
+
process.stdout.write(formatDeepSeekV4RuntimeGuardrailsPlan(report));
|
|
1793
|
+
}
|
|
1794
|
+
|
|
1795
|
+
function upstreamContributions() {
|
|
1796
|
+
const args = parseArgs(process.argv.slice(3));
|
|
1797
|
+
const {
|
|
1798
|
+
buildUpstreamContributionPlan,
|
|
1799
|
+
renderUpstreamContributionPlan,
|
|
1800
|
+
writeUpstreamContributionPlan,
|
|
1801
|
+
} = require(path.join(PKG_ROOT, 'scripts', 'upstream-contribution-engine'));
|
|
1802
|
+
const report = buildUpstreamContributionPlan({
|
|
1803
|
+
...args,
|
|
1804
|
+
root: CWD,
|
|
1805
|
+
maxRepos: args['max-repos'] || args.max,
|
|
1806
|
+
maxIssues: args['max-issues'],
|
|
1807
|
+
offline: args.live || args.network ? false : true,
|
|
1808
|
+
});
|
|
1809
|
+
|
|
1810
|
+
if (args.write || args['write-report']) {
|
|
1811
|
+
const paths = writeUpstreamContributionPlan(report, args['out-dir'] || undefined);
|
|
1812
|
+
if (args.json) {
|
|
1813
|
+
console.log(JSON.stringify({ ...report, paths }, null, 2));
|
|
1814
|
+
return;
|
|
1815
|
+
}
|
|
1816
|
+
process.stdout.write(renderUpstreamContributionPlan(report));
|
|
1817
|
+
process.stdout.write(`\nArtifacts: ${paths.mdPath}, ${paths.jsonPath}\n`);
|
|
1818
|
+
return;
|
|
1819
|
+
}
|
|
1820
|
+
|
|
1821
|
+
if (args.json) {
|
|
1822
|
+
console.log(JSON.stringify(report, null, 2));
|
|
1823
|
+
return;
|
|
1824
|
+
}
|
|
1825
|
+
|
|
1826
|
+
process.stdout.write(renderUpstreamContributionPlan(report));
|
|
1827
|
+
}
|
|
1828
|
+
|
|
1829
|
+
function longRunningAgentContextGuardrails() {
|
|
1830
|
+
const args = parseArgs(process.argv.slice(3));
|
|
1831
|
+
const {
|
|
1832
|
+
buildLongRunningAgentContextGuardrailsPlan,
|
|
1833
|
+
formatLongRunningAgentContextGuardrailsPlan,
|
|
1834
|
+
} = require(path.join(PKG_ROOT, 'scripts', 'long-running-agent-context-guardrails'));
|
|
1835
|
+
const report = buildLongRunningAgentContextGuardrailsPlan(args);
|
|
1836
|
+
|
|
1837
|
+
if (args.json) {
|
|
1838
|
+
console.log(JSON.stringify(report, null, 2));
|
|
1839
|
+
return;
|
|
1840
|
+
}
|
|
1841
|
+
|
|
1842
|
+
process.stdout.write(formatLongRunningAgentContextGuardrailsPlan(report));
|
|
1843
|
+
}
|
|
1844
|
+
|
|
1845
|
+
function reasoningEfficiencyGuardrails() {
|
|
1846
|
+
const args = parseArgs(process.argv.slice(3));
|
|
1847
|
+
const {
|
|
1848
|
+
buildReasoningEfficiencyGuardrailsPlan,
|
|
1849
|
+
formatReasoningEfficiencyGuardrailsPlan,
|
|
1850
|
+
} = require(path.join(PKG_ROOT, 'scripts', 'reasoning-efficiency-guardrails'));
|
|
1851
|
+
const report = buildReasoningEfficiencyGuardrailsPlan(args);
|
|
1852
|
+
|
|
1853
|
+
if (args.json) {
|
|
1854
|
+
console.log(JSON.stringify(report, null, 2));
|
|
1855
|
+
return;
|
|
1856
|
+
}
|
|
1857
|
+
|
|
1858
|
+
process.stdout.write(formatReasoningEfficiencyGuardrailsPlan(report));
|
|
1859
|
+
}
|
|
1860
|
+
|
|
1861
|
+
function backgroundGovernance() {
|
|
1862
|
+
const args = parseArgs(process.argv.slice(3));
|
|
1863
|
+
const {
|
|
1864
|
+
checkRunGovernance,
|
|
1865
|
+
formatGovernanceReport,
|
|
1866
|
+
generateGovernanceReport,
|
|
1867
|
+
} = require(path.join(PKG_ROOT, 'scripts', 'background-agent-governance'));
|
|
1868
|
+
const feedbackDir = args['feedback-dir'];
|
|
1869
|
+
|
|
1870
|
+
if (args.check) {
|
|
1871
|
+
const verdict = checkRunGovernance({
|
|
1872
|
+
agentId: args['agent-id'] || args.agent || 'unknown',
|
|
1873
|
+
runType: args['run-type'] || args.type || 'pr',
|
|
1874
|
+
branch: args.branch,
|
|
1875
|
+
filesChanged: Number(args['files-changed'] || 0),
|
|
1876
|
+
}, feedbackDir);
|
|
1877
|
+
|
|
1878
|
+
if (args.json) {
|
|
1879
|
+
console.log(JSON.stringify({
|
|
1880
|
+
kind: 'background_agent_governance_check',
|
|
1881
|
+
...verdict,
|
|
1882
|
+
}, null, 2));
|
|
1883
|
+
} else {
|
|
1884
|
+
console.log('\nBackground Agent Governance Check');
|
|
1885
|
+
console.log('-'.repeat(50));
|
|
1886
|
+
console.log(` Allowed : ${verdict.allowed ? 'yes' : 'no'}`);
|
|
1887
|
+
console.log(` Score : ${verdict.governanceScore}/100`);
|
|
1888
|
+
if (verdict.blockers.length > 0) {
|
|
1889
|
+
console.log('\nBlockers:');
|
|
1890
|
+
for (const blocker of verdict.blockers) console.log(` - ${blocker.rule}: ${blocker.message}`);
|
|
1891
|
+
}
|
|
1892
|
+
if (verdict.warnings.length > 0) {
|
|
1893
|
+
console.log('\nWarnings:');
|
|
1894
|
+
for (const warning of verdict.warnings) console.log(` - ${warning.rule}: ${warning.message}`);
|
|
1895
|
+
}
|
|
1896
|
+
if (verdict.allowed && verdict.warnings.length === 0) {
|
|
1897
|
+
console.log('\nNo governance blockers or warnings found.');
|
|
1898
|
+
}
|
|
1899
|
+
console.log('');
|
|
1900
|
+
}
|
|
1901
|
+
process.exit(verdict.allowed ? 0 : 2);
|
|
1902
|
+
}
|
|
1903
|
+
|
|
1904
|
+
const report = generateGovernanceReport({
|
|
1905
|
+
periodHours: Number(args['window-hours'] || args.window || 24),
|
|
1906
|
+
feedbackDir,
|
|
1907
|
+
});
|
|
1908
|
+
|
|
1909
|
+
if (args.json) {
|
|
1910
|
+
console.log(JSON.stringify({
|
|
1911
|
+
kind: 'background_agent_governance_report',
|
|
1912
|
+
...report,
|
|
1913
|
+
}, null, 2));
|
|
1914
|
+
return;
|
|
1915
|
+
}
|
|
1916
|
+
|
|
1917
|
+
console.log('\n' + formatGovernanceReport(report));
|
|
1918
|
+
console.log('\nReview relief actions:');
|
|
1919
|
+
console.log(' - Run --check before dispatching an unattended PR job.');
|
|
1920
|
+
console.log(' - Route protected branches and large blast-radius jobs to human review.');
|
|
1921
|
+
console.log(' - Convert CI failures into thumbs-down lessons so repeats become Pre-Action Checks.');
|
|
1922
|
+
console.log('\nGuide: https://thumbgate-production.up.railway.app/guides/background-agent-governance\n');
|
|
1923
|
+
}
|
|
1924
|
+
|
|
1601
1925
|
function optimize() {
|
|
1602
1926
|
const { optimize: doOptimize } = require(path.join(PKG_ROOT, 'scripts', 'optimize-context'));
|
|
1603
1927
|
doOptimize();
|
|
@@ -1944,7 +2268,7 @@ function help() {
|
|
|
1944
2268
|
console.log(' repair-github-marketplace Repair legacy GitHub Marketplace amount mappings');
|
|
1945
2269
|
console.log(' north-star Show proof-backed workflow-run progress toward the North Star');
|
|
1946
2270
|
console.log(' model-fit Detect local embedding profile and write evidence report');
|
|
1947
|
-
console.log(' model-candidates Rank managed model candidates and
|
|
2271
|
+
console.log(' model-candidates Rank managed model candidates and benchmark routing plans');
|
|
1948
2272
|
console.log(' risk Train or query the boosted local risk scorer');
|
|
1949
2273
|
console.log(' eval Turn feedback into reusable prompt/workflow eval proof');
|
|
1950
2274
|
console.log(' optimize [PRO] Prune CLAUDE.md and migrate rules to Pre-Action Checks');
|
|
@@ -1954,6 +2278,15 @@ function help() {
|
|
|
1954
2278
|
console.log(' funnel Marketing and revenue conversion funnel analytics');
|
|
1955
2279
|
console.log(' pulse Real-time GTM velocity and Mission Control summary');
|
|
1956
2280
|
console.log(' dispatch Dispatch-safe brief for phone-driven review sessions');
|
|
2281
|
+
console.log(' code-graph-guardrails Map code-graph risk signals to Knowledge Graph Safety gates');
|
|
2282
|
+
console.log(' proxy-pointer-rag-guardrails Map visual document RAG signals to Document RAG Safety gates');
|
|
2283
|
+
console.log(' rag-precision-guardrails Map retrieval tuning regressions to Document RAG Safety gates');
|
|
2284
|
+
console.log(' ai-engineering-stack-guardrails Map gateway, MCP, AGENTS.md, LLM wiki, reviewer, and sandbox gaps to stack gates');
|
|
2285
|
+
console.log(' upstream-contributions Find dependency issues worth fixing without promotional PRs');
|
|
2286
|
+
console.log(' long-running-agent-context-guardrails Map structured-memory gaps to long-running agent gates');
|
|
2287
|
+
console.log(' reasoning-efficiency-guardrails Map reasoning compression signals to efficiency gates');
|
|
2288
|
+
console.log(' deepseek-v4-runtime-guardrails Map sparse-attention runtime signals to safety gates');
|
|
2289
|
+
console.log(' background-governance Background-agent run report and dispatch risk check');
|
|
1957
2290
|
console.log(' analytics Unified analytics snapshot (npm, GitHub, landing)');
|
|
1958
2291
|
console.log(' start-api Start the ThumbGate HTTPS API server');
|
|
1959
2292
|
console.log('');
|
|
@@ -1978,6 +2311,16 @@ function help() {
|
|
|
1978
2311
|
console.log(' npx thumbgate explore gates --json');
|
|
1979
2312
|
console.log(' npx thumbgate demo');
|
|
1980
2313
|
console.log(' npx thumbgate stats --json');
|
|
2314
|
+
console.log(' npx thumbgate code-graph-guardrails --central-files=src/api/server.js --layers=api,data --generated-artifacts=.codegraph/index.json --json');
|
|
2315
|
+
console.log(' npx thumbgate proxy-pointer-rag-guardrails --tree-path=.rag/tree.json --image-pointers=paper-1/figures/fig2.png --documents=paper-1 --visual-claims --json');
|
|
2316
|
+
console.log(' npx thumbgate rag-precision-guardrails --baseline-recall=0.86 --new-recall=0.72 --threshold-change --agentic --structural-near-misses --json');
|
|
2317
|
+
console.log(' npx thumbgate ai-engineering-stack-guardrails --mcp-tool-count=182 --direct-provider-keys --llm-wiki-pages=24 --context-freshness-days=30 --background-agents --json');
|
|
2318
|
+
console.log(' npx thumbgate long-running-agent-context-guardrails --request-count=80 --output-mb=3 --raw-chat-only --json');
|
|
2319
|
+
console.log(' npx thumbgate reasoning-efficiency-guardrails --baseline-tokens=1200 --compressed-tokens=980 --baseline-accuracy=0.84 --compressed-accuracy=0.85 --verifier --json');
|
|
2320
|
+
console.log(' npx thumbgate deepseek-v4-runtime-guardrails --context-tokens=900000 --hybrid-attention --speculative-decoding --accept-length=1.4 --precision-mode=fp8 --json');
|
|
2321
|
+
console.log(' npx thumbgate upstream-contributions --max-repos=10 --write');
|
|
2322
|
+
console.log(' npx thumbgate background-governance --json');
|
|
2323
|
+
console.log(' npx thumbgate background-governance --check --agent-id=builder --branch=main --files-changed=25 --json');
|
|
1981
2324
|
console.log(' npx thumbgate eval --from-feedback --json');
|
|
1982
2325
|
console.log(' npx thumbgate lessons "force push" --json');
|
|
1983
2326
|
console.log(' npx thumbgate lessons --query="deploy" --remote');
|
|
@@ -2120,10 +2463,45 @@ switch (COMMAND) {
|
|
|
2120
2463
|
case 'model-fit':
|
|
2121
2464
|
modelFit();
|
|
2122
2465
|
break;
|
|
2466
|
+
case 'gemini-embedding-plan':
|
|
2467
|
+
case 'embedding-plan':
|
|
2468
|
+
geminiEmbeddingPlan();
|
|
2469
|
+
break;
|
|
2470
|
+
case 'agent-design-governance':
|
|
2471
|
+
case 'agent-architecture':
|
|
2472
|
+
case 'agent-governance-plan':
|
|
2473
|
+
agentDesignGovernance();
|
|
2474
|
+
break;
|
|
2475
|
+
case 'proactive-agent-eval-guardrails':
|
|
2476
|
+
case 'pare-guardrails':
|
|
2477
|
+
case 'proactive-agent-guardrails':
|
|
2478
|
+
proactiveAgentEvalGuardrails();
|
|
2479
|
+
break;
|
|
2480
|
+
case 'reward-hacking-guardrails':
|
|
2481
|
+
case 'proxy-reward-guardrails':
|
|
2482
|
+
case 'reward-guardrails':
|
|
2483
|
+
rewardHackingGuardrails();
|
|
2484
|
+
break;
|
|
2485
|
+
case 'oss-pr-opportunity-scout':
|
|
2486
|
+
case 'github-pr-scout':
|
|
2487
|
+
case 'upstream-pr-scout':
|
|
2488
|
+
ossPrOpportunityScout();
|
|
2489
|
+
break;
|
|
2490
|
+
case 'chatgpt-ads-readiness-pack':
|
|
2491
|
+
case 'chatgpt-ads-plan':
|
|
2492
|
+
case 'ai-ads-plan':
|
|
2493
|
+
chatgptAdsReadinessPack();
|
|
2494
|
+
break;
|
|
2123
2495
|
case 'model-candidates':
|
|
2124
2496
|
case 'managed-models':
|
|
2125
2497
|
modelCandidatesCmd();
|
|
2126
2498
|
break;
|
|
2499
|
+
case 'upstream-contributions':
|
|
2500
|
+
case 'upstream-contribution-engine':
|
|
2501
|
+
case 'upstream-prs':
|
|
2502
|
+
case 'oss-pr-opportunities':
|
|
2503
|
+
upstreamContributions();
|
|
2504
|
+
break;
|
|
2127
2505
|
case 'risk':
|
|
2128
2506
|
risk();
|
|
2129
2507
|
break;
|
|
@@ -2168,6 +2546,47 @@ switch (COMMAND) {
|
|
|
2168
2546
|
case 'bridge-audit':
|
|
2169
2547
|
nativeMessagingAudit();
|
|
2170
2548
|
break;
|
|
2549
|
+
case 'code-graph-guardrails':
|
|
2550
|
+
case 'knowledge-graph-guardrails':
|
|
2551
|
+
case 'graph-guardrails':
|
|
2552
|
+
codeGraphGuardrails();
|
|
2553
|
+
break;
|
|
2554
|
+
case 'proxy-pointer-rag-guardrails':
|
|
2555
|
+
case 'document-rag-guardrails':
|
|
2556
|
+
case 'multimodal-rag-guardrails':
|
|
2557
|
+
proxyPointerRagGuardrails();
|
|
2558
|
+
break;
|
|
2559
|
+
case 'rag-precision-guardrails':
|
|
2560
|
+
case 'retrieval-precision-guardrails':
|
|
2561
|
+
case 'agentic-rag-guardrails':
|
|
2562
|
+
ragPrecisionGuardrails();
|
|
2563
|
+
break;
|
|
2564
|
+
case 'ai-engineering-stack-guardrails':
|
|
2565
|
+
case 'ai-stack-guardrails':
|
|
2566
|
+
case 'internal-ai-stack-guardrails':
|
|
2567
|
+
case 'llm-wiki-guardrails':
|
|
2568
|
+
aiEngineeringStackGuardrails();
|
|
2569
|
+
break;
|
|
2570
|
+
case 'deepseek-v4-runtime-guardrails':
|
|
2571
|
+
case 'deepseek-runtime-guardrails':
|
|
2572
|
+
case 'sparse-attention-runtime-guardrails':
|
|
2573
|
+
deepseekV4RuntimeGuardrails();
|
|
2574
|
+
break;
|
|
2575
|
+
case 'long-running-agent-context-guardrails':
|
|
2576
|
+
case 'agent-context-guardrails':
|
|
2577
|
+
case 'slack-context-guardrails':
|
|
2578
|
+
longRunningAgentContextGuardrails();
|
|
2579
|
+
break;
|
|
2580
|
+
case 'reasoning-efficiency-guardrails':
|
|
2581
|
+
case 'sas-guardrails':
|
|
2582
|
+
case 'reasoning-compression-guardrails':
|
|
2583
|
+
reasoningEfficiencyGuardrails();
|
|
2584
|
+
break;
|
|
2585
|
+
case 'background-governance':
|
|
2586
|
+
case 'background-agent-governance':
|
|
2587
|
+
case 'agent-governance':
|
|
2588
|
+
backgroundGovernance();
|
|
2589
|
+
break;
|
|
2171
2590
|
case 'optimize':
|
|
2172
2591
|
optimize();
|
|
2173
2592
|
break;
|