thumbgate 1.27.17 → 1.27.18
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 +85 -0
- package/.claude-plugin/plugin.json +3 -4
- package/.well-known/llms.txt +12 -33
- package/.well-known/mcp/server-card.json +8 -8
- package/README.md +30 -221
- package/adapters/chatgpt/openapi.yaml +1695 -0
- package/adapters/claude/.mcp.json +2 -2
- package/adapters/gemini/function-declarations.json +0 -1
- package/adapters/mcp/server-stdio.js +11 -263
- package/adapters/opencode/opencode.json +1 -1
- package/bench/thumbgate-bench.json +2 -2
- package/bin/cli.js +122 -1421
- package/bin/postinstall.js +27 -11
- package/config/gate-templates.json +0 -216
- package/config/gates/claim-verification.json +0 -12
- package/config/gates/default.json +2 -31
- package/config/github-about.json +2 -2
- package/config/mcp-allowlists.json +13 -23
- package/config/merge-quality-checks.json +1 -0
- package/config/model-candidates.json +6 -121
- package/openapi/openapi.yaml +0 -12
- package/package.json +99 -229
- package/public/blog.html +4 -4
- package/public/codex-plugin.html +20 -72
- package/public/compare.html +8 -31
- package/public/dashboard.html +166 -930
- package/public/federal.html +2 -2
- package/public/guide.html +9 -33
- package/public/index.html +116 -495
- package/public/learn.html +18 -191
- package/public/lessons.html +10 -168
- package/public/numbers.html +7 -7
- package/public/pro.html +11 -34
- package/scripts/agent-memory-lifecycle.js +0 -211
- package/scripts/agent-readiness.js +3 -167
- package/scripts/agent-reward-model.js +1 -53
- package/scripts/auto-promote-gates.js +10 -82
- package/scripts/auto-wire-hooks.js +0 -14
- package/scripts/billing.js +1 -93
- package/scripts/build-metadata.js +10 -50
- package/scripts/cli-feedback.js +6 -18
- package/scripts/cli-schema.js +0 -90
- package/scripts/cli-telemetry.js +1 -6
- package/scripts/commercial-offer.js +2 -82
- package/scripts/context-manager.js +6 -74
- package/scripts/dashboard.js +2 -68
- package/scripts/durability/step.js +3 -3
- package/scripts/export-databricks-bundle.js +1 -5
- package/scripts/export-dpo-pairs.js +2 -7
- package/scripts/feedback-loop.js +1 -145
- package/scripts/feedback-quality.js +0 -87
- package/scripts/filesystem-search.js +10 -35
- package/scripts/gate-stats.js +0 -89
- package/scripts/gates-engine.js +85 -1105
- package/scripts/gemini-embedding-policy.js +1 -2
- package/scripts/hook-runtime.js +14 -20
- package/scripts/hook-thumbgate-cache-updater.js +2 -18
- package/scripts/hybrid-feedback-context.js +7 -142
- package/scripts/lesson-inference.js +3 -8
- package/scripts/lesson-search.js +1 -17
- package/scripts/license.js +1 -0
- package/scripts/llm-client.js +9 -390
- package/scripts/local-model-profile.js +8 -15
- package/scripts/memory-scope-readiness.js +0 -159
- package/scripts/meta-agent-loop.js +0 -36
- package/scripts/operational-integrity.js +5 -39
- package/scripts/oss-pr-opportunity-scout.js +5 -35
- package/scripts/plausible-server-events.js +6 -9
- package/scripts/pro-local-dashboard.js +4 -4
- package/scripts/proxy-pointer-rag-guardrails.js +1 -42
- package/scripts/rate-limiter.js +13 -64
- package/scripts/secret-scanner.js +5 -44
- package/scripts/security-scanner.js +10 -260
- package/scripts/self-distill-agent.js +1 -3
- package/scripts/seo-gsd.js +2 -916
- package/scripts/statusline-cache-path.js +2 -17
- package/scripts/statusline-local-stats.js +1 -9
- package/scripts/statusline-meta.js +2 -28
- package/scripts/statusline.sh +4 -20
- package/scripts/telemetry-analytics.js +0 -357
- package/scripts/thompson-sampling.js +10 -31
- package/scripts/thumbgate-bench.js +1 -16
- package/scripts/thumbgate-search.js +19 -85
- package/scripts/tool-registry.js +1 -169
- package/scripts/vector-store.js +0 -45
- package/scripts/workflow-sentinel.js +53 -286
- package/scripts/workspace-evolver.js +2 -62
- package/src/api/server.js +290 -2578
- package/.claude/commands/dashboard.md +0 -15
- package/.claude/commands/thumbgate-blocked.md +0 -27
- package/.claude/commands/thumbgate-dashboard.md +0 -15
- package/.claude/commands/thumbgate-doctor.md +0 -30
- package/.claude/commands/thumbgate-guard.md +0 -36
- package/.claude/commands/thumbgate-protect.md +0 -30
- package/.claude/commands/thumbgate-rules.md +0 -30
- package/.well-known/agentic-verify.txt +0 -1
- package/adapters/gcp/dfcx-webhook-gate.js +0 -295
- package/adapters/letta/README.md +0 -41
- package/adapters/letta/thumbgate-letta-adapter.js +0 -133
- package/adapters/policy-engine/ethicore-guardian-client.js +0 -68
- package/adapters/policy-engine/thumbgate-policy-engine-adapter.js +0 -260
- package/bench/observability-eval-suite.json +0 -26
- package/bin/dashboard-cli.js +0 -7
- package/commands/dashboard.md +0 -15
- package/commands/thumbgate-dashboard.md +0 -15
- package/config/builtin-lessons.json +0 -23
- package/config/gate-classifier-routing.json +0 -98
- package/config/post-deploy-marketing-pages.json +0 -61
- package/public/about.html +0 -162
- package/public/agent-manager.html +0 -179
- package/public/agents-cost-savings.html +0 -153
- package/public/ai-malpractice-prevention.html +0 -818
- package/public/assets/brand/github-social-preview.png +0 -0
- package/public/assets/brand/thumbgate-icon-512.png +0 -0
- package/public/assets/brand/thumbgate-icon-pro-512.png +0 -0
- package/public/assets/brand/thumbgate-icon-team-512.png +0 -0
- package/public/assets/brand/thumbgate-logo-1200x360.png +0 -0
- package/public/assets/brand/thumbgate-logo-transparent.svg +0 -22
- package/public/assets/brand/thumbgate-mark-inline-v3.svg +0 -19
- package/public/assets/brand/thumbgate-mark-pro.svg +0 -23
- package/public/assets/brand/thumbgate-mark-team.svg +0 -26
- package/public/assets/brand/thumbgate-mark.svg +0 -21
- package/public/assets/brand/thumbgate-wordmark.svg +0 -20
- package/public/assets/claude-thumbgate-statusbar.svg +0 -8
- package/public/assets/codex-thumbgate-statusbar-test.svg +0 -9
- package/public/assets/legal-intake-control-flow.svg +0 -66
- package/public/brand/thumbgate-mark.svg +0 -19
- package/public/brand/thumbgate-og.svg +0 -16
- package/public/chatgpt-app.html +0 -330
- package/public/codex-enterprise.html +0 -123
- package/public/js/buyer-intent.js +0 -672
- package/public/pricing.html +0 -399
- package/scripts/action-receipts.js +0 -324
- package/scripts/activation-quickstart.js +0 -187
- package/scripts/agent-operations-planner.js +0 -621
- package/scripts/ai-component-inventory.js +0 -367
- package/scripts/async-eval-observability.js +0 -236
- package/scripts/audit.js +0 -65
- package/scripts/aws-blocks-guardrails.js +0 -228
- package/scripts/classifier-routing.js +0 -130
- package/scripts/dashboard-chat.js +0 -332
- package/scripts/feedback-aggregate.js +0 -281
- package/scripts/feedback-sanitizer.js +0 -105
- package/scripts/hob-pack.js +0 -591
- package/scripts/hook-stop-anti-claim.js +0 -301
- package/scripts/install-shim.js +0 -87
- package/scripts/mcp-oauth.js +0 -293
- package/scripts/noop-detect.js +0 -285
- package/scripts/omlx-smoke.js +0 -192
- package/scripts/parallel-workflow-orchestrator.js +0 -293
- package/scripts/plan-gate.js +0 -243
- package/scripts/plausible-domain-config.js +0 -99
- package/scripts/qa-scenario-planner.js +0 -136
- package/scripts/repeat-metric.js +0 -137
- package/scripts/secret-fixture-tokens.js +0 -61
- package/scripts/secret-redaction.js +0 -166
- package/scripts/self-harness-optimizer.js +0 -141
- package/scripts/self-healing-check.js +0 -193
- package/scripts/silent-failure-cluster.js +0 -531
- package/scripts/statusline-cache-read.js +0 -57
- package/scripts/sync-telemetry-from-prod.js +0 -374
- package/scripts/tool-contract-validator.js +0 -76
- package/scripts/trajectory-scorer.js +0 -63
- package/scripts/verify-marketing-pages-deployed.js +0 -195
- package/scripts/visitor-journey.js +0 -172
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
const fs = require('node:fs');
|
|
3
|
-
const os = require('node:os');
|
|
4
|
-
const path = require('node:path');
|
|
5
|
-
const { spawnSync } = require('node:child_process');
|
|
6
|
-
const { diagnoseFailure } = require('./failure-diagnostics');
|
|
7
|
-
const { appendDiagnosticRecord } = require('./feedback-loop');
|
|
8
|
-
|
|
9
|
-
const PROJECT_ROOT = path.join(__dirname, '..');
|
|
10
|
-
const DEFAULT_MAX_BUFFER_BYTES = 64 * 1024 * 1024;
|
|
11
|
-
const DEFAULT_TESTS_TIMEOUT_MS = Number.parseInt(
|
|
12
|
-
process.env.THUMBGATE_SELF_HEAL_TEST_TIMEOUT_MS || '',
|
|
13
|
-
10,
|
|
14
|
-
) || 60 * 60_000;
|
|
15
|
-
|
|
16
|
-
const DEFAULT_CHECKS = [
|
|
17
|
-
{ name: 'budget_status', command: ['npm', 'run', 'budget:status'], timeoutMs: 60_000 },
|
|
18
|
-
{ name: 'tests', command: ['npm', 'test'], timeoutMs: DEFAULT_TESTS_TIMEOUT_MS },
|
|
19
|
-
{ name: 'prove_adapters', command: ['npm', 'run', 'prove:adapters'], timeoutMs: 10 * 60_000, useTempProofDir: true },
|
|
20
|
-
{ name: 'prove_automation', command: ['npm', 'run', 'prove:automation'], timeoutMs: 10 * 60_000, useTempProofDir: true },
|
|
21
|
-
{ name: 'prove_data_pipeline', command: ['npm', 'run', 'prove:data-pipeline'], timeoutMs: 10 * 60_000, useTempProofDir: true },
|
|
22
|
-
{ name: 'prove_tessl', command: ['npm', 'run', 'prove:tessl'], timeoutMs: 10 * 60_000, useTempProofDir: true },
|
|
23
|
-
];
|
|
24
|
-
|
|
25
|
-
function runCommand(command, {
|
|
26
|
-
cwd = PROJECT_ROOT,
|
|
27
|
-
timeoutMs = 5 * 60_000,
|
|
28
|
-
env = process.env,
|
|
29
|
-
maxBufferBytes = DEFAULT_MAX_BUFFER_BYTES,
|
|
30
|
-
} = {}) {
|
|
31
|
-
const [cmd, ...args] = command;
|
|
32
|
-
const started = Date.now();
|
|
33
|
-
const result = spawnSync(cmd, args, {
|
|
34
|
-
cwd,
|
|
35
|
-
env,
|
|
36
|
-
encoding: 'utf-8',
|
|
37
|
-
timeout: timeoutMs,
|
|
38
|
-
maxBuffer: maxBufferBytes,
|
|
39
|
-
shell: false,
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
const durationMs = Date.now() - started;
|
|
43
|
-
const status = Number.isInteger(result.status) ? result.status : 1;
|
|
44
|
-
return {
|
|
45
|
-
exitCode: status,
|
|
46
|
-
durationMs,
|
|
47
|
-
stdout: result.stdout || '',
|
|
48
|
-
stderr: result.stderr || '',
|
|
49
|
-
error: result.error ? result.error.message : null,
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
function createCheckEnvironment(check) {
|
|
54
|
-
const environment = { ...process.env };
|
|
55
|
-
let cleanup = null;
|
|
56
|
-
|
|
57
|
-
if (check.useTempProofDir) {
|
|
58
|
-
const proofDir = fs.mkdtempSync(path.join(os.tmpdir(), `thumbgate-${check.name}-`));
|
|
59
|
-
environment.THUMBGATE_PROOF_DIR = proofDir;
|
|
60
|
-
if (check.name === 'prove_automation') {
|
|
61
|
-
environment.THUMBGATE_AUTOMATION_PROOF_DIR = proofDir;
|
|
62
|
-
}
|
|
63
|
-
cleanup = () => {
|
|
64
|
-
fs.rmSync(proofDir, { recursive: true, force: true });
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
return { env: environment, cleanup };
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
function collectHealthReport({
|
|
72
|
-
checks = DEFAULT_CHECKS,
|
|
73
|
-
runner = runCommand,
|
|
74
|
-
cwd = PROJECT_ROOT,
|
|
75
|
-
persistDiagnostics = false,
|
|
76
|
-
} = {}) {
|
|
77
|
-
const startedAt = new Date();
|
|
78
|
-
const results = checks.map((check) => {
|
|
79
|
-
const { env, cleanup } = createCheckEnvironment(check);
|
|
80
|
-
let run;
|
|
81
|
-
try {
|
|
82
|
-
run = runner(check.command, { cwd, timeoutMs: check.timeoutMs, env });
|
|
83
|
-
} finally {
|
|
84
|
-
if (cleanup) {
|
|
85
|
-
cleanup();
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
const diagnosis = run.exitCode === 0
|
|
89
|
-
? null
|
|
90
|
-
: diagnoseFailure({
|
|
91
|
-
step: check.name,
|
|
92
|
-
context: check.command.join(' '),
|
|
93
|
-
healthCheck: {
|
|
94
|
-
name: check.name,
|
|
95
|
-
exitCode: run.exitCode,
|
|
96
|
-
status: 'unhealthy',
|
|
97
|
-
outputTail: `${run.stdout}\n${run.stderr}`.trim().slice(-2000),
|
|
98
|
-
},
|
|
99
|
-
exitCode: run.exitCode,
|
|
100
|
-
error: run.error,
|
|
101
|
-
output: `${run.stdout}\n${run.stderr}`.trim(),
|
|
102
|
-
});
|
|
103
|
-
const persistedDiagnosis = persistDiagnostics && diagnosis
|
|
104
|
-
? appendDiagnosticRecord({
|
|
105
|
-
source: 'self_heal_check',
|
|
106
|
-
step: check.name,
|
|
107
|
-
context: check.command.join(' '),
|
|
108
|
-
diagnosis,
|
|
109
|
-
metadata: {
|
|
110
|
-
command: check.command.join(' '),
|
|
111
|
-
},
|
|
112
|
-
})
|
|
113
|
-
: null;
|
|
114
|
-
return {
|
|
115
|
-
name: check.name,
|
|
116
|
-
command: check.command.join(' '),
|
|
117
|
-
status: run.exitCode === 0 ? 'healthy' : 'unhealthy',
|
|
118
|
-
exitCode: run.exitCode,
|
|
119
|
-
durationMs: run.durationMs,
|
|
120
|
-
error: run.error,
|
|
121
|
-
outputTail: `${run.stdout}\n${run.stderr}`.trim().slice(-2000),
|
|
122
|
-
diagnosis,
|
|
123
|
-
persistedDiagnosis,
|
|
124
|
-
};
|
|
125
|
-
});
|
|
126
|
-
|
|
127
|
-
const healthyCount = results.filter((x) => x.status === 'healthy').length;
|
|
128
|
-
const unhealthyCount = results.length - healthyCount;
|
|
129
|
-
|
|
130
|
-
return {
|
|
131
|
-
generatedAt: startedAt.toISOString(),
|
|
132
|
-
durationMs: Date.now() - startedAt.getTime(),
|
|
133
|
-
overall_status: unhealthyCount === 0 ? 'healthy' : 'unhealthy',
|
|
134
|
-
summary: {
|
|
135
|
-
total: results.length,
|
|
136
|
-
healthy: healthyCount,
|
|
137
|
-
unhealthy: unhealthyCount,
|
|
138
|
-
},
|
|
139
|
-
checks: results,
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
function reportToText(report) {
|
|
144
|
-
const lines = [];
|
|
145
|
-
lines.push(`Self-Healing Health Check @ ${report.generatedAt}`);
|
|
146
|
-
lines.push(`Overall: ${report.overall_status.toUpperCase()}`);
|
|
147
|
-
lines.push(`Checks: ${report.summary.healthy}/${report.summary.total} healthy`);
|
|
148
|
-
lines.push('');
|
|
149
|
-
|
|
150
|
-
report.checks.forEach((check) => {
|
|
151
|
-
const icon = check.status === 'healthy' ? '✅' : '❌';
|
|
152
|
-
lines.push(`${icon} ${check.name} (${check.durationMs}ms)`);
|
|
153
|
-
if (check.status !== 'healthy') {
|
|
154
|
-
lines.push(` command: ${check.command}`);
|
|
155
|
-
if (check.error) lines.push(` error: ${check.error}`);
|
|
156
|
-
if (check.diagnosis && check.diagnosis.rootCauseCategory) {
|
|
157
|
-
lines.push(` diagnosis: ${check.diagnosis.rootCauseCategory}`);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
});
|
|
161
|
-
|
|
162
|
-
return `${lines.join('\n')}\n`;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
function runCli() {
|
|
166
|
-
const args = new Set(process.argv.slice(2));
|
|
167
|
-
const emitJson = args.has('--json');
|
|
168
|
-
const noFail = args.has('--no-fail');
|
|
169
|
-
const report = collectHealthReport({ persistDiagnostics: true });
|
|
170
|
-
|
|
171
|
-
if (emitJson) {
|
|
172
|
-
console.log(JSON.stringify(report, null, 2));
|
|
173
|
-
} else {
|
|
174
|
-
process.stdout.write(reportToText(report));
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
if (!noFail && report.overall_status !== 'healthy') {
|
|
178
|
-
process.exit(1);
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
module.exports = {
|
|
183
|
-
DEFAULT_CHECKS,
|
|
184
|
-
DEFAULT_TESTS_TIMEOUT_MS,
|
|
185
|
-
DEFAULT_MAX_BUFFER_BYTES,
|
|
186
|
-
runCommand,
|
|
187
|
-
collectHealthReport,
|
|
188
|
-
reportToText,
|
|
189
|
-
};
|
|
190
|
-
|
|
191
|
-
if (require.main === module) {
|
|
192
|
-
runCli();
|
|
193
|
-
}
|