thumbgate 1.40.12 → 1.40.14

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "thumbgate",
3
3
  "description": "One 👎 becomes a hard rule the agent cannot bypass. Captures thumbs-down feedback, distills it into PreToolUse Pre-Action Checks, enforced across every future Claude Code session.",
4
- "version": "1.40.12",
4
+ "version": "1.40.14",
5
5
  "author": {
6
6
  "name": "Igor Ganapolsky",
7
7
  "email": "ig5973700@gmail.com",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thumbgate",
3
- "version": "1.40.12",
3
+ "version": "1.40.14",
4
4
  "description": "ThumbGate — 👍👎 feedback that teaches your AI agent. Thumbs down a mistake, it never happens again.",
5
5
  "homepage": "https://thumbgate.ai",
6
6
  "transport": "stdio",
@@ -2,17 +2,17 @@
2
2
  "mcpServers": {
3
3
  "thumbgate": {
4
4
  "command": "npx",
5
- "args": ["--yes", "--package", "thumbgate@1.40.12", "thumbgate", "serve"]
5
+ "args": ["--yes", "--package", "thumbgate@1.40.14", "thumbgate", "serve"]
6
6
  }
7
7
  },
8
8
  "hooks": {
9
9
  "preToolUse": {
10
10
  "command": "npx",
11
- "args": ["--yes", "--package", "thumbgate@1.40.12", "thumbgate", "gate-check"]
11
+ "args": ["--yes", "--package", "thumbgate@1.40.14", "thumbgate", "gate-check"]
12
12
  },
13
13
  "userPromptSubmit": {
14
14
  "command": "npx",
15
- "args": ["--yes", "--package", "thumbgate@1.40.12", "thumbgate", "hook-auto-capture"]
15
+ "args": ["--yes", "--package", "thumbgate@1.40.14", "thumbgate", "hook-auto-capture"]
16
16
  }
17
17
  }
18
18
  }
@@ -9,12 +9,12 @@ version: "1"
9
9
  skills:
10
10
  thumbgate-gate-check:
11
11
  description: "ThumbGate PreToolUse gate — blocks known-bad tool calls"
12
- command: "npx --yes --package thumbgate@1.40.12 thumbgate gate-check"
12
+ command: "npx --yes --package thumbgate@1.40.14 thumbgate gate-check"
13
13
  trigger: pre_tool_use
14
14
 
15
15
  thumbgate-feedback:
16
16
  description: "ThumbGate UserPromptSubmit guard & feedback capture — blocks pasted passwords/keys and logs safe prompt context"
17
- command: "npx --yes --package thumbgate@1.40.12 thumbgate hook-auto-capture"
17
+ command: "npx --yes --package thumbgate@1.40.14 thumbgate hook-auto-capture"
18
18
  trigger: user_prompt
19
19
 
20
20
  mcp:
@@ -23,6 +23,6 @@ mcp:
23
23
  args:
24
24
  - "--yes"
25
25
  - "--package"
26
- - "thumbgate@1.40.12"
26
+ - "thumbgate@1.40.14"
27
27
  - "thumbgate"
28
28
  - "serve"
@@ -2,7 +2,7 @@
2
2
  "mcpServers": {
3
3
  "thumbgate": {
4
4
  "command": "npx",
5
- "args": ["--yes", "--package", "thumbgate@1.40.12", "thumbgate", "serve"]
5
+ "args": ["--yes", "--package", "thumbgate@1.40.14", "thumbgate", "serve"]
6
6
  }
7
7
  }
8
8
  }
@@ -1,3 +1,3 @@
1
1
  [mcp.servers.thumbgate]
2
2
  command = "npx"
3
- args = ["--yes", "--package", "thumbgate@1.40.12", "thumbgate", "serve"]
3
+ args = ["--yes", "--package", "thumbgate@1.40.14", "thumbgate", "serve"]
@@ -2,7 +2,7 @@
2
2
  "mcpServers": {
3
3
  "thumbgate": {
4
4
  "command": "npx",
5
- "args": ["--yes", "--package", "thumbgate@1.40.12", "thumbgate", "serve"]
5
+ "args": ["--yes", "--package", "thumbgate@1.40.14", "thumbgate", "serve"]
6
6
  }
7
7
  }
8
8
  }
@@ -1,7 +1,7 @@
1
1
  [plugin]
2
2
  id = "thumbgate-approvals"
3
3
  name = "ThumbGate Approvals"
4
- version = "1.40.12"
4
+ version = "1.40.14"
5
5
  minHerdrVersion = "0.7.0"
6
6
  description = "Pre-action governance, spend guard, and safety approval gates for multi-agent terminal sessions in Herdr."
7
7
  platforms = ["linux", "macos", "windows"]
@@ -12,7 +12,7 @@ category = "Security & Governance"
12
12
 
13
13
  [mcp_server]
14
14
  command = "npx"
15
- args = ["--yes", "--package", "thumbgate@1.40.12", "thumbgate", "serve"]
15
+ args = ["--yes", "--package", "thumbgate@1.40.14", "thumbgate", "serve"]
16
16
 
17
17
  [mcp_server.env]
18
18
  THUMBGATE_ENFORCE_ENTITLEMENTS = "1"
@@ -334,7 +334,7 @@ const {
334
334
  finalizeSession: finalizeFeedbackSession,
335
335
  } = require('../../scripts/feedback-session');
336
336
 
337
- const SERVER_INFO = { name: 'thumbgate-mcp', version: '1.40.12' };
337
+ const SERVER_INFO = { name: 'thumbgate-mcp', version: '1.40.14' };
338
338
  const COMMERCE_CATEGORIES = [
339
339
  'product_recommendation',
340
340
  'brand_compliance',
@@ -1124,9 +1124,11 @@ async function callToolInner(name, args) {
1124
1124
  cwd: resolveWorkspaceCwd(args.cwd),
1125
1125
  lessonId: args.lessonId,
1126
1126
  lessonKey: args.lessonKey,
1127
- // A capture_feedback call carries a person's thumb; callers that are
1128
- // scripts can pass reviewOrigin 'automated' or 'imported' explicitly.
1129
- reviewOrigin: ['automated', 'imported'].includes(args.reviewOrigin) ? args.reviewOrigin : 'human',
1127
+ // An agent calling this tool is not a person. A call is a person's thumb only when it carries the
1128
+ // user-prompt hook's tag, which the hook adds when the thumb came from the person's own message.
1129
+ // Everything else is recorded as automated, whatever the caller says.
1130
+ reviewOrigin: args.reviewOrigin === 'imported' ? 'imported'
1131
+ : (args.reviewOrigin === 'human' && Array.isArray(args.tags) && args.tags.includes('user-prompt-thumbs') ? 'human' : 'automated'),
1130
1132
  }));
1131
1133
  }
1132
1134
  case 'feedback_summary':
@@ -1956,11 +1958,22 @@ async function handleRequest(message) {
1956
1958
  return null;
1957
1959
  }
1958
1960
  if (message.method === 'initialize') {
1959
- return {
1961
+ const result = {
1960
1962
  protocolVersion: '2024-11-05',
1961
1963
  capabilities: { tools: {} },
1962
1964
  serverInfo: SERVER_INFO,
1963
1965
  };
1966
+ // Old hook runtimes never self-upgrade, so the (usually @latest) MCP server is the one
1967
+ // place that can notice the gap. Detect and report only; never install. Best-effort.
1968
+ try {
1969
+ const skewLib = require('../../scripts/check-update');
1970
+ const skew = skewLib.detectSkew({ currentVersion: SERVER_INFO.version });
1971
+ if (skew.skewed) {
1972
+ result.instructions = skewLib.buildSkewNotice(skew.runtimeVersion, skew.currentVersion);
1973
+ skewLib.reportSkewOnce({ skew });
1974
+ }
1975
+ } catch { /* never fail initialize */ }
1976
+ return result;
1964
1977
  }
1965
1978
  if (message.method === 'ping') return {};
1966
1979
  if (message.method === 'tools/list') return { tools: getExposedTools() };
@@ -7,7 +7,7 @@
7
7
  "npx",
8
8
  "--yes",
9
9
  "--package",
10
- "thumbgate@1.40.12",
10
+ "thumbgate@1.40.14",
11
11
  "thumbgate",
12
12
  "serve"
13
13
  ],
package/bin/cli.js CHANGED
@@ -34,20 +34,17 @@ const PRO_CHECKOUT_URL = PRO_MONTHLY_PAYMENT_LINK;
34
34
  const TRIAL_DAYS = 7;
35
35
 
36
36
  function checkoutUrlFor(source, content) {
37
+ // Every CLI upgrade link goes through thumbgate.ai/go/pro, never a raw Stripe payment link:
38
+ // only that route attributes the click, opens a session tied to the buyer, and provisions the key.
37
39
  try {
38
- const base = content === 'capture_feedback'
39
- ? 'https://buy.stripe.com/7sYfZhaiE1eSbO99uj3sI0d'
40
- : PRO_CHECKOUT_URL;
41
- const url = new URL(base);
40
+ const url = new URL(PRO_CHECKOUT_URL);
42
41
  url.searchParams.set('utm_source', source || 'cli');
43
42
  url.searchParams.set('utm_medium', 'cli');
44
43
  url.searchParams.set('utm_campaign', 'pro_conversion');
45
44
  if (content) url.searchParams.set('utm_content', content);
46
45
  return url.toString();
47
46
  } catch (_) {
48
- return content === 'capture_feedback'
49
- ? 'https://buy.stripe.com/7sYfZhaiE1eSbO99uj3sI0d'
50
- : PRO_CHECKOUT_URL;
47
+ return PRO_CHECKOUT_URL;
51
48
  }
52
49
  }
53
50
 
@@ -225,6 +222,8 @@ function limitNudge(action, limitResult = {}) {
225
222
  const reason = limitResult.message
226
223
  ? String(limitResult.message).split('\n')[0]
227
224
  : 'Free tier limit reached.';
225
+ // The free-tier wall is an upgrade moment; count it so the funnel can see it.
226
+ try { trackEvent('cli_limit_hit', { action, limitType: limitResult.limitType || null }); } catch (_) { /* best-effort */ }
228
227
  process.stderr.write(
229
228
  `\n 🔒 ${reason}\n` +
230
229
  usageLine +
@@ -0,0 +1,47 @@
1
+ {
2
+ "version": 1,
3
+ "checkedAt": "2026-11-24",
4
+ "currency": "USD",
5
+ "note": "List rates the owner console uses to turn measured usage into dollars. Change a rate here when a provider changes it, and record the date and source. Amounts are US dollars.",
6
+ "hosting": {
7
+ "provider": "Railway",
8
+ "source": "https://docs.railway.com/pricing (checked 2026-11-24): $20 per vCPU-month, $10 per GB of memory per month, $0.15 per GB-month of volume, $0.05 per GB of egress, billed by the minute",
9
+ "vcpuMonthUsd": 20,
10
+ "memoryGbMonthUsd": 10,
11
+ "volumeGbMonthUsd": 0.15,
12
+ "egressGbUsd": 0.05,
13
+ "volumeGb": 0.3,
14
+ "volumeGbSource": "Railway metrics for the thumbgate service, 7-day average 0.27 GB on 2026-11-24",
15
+ "egressGbPerMonth": 7.3,
16
+ "egressGbSource": "Railway metrics for the thumbgate service, 7-day average about 0.01 GB per hour on 2026-11-24; not measured live by the app"
17
+ },
18
+ "email": {
19
+ "provider": "Resend",
20
+ "source": "https://resend.com/pricing (checked 2026-11-24): free tier 3,000 emails per month and 100 per day; Pro $20 per month for 50,000, extra emails $0.90 per 1,000",
21
+ "costPerEmailUsd": 0.0004,
22
+ "basis": "Pro plan price divided by its included emails. While sends stay inside the free tier the true marginal cost is $0, so this is an upper bound."
23
+ },
24
+ "payments": {
25
+ "provider": "Stripe",
26
+ "source": "https://stripe.com/pricing and https://stripe.com/billing/pricing (checked 2026-11-24): 2.9% + 30 cents per successful domestic card charge; Stripe Billing adds 0.7% of recurring billing volume",
27
+ "percent": 0.029,
28
+ "fixedUsd": 0.3,
29
+ "basis": "Checkout fees are read from Stripe when it returns them. Renewal invoices, and any checkout whose fee was not returned, use the card rate; renewals and subscription first charges also carry the 0.7% Billing fee.",
30
+ "billingPercent": 0.007
31
+ },
32
+ "plans": {
33
+ "pro": {
34
+ "name": "Pro",
35
+ "listMonthlyUsd": 19
36
+ },
37
+ "setupSprint": {
38
+ "name": "Setup Sprint",
39
+ "listUsd": 499,
40
+ "deliveryHours": null,
41
+ "deliveryHoursNote": "Owner time to deliver one sprint is not recorded, so sprint margin leaves labor out."
42
+ }
43
+ },
44
+ "fixedDeliveryMonthly": [],
45
+ "buildAndInternalMonthly": [],
46
+ "fixedNote": "fixedDeliveryMonthly holds monthly costs of serving customers that usage does not measure (for example a plan minimum or a domain). buildAndInternalMonthly holds the cost of building and running the business (agent subscriptions, CI, tools). Each entry is { \"name\": \"...\", \"usd\": 0, \"source\": \"...\" }. Both lists are empty until a real bill is recorded; the console says so instead of guessing."
47
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thumbgate",
3
- "version": "1.40.12",
3
+ "version": "1.40.14",
4
4
  "description": "ThumbGate Pre-Action Checks self-improve from ranked lessons and repeated failures, hard-block detected secret leaks, and block matches in strict mode.",
5
5
  "homepage": "https://thumbgate.ai",
6
6
  "repository": {
@@ -19,6 +19,8 @@
19
19
  },
20
20
  "files": [
21
21
  "!config/main-branch-ruleset.json",
22
+ "!config/ship-policy.json",
23
+ "!.claude/commands/ship.md",
22
24
  "!config/performance-budgets.json",
23
25
  "!public/assets/brand/github-social-preview.png",
24
26
  "!public/assets/diagrams/thumbgate-agent-meme.jpg",
@@ -567,6 +569,8 @@
567
569
  "scripts/owner-admin.js",
568
570
  "scripts/owner-alerts.js",
569
571
  "scripts/owner-telemetry.js",
572
+ "scripts/cost-meter.js",
573
+ "scripts/unit-economics.js",
570
574
  "scripts/ops-log.js",
571
575
  "scripts/ops-report.js",
572
576
  "scripts/checkout-session-count.js",
@@ -764,7 +768,7 @@
764
768
  "test:futureagi-prepost": "node --test tests/futureagi-prepost-gate.test.js",
765
769
  "test:five-walls": "node --test tests/five-walls-governance.test.js",
766
770
  "test:llm-surface-consistency": "node --test tests/llm-surface-consistency.test.js",
767
- "test": "npm run test:python && npm run test:schema && npm run test:loop && npm run test:dpo && npm run test:kto && npm run test:api && npm run test:proof && npm run test:e2e && npm run test:rlaif && npm run test:attribution && npm run test:quality && npm run test:intelligence && npm run test:training-export && npm run test:deployment && npm run test:operational-integrity && npm run test:workflow && npm run test:proof-pack-cadence && npm run test:founder-proof && npm run test:grafana-revenue-evidence && npm run test:billing && npm run test:billing-setup && npm run test:cli && npm run test:watcher && npm run test:autoresearch && npm run test:ops && npm run test:session-analyzer && npm run test:tessl && npm run test:canary && npm run test:gates && npm run test:evoskill && npm run test:gates-hardening && npm run test:workers && npm run test:social-analytics && npm run test:memalign && npm run test:xmemory-lite && npm run test:filesystem-search && npm run test:platform-limits && npm run test:post-video && npm run test:post-everywhere-instagram && npm run test:post-everywhere-channels && npm run test:obsidian-export && npm run test:lesson-db && npm run test:lesson-rotation && npm run test:memory-dedup && npm run test:feedback-quality && npm run test:sync-version && npm run test:release-window && npm run test:check-congruence && npm run test:tool-registry && npm run test:repeat-metric && npm run test:noop-detect && npm run test:action-receipts && npm run test:broker-execution-receipts && npm run test:provider-attestation && npm run test:feedback-to-rules && npm run test:memory-firewall && npm run test:memory-scope-readiness && npm run test:belief-update && npm run test:hosted-config && npm run test:operational-summary && npm run test:operational-dashboard && npm run test:operator-artifacts && npm run test:operator-key-auth && npm run test:cloudflare-sandbox && npm run test:mcp-config && npm run test:mcp-tool-annotations && npm run test:mcp-oauth && npm run test:mcp-oauth-flow && npm run test:plan-gate && npm run test:ai-component-inventory && npm run test:verification-evidence && npm run test:pulse && npm run test:semantic-layer && npm run test:data-pipeline && npm run test:optimize-context && npm run test:principle-extractor && npm run test:analytics-window && npm run test:funnel-analytics && npm run test:experiment-tracker && npm run test:build-metadata && npm run test:context-engine && npm run test:hf-papers && npm run test:marketing-experiment && npm run test:seo-gsd && npm run test:verify-run && npm run test:entitlement && npm run test:export-dpo-pairs && npm run test:export-hf-dataset && npm run test:license && npm run test:imperative-detector && npm run test:audit-pr-bot-contamination && npm run test:stripe-bootstrap-saas-catalog && npm run test:postinstall && npm run test:funnel-invariants && npm run test:cli-telemetry && npm run test:pro-parity && npm run test:model-tier-router && npm run test:computer-use-firewall && npm run test:skill-exporter && npm run test:statusline && npm run test:statusline-cache-aggregate && npm run test:public-repo-hygiene && npm run test:no-internal-orchestration-leaks && npm run test:evolution && npm run test:org-dashboard && npm run test:multi-hop-recall && npm run test:synthetic-dpo && npm run test:thumbgate-skill && npm run test:learn-hub && npm run test:feedback-fallback && npm run test:metaclaw && npm run test:server-lock && npm run test:control-tower && npm run test:pii-scanner && npm run test:data-governance && npm run test:lesson-inference && npm run test:semantic-dedup && npm run test:fs-utils && npm run test:cli-schema && npm run test:shipped-js-syntax && npm run test:tiktok-short-link && npm run test:explore && npm run test:lesson-reranker && npm run test:lesson-retrieval && npm run test:lesson-graph && npm run test:lesson-semantic-retrieval && npm run test:cross-encoder && npm run test:reflector-agent && npm run test:feedback-session && npm run test:feedback-history-distiller && npm run test:hallucination-detector && npm run test:history-distiller && npm run test:predictive-insights && npm run test:predictive-credible-range && npm run test:prove-predictive-insights && npm run test:statusbar-cli && npm run test:generate-instagram-card && npm run test:instagram-thumbgate-post && npm run test:publish-instagram-thumbgate && npm run test:lesson-synthesis && npm run test:lesson-canonical && npm run test:background-governance && npm run test:memory-migration && npm run test:prompt-dlp && npm run test:ephemeral-store && npm run test:agent-security && npm run test:skill-progressive && npm run test:per-step-scoring && npm run test:weekly-auto-post && npm run test:social-post-hourly && npm run test:social-quality-gate && npm run test:a2ui-engine && npm run test:gate-satisfy && npm run test:money-watcher && npm run test:budget && npm run test:quick-start && npm run test:utm && npm run test:product-feedback && npm run test:feedback-root-consolidator && npm run test:engagement-audit && npm run test:install-growth-automation && npm run test:publish-thumbgate-launch && npm run test:reconcile-thumbgate-campaign && npm run test:reddit-publisher && npm run test:schedule-thumbgate-campaign && npm run test:social-reply-monitor && npm run test:sync-launch-assets && npm run test:ai-search-visibility && npm run test:perplexity && npm run test:vlt && npm run test:hf-context && npm run test:proof-common && npm run test:xss-checkout-escape && npm run test:security-scanner && npm run test:agent-security-central && npm run test:llm-client && npm run test:managed-lesson-agent && npm run test:self-distill && npm run test:meta-agent && npm run test:harness-selector && npm run test:thumbgate-bench && npm run test:seo-guides && npm run test:enforcement-loop && npm run test:cli-agent-experience && npm run test:bot-detection && npm run test:checkout-archived-product-guard && npm run test:postgres-guard && npm run test:checkout-bot-guard && npm run test:checkout-pro-confirmation-gate && npm run test:checkout-human-gate && npm run test:checkout-interstitial-shown-beacon && npm run test:connect-panel && npm run test:first-block-upsell && npm run test:checkout-session-count && npm run test:checkout-utm-attribution && npm run test:utm-source-summary && npm run test:pricing-page-telemetry && npm run test:session-health && npm run test:session-episodes && npm run test:spec-gate && npm run test:decision-trace && npm run test:dashboard-insights && npm run test:telemetry-tracked-link-slug && npm run test:prompt-eval && npm run test:gate-coherence && npm run test:gate-eval && npm run test:high-roi && npm run test:public-static-assets && npm run test:token-savings && npm run test:numbers-page && npm run test:workflow-gate-checkpoint && npm run test:lesson-export-import && npm run test:landing-page-claims && npm run test:competitive-positioning-marketing && npm run test:medium-weekly && npm run test:dashboard-deeplink-e2e && npm run test:public-package-parity && npm run test:token-savings-dashboard && npm run test:cursor-wiring && npm run test:cursor-shell-gate && npm run test:pretooluse-injection && npm run test:recent-corrective-context && npm run test:durability-step && npm run test:mailer && npm run test:brand-assets && npm run test:enforcement-teeth && npm run test:bayes-optimal-gate && npm run test:swarm-coordinator && npm run test:session-report && npm run test:agent-reasoning-traces && npm run test:judge-reward && npm run test:llm-behavior-monitor && npm run test:prompting-os && npm run test:single-use-credential-gate && npm run test:structured-prompt-driven && npm run test:require-evidence-gate && npm run test:universal-claim-evaluator && npm run test:rule-validator && npm run test:bluesky-atproto && npm run test:social-reply-monitor-bluesky && npm run test:bluesky-delete-replies && npm run test:architect-kit-memory-bridge && npm run test:sonar-review-hotspots && npm run test:actionable-remediations && npm run test:gemini-embedding-policy && npm run test:agent-design-governance && npm run test:public-core-boundary && npm run test:hook-stop-verify-deploy && npm run test:hook-stop-anti-claim && npm run test:email-triage-quoting && npm run test:claim-gate-stop && npm run test:feedback-reward-claim-lessons &&npm run test:stop-hook-json-contract && npm run test:plausible-server-events && npm run test:activation-tracker && npm run test:activation-onboarding && npm run test:unified-revenue-rollup && npm run test:conversion-rate-stats && npm run test:external-customer-audit && npm run test:telemetry-export && npm run test:stripe-checkout-diagnostic && npm run test:stripe-business-identity-probe && npm run test:revenue-observability-doctor && npm run test:jsonl-window && npm run test:observability-env && npm run test:glama-mcp && npm run test:prove-glama-mcp && npm run test:public-bundle-ratchet && npm run test:pack-runtime-integrity && npm run test:packed-cli-require-closure && npm run test:hook-self-protection && npm run test:self-protect-enforcement && npm run test:never-bypass-branch-protection && npm run test:stripe-payment-link-update && npm run test:ci-cd-hygiene-audit && npm run test:verify-marketing-pages-deployed && npm run test:install-email-capture && npm run test:install-shim && npm run test:hook-runtime-subcommands && npm run test:implementation-notes && npm run test:enforce-rules-without-daily-cap && npm run test:free-to-paid-conversion-units && npm run test:metrics-real-endpoint && npm run test:cli-trial-and-help && npm run test:cost-cli && npm run test:silent-failure-cluster && npm run test:workos-production-guard && npm run test:partner-landing && npm run test:memory-pyramid && npm run test:proof:truth && node --test tests/adaptive-reliability.test.js && npm run test:mcp-oauth-reviewer && npm run test:dfcx-gate && npm run test:dfcx-gate-server && npm run test:vertex-scorer && npm run test:dashboard-chat && npm run test:gitar-integration && npm run test:secret-redaction && npm run test:discoverable-skills && npm run test:discoverable-skill-skills && npm run test:sync-telemetry && npm run test:leak-scanner && npm run test:team-sync && npm run test:rag-pipeline && npm run test:autonomous-reliability && npm run test:eval-rag && npm run test:async-eval-observability && npm run test:letta-adapter && npm run test:policy-engine-adapter && npm run test:tool-contract-validator && npm run test:check-update && npm run test:hermes-gate && npm run test:memory-provider-enforcement-bridge && npm run test:publisher-credential-guards && npm run test:reddit-browser-notification-watch && npm run test:payment-rails && npm run test:service-checkout-price-integrity && npm run test:cursor-marketplace-doctor && npm run test:github-marketplace-action && npm run test:plugin-hooks-manifest && npm run test:okara-money-promo-automation && npm run test:retrieval-window && npm run test:risk-quality && npm run test:eval-mining && npm run test:state-backup && npm run test:eval-golden && npm run test:task-scope-lease && npm run test:evaluations-page && npm run test:agent-install-paths && npm run test:mcp-gate-check && npm run test:adapter-pins && npm run test:secret-egress && npm run test:harness-tool-names && npm run test:feedback-reward && npm run test:capability-wiring && npm run test:autonomous-mandate && npm run test:memory-near-dupe && npm run test:lesson-retrieval-dedupe-backfill && npm run test:matryoshka-embedding && npm run test:rag-embedding-identity && npm run test:switchyard-router && npm run test:bulk-cloud-tier && npm run test:session-lease && npm run test:compare-agoragentic && npm run test:compare-dirac && npm run test:compare-aperture && npm run test:qwen-adapter && npm run test:qwen38-max-cost-optimizer && npm run test:openai-compatible-embed && npm run test:legal-public-routes && npm run test:gurobi && npm run test:mcp-session-handles && npm run test:agent-egress-policy && npm run test:budget-aware-gates-proof && npm run test:edotenv-rl-gateway && npm run test:rsi-safety-hillclimb && npm run test:research-agent-harness && npm run test:governance-curriculum && npm run test:provider-receipt-contract && npm run test:adaptive-governance-arena && npm run test:gpc-optout && npm run test:override-audit && npm run test:admin-override && npm run test:progressive-wiring && npm run test:security-questionnaire && npm run test:pipeline-compass && npm run test:guide-progressive && npm run test:git-at-scale && npm run test:rule-sprawl && npm run test:hidden-entry && npm run test:solver-parity && npm run test:mcp-writeguard && npm run test:latency-budget && npm run test:gates-tree-scope && npm run test:actor-critic && npm run test:infoq-engage && npm run test:infoq-architect-honesty && npm run test:qwenwork-policy-group && npm run test:hermes-platform && npm run test:future-agi && npm run test:futureagi-prepost && npm run test:five-walls && npm run test:llm-surface-consistency && npm run test:dashboard-oversized-logs && npm run test:agent-action-inventory && npm run test:simatree-data-governance && npm run test:governance-conflict-audit && npm run test:agent-identity-plane && npm run test:mcp-identity-bootstrap && npm run test:alert-noise-ledger && npm run test:webmcp && npm run test:ideabrowser-connector && npm run test:perf-budget && npm run test:agent-loop && npm run test:nvhbm-base-die-gates && npm run test:graphrag-schema-first-multi-hop && npm run test:agentic-prompt-pipelines && npm run test:ai-governance-operating-plan && npm run test:claw-harness-production && npm run test:double-blind-eval-protocol && npm run test:codex-runbook-flywheel && npm run test:explainx-trending && npm run test:graphify && npm run test:tooling-scripts && npm run test:synthetic-customer-panel && npm run test:star-history && npm run test:github-achievement-honesty && npm run test:ai-identity-checklist && npm run test:knowledge-graph-fuse && npm run test:skill-library-compact && npm run test:intent-scope-runtime && npm run test:unicode-tag-block-normalize && npm run test:issue-3702-action-not-substring && npm run test:mantis-critic-review && npm run test:break-glass-gates-propose && npm run test:thumbgate-daily-discoveries-publish && npm run test:agensi-skill-listing && npm run test:tailscale-p2p-adapter && npm run test:siren-mcp && npm run test:vulnerability-diode && npm run test:enterprise-intelligence && npm run test:third-author && npm run test:embeddinggemma && npm run test:session-interactivity && npm run test:operator-framework-page && npm run test:monthly-report && npm run test:checkout-funnel-bot-filter && npm run test:catastrophic-default-deny && npm run test:rule-cap-hit && npm run test:plugin-eval-gate && npm run test:jules-cloud-fleet-dispatcher && npm run test:openrouter-armor-partnership-diode && npm run test:profound-aeo-citation-engine && npm run test:craft-playbook-gate && npm run test:mac-dispatch-loop && npm run test:graphrag-moe-jit-evals && npm run test:egm-goldfish-packet && npm run test:hosted-tenant-isolation && npm run test:owner-admin && npm run test:admin-truth-ui && npm run test:admin-usage-mrr && npm run test:no-orphan-posthog && npm run test:refund-policy-consistency && npm run test:owner-checkout-panel && npm run test:owner-telemetry-visitors && npm run test:project-scope && npm run test:session-context-dedupe",
771
+ "test": "npm run test:python && npm run test:schema && npm run test:loop && npm run test:dpo && npm run test:kto && npm run test:api && npm run test:proof && npm run test:e2e && npm run test:rlaif && npm run test:attribution && npm run test:quality && npm run test:intelligence && npm run test:training-export && npm run test:deployment && npm run test:operational-integrity && npm run test:workflow && npm run test:proof-pack-cadence && npm run test:founder-proof && npm run test:grafana-revenue-evidence && npm run test:billing && npm run test:billing-setup && npm run test:cli && npm run test:watcher && npm run test:autoresearch && npm run test:ops && npm run test:session-analyzer && npm run test:tessl && npm run test:canary && npm run test:gates && npm run test:evoskill && npm run test:gates-hardening && npm run test:workers && npm run test:social-analytics && npm run test:memalign && npm run test:xmemory-lite && npm run test:filesystem-search && npm run test:platform-limits && npm run test:post-video && npm run test:post-everywhere-instagram && npm run test:post-everywhere-channels && npm run test:obsidian-export && npm run test:lesson-db && npm run test:lesson-rotation && npm run test:memory-dedup && npm run test:feedback-quality && npm run test:sync-version && npm run test:release-window && npm run test:check-congruence && npm run test:tool-registry && npm run test:repeat-metric && npm run test:noop-detect && npm run test:action-receipts && npm run test:broker-execution-receipts && npm run test:provider-attestation && npm run test:feedback-to-rules && npm run test:memory-firewall && npm run test:memory-scope-readiness && npm run test:belief-update && npm run test:hosted-config && npm run test:operational-summary && npm run test:operational-dashboard && npm run test:operator-artifacts && npm run test:operator-key-auth && npm run test:cloudflare-sandbox && npm run test:mcp-config && npm run test:mcp-tool-annotations && npm run test:mcp-oauth && npm run test:mcp-oauth-flow && npm run test:plan-gate && npm run test:ai-component-inventory && npm run test:verification-evidence && npm run test:pulse && npm run test:semantic-layer && npm run test:data-pipeline && npm run test:optimize-context && npm run test:principle-extractor && npm run test:analytics-window && npm run test:funnel-analytics && npm run test:experiment-tracker && npm run test:build-metadata && npm run test:context-engine && npm run test:hf-papers && npm run test:marketing-experiment && npm run test:seo-gsd && npm run test:verify-run && npm run test:entitlement && npm run test:export-dpo-pairs && npm run test:export-hf-dataset && npm run test:license && npm run test:imperative-detector && npm run test:audit-pr-bot-contamination && npm run test:stripe-bootstrap-saas-catalog && npm run test:postinstall && npm run test:funnel-invariants && npm run test:cli-telemetry && npm run test:pro-parity && npm run test:model-tier-router && npm run test:computer-use-firewall && npm run test:skill-exporter && npm run test:statusline && npm run test:statusline-cache-aggregate && npm run test:public-repo-hygiene && npm run test:no-internal-orchestration-leaks && npm run test:evolution && npm run test:org-dashboard && npm run test:multi-hop-recall && npm run test:synthetic-dpo && npm run test:thumbgate-skill && npm run test:learn-hub && npm run test:feedback-fallback && npm run test:metaclaw && npm run test:server-lock && npm run test:control-tower && npm run test:pii-scanner && npm run test:data-governance && npm run test:lesson-inference && npm run test:semantic-dedup && npm run test:fs-utils && npm run test:cli-schema && npm run test:shipped-js-syntax && npm run test:tiktok-short-link && npm run test:explore && npm run test:lesson-reranker && npm run test:lesson-retrieval && npm run test:lesson-graph && npm run test:lesson-semantic-retrieval && npm run test:cross-encoder && npm run test:reflector-agent && npm run test:feedback-session && npm run test:feedback-history-distiller && npm run test:hallucination-detector && npm run test:history-distiller && npm run test:predictive-insights && npm run test:predictive-credible-range && npm run test:prove-predictive-insights && npm run test:statusbar-cli && npm run test:generate-instagram-card && npm run test:instagram-thumbgate-post && npm run test:publish-instagram-thumbgate && npm run test:lesson-synthesis && npm run test:lesson-canonical && npm run test:background-governance && npm run test:memory-migration && npm run test:prompt-dlp && npm run test:ephemeral-store && npm run test:agent-security && npm run test:skill-progressive && npm run test:per-step-scoring && npm run test:weekly-auto-post && npm run test:social-post-hourly && npm run test:social-quality-gate && npm run test:a2ui-engine && npm run test:gate-satisfy && npm run test:money-watcher && npm run test:budget && npm run test:quick-start && npm run test:utm && npm run test:product-feedback && npm run test:feedback-root-consolidator && npm run test:engagement-audit && npm run test:install-growth-automation && npm run test:publish-thumbgate-launch && npm run test:reconcile-thumbgate-campaign && npm run test:reddit-publisher && npm run test:schedule-thumbgate-campaign && npm run test:social-reply-monitor && npm run test:sync-launch-assets && npm run test:ai-search-visibility && npm run test:perplexity && npm run test:vlt && npm run test:hf-context && npm run test:proof-common && npm run test:xss-checkout-escape && npm run test:security-scanner && npm run test:agent-security-central && npm run test:llm-client && npm run test:managed-lesson-agent && npm run test:self-distill && npm run test:meta-agent && npm run test:harness-selector && npm run test:thumbgate-bench && npm run test:seo-guides && npm run test:enforcement-loop && npm run test:cli-agent-experience && npm run test:bot-detection && npm run test:checkout-archived-product-guard && npm run test:postgres-guard && npm run test:checkout-bot-guard && npm run test:checkout-pro-confirmation-gate && npm run test:checkout-human-gate && npm run test:checkout-interstitial-shown-beacon && npm run test:connect-panel && npm run test:first-block-upsell && npm run test:checkout-session-count && npm run test:checkout-utm-attribution && npm run test:utm-source-summary && npm run test:pricing-page-telemetry && npm run test:session-health && npm run test:session-episodes && npm run test:spec-gate && npm run test:decision-trace && npm run test:dashboard-insights && npm run test:telemetry-tracked-link-slug && npm run test:prompt-eval && npm run test:gate-coherence && npm run test:gate-eval && npm run test:high-roi && npm run test:public-static-assets && npm run test:token-savings && npm run test:numbers-page && npm run test:workflow-gate-checkpoint && npm run test:lesson-export-import && npm run test:landing-page-claims && npm run test:competitive-positioning-marketing && npm run test:medium-weekly && npm run test:dashboard-deeplink-e2e && npm run test:public-package-parity && npm run test:token-savings-dashboard && npm run test:cursor-wiring && npm run test:cursor-shell-gate && npm run test:pretooluse-injection && npm run test:recent-corrective-context && npm run test:durability-step && npm run test:mailer && npm run test:brand-assets && npm run test:enforcement-teeth && npm run test:bayes-optimal-gate && npm run test:swarm-coordinator && npm run test:session-report && npm run test:agent-reasoning-traces && npm run test:judge-reward && npm run test:llm-behavior-monitor && npm run test:prompting-os && npm run test:single-use-credential-gate && npm run test:structured-prompt-driven && npm run test:require-evidence-gate && npm run test:universal-claim-evaluator && npm run test:rule-validator && npm run test:bluesky-atproto && npm run test:social-reply-monitor-bluesky && npm run test:bluesky-delete-replies && npm run test:architect-kit-memory-bridge && npm run test:sonar-review-hotspots && npm run test:actionable-remediations && npm run test:gemini-embedding-policy && npm run test:agent-design-governance && npm run test:public-core-boundary && npm run test:hook-stop-verify-deploy && npm run test:hook-stop-anti-claim && npm run test:email-triage-quoting && npm run test:claim-gate-stop && npm run test:feedback-reward-claim-lessons &&npm run test:stop-hook-json-contract && npm run test:plausible-server-events && npm run test:activation-tracker && npm run test:activation-onboarding && npm run test:unified-revenue-rollup && npm run test:conversion-rate-stats && npm run test:external-customer-audit && npm run test:telemetry-export && npm run test:stripe-checkout-diagnostic && npm run test:stripe-business-identity-probe && npm run test:revenue-observability-doctor && npm run test:jsonl-window && npm run test:observability-env && npm run test:glama-mcp && npm run test:prove-glama-mcp && npm run test:public-bundle-ratchet && npm run test:pack-runtime-integrity && npm run test:packed-cli-require-closure && npm run test:hook-self-protection && npm run test:self-protect-enforcement && npm run test:never-bypass-branch-protection && npm run test:stripe-payment-link-update && npm run test:ci-cd-hygiene-audit && npm run test:verify-marketing-pages-deployed && npm run test:install-email-capture && npm run test:install-shim && npm run test:hook-runtime-subcommands && npm run test:implementation-notes && npm run test:enforce-rules-without-daily-cap && npm run test:free-to-paid-conversion-units && npm run test:metrics-real-endpoint && npm run test:cli-trial-and-help && npm run test:cost-cli && npm run test:silent-failure-cluster && npm run test:workos-production-guard && npm run test:partner-landing && npm run test:memory-pyramid && npm run test:proof:truth && node --test tests/adaptive-reliability.test.js && npm run test:mcp-oauth-reviewer && npm run test:dfcx-gate && npm run test:dfcx-gate-server && npm run test:vertex-scorer && npm run test:dashboard-chat && npm run test:gitar-integration && npm run test:secret-redaction && npm run test:discoverable-skills && npm run test:discoverable-skill-skills && npm run test:sync-telemetry && npm run test:leak-scanner && npm run test:team-sync && npm run test:rag-pipeline && npm run test:autonomous-reliability && npm run test:eval-rag && npm run test:async-eval-observability && npm run test:letta-adapter && npm run test:policy-engine-adapter && npm run test:tool-contract-validator && npm run test:check-update && npm run test:hermes-gate && npm run test:memory-provider-enforcement-bridge && npm run test:publisher-credential-guards && npm run test:reddit-browser-notification-watch && npm run test:payment-rails && npm run test:service-checkout-price-integrity && npm run test:cursor-marketplace-doctor && npm run test:github-marketplace-action && npm run test:plugin-hooks-manifest && npm run test:okara-money-promo-automation && npm run test:retrieval-window && npm run test:risk-quality && npm run test:eval-mining && npm run test:state-backup && npm run test:eval-golden && npm run test:task-scope-lease && npm run test:evaluations-page && npm run test:agent-install-paths && npm run test:mcp-gate-check && npm run test:adapter-pins && npm run test:secret-egress && npm run test:harness-tool-names && npm run test:feedback-reward && npm run test:capability-wiring && npm run test:autonomous-mandate && npm run test:memory-near-dupe && npm run test:lesson-retrieval-dedupe-backfill && npm run test:matryoshka-embedding && npm run test:rag-embedding-identity && npm run test:switchyard-router && npm run test:bulk-cloud-tier && npm run test:session-lease && npm run test:compare-agoragentic && npm run test:compare-dirac && npm run test:compare-aperture && npm run test:qwen-adapter && npm run test:qwen38-max-cost-optimizer && npm run test:openai-compatible-embed && npm run test:legal-public-routes && npm run test:gurobi && npm run test:mcp-session-handles && npm run test:agent-egress-policy && npm run test:budget-aware-gates-proof && npm run test:edotenv-rl-gateway && npm run test:rsi-safety-hillclimb && npm run test:research-agent-harness && npm run test:governance-curriculum && npm run test:provider-receipt-contract && npm run test:adaptive-governance-arena && npm run test:gpc-optout && npm run test:override-audit && npm run test:admin-override && npm run test:progressive-wiring && npm run test:security-questionnaire && npm run test:pipeline-compass && npm run test:guide-progressive && npm run test:git-at-scale && npm run test:rule-sprawl && npm run test:hidden-entry && npm run test:solver-parity && npm run test:mcp-writeguard && npm run test:latency-budget && npm run test:gates-tree-scope && npm run test:actor-critic && npm run test:infoq-engage && npm run test:infoq-architect-honesty && npm run test:qwenwork-policy-group && npm run test:hermes-platform && npm run test:future-agi && npm run test:futureagi-prepost && npm run test:five-walls && npm run test:llm-surface-consistency && npm run test:dashboard-oversized-logs && npm run test:agent-action-inventory && npm run test:simatree-data-governance && npm run test:governance-conflict-audit && npm run test:agent-identity-plane && npm run test:mcp-identity-bootstrap && npm run test:alert-noise-ledger && npm run test:webmcp && npm run test:ideabrowser-connector && npm run test:perf-budget && npm run test:agent-loop && npm run test:nvhbm-base-die-gates && npm run test:graphrag-schema-first-multi-hop && npm run test:agentic-prompt-pipelines && npm run test:ai-governance-operating-plan && npm run test:claw-harness-production && npm run test:double-blind-eval-protocol && npm run test:codex-runbook-flywheel && npm run test:explainx-trending && npm run test:graphify && npm run test:tooling-scripts && npm run test:synthetic-customer-panel && npm run test:star-history && npm run test:github-achievement-honesty && npm run test:ai-identity-checklist && npm run test:knowledge-graph-fuse && npm run test:skill-library-compact && npm run test:intent-scope-runtime && npm run test:unicode-tag-block-normalize && npm run test:issue-3702-action-not-substring && npm run test:mantis-critic-review && npm run test:break-glass-gates-propose && npm run test:thumbgate-daily-discoveries-publish && npm run test:agensi-skill-listing && npm run test:tailscale-p2p-adapter && npm run test:siren-mcp && npm run test:vulnerability-diode && npm run test:enterprise-intelligence && npm run test:third-author && npm run test:embeddinggemma && npm run test:session-interactivity && npm run test:operator-framework-page && npm run test:monthly-report && npm run test:checkout-funnel-bot-filter && npm run test:catastrophic-default-deny && npm run test:rule-cap-hit && npm run test:plugin-eval-gate && npm run test:jules-cloud-fleet-dispatcher && npm run test:openrouter-armor-partnership-diode && npm run test:profound-aeo-citation-engine && npm run test:craft-playbook-gate && npm run test:mac-dispatch-loop && npm run test:graphrag-moe-jit-evals && npm run test:egm-goldfish-packet && npm run test:hosted-tenant-isolation && npm run test:owner-admin && npm run test:admin-truth-ui && npm run test:admin-usage-mrr && npm run test:no-orphan-posthog && npm run test:refund-policy-consistency && npm run test:owner-checkout-panel && npm run test:owner-telemetry-visitors && npm run test:project-scope && npm run test:session-context-dedupe && npm run test:ship-pipeline",
768
772
  "test:thumbgate-daily-discoveries-publish": "node --test tests/thumbgate-daily-discoveries-publish.test.js",
769
773
  "test:dashboard-oversized-logs": "node --test tests/dashboard-oversized-log-resilience.test.js",
770
774
  "test:python": "python3 -m pytest tests/*.py",
@@ -837,7 +841,7 @@
837
841
  "test:thumbgate-skill": "node --test tests/thumbgate-skill.test.js",
838
842
  "test:discoverable-skills": "node --test tests/discoverable-skills.test.js",
839
843
  "test:discoverable-skill-skills": "node --test tests/discoverable-skill-skills.test.js",
840
- "test:statusline": "node --test tests/claude-feedback-sync.test.js tests/statusline.test.js tests/statusline-aggregation.test.js tests/statusline-context.test.js tests/statusline-links.test.js tests/statusline-e2e.test.js tests/statusline-human-counts.test.js tests/statusline-human-counts-env.test.js",
844
+ "test:statusline": "node --test tests/claude-feedback-sync.test.js tests/statusline.test.js tests/statusline-aggregation.test.js tests/statusline-context.test.js tests/statusline-links.test.js tests/statusline-e2e.test.js tests/statusline-human-counts.test.js tests/statusline-human-counts-env.test.js tests/statusline-fake-thumbs.test.js tests/e2e/one-count.e2e.test.js",
841
845
  "test:statusline-cache-aggregate": "node --test tests/statusline-cache-aggregate.test.js",
842
846
  "test:no-internal-orchestration-leaks": "node --test tests/no-internal-orchestration-leaks.test.js",
843
847
  "test:memory-dedup": "node --test tests/memory-dedup.test.js",
@@ -977,6 +981,9 @@
977
981
  "adk:consolidate": "node scripts/adk-consolidator.js",
978
982
  "adk:watch": "node scripts/adk-consolidator.js --watch",
979
983
  "pr:manage": "node scripts/pr-manager.js",
984
+ "ship": "node scripts/ship.js",
985
+ "ship:policy": "node scripts/ship-policy.js",
986
+ "test:ship-pipeline": "node --test tests/ship-policy.test.js tests/ship.test.js",
980
987
  "branch-protection:check": "node scripts/sync-branch-protection.js --check",
981
988
  "branch-protection:sync": "node scripts/sync-branch-protection.js",
982
989
  "rulesets:check": "node scripts/sync-repository-rulesets.js --check",
@@ -1225,7 +1232,7 @@
1225
1232
  "test:mcp-oauth-reviewer": "node --test tests/mcp-oauth-reviewer.test.js",
1226
1233
  "test:dashboard-chat": "node --test tests/dashboard-chat.test.js",
1227
1234
  "test:gitar-integration": "node --test tests/gitar-integration.test.js",
1228
- "test:api": "node --test --test-concurrency=1 tests/api-server.test.js tests/api-events-sse.test.js tests/api-auth-config.test.js tests/mcp-server.test.js tests/adapters.test.js tests/openapi-parity.test.js tests/budget-guard.test.js tests/context-manager.test.js tests/contextfs.test.js tests/job-api.test.js tests/pack-templates.test.js tests/dashboard.test.js tests/dashboard-jsonl-bound.test.js tests/dashboard-limits.test.js tests/cli-progress.test.js tests/dashboard-render-spec.test.js tests/dashboard-html.test.js tests/agent-readiness.test.js tests/progressive-signoff.test.js tests/mcp-policy.test.js tests/subagent-profiles.test.js tests/intent-router.test.js tests/internal-agent-bootstrap.test.js tests/lesson-search.test.js tests/thumbgate-search.test.js tests/document-intake.test.js tests/rubric-engine.test.js tests/self-healing-check.test.js tests/self-heal.test.js tests/feedback-schema.test.js tests/thompson-sampling.test.js tests/feedback-sequences.test.js tests/diversity-tracking.test.js tests/vector-store.test.js tests/gemini-embedding-policy.test.js tests/feedback-attribution.test.js tests/hybrid-feedback-context.test.js tests/loop-closure.test.js tests/code-reasoning.test.js tests/feedback-loop.test.js tests/feedback-inbox-read.test.js tests/feedback-to-memory.test.js tests/test-coverage.test.js tests/version-metadata.test.js tests/claude-mcpb.test.js tests/claude-codex-bridge.test.js tests/cursor-plugin.test.js tests/codex-plugin.test.js tests/ide-marketplace-extensions.test.js tests/telemetry-analytics.test.js tests/claude-first-claims.test.js tests/public-landing.test.js tests/lessons-page.test.js tests/pro-landing.test.js tests/local-model-profile.test.js tests/risk-scorer.test.js tests/context-compaction.test.js tests/reminder-engine.test.js tests/verification-loop.test.js tests/async-job-runner.test.js tests/commerce-quality.test.js tests/recall-limit.test.js tests/problem-detail.test.js tests/natural-language-harness.test.js tests/settings-hierarchy.test.js tests/classifier-routing.test.js tests/dashboard-response-cache.test.js tests/onboarding-first-block.test.js tests/sso-authorize-no-typed-email.test.js tests/admin-board.test.js tests/sso-next-redirect.test.js tests/admin-money-labels.test.js tests/admin-observability.test.js tests/funnel-copy.test.js tests/owner-money-stripe.test.js",
1235
+ "test:api": "node --test --test-concurrency=1 tests/api-server.test.js tests/api-events-sse.test.js tests/api-auth-config.test.js tests/mcp-server.test.js tests/adapters.test.js tests/openapi-parity.test.js tests/budget-guard.test.js tests/context-manager.test.js tests/contextfs.test.js tests/job-api.test.js tests/pack-templates.test.js tests/dashboard.test.js tests/dashboard-jsonl-bound.test.js tests/dashboard-limits.test.js tests/cli-progress.test.js tests/dashboard-render-spec.test.js tests/dashboard-html.test.js tests/agent-readiness.test.js tests/progressive-signoff.test.js tests/mcp-policy.test.js tests/subagent-profiles.test.js tests/intent-router.test.js tests/internal-agent-bootstrap.test.js tests/lesson-search.test.js tests/thumbgate-search.test.js tests/document-intake.test.js tests/rubric-engine.test.js tests/self-healing-check.test.js tests/self-heal.test.js tests/feedback-schema.test.js tests/thompson-sampling.test.js tests/feedback-sequences.test.js tests/diversity-tracking.test.js tests/vector-store.test.js tests/gemini-embedding-policy.test.js tests/feedback-attribution.test.js tests/hybrid-feedback-context.test.js tests/loop-closure.test.js tests/code-reasoning.test.js tests/feedback-loop.test.js tests/feedback-inbox-read.test.js tests/feedback-to-memory.test.js tests/test-coverage.test.js tests/version-metadata.test.js tests/claude-mcpb.test.js tests/claude-codex-bridge.test.js tests/cursor-plugin.test.js tests/codex-plugin.test.js tests/ide-marketplace-extensions.test.js tests/telemetry-analytics.test.js tests/claude-first-claims.test.js tests/public-landing.test.js tests/lessons-page.test.js tests/pro-landing.test.js tests/local-model-profile.test.js tests/risk-scorer.test.js tests/context-compaction.test.js tests/reminder-engine.test.js tests/verification-loop.test.js tests/async-job-runner.test.js tests/commerce-quality.test.js tests/recall-limit.test.js tests/problem-detail.test.js tests/natural-language-harness.test.js tests/settings-hierarchy.test.js tests/classifier-routing.test.js tests/dashboard-response-cache.test.js tests/onboarding-first-block.test.js tests/activation-first-block-delivery.test.js tests/runtime-version-skew.test.js tests/sso-authorize-no-typed-email.test.js tests/admin-board.test.js tests/sso-next-redirect.test.js tests/admin-money-labels.test.js tests/admin-observability.test.js tests/funnel-copy.test.js tests/owner-money-stripe.test.js",
1229
1236
  "test:leak-scanner": "node --test tests/leak-scanner.test.js",
1230
1237
  "test:tool-contract-validator": "node --test tests/tool-contract-validator.test.js",
1231
1238
  "test:letta-adapter": "node --test tests/letta-adapter.test.js",
@@ -1302,7 +1309,7 @@
1302
1309
  "test:adapter-pins": "node --test tests/adapter-version-pins.test.js",
1303
1310
  "test:secret-egress": "node --test tests/secret-egress-gate.test.js",
1304
1311
  "test:harness-tool-names": "node --test tests/harness-tool-names.test.js",
1305
- "test:feedback-reward": "node --test tests/feedback-reward-score.test.js",
1312
+ "test:feedback-reward": "node --test tests/feedback-reward-score.test.js tests/feedback-thumbs-down-promotion.test.js",
1306
1313
  "test:capability-wiring": "node --test tests/capability-wiring-ratchet.test.js && node --test tests/prove-vlt-dogfood.test.js && node --test tests/context-engineering-checklist.test.js",
1307
1314
  "test:llm-gateway": "node --test tests/llm-gateway-provider.test.js",
1308
1315
  "test:request-envelope": "node --test tests/request-envelope.test.js",
@@ -1470,7 +1477,7 @@
1470
1477
  "test:no-orphan-posthog": "node --test --test-force-exit tests/no-orphan-posthog.test.js",
1471
1478
  "test:admin-truth-ui": "node --test --test-force-exit tests/admin-truth-ui.test.js",
1472
1479
  "test:admin-usage-mrr": "node --test --test-force-exit tests/admin-usage-mrr.test.js",
1473
- "test:owner-admin": "node --test tests/owner-admin.test.js tests/owner-admin-payment-cursor.test.js tests/owner-reporting-semantics.test.js tests/owner-summary-quality.test.js"
1480
+ "test:owner-admin": "node --test tests/unit-economics.test.js tests/admin-economics.test.js tests/owner-admin.test.js tests/owner-admin-payment-cursor.test.js tests/owner-reporting-semantics.test.js tests/owner-summary-quality.test.js"
1474
1481
  },
1475
1482
  "keywords": [
1476
1483
  "mcp",
@@ -1526,7 +1533,7 @@
1526
1533
  },
1527
1534
  "dependencies": {
1528
1535
  "@anthropic-ai/sdk": "^1.3.0",
1529
- "@google/genai": "3.0.0",
1536
+ "@google/genai": "3.6.1",
1530
1537
  "@lancedb/lancedb": "^0.41.0",
1531
1538
  "apache-arrow": "^18.1.0",
1532
1539
  "better-sqlite3": "^12.11.1",
@@ -1551,7 +1558,7 @@
1551
1558
  "js-yaml": "5.5.0",
1552
1559
  "sharp": "0.35.5",
1553
1560
  "shell-quote": "1.12.0",
1554
- "undici": "8.12.4",
1561
+ "undici": "8.13.1",
1555
1562
  "test-exclude": {
1556
1563
  "glob": "14.0.3",
1557
1564
  "minimatch": "11.0.4"
@@ -1564,7 +1571,7 @@
1564
1571
  "@playwright/test": "^1.62.1",
1565
1572
  "c8": "^12.0.0",
1566
1573
  "launch-editor": "^2.14.2",
1567
- "undici": "8.12.4"
1574
+ "undici": "8.13.1"
1568
1575
  },
1569
1576
  "hotfix": "gate-check-bypass-2026-06-03"
1570
1577
  }
package/public/admin.html CHANGED
@@ -276,16 +276,17 @@
276
276
  </main>
277
277
  <footer>
278
278
  Private and read-only. Owner and test purchases are left out of every
279
- revenue number. JSON for agents: /v1/admin/summary and /v1/admin/alerts.
279
+ revenue number. JSON for agents: /v1/admin/summary, /v1/admin/economics and /v1/admin/alerts.
280
280
  </footer>
281
281
  <script nonce="__ADMIN_NONCE__">
282
282
  'use strict';
283
283
  const content = document.getElementById('content');
284
284
  // Today answers "does anything need me, and how did this week go". Overview repeated it, so it left the menu;
285
285
  // its numbers stay in /v1/admin/summary for agents.
286
- const sections = ['money', 'analytics', 'observability', 'stripe', 'data'];
286
+ const sections = ['money', 'economics', 'analytics', 'observability', 'stripe', 'data'];
287
287
  const titles = {
288
288
  money: 'Today',
289
+ economics: 'Unit economics',
289
290
  overview: 'Overview',
290
291
  stripe: 'Stripe records',
291
292
  data: 'Hosted data',
@@ -890,6 +891,57 @@
890
891
  );
891
892
  parent.append(element('p', 'The channel is the utm source a checkout carried, or direct. Bots and your own checkouts are left out of starts; a customer counts once, for their first paid checkout.', 'muted'));
892
893
  }
894
+ function minutesWords(m) {
895
+ if (m < 60) return Math.round(m) + ' min';
896
+ if (m < 1440) return Math.round((m / 60) * 10) / 10 + ' h';
897
+ return Math.round((m / 1440) * 10) / 10 + ' days';
898
+ }
899
+ const usd = (n) => (Number.isFinite(n) ? '$' + (Math.abs(n) < 1 && n !== 0 ? n.toFixed(4) : n.toFixed(2)) : null);
900
+ function economicsBlock(parent, data) {
901
+ const reasons = data.reasons || {};
902
+ const or = (value, reason) => (value === null || value === undefined ? reason || 'Source not available right now' : value);
903
+ const d = data.delivery || {};
904
+ parent.append(element('h3', 'Cost to deliver · past 30 days, US dollars'));
905
+ cards(parent, {
906
+ 'Hosting (Railway, measured CPU and memory at list rates)': or(usd(d.hostingUsd), reasons.hosting),
907
+ 'Email (sends counted by the app)': d.emailUsd === null || d.emailUsd === undefined ? 'Not counted yet' : usd(d.emailUsd) + ' · ' + d.emails + ' sent',
908
+ 'Payment fees (Stripe)': or(usd(d.paymentFeesUsd), reasons.paymentFees),
909
+ 'Fixed delivery costs': d.fixedUsd ? usd(d.fixedUsd) : 'None recorded',
910
+ 'Total delivery cost': or(usd(d.totalUsd), 'Not complete yet'),
911
+ 'Build and internal costs (kept apart)': data.build?.totalUsd ? usd(data.build.totalUsd) : 'None recorded',
912
+ }, true);
913
+ parent.append(element('h3', 'Per unit'));
914
+ cards(parent, {
915
+ 'Serving cost per active install': or(usd(data.perActiveInstallUsd), reasons.activeInstalls || reasons.hosting),
916
+ 'Delivery cost per paying customer': or(usd(data.perPayingCustomerUsd), reasons.payingCustomers || reasons.hosting),
917
+ 'Revenue, past 30 days (one-time plus renewals)': or(usd(data.revenue?.totalUsd), 'Stripe not available right now'),
918
+ 'Contribution (revenue minus delivery cost)': data.contribution ? usd(data.contribution.contributionUsd) + (Number.isFinite(data.contribution.marginPct) ? ' · ' + Math.round(data.contribution.marginPct * 1000) / 10 + '% margin' : '') : 'Not complete yet',
919
+ }, true);
920
+ parent.append(element('h3', 'Contribution per sale, by plan'));
921
+ const plans = Object.values(data.plans || {}).filter((plan) => plan && Number.isFinite(plan.priceUsd));
922
+ table(parent, [
923
+ ['Plan', (r) => r.name],
924
+ ['Price', (r) => usd(r.priceUsd) + (r.priceBasis === 'list_price' ? ' (list)' : ' (Stripe average)')],
925
+ ['Payment fee', (r) => usd(r.paymentFeeUsd)],
926
+ ['Serving cost', (r) => usd(r.deliveryCostUsd)],
927
+ ['Keeps', (r) => usd(r.contributionUsd) + ' · ' + Math.round(r.marginPct * 1000) / 10 + '%' + (r.laborNote ? ' · labor not counted' : '')],
928
+ ], plans);
929
+ const access = data.paymentAccess;
930
+ parent.append(element('h3', 'Payment to access'));
931
+ if (!access) parent.append(element('p', 'Stripe or the key store is not available right now, so the check did not run.', 'notice'));
932
+ else if (access.status === 'unavailable') parent.append(element('p', access.reason, 'notice'));
933
+ else {
934
+ cards(parent, {
935
+ 'Entitled but no key': String(access.paidWithoutAccess),
936
+ 'Failed payment, key still active': access.failedPaymentWithAccess === null ? 'Not checked' : String(access.failedPaymentWithAccess),
937
+ 'Active paid keys with no Stripe payment': String(access.accessWithoutStripePayment),
938
+ 'Subscriptions with a failed payment': access.failedPaymentSubscriptions === null ? 'Not checked' : String(access.failedPaymentSubscriptions),
939
+ }, true);
940
+ parent.append(element('p', 'Entitled means an active subscription or a credit pack bought in the past year; service orders and canceled subscriptions grant no key. Used-up credit packs (' + access.exhaustedCreditKeys + ') were provisioned, so they are not missing keys. Keys with no Stripe payment can be GitHub Marketplace, PayPal or manual grants, so they are listed for review, not called wrong. Trial and free keys are left out (' + access.activeTrialOrFreeKeys + ').' + (access.complete ? '' : ' Some Stripe lists were cut short, so these counts are a lower bound.'), 'muted'));
941
+ }
942
+ for (const reason of [reasons.fixed, reasons.build, reasons.currencies, d.hosting?.reason, d.emailBasis]) if (reason) parent.append(element('p', reason, 'muted'));
943
+ parent.append(element('p', 'Rates checked ' + data.ratesCheckedAt + ' and kept in config/unit-costs.json with their sources. JSON for agents: /v1/admin/economics.', 'muted'));
944
+ }
893
945
  function usageBlock(parent, usage) {
894
946
  parent.append(element('h3', 'Product usage · CLI installs, past 30 days'));
895
947
  if (!usage) {
@@ -905,6 +957,8 @@
905
957
  'Ran init in this window': usage.initsInWindow,
906
958
  'Captured feedback (activated)': String(usage.activatedInstalls) + share(usage.activatedInstalls),
907
959
  'Came back on a second day': String(usage.returningInstalls) + share(usage.returningInstalls),
960
+ 'First value: a real gate blocked a tool call': Number.isFinite(usage.firstValueInstalls) ? String(usage.firstValueInstalls) + share(usage.firstValueInstalls) : 'Not reported by this telemetry yet',
961
+ 'Time to first value (median)': usage.timeToFirstValue && Number.isFinite(usage.timeToFirstValue.medianMinutes) ? minutesWords(usage.timeToFirstValue.medianMinutes) + ' after install (' + usage.timeToFirstValue.installs + ' installs)' : 'N/A, no first block yet',
908
962
  },
909
963
  true,
910
964
  );
@@ -913,7 +967,7 @@
913
967
  'p',
914
968
  'An install is the anonymous id the CLI keeps in ~/.thumbgate. Your own machines, CI and flagged pings are left out (' +
915
969
  usage.excludedInstalls +
916
- ' excluded). Installs with telemetry turned off are not seen, so these are lower bounds. Gate blocks run locally and are not reported.',
970
+ ' excluded). Installs with telemetry turned off are not seen, so these are lower bounds. Gate blocks run locally; only the first block on each install is reported, with the minutes since install.',
917
971
  'muted',
918
972
  ),
919
973
  );
@@ -922,6 +976,7 @@
922
976
  detail(parent, 'Installs by platform', usage.byPlatform);
923
977
  }
924
978
  function render(parent, section, data) {
979
+ if (section === 'economics') economicsBlock(parent, data);
925
980
  if (section === 'money') {
926
981
  alertsBlock(parent);
927
982
  parent.append(element('h3', 'This week at a glance'));
package/public/index.html CHANGED
@@ -5,7 +5,7 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
6
  <meta name="generator" content="ThumbGate">
7
7
  <meta name="author" content="Igor Ganapolsky">
8
- <meta name="thumbgate-version" content="1.40.12">
8
+ <meta name="thumbgate-version" content="1.40.14">
9
9
  __GOOGLE_SITE_VERIFICATION_META__
10
10
  <link rel="icon" type="image/png" href="/thumbgate-icon.png">
11
11
  <link rel="canonical" href="__APP_ORIGIN__/">
@@ -1047,7 +1047,7 @@ $ ... "rm -rf ~/"
1047
1047
 
1048
1048
  <footer>
1049
1049
  <div class="shell footer-inner">
1050
- <span>ThumbGate · MIT License · npm v1.40.12</span>
1050
+ <span>ThumbGate · MIT License · npm v1.40.14</span>
1051
1051
  <div class="footer-links">
1052
1052
  <a href="https://github.com/IgorGanapolsky/ThumbGate" target="_blank" rel="noopener">GitHub</a>
1053
1053
  <a href="/guide">Technical setup</a>