thumbgate 1.27.20 → 1.28.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/plugin.json +2 -1
- package/.well-known/mcp/server-card.json +1 -1
- package/README.md +124 -129
- package/adapters/claude/.mcp.json +2 -2
- package/adapters/mcp/server-stdio.js +18 -33
- package/adapters/opencode/opencode.json +1 -1
- package/bin/cli.js +95 -78
- package/bin/postinstall.js +1 -1
- package/config/entitlement-public-keys.json +6 -0
- package/config/gates/default.json +3 -3
- package/config/github-about.json +2 -5
- package/config/merge-quality-checks.json +3 -0
- package/config/post-deploy-marketing-pages.json +1 -1
- package/hooks/hooks.json +38 -0
- package/package.json +28 -10
- package/public/about.html +1 -4
- package/public/agent-manager.html +6 -6
- package/public/agents-cost-savings.html +3 -3
- package/public/ai-malpractice-prevention.html +1 -1
- package/public/blog.html +12 -9
- package/public/chatgpt-app.html +3 -3
- package/public/codex-enterprise.html +3 -3
- package/public/codex-plugin.html +5 -5
- package/public/compare.html +10 -10
- package/public/dashboard.html +1 -1
- package/public/diagnostic.html +23 -1
- package/public/federal.html +2 -2
- package/public/guide.html +14 -14
- package/public/index.html +202 -220
- package/public/install.html +14 -14
- package/public/learn.html +4 -17
- package/public/numbers.html +2 -2
- package/public/partner-intake.html +198 -0
- package/public/pricing.html +61 -31
- package/public/pro.html +2 -2
- package/scripts/agent-reward-model.js +13 -0
- package/scripts/bayes-optimal-gate.js +6 -1
- package/scripts/billing.js +815 -137
- package/scripts/checkout-attribution-reference.js +85 -0
- package/scripts/claude-feedback-sync.js +23 -6
- package/scripts/cli-feedback.js +33 -8
- package/scripts/commercial-offer.js +3 -3
- package/scripts/entitlement.js +250 -0
- package/scripts/export-databricks-bundle.js +5 -0
- package/scripts/export-dpo-pairs.js +6 -0
- package/scripts/export-hf-dataset.js +5 -0
- package/scripts/feedback-loop.js +290 -1
- package/scripts/feedback-quality.js +25 -26
- package/scripts/feedback-sanitizer.js +151 -3
- package/scripts/gates-engine.js +134 -43
- package/scripts/hosted-config.js +9 -2
- package/scripts/imperative-detector.js +85 -0
- package/scripts/intervention-policy.js +13 -0
- package/scripts/mailer/resend-mailer.js +11 -5
- package/scripts/pr-manager.js +9 -22
- package/scripts/pro-local-dashboard.js +198 -0
- package/scripts/risk-scorer.js +6 -0
- package/scripts/secret-scanner.js +363 -68
- package/scripts/self-protection.js +21 -36
- package/scripts/seo-gsd.js +2 -2
- package/scripts/thompson-sampling.js +11 -2
- package/src/api/server.js +202 -22
- package/public/assets/brand/github-social-preview.png +0 -0
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
const path = require('node:path');
|
|
13
13
|
const { loadEpisodes } = require('./session-episode-store');
|
|
14
|
+
const { requireLearnedModelsEntitlement } = require('./entitlement');
|
|
14
15
|
|
|
15
16
|
const HIGH_RISK_TAGS = new Set([
|
|
16
17
|
'billing',
|
|
@@ -163,6 +164,10 @@ function isRlTuple(value) {
|
|
|
163
164
|
}
|
|
164
165
|
|
|
165
166
|
function buildPreferencePairs(episodes = [], options = {}) {
|
|
167
|
+
requireLearnedModelsEntitlement({
|
|
168
|
+
...(options.entitlement || {}),
|
|
169
|
+
label: 'agent reward preference-pair generation',
|
|
170
|
+
});
|
|
166
171
|
const tuples = episodes
|
|
167
172
|
.map((episode) => episodeToRlTuple(episode, options))
|
|
168
173
|
.sort((a, b) => a.reward.total - b.reward.total);
|
|
@@ -181,6 +186,10 @@ function buildPreferencePairs(episodes = [], options = {}) {
|
|
|
181
186
|
}
|
|
182
187
|
|
|
183
188
|
function rankGateCandidatesByReward(episodes = [], options = {}) {
|
|
189
|
+
requireLearnedModelsEntitlement({
|
|
190
|
+
...(options.entitlement || {}),
|
|
191
|
+
label: 'agent reward gate ranking',
|
|
192
|
+
});
|
|
184
193
|
const minOccurrences = Math.max(1, Number(options.minOccurrences || 2));
|
|
185
194
|
const buckets = new Map();
|
|
186
195
|
|
|
@@ -305,6 +314,10 @@ function allocateTestTimeCompute(action = {}) {
|
|
|
305
314
|
}
|
|
306
315
|
|
|
307
316
|
function buildRewardReport(episodes = [], options = {}) {
|
|
317
|
+
requireLearnedModelsEntitlement({
|
|
318
|
+
...(options.entitlement || {}),
|
|
319
|
+
label: 'agent reward model report',
|
|
320
|
+
});
|
|
308
321
|
const tuples = episodes.map((episode) => episodeToRlTuple(episode, options));
|
|
309
322
|
const rewards = tuples.map((tuple) => tuple.reward.total);
|
|
310
323
|
const averageReward = rewards.length ? round(rewards.reduce((sum, value) => sum + value, 0) / rewards.length) : 0;
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
|
|
33
33
|
const fs = require('node:fs');
|
|
34
34
|
const path = require('node:path');
|
|
35
|
+
const { requireLearnedModelsEntitlement } = require('./entitlement');
|
|
35
36
|
|
|
36
37
|
// Baseline loss matrix. `default` applies when no tag-specific override
|
|
37
38
|
// matches. Higher = more expensive. The asymmetry below reflects the
|
|
@@ -181,7 +182,11 @@ function computeBayesPosterior({ tags, riskByTag, baseRate, modelProbability } =
|
|
|
181
182
|
*
|
|
182
183
|
* This reduces to the usual Bayes classifier when both costs are equal.
|
|
183
184
|
*/
|
|
184
|
-
function bayesOptimalDecision(posterior, tags, lossMatrix = DEFAULT_LOSS_MATRIX) {
|
|
185
|
+
function bayesOptimalDecision(posterior, tags, lossMatrix = DEFAULT_LOSS_MATRIX, options = {}) {
|
|
186
|
+
requireLearnedModelsEntitlement({
|
|
187
|
+
...(options.entitlement || {}),
|
|
188
|
+
label: 'Bayes-optimal gate decisioning',
|
|
189
|
+
});
|
|
185
190
|
const pHarmful = clip(Number(posterior?.pHarmful), 0, 1);
|
|
186
191
|
const pSafe = clip(Number(posterior?.pSafe ?? 1 - pHarmful), 0, 1);
|
|
187
192
|
const cFalseAllow = resolveCost(lossMatrix?.falseAllow || {}, tags);
|