thumbgate 1.27.17 → 1.27.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.
Files changed (107) hide show
  1. package/.claude-plugin/marketplace.json +85 -0
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.well-known/mcp/server-card.json +1 -1
  4. package/README.md +33 -5
  5. package/adapters/chatgpt/openapi.yaml +1707 -0
  6. package/adapters/claude/.mcp.json +2 -2
  7. package/adapters/codex/config.toml +2 -2
  8. package/adapters/mcp/server-stdio.js +1 -1
  9. package/adapters/opencode/opencode.json +1 -1
  10. package/bin/cli.js +63 -54
  11. package/bin/postinstall.js +23 -14
  12. package/config/post-deploy-marketing-pages.json +19 -0
  13. package/config/tessl-tiles.json +1 -3
  14. package/package.json +99 -229
  15. package/public/guide.html +0 -4
  16. package/public/index.html +28 -49
  17. package/public/learn.html +0 -8
  18. package/public/numbers.html +2 -2
  19. package/scripts/agent-readiness.js +0 -147
  20. package/scripts/bot-detection.js +61 -3
  21. package/scripts/cli-feedback.js +4 -14
  22. package/scripts/cli-schema.js +7 -0
  23. package/scripts/durability/step.js +3 -3
  24. package/scripts/feedback-loop.js +10 -32
  25. package/scripts/gates-engine.js +72 -1
  26. package/scripts/hook-runtime.js +2 -2
  27. package/scripts/license.js +10 -9
  28. package/scripts/llm-client.js +44 -260
  29. package/scripts/mcp-config.js +7 -1
  30. package/scripts/published-cli.js +0 -8
  31. package/scripts/seo-gsd.js +0 -5
  32. package/src/api/server.js +111 -35
  33. package/.claude/commands/dashboard.md +0 -15
  34. package/.claude/commands/thumbgate-blocked.md +0 -27
  35. package/.claude/commands/thumbgate-dashboard.md +0 -15
  36. package/.claude/commands/thumbgate-doctor.md +0 -30
  37. package/.claude/commands/thumbgate-guard.md +0 -36
  38. package/.claude/commands/thumbgate-protect.md +0 -30
  39. package/.claude/commands/thumbgate-rules.md +0 -30
  40. package/adapters/gcp/dfcx-webhook-gate.js +0 -295
  41. package/adapters/letta/README.md +0 -41
  42. package/adapters/letta/thumbgate-letta-adapter.js +0 -133
  43. package/adapters/policy-engine/ethicore-guardian-client.js +0 -68
  44. package/adapters/policy-engine/thumbgate-policy-engine-adapter.js +0 -260
  45. package/bench/observability-eval-suite.json +0 -26
  46. package/bin/dashboard-cli.js +0 -7
  47. package/commands/dashboard.md +0 -15
  48. package/commands/thumbgate-dashboard.md +0 -15
  49. package/config/builtin-lessons.json +0 -23
  50. package/public/about.html +0 -162
  51. package/public/agent-manager.html +0 -179
  52. package/public/agents-cost-savings.html +0 -153
  53. package/public/ai-malpractice-prevention.html +0 -818
  54. package/public/assets/brand/github-social-preview.png +0 -0
  55. package/public/assets/brand/thumbgate-icon-512.png +0 -0
  56. package/public/assets/brand/thumbgate-icon-pro-512.png +0 -0
  57. package/public/assets/brand/thumbgate-icon-team-512.png +0 -0
  58. package/public/assets/brand/thumbgate-logo-1200x360.png +0 -0
  59. package/public/assets/brand/thumbgate-logo-transparent.svg +0 -22
  60. package/public/assets/brand/thumbgate-mark-inline-v3.svg +0 -19
  61. package/public/assets/brand/thumbgate-mark-pro.svg +0 -23
  62. package/public/assets/brand/thumbgate-mark-team.svg +0 -26
  63. package/public/assets/brand/thumbgate-mark.svg +0 -21
  64. package/public/assets/brand/thumbgate-wordmark.svg +0 -20
  65. package/public/assets/claude-thumbgate-statusbar.svg +0 -8
  66. package/public/assets/codex-thumbgate-statusbar-test.svg +0 -9
  67. package/public/assets/legal-intake-control-flow.svg +0 -66
  68. package/public/brand/thumbgate-mark.svg +0 -19
  69. package/public/brand/thumbgate-og.svg +0 -16
  70. package/public/chatgpt-app.html +0 -330
  71. package/public/codex-enterprise.html +0 -123
  72. package/public/js/buyer-intent.js +0 -672
  73. package/public/pricing.html +0 -399
  74. package/scripts/action-receipts.js +0 -324
  75. package/scripts/activation-quickstart.js +0 -187
  76. package/scripts/agent-operations-planner.js +0 -621
  77. package/scripts/ai-component-inventory.js +0 -367
  78. package/scripts/async-eval-observability.js +0 -236
  79. package/scripts/audit.js +0 -65
  80. package/scripts/aws-blocks-guardrails.js +0 -228
  81. package/scripts/bot-detector.js +0 -50
  82. package/scripts/classifier-routing.js +0 -130
  83. package/scripts/dashboard-chat.js +0 -332
  84. package/scripts/feedback-aggregate.js +0 -281
  85. package/scripts/feedback-sanitizer.js +0 -105
  86. package/scripts/hob-pack.js +0 -591
  87. package/scripts/hook-stop-anti-claim.js +0 -301
  88. package/scripts/install-shim.js +0 -87
  89. package/scripts/mcp-oauth.js +0 -293
  90. package/scripts/noop-detect.js +0 -285
  91. package/scripts/omlx-smoke.js +0 -192
  92. package/scripts/parallel-workflow-orchestrator.js +0 -293
  93. package/scripts/plan-gate.js +0 -243
  94. package/scripts/plausible-domain-config.js +0 -99
  95. package/scripts/qa-scenario-planner.js +0 -136
  96. package/scripts/repeat-metric.js +0 -137
  97. package/scripts/secret-fixture-tokens.js +0 -61
  98. package/scripts/secret-redaction.js +0 -166
  99. package/scripts/self-harness-optimizer.js +0 -141
  100. package/scripts/self-healing-check.js +0 -193
  101. package/scripts/silent-failure-cluster.js +0 -531
  102. package/scripts/statusline-cache-read.js +0 -57
  103. package/scripts/sync-telemetry-from-prod.js +0 -374
  104. package/scripts/tool-contract-validator.js +0 -76
  105. package/scripts/trajectory-scorer.js +0 -63
  106. package/scripts/verify-marketing-pages-deployed.js +0 -195
  107. 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
- }