thumbgate 1.35.0 → 1.37.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.
Files changed (196) hide show
  1. package/.agents/skills/cyberstrike-compare-not-clone/SKILL.md +36 -0
  2. package/.agents/skills/gitlab-sandbox-allowlist-not-trust/SKILL.md +77 -0
  3. package/.agents/skills/jit-harness-compare-not-clone/SKILL.md +34 -0
  4. package/.agents/skills/openui-catalog-compose-honesty/SKILL.md +64 -0
  5. package/.agents/skills/zvec-grep-compare-not-clone/SKILL.md +34 -0
  6. package/.claude-plugin/plugin.json +1 -1
  7. package/.well-known/llms.txt +1 -0
  8. package/.well-known/mcp/server-card.json +1 -1
  9. package/CONTRIBUTING.md +95 -0
  10. package/README.md +195 -632
  11. package/THIRD_PARTY_NOTICES.md +89 -0
  12. package/adapters/claude/.mcp.json +2 -2
  13. package/adapters/forge/forge.yaml +3 -3
  14. package/adapters/future-agi/.mcp.json +8 -0
  15. package/adapters/future-agi/FUTURE_AGI.md +23 -0
  16. package/adapters/future-agi/config.toml +3 -0
  17. package/adapters/future-agi/future-agi-bridge.js +9 -0
  18. package/adapters/future-agi/opencode.json +8 -0
  19. package/adapters/herdr/herdr-plugin.toml +18 -0
  20. package/adapters/mcp/server-stdio.js +238 -25
  21. package/adapters/opencode/opencode.json +1 -1
  22. package/adapters/workos/WORKOS.md +52 -0
  23. package/bin/cli.js +336 -3
  24. package/bin/futureagi-bridge +9 -0
  25. package/config/gate-templates.json +581 -4
  26. package/config/gates/actor-critic-audit.json +34 -0
  27. package/config/gates/default.json +9 -3
  28. package/config/gates/five-walls-governance.json +34 -0
  29. package/config/gates/future-agi-guardrails.json +34 -0
  30. package/config/gates/radware-threat-defense-2026.json +61 -0
  31. package/config/gates/simatree-data-governance.json +33 -0
  32. package/config/mcp-allowlists.json +4 -0
  33. package/config/merge-quality-checks.json +6 -0
  34. package/config/model-candidates.json +312 -29
  35. package/config/model-tiers.json +18 -0
  36. package/config/post-deploy-marketing-pages.json +10 -0
  37. package/config/progressive/01-wire-only.json +11 -0
  38. package/config/progressive/02-dashboard-empty-ok.json +10 -0
  39. package/config/progressive/03-one-lesson.json +10 -0
  40. package/config/progressive/04-warn-fires.json +11 -0
  41. package/config/progressive/05-strict-optional.json +11 -0
  42. package/config/progressive/README.md +15 -0
  43. package/config/schemas/broker-execution-receipt.schema.json +139 -0
  44. package/config/schemas/provider-execution-attestation-v1.schema.json +58 -0
  45. package/conformance/provider-attestation/vectors.json +320 -0
  46. package/docs/specs/provider-execution-attestation-v1.md +69 -0
  47. package/openapi/openapi.yaml +15 -0
  48. package/package.json +390 -148
  49. package/public/about.html +2 -2
  50. package/public/ai-malpractice-prevention.html +7 -7
  51. package/public/blog/a-10-dollar-vps-is-not-a-computer.html +143 -0
  52. package/public/blog/a-receipt-is-not-world-state.html +388 -0
  53. package/public/blog/git-at-agent-scale.html +374 -0
  54. package/public/blog/no-llm-in-the-gate.html +133 -0
  55. package/public/blog.html +80 -0
  56. package/public/case-studies.html +16 -1
  57. package/public/compare.html +28 -0
  58. package/public/diagnostic.html +216 -7
  59. package/public/docs/connectors.html +39 -0
  60. package/public/federal.html +2 -2
  61. package/public/founders.html +639 -0
  62. package/public/index.html +87 -9
  63. package/public/install.html +8 -8
  64. package/public/learn.html +39 -0
  65. package/public/numbers.html +2 -2
  66. package/public/peter.html +310 -0
  67. package/public/platform-partners.html +119 -0
  68. package/public/pricing.html +24 -3
  69. package/public/privacy.html +117 -0
  70. package/public/pro.html +17 -0
  71. package/public/support.html +62 -0
  72. package/public/terms.html +130 -0
  73. package/public/third-party-notices.html +95 -0
  74. package/public/yt.html +351 -0
  75. package/scripts/action-receipts.js +133 -3
  76. package/scripts/adaptive-governance-arena.js +349 -0
  77. package/scripts/admin-override.js +205 -0
  78. package/scripts/agent-action-inventory.js +869 -0
  79. package/scripts/agent-audit-trace.js +42 -2
  80. package/scripts/agent-egress-policy.js +1117 -0
  81. package/scripts/agent-memory-lifecycle.js +141 -2
  82. package/scripts/agent-operations-planner.js +441 -1
  83. package/scripts/agent-readiness.js +68 -0
  84. package/scripts/agent-security-central.js +647 -0
  85. package/scripts/allowlist-bridge-honesty.js +417 -0
  86. package/scripts/async-job-runner.js +102 -11
  87. package/scripts/audit-trail.js +212 -0
  88. package/scripts/billing.js +1 -1
  89. package/scripts/broker-execution-receipts.js +719 -0
  90. package/scripts/budget-aware-gates-proof.js +423 -0
  91. package/scripts/claude-feedback-sync.js +29 -3
  92. package/scripts/claw-harness-production.js +237 -0
  93. package/scripts/cli-schema.js +163 -1
  94. package/scripts/codex-runbook-flywheel.js +318 -0
  95. package/scripts/context-footprint.js +186 -0
  96. package/scripts/contextfs.js +143 -61
  97. package/scripts/dashboard.js +251 -32
  98. package/scripts/deepseek-v4-runtime-guardrails.js +72 -6
  99. package/scripts/docker-sandbox-planner.js +18 -0
  100. package/scripts/double-blind-eval-protocol.js +252 -0
  101. package/scripts/edotenv-rl-gateway.js +259 -0
  102. package/scripts/ensure-production-search-corpus.js +162 -0
  103. package/scripts/eval-holdout.js +311 -0
  104. package/scripts/feedback-aggregate.js +21 -2
  105. package/scripts/feedback-loop.js +87 -5
  106. package/scripts/feedback-quality.js +9 -0
  107. package/scripts/file-ledger-lock.js +4 -1
  108. package/scripts/financial-control-plane.js +41 -1
  109. package/scripts/find-dormant-requires.js +118 -0
  110. package/scripts/fs-utils.js +84 -8
  111. package/scripts/gates-engine.js +810 -63
  112. package/scripts/generate-case-study-outreach.js +24 -15
  113. package/scripts/git-at-scale.js +628 -0
  114. package/scripts/governance-conflict-audit.js +1650 -0
  115. package/scripts/governance-difficulty-curriculum.js +328 -0
  116. package/scripts/graphrag-retrieval.js +275 -0
  117. package/scripts/gurobi-optimizer.js +324 -0
  118. package/scripts/gurobi_optimizer.py +485 -0
  119. package/scripts/harness-selector.js +82 -1
  120. package/scripts/hidden-entry-points.js +284 -0
  121. package/scripts/human-escalation.js +199 -1
  122. package/scripts/hybrid-feedback-context.js +152 -19
  123. package/scripts/intent-governed-execution.js +602 -0
  124. package/scripts/intervention-policy.js +123 -20
  125. package/scripts/jit-harness-compose.js +628 -0
  126. package/scripts/jsonl-watcher.js +10 -0
  127. package/scripts/lesson-embedding-index.js +95 -12
  128. package/scripts/lesson-retrieval.js +105 -19
  129. package/scripts/local-model-profile.js +19 -2
  130. package/scripts/mailer/resend-mailer.js +1 -1
  131. package/scripts/matryoshka-embedding.js +235 -0
  132. package/scripts/mcp-oauth.js +42 -4
  133. package/scripts/mcp-session-handles.js +1016 -0
  134. package/scripts/mcp-wiring-doctor.js +314 -0
  135. package/scripts/memory-firewall.js +115 -2
  136. package/scripts/memory-scope-readiness.js +299 -0
  137. package/scripts/memory-vs-rag-route.js +161 -0
  138. package/scripts/model-tier-router.js +148 -21
  139. package/scripts/nvidia-specdecode-al-doctor.js +536 -0
  140. package/scripts/openui-catalog-compose-honesty.js +593 -0
  141. package/scripts/operational-integrity.js +19 -1
  142. package/scripts/override-audit.js +213 -0
  143. package/scripts/package-manager-honesty-doctor.js +458 -0
  144. package/scripts/pr-manager.js +63 -1
  145. package/scripts/prove-herdr-adapter.js +52 -0
  146. package/scripts/prove-memory-pyramid-and-symbolic-canvas.js +95 -0
  147. package/scripts/prove-workos.js +73 -0
  148. package/scripts/provider-attestation-conformance.js +192 -0
  149. package/scripts/provider-receipt-contract.js +136 -0
  150. package/scripts/qwen38-max-cost-optimizer.js +401 -0
  151. package/scripts/radware-threat-defense.js +280 -0
  152. package/scripts/rag-embedding-identity.js +221 -0
  153. package/scripts/rag-precision-guardrails.js +112 -2
  154. package/scripts/remote-feedback-capture.js +159 -0
  155. package/scripts/research-agent-harness.js +256 -0
  156. package/scripts/rsi-safety-hillclimb.js +200 -0
  157. package/scripts/rule-sprawl.js +188 -0
  158. package/scripts/schedule-manager.js +147 -0
  159. package/scripts/self-heal.js +8 -0
  160. package/scripts/session-lease.js +415 -0
  161. package/scripts/simatree-data-governance.js +347 -0
  162. package/scripts/slo-alert-engine.js +172 -7
  163. package/scripts/solver-parity.js +539 -0
  164. package/scripts/stealth-memory-injection-gate.js +333 -0
  165. package/scripts/switchyard-router.js +366 -0
  166. package/scripts/telemetry-analytics.js +84 -27
  167. package/scripts/temporal-decay-weighting.js +138 -0
  168. package/scripts/test-all.js +165 -0
  169. package/scripts/token-savings.js +42 -0
  170. package/scripts/tool-kpi-tracker.js +108 -5
  171. package/scripts/tool-registry.js +193 -5
  172. package/scripts/universal-claim-evaluator.js +14 -2
  173. package/scripts/vector-store.js +279 -9
  174. package/scripts/workflow-notebook.js +391 -0
  175. package/scripts/workflow-sentinel.js +111 -12
  176. package/scripts/workos-production-guard.js +260 -0
  177. package/scripts/workspace-search-route.js +515 -0
  178. package/server.json +2 -2
  179. package/src/agent-identity-boundary.js +76 -0
  180. package/src/agent-retrieval-cache.js +155 -0
  181. package/src/alert-noise-ledger.js +502 -0
  182. package/src/api/server.js +724 -153
  183. package/src/git-fast-cache.js +220 -0
  184. package/src/git-wal-sync.js +156 -0
  185. package/src/hash-anchored-edit.js +82 -0
  186. package/src/hermes-platform-protocol.js +475 -0
  187. package/src/hermes-sync-plane.js +241 -0
  188. package/src/index.js +30 -1
  189. package/src/iso42001-compliance-guard.js +97 -0
  190. package/src/latency-budget.js +244 -0
  191. package/src/mcp-writeguard.js +316 -0
  192. package/src/miminions-adapter.js +106 -0
  193. package/src/pipeline-compass.js +104 -0
  194. package/src/ppl-alert-pipeline.js +284 -0
  195. package/src/rendezvous-router.js +90 -0
  196. package/src/security-questionnaire.js +195 -0
@@ -0,0 +1,52 @@
1
+ # WorkOS + ThumbGate (identity vs pre-action gates)
2
+
3
+ ## Split of responsibility
4
+
5
+ | Concern | WorkOS AuthKit / MCP Auth | ThumbGate |
6
+ |---------|---------------------------|-----------|
7
+ | Who is the user/org? | SSO, social login, orgs, SCIM (paid) | — |
8
+ | OAuth for MCP servers | AuthKit as OAuth 2.1 AS; scopes → RBAC | Remote MCP OAuth 2.1 PKCE (`scripts/mcp-oauth.js`) |
9
+ | What may this tool call do *now*? | Scope admission only | Pre-action gates, lessons, prevention rules |
10
+ | Agent skill install / auth scaffold | WorkOS CLI / widget skills | Gate: `review-workos-skill-and-auth-installer-actions` |
11
+
12
+ **One line for buyers:** WorkOS (or any IdP) decides *who* the agent is. ThumbGate decides *which tool calls may run*.
13
+
14
+ ## ThumbGate production policy ($10/mo)
15
+
16
+ Public `thumbgate.app` auth uses **WorkOS Production AuthKit only**:
17
+
18
+ - AuthKit host: `progressive-mouse-13.authkit.app`
19
+ - Production client id: `client_01KY0306CYDV6QSXE43QKM2ZXW`
20
+ - Allowed under cap: email + password, **own** social OAuth apps (Google free under AuthKit MAU tier)
21
+ - **Forbidden without budget rewrite:** custom AuthKit domain (~$99/mo), enterprise SSO/SAML connections (~$125/conn), Directory Sync, public traffic on staging AuthKit
22
+
23
+ Guard (secret-free):
24
+
25
+ ```bash
26
+ node scripts/workos-production-guard.js --json
27
+ npm run prove:workos
28
+ ```
29
+
30
+ ## MCP OAuth scopes (hierarchy)
31
+
32
+ ThumbGate remote MCP supports:
33
+
34
+ | Scope | Allows |
35
+ |-------|--------|
36
+ | `mcp:read` | Tools with `readOnlyHint: true` |
37
+ | `mcp:gates` | Gate-evaluation tools (+ read) |
38
+ | `mcp:feedback` | Feedback capture tools (+ read) |
39
+ | `mcp:write` | Mutating tools **and** everything above |
40
+
41
+ `mcp:write` **implies** read/gates/feedback so operator tokens are not fail-closed on read-only tools (WorkOS-style role implication).
42
+
43
+ ## Complementary, not competitive
44
+
45
+ Do not pitch ThumbGate as “WorkOS for agents.” Pitch as the **runtime prevention layer after identity** — the same gap as claw-style enterprise agents and GDG “dark agent” demos (poisoned specs, secret egress, destructive tool use).
46
+
47
+ ## Related
48
+
49
+ - `scripts/workos-production-guard.js`
50
+ - `scripts/mcp-oauth.js`
51
+ - `scripts/prove-workos.js`
52
+ - Gate category: **Enterprise Identity & MCP Auth Governance** in `config/gate-templates.json`
package/bin/cli.js CHANGED
@@ -2627,6 +2627,156 @@ function deepseekV4RuntimeGuardrails() {
2627
2627
  process.stdout.write(formatDeepSeekV4RuntimeGuardrailsPlan(report));
2628
2628
  }
2629
2629
 
2630
+ function nvidiaSpecDecodeAlDoctor() {
2631
+ const args = parseArgs(process.argv.slice(3));
2632
+ const {
2633
+ buildNvidiaSpecDecodeAlDoctorReport,
2634
+ formatNvidiaSpecDecodeAlDoctorReport,
2635
+ } = require(path.join(PKG_ROOT, 'scripts', 'nvidia-specdecode-al-doctor'));
2636
+ const report = buildNvidiaSpecDecodeAlDoctorReport(args);
2637
+
2638
+ if (args.json) {
2639
+ console.log(JSON.stringify(report, null, 2));
2640
+ } else {
2641
+ process.stdout.write(formatNvidiaSpecDecodeAlDoctorReport(report));
2642
+ }
2643
+
2644
+ if (args.strict && report.status !== 'ready') {
2645
+ process.exitCode = 1;
2646
+ return;
2647
+ }
2648
+ if (report.status === 'fail') process.exitCode = 1;
2649
+ }
2650
+
2651
+
2652
+
2653
+ function intentGovernedExecution() {
2654
+ const args = parseArgs(process.argv.slice(3));
2655
+ const {
2656
+ buildIntentGovernedExecutionReport,
2657
+ formatIntentGovernedExecutionReport,
2658
+ } = require(path.join(PKG_ROOT, 'scripts', 'intent-governed-execution'));
2659
+ const report = buildIntentGovernedExecutionReport(args);
2660
+
2661
+ if (args.json) {
2662
+ console.log(JSON.stringify(report, null, 2));
2663
+ } else {
2664
+ process.stdout.write(formatIntentGovernedExecutionReport(report));
2665
+ }
2666
+
2667
+ if (args.strict && report.status !== 'ready') {
2668
+ process.exitCode = 1;
2669
+ return;
2670
+ }
2671
+ if (report.status === 'fail') process.exitCode = 1;
2672
+ }
2673
+
2674
+ function jitHarnessCompose() {
2675
+ const args = parseArgs(process.argv.slice(3));
2676
+ const {
2677
+ buildJitHarnessComposeReport,
2678
+ formatJitHarnessComposeReport,
2679
+ } = require(path.join(PKG_ROOT, 'scripts', 'jit-harness-compose'));
2680
+ const report = buildJitHarnessComposeReport(args);
2681
+
2682
+ if (args.json) {
2683
+ console.log(JSON.stringify(report, null, 2));
2684
+ } else {
2685
+ process.stdout.write(formatJitHarnessComposeReport(report));
2686
+ }
2687
+
2688
+ if (args.strict && report.status !== 'ready') {
2689
+ process.exitCode = 1;
2690
+ return;
2691
+ }
2692
+ if (report.status === 'fail') process.exitCode = 1;
2693
+ }
2694
+
2695
+ function allowlistBridgeHonestyDoctor() {
2696
+ const args = parseArgs(process.argv.slice(3));
2697
+ const {
2698
+ buildAllowlistBridgeHonestyReport,
2699
+ formatAllowlistBridgeHonestyReport,
2700
+ } = require(path.join(PKG_ROOT, 'scripts', 'allowlist-bridge-honesty'));
2701
+ const report = buildAllowlistBridgeHonestyReport(args);
2702
+
2703
+ if (args.json) {
2704
+ console.log(JSON.stringify(report, null, 2));
2705
+ } else {
2706
+ process.stdout.write(formatAllowlistBridgeHonestyReport(report));
2707
+ }
2708
+
2709
+ if (args.strict && report.status !== 'ready') {
2710
+ process.exitCode = 1;
2711
+ return;
2712
+ }
2713
+ if (report.status === 'fail') process.exitCode = 1;
2714
+ }
2715
+
2716
+ function packageManagerHonestyDoctor() {
2717
+ const args = parseArgs(process.argv.slice(3));
2718
+ const {
2719
+ buildPackageManagerHonestyReport,
2720
+ formatPackageManagerHonestyReport,
2721
+ } = require(path.join(PKG_ROOT, 'scripts', 'package-manager-honesty-doctor'));
2722
+ const report = buildPackageManagerHonestyReport(args);
2723
+
2724
+ if (args.json) {
2725
+ console.log(JSON.stringify(report, null, 2));
2726
+ } else {
2727
+ process.stdout.write(formatPackageManagerHonestyReport(report));
2728
+ }
2729
+
2730
+ if (args.strict && report.status !== 'ready') {
2731
+ process.exitCode = 1;
2732
+ return;
2733
+ }
2734
+ if (report.status === 'fail') process.exitCode = 1;
2735
+ }
2736
+
2737
+ function openuiCatalogComposeHonestyDoctor() {
2738
+ const args = parseArgs(process.argv.slice(3));
2739
+ const {
2740
+ buildOpenuiCatalogComposeHonestyReport,
2741
+ formatOpenuiCatalogComposeHonestyReport,
2742
+ } = require(path.join(PKG_ROOT, 'scripts', 'openui-catalog-compose-honesty'));
2743
+ const report = buildOpenuiCatalogComposeHonestyReport(args);
2744
+
2745
+ if (args.json) {
2746
+ console.log(JSON.stringify(report, null, 2));
2747
+ } else {
2748
+ process.stdout.write(formatOpenuiCatalogComposeHonestyReport(report));
2749
+ }
2750
+
2751
+ if (args.strict && report.status !== 'ready') {
2752
+ process.exitCode = 1;
2753
+ return;
2754
+ }
2755
+ if (report.status === 'fail') process.exitCode = 1;
2756
+ }
2757
+
2758
+
2759
+ async function workspaceSearchRoute() {
2760
+ const args = parseArgs(process.argv.slice(3));
2761
+ const {
2762
+ buildWorkspaceSearchRouteReport,
2763
+ formatWorkspaceSearchRouteReport,
2764
+ } = require(path.join(PKG_ROOT, 'scripts', 'workspace-search-route'));
2765
+ const report = await buildWorkspaceSearchRouteReport(args);
2766
+
2767
+ if (args.json) {
2768
+ console.log(JSON.stringify(report, null, 2));
2769
+ } else {
2770
+ process.stdout.write(formatWorkspaceSearchRouteReport(report));
2771
+ }
2772
+
2773
+ if (args.strict && report.status !== 'ready') {
2774
+ process.exitCode = 1;
2775
+ return;
2776
+ }
2777
+ if (report.status === 'fail') process.exitCode = 1;
2778
+ }
2779
+
2630
2780
  function upstreamContributions() {
2631
2781
  const args = parseArgs(process.argv.slice(3));
2632
2782
  const {
@@ -3012,6 +3162,24 @@ function sessionStart() {
3012
3162
  }
3013
3163
  } catch (_) { /* non-critical */ }
3014
3164
 
3165
+ // MCP + lessons-store wiring — make unattended RAG-loop gaps loud at boot
3166
+ try {
3167
+ const { wiringReport } = require(path.join(PKG_ROOT, 'scripts', 'mcp-wiring-doctor'));
3168
+ const wiring = wiringReport(CWD);
3169
+ if (wiring && wiring.overall !== 'ok') {
3170
+ if (reminderLines.length > 0) reminderLines.push('');
3171
+ reminderLines.push(`ThumbGate RAG wiring: ${wiring.overall.toUpperCase()}`);
3172
+ reminderLines.push(
3173
+ wiring.unattendedCaptureReady
3174
+ ? ' Capture path available (local and/or hosted).'
3175
+ : ' Capture path BROKEN for unattended runs — wire .mcp.json thumbgate server and set THUMBGATE_FEEDBACK_DIR or THUMBGATE_API_BASE_URL+THUMBGATE_API_KEY.'
3176
+ );
3177
+ (wiring.findings || []).slice(0, 4).forEach((finding) => {
3178
+ reminderLines.push(` - ${finding}`);
3179
+ });
3180
+ }
3181
+ } catch (_) { /* non-critical */ }
3182
+
3015
3183
  // Top high-risk tags — force agent to see them at session start, not opt-in
3016
3184
  try {
3017
3185
  const { getRiskSummary } = require(path.join(PKG_ROOT, 'scripts', 'risk-scorer'));
@@ -3305,6 +3473,8 @@ function help() {
3305
3473
  console.log(' ai-inventory Scan AI/ML components and export ML-BOM evidence');
3306
3474
  console.log(' verify-claims --claim="..." Recheck factual claims against configured sources');
3307
3475
  console.log(' doctor Audit runtime isolation + bootstrap context');
3476
+ console.log(' compass 6-axis pipeline: wire, lessons, rules, eval');
3477
+ console.log(' security-central Free Agent Security Central posture report');
3308
3478
  console.log(' break-glass --reason="..." Short TTL recovery if gates over-fire');
3309
3479
  console.log(' brain [--write] Build the agent-readable context brain (lessons + rules + gates)');
3310
3480
  console.log(' pro ThumbGate Pro (dashboard, exports, sync)');
@@ -3372,6 +3542,7 @@ function help() {
3372
3542
  console.log(' eval Turn feedback into reusable prompt/workflow eval proof');
3373
3543
  console.log(' optimize [PRO] Prune CLAUDE.md and migrate rules to Pre-Action Checks');
3374
3544
  console.log(' prove [--target=X] Run proof harness (adapters|automation|...)');
3545
+ console.log(' compass 6-axis pipeline check (wire → lessons → rules → eval)');
3375
3546
  console.log(' watch Watch .thumbgate/ for external signals');
3376
3547
  console.log(' status Approval trend + failure domain dashboard');
3377
3548
  console.log(' funnel Marketing and revenue conversion funnel analytics');
@@ -3386,8 +3557,17 @@ function help() {
3386
3557
  console.log(' long-running-agent-context-guardrails Map structured-memory gaps to long-running agent gates');
3387
3558
  console.log(' reasoning-efficiency-guardrails Map reasoning compression signals to efficiency gates');
3388
3559
  console.log(' deepseek-v4-runtime-guardrails Map sparse-attention runtime signals to safety gates');
3560
+ console.log(' nvidia-specdecode-al-doctor Check speculative AL/D evidence vs AL/(1+ρD) speedup math');
3561
+ console.log(' package-manager-honesty-doctor Audit lockfile/CI parity; fail-closed manager switches');
3562
+ console.log(' openui-catalog-compose-honesty Catalog-compose-only + repair-before-claim (OpenUI FORMAT)');
3563
+ console.log(' allowlist-bridge-honesty Audit allowlisted registries/proxies as hops, not trust boundaries');
3564
+ console.log(' jit-harness-compose Compose memory/planning/action/capability onto existing rails (JIT FORMAT)');
3565
+ console.log(' workspace-search-route Route query to rg/fts/vector/hybrid/graph (zg FORMAT)');
3566
+ console.log(' intent-governed-execution NL intent → classify/authorize/gate/HITL/evidence (CyberStrike FORMAT)');
3389
3567
  console.log(' background-governance Background-agent run report and dispatch risk check');
3390
3568
  console.log(' analytics Unified analytics snapshot (npm, GitHub, landing)');
3569
+ console.log(' inventory Agent action inventory: tool calls, gate denies, false-deny rate');
3570
+ console.log(' conflict-audit Find controls that report success but enforce nothing');
3391
3571
  console.log(' start-api Start the ThumbGate HTTPS API server');
3392
3572
  console.log('');
3393
3573
 
@@ -3420,6 +3600,13 @@ function help() {
3420
3600
  console.log(' npx thumbgate long-running-agent-context-guardrails --request-count=80 --output-mb=3 --raw-chat-only --json');
3421
3601
  console.log(' npx thumbgate reasoning-efficiency-guardrails --baseline-tokens=1200 --compressed-tokens=980 --baseline-accuracy=0.84 --compressed-accuracy=0.85 --verifier --json');
3422
3602
  console.log(' npx thumbgate deepseek-v4-runtime-guardrails --context-tokens=900000 --hybrid-attention --speculative-decoding --accept-length=1.4 --precision-mode=fp8 --json');
3603
+ console.log(' npx thumbgate nvidia-specdecode-al-doctor --speculative-decoding --accept-length=1.4 --draft-length=7 --draft-depth-ratio=0.05 --claimed-speedup=3 --json');
3604
+ console.log(' npx thumbgate package-manager-honesty-doctor --propose-switch=pnpm --json');
3605
+ console.log(' npx thumbgate openui-catalog-compose-honesty --catalog=catalog.json --stream=compose.txt --repair --json');
3606
+ console.log(' npx thumbgate allowlist-bridge-honesty --json');
3607
+ console.log(' npx thumbgate jit-harness-compose --task="implement PreToolUse gate fix" --json');
3608
+ console.log(' npx thumbgate workspace-search-route --query="how does X connect" --json');
3609
+ console.log(' npx thumbgate intent-governed-execution --intent="railway deploy" --json');
3423
3610
  console.log(' npx thumbgate upstream-contributions --max-repos=10 --write');
3424
3611
  console.log(' npx thumbgate background-governance --json');
3425
3612
  console.log(' npx thumbgate background-governance --check --agent-id=builder --branch=main --files-changed=25 --json');
@@ -3473,6 +3660,8 @@ const SUBCOMMAND_HELP = {
3473
3660
  compact: 'Usage: npx thumbgate compact\n\nCompact the lesson database and reclaim disk space.',
3474
3661
  'context-packs': 'Usage: npx thumbgate context-packs\n\nGenerate context packs from top failure patterns.',
3475
3662
  suggest: 'Usage: npx thumbgate suggest <gate-id>\n\nSuggest fixes for a specific gate based on lesson history.',
3663
+ inventory: 'Usage: npx thumbgate inventory [--json] [--days=N] [--data-dir=path] [--max-bytes=N]\n\nRead-only inventory of agent activity in this repo\'s ThumbGate store: agents seen, tool calls by tool, allow/deny counts, deny reasons per gate, top gates, per-day activity, and the false-deny rate.\n\nEvery source reports its own status (ok / empty / missing) so an uninstrumented store never looks like a quiet one. falseDenyRate is null with a stated reason whenever a real denominator was not observed; falseDenyNumerator and falseDenyDenominator are always emitted raw.\n\nEach source is read as a bounded tail (default 8 MiB, --max-bytes to change) so a multi-hundred-MB audit log is never loaded whole. If the tail did not reach back to the start of the window, windowFullyCovered is false and the text output says so.',
3664
+ 'conflict-audit': 'Usage: npx thumbgate conflict-audit [--json] [--offline] [--repo-root=path] [--github-repo=owner/name] [--branch=main] [--consecutive-failures=N] [--excluded-lines=N] [--commits=N]\n\nDeterministic detector for controls that report success but enforce nothing. Six detectors, no model involved:\n\n D1 gate configs declaring a `patterns` array when the engine reads `pattern` (the match block is skipped, so the gate fires on every tool in its toolNames)\n D2 gate patterns that cannot compile (an inline (?i) flag group throws; the engine swallows the throw as "no match")\n D3 checks required by NEITHER classic branch protection NOR any repository ruleset, which have failed on N or more consecutive recent commits\n D4 sonar.exclusions / sonar.coverage.exclusions entries that hide non-trivial code inside sonar.sources from scanning\n D5 modules and entry exports with zero production call sites outside their own tests (for a PUBLISHED package the entry surface is public API whose callers are downstream npm consumers, so those are reported NOT INSPECTED rather than dead)\n D6 the bare `path.resolve(process.argv[1]) === path.resolve(__filename)` main check, which no-ops under an npm bin shim\n\nEvery detector reports its own status: `ran` (inspected), `partial` (some of the surface was not inspected, and which), or `unavailable` (could not inspect at all). An unavailable detector is NEVER reported as clean. D3 needs the `gh` CLI (resolved from a fixed install location, never through $PATH) plus read access to branch protection and repository rulesets; use --offline to skip it explicitly.',
3476
3665
  cost: 'Usage: npx thumbgate cost [--json] [--stats <path>] [--mix \'{"claude-sonnet-4-5":0.8,...}\']\n\nShow cumulative $ and tokens saved by PreToolUse gate blocks. Reads ~/.thumbgate/gate-stats.json.',
3477
3666
  savings: 'Usage: npx thumbgate savings [--json] [--stats <path>] [--mix \'{"claude-sonnet-4-5":0.8,...}\']\n\nAlias for `thumbgate cost`.',
3478
3667
  'setup-vertex': 'Usage: npx thumbgate setup-vertex [--dry-run]\n\nAuto-enable Vertex AI API on GCP and write local Vertex routing config to .env. With --dry-run, only detect the active account/project and print the planned changes. This does not create or verify a Dialogflow CX agent; use the Dialogflow CX REST API or console for live-agent evidence.',
@@ -3923,14 +4112,66 @@ switch (COMMAND) {
3923
4112
  generateAgentReadinessReport,
3924
4113
  reportToText,
3925
4114
  } = require(path.join(PKG_ROOT, 'scripts', 'agent-readiness'));
4115
+ const { wiringReport, formatReport } = require(path.join(PKG_ROOT, 'scripts', 'mcp-wiring-doctor'));
3926
4116
  const args = parseArgs(process.argv.slice(3));
3927
4117
  const report = generateAgentReadinessReport({ projectRoot: CWD });
4118
+ const wiring = wiringReport(CWD);
3928
4119
  if (args.json) {
3929
- console.log(JSON.stringify(report, null, 2));
4120
+ console.log(JSON.stringify({ ...report, wiring }, null, 2));
3930
4121
  } else {
3931
4122
  process.stdout.write(reportToText(report));
4123
+ process.stdout.write(`\n${formatReport(wiring)}\n`);
3932
4124
  }
3933
- process.exit(report.overallStatus === 'ready' ? 0 : 1);
4125
+ const ready = report.overallStatus === 'ready' && wiring.overall !== 'error';
4126
+ process.exit(ready ? 0 : 1);
4127
+ break;
4128
+ }
4129
+ case 'compass':
4130
+ case 'pipeline':
4131
+ case 'pipeline-compass': {
4132
+ const { getPipelineCompass, formatPipelineCompass } = require(path.join(PKG_ROOT, 'src', 'pipeline-compass'));
4133
+ const args = parseArgs(process.argv.slice(3));
4134
+ const report = getPipelineCompass({ projectRoot: CWD });
4135
+ if (args.json) console.log(JSON.stringify(report, null, 2));
4136
+ else console.log(formatPipelineCompass(report));
4137
+ process.exit(report.ready ? 0 : 1);
4138
+ break;
4139
+ }
4140
+ case 'writeguard':
4141
+ case 'mcp-writeguard': {
4142
+ const { main } = require(path.join(PKG_ROOT, 'scripts', 'mcp-writeguard'));
4143
+ main();
4144
+ break;
4145
+ }
4146
+ case 'latency':
4147
+ case 'latency-budget': {
4148
+ const { main } = require(path.join(PKG_ROOT, 'scripts', 'latency-budget'));
4149
+ main();
4150
+ break;
4151
+ }
4152
+ case 'wiring-doctor':
4153
+ case 'mcp-wiring-doctor': {
4154
+ const { wiringReport, formatReport, applyFix } = require(path.join(PKG_ROOT, 'scripts', 'mcp-wiring-doctor'));
4155
+ const args = parseArgs(process.argv.slice(3));
4156
+ if (args.fix) applyFix(CWD);
4157
+ const wiring = wiringReport(CWD);
4158
+ if (args.json) console.log(JSON.stringify(wiring, null, 2));
4159
+ else console.log(formatReport(wiring));
4160
+ process.exit(wiring.overall === 'error' ? 2 : wiring.overall === 'warning' ? 1 : 0);
4161
+ break;
4162
+ }
4163
+ case 'security-central':
4164
+ case 'security:central':
4165
+ case 'agent-security-central': {
4166
+ const {
4167
+ buildSecurityCentralReport,
4168
+ formatSecurityCentralReport,
4169
+ } = require(path.join(PKG_ROOT, 'scripts', 'agent-security-central'));
4170
+ const args = parseArgs(process.argv.slice(3));
4171
+ const report = buildSecurityCentralReport({ projectRoot: CWD });
4172
+ if (args.json) console.log(JSON.stringify(report, null, 2));
4173
+ else console.log(formatSecurityCentralReport(report));
4174
+ process.exit(report.posture.band === 'critical' ? 2 : report.posture.band === 'at_risk' ? 1 : 0);
3934
4175
  break;
3935
4176
  }
3936
4177
  case 'export-dpo':
@@ -3994,6 +4235,51 @@ switch (COMMAND) {
3994
4235
  case 'sparse-attention-runtime-guardrails':
3995
4236
  deepseekV4RuntimeGuardrails();
3996
4237
  break;
4238
+ case 'nvidia-specdecode-al-doctor':
4239
+ case 'specdecode-al-doctor':
4240
+ case 'speculative-decoding-al-doctor':
4241
+ case 'nvidia-speculative-decoding-doctor':
4242
+ nvidiaSpecDecodeAlDoctor();
4243
+ break;
4244
+ case 'package-manager-honesty-doctor':
4245
+ case 'pm-honesty-doctor':
4246
+ case 'pnpm12-honesty-doctor':
4247
+ case 'lockfile-ci-parity-doctor':
4248
+ packageManagerHonestyDoctor();
4249
+ break;
4250
+ case 'openui-catalog-compose-honesty':
4251
+ case 'openui-honesty-doctor':
4252
+ case 'catalog-compose-honesty':
4253
+ case 'repair-before-compose-claim':
4254
+ openuiCatalogComposeHonestyDoctor();
4255
+ break;
4256
+ case 'allowlist-bridge-honesty':
4257
+ case 'gitlab-sandbox-allowlist':
4258
+ case 'allowlist-not-trust':
4259
+ case 'trust-handoff-honesty':
4260
+ allowlistBridgeHonestyDoctor();
4261
+ break;
4262
+ case 'jit-harness-compose':
4263
+ case 'jit-compose':
4264
+ case 'jit-harness':
4265
+ case 'harness-compose':
4266
+ jitHarnessCompose();
4267
+ break;
4268
+ case 'workspace-search-route':
4269
+ case 'zg-search-route':
4270
+ case 'zvec-grep-route':
4271
+ case 'search-route':
4272
+ workspaceSearchRoute().catch((err) => {
4273
+ console.error(err && err.stack ? err.stack : err);
4274
+ process.exitCode = 1;
4275
+ });
4276
+ break;
4277
+ case 'intent-governed-execution':
4278
+ case 'governed-intent':
4279
+ case 'cyberstrike-governed':
4280
+ case 'intent-govern':
4281
+ intentGovernedExecution();
4282
+ break;
3997
4283
  case 'long-running-agent-context-guardrails':
3998
4284
  case 'agent-context-guardrails':
3999
4285
  case 'slack-context-guardrails':
@@ -4327,6 +4613,53 @@ switch (COMMAND) {
4327
4613
  runAnalytics();
4328
4614
  break;
4329
4615
  }
4616
+ case 'inventory': {
4617
+ // Read-only rollup of what agents did in this repo's ThumbGate store:
4618
+ // tool calls, allow/deny counts, deny reasons per gate, per-day activity,
4619
+ // and the false-deny rate (null when it cannot be honestly computed).
4620
+ const inventoryArgs = parseArgs(process.argv.slice(3));
4621
+ const {
4622
+ buildInventory,
4623
+ renderInventoryText,
4624
+ } = require(path.join(PKG_ROOT, 'scripts', 'agent-action-inventory'));
4625
+ const { resolveFeedbackDir } = require(path.join(PKG_ROOT, 'scripts', 'feedback-paths'));
4626
+ const inventory = buildInventory({
4627
+ dataDir: inventoryArgs['data-dir'] || resolveFeedbackDir(),
4628
+ windowDays: inventoryArgs.days,
4629
+ maxBytes: inventoryArgs['max-bytes'] ? Number(inventoryArgs['max-bytes']) : undefined,
4630
+ });
4631
+ if (inventoryArgs.json) {
4632
+ console.log(JSON.stringify(inventory, null, 2));
4633
+ } else {
4634
+ process.stdout.write(renderInventoryText(inventory));
4635
+ }
4636
+ break;
4637
+ }
4638
+ case 'conflict-audit': {
4639
+ // Deterministic sweep for controls that report success but enforce
4640
+ // nothing. Each detector reports its own status, so a surface that could
4641
+ // not be inspected is never rendered as a clean bill of health.
4642
+ const conflictArgs = parseArgs(process.argv.slice(3));
4643
+ const {
4644
+ auditGovernanceConflicts,
4645
+ renderConflictAuditText,
4646
+ } = require(path.join(PKG_ROOT, 'scripts', 'governance-conflict-audit'));
4647
+ const conflictReport = auditGovernanceConflicts({
4648
+ repoRoot: conflictArgs['repo-root'] || process.cwd(),
4649
+ gitHubRepo: conflictArgs['github-repo'],
4650
+ branch: conflictArgs.branch,
4651
+ consecutiveFailureThreshold: conflictArgs['consecutive-failures'],
4652
+ excludedLineThreshold: conflictArgs['excluded-lines'],
4653
+ commitLimit: conflictArgs.commits,
4654
+ offline: Boolean(conflictArgs.offline),
4655
+ });
4656
+ if (conflictArgs.json) {
4657
+ console.log(JSON.stringify(conflictReport, null, 2));
4658
+ } else {
4659
+ process.stdout.write(`${renderConflictAuditText(conflictReport)}\n`);
4660
+ }
4661
+ break;
4662
+ }
4330
4663
  case 'start-api':
4331
4664
  startApi();
4332
4665
  break;
@@ -4408,7 +4741,7 @@ switch (COMMAND) {
4408
4741
  });
4409
4742
  req.on('error', (err) => {
4410
4743
  console.error(`✗ Subscribe failed: ${err.message}`);
4411
- console.error(' Network issue? Try again, or email igor.ganapolsky@gmail.com directly.');
4744
+ console.error(' Network issue? Try again, or email support@thumbgate.ai directly.');
4412
4745
  process.exit(3);
4413
4746
  });
4414
4747
  req.on('timeout', () => {
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ // Requiring the module is not enough: its CLI only self-executes when the
5
+ // module itself is the entry point, so `futureagi-bridge --doctor` used to
6
+ // exit 0 having evaluated nothing.
7
+ const { mainCli } = require('../scripts/future-agi-evaluator.js');
8
+
9
+ process.exit(mainCli());