thumbgate 1.34.3 → 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.
- package/.agents/skills/cyberstrike-compare-not-clone/SKILL.md +36 -0
- package/.agents/skills/gitlab-sandbox-allowlist-not-trust/SKILL.md +77 -0
- package/.agents/skills/jit-harness-compare-not-clone/SKILL.md +34 -0
- package/.agents/skills/openui-catalog-compose-honesty/SKILL.md +64 -0
- package/.agents/skills/zvec-grep-compare-not-clone/SKILL.md +34 -0
- package/.claude-plugin/plugin.json +1 -1
- package/.well-known/llms.txt +1 -0
- package/.well-known/mcp/server-card.json +1 -1
- package/CONTRIBUTING.md +95 -0
- package/README.md +195 -632
- package/THIRD_PARTY_NOTICES.md +89 -0
- package/adapters/claude/.mcp.json +2 -2
- package/adapters/forge/forge.yaml +3 -3
- package/adapters/future-agi/.mcp.json +8 -0
- package/adapters/future-agi/FUTURE_AGI.md +23 -0
- package/adapters/future-agi/config.toml +3 -0
- package/adapters/future-agi/future-agi-bridge.js +9 -0
- package/adapters/future-agi/opencode.json +8 -0
- package/adapters/herdr/herdr-plugin.toml +18 -0
- package/adapters/mcp/server-stdio.js +238 -25
- package/adapters/opencode/opencode.json +1 -1
- package/adapters/workos/WORKOS.md +52 -0
- package/bin/cli.js +373 -5
- package/bin/futureagi-bridge +9 -0
- package/config/gate-templates.json +653 -4
- package/config/gates/actor-critic-audit.json +34 -0
- package/config/gates/default.json +21 -2
- package/config/gates/five-walls-governance.json +34 -0
- package/config/gates/future-agi-guardrails.json +34 -0
- package/config/gates/radware-threat-defense-2026.json +61 -0
- package/config/gates/simatree-data-governance.json +33 -0
- package/config/mcp-allowlists.json +4 -0
- package/config/merge-quality-checks.json +10 -1
- package/config/model-candidates.json +382 -24
- package/config/model-tiers.json +18 -0
- package/config/post-deploy-marketing-pages.json +10 -0
- package/config/progressive/01-wire-only.json +11 -0
- package/config/progressive/02-dashboard-empty-ok.json +10 -0
- package/config/progressive/03-one-lesson.json +10 -0
- package/config/progressive/04-warn-fires.json +11 -0
- package/config/progressive/05-strict-optional.json +11 -0
- package/config/progressive/README.md +15 -0
- package/config/schemas/broker-execution-receipt.schema.json +139 -0
- package/config/schemas/provider-execution-attestation-v1.schema.json +58 -0
- package/conformance/provider-attestation/vectors.json +320 -0
- package/docs/specs/provider-execution-attestation-v1.md +69 -0
- package/openapi/openapi.yaml +15 -0
- package/package.json +401 -147
- package/public/about.html +2 -2
- package/public/ai-malpractice-prevention.html +7 -7
- package/public/blog/a-10-dollar-vps-is-not-a-computer.html +143 -0
- package/public/blog/a-receipt-is-not-world-state.html +388 -0
- package/public/blog/git-at-agent-scale.html +374 -0
- package/public/blog/no-llm-in-the-gate.html +133 -0
- package/public/blog.html +80 -0
- package/public/case-studies.html +16 -1
- package/public/compare.html +28 -0
- package/public/diagnostic.html +216 -7
- package/public/docs/connectors.html +39 -0
- package/public/federal.html +2 -2
- package/public/founders.html +639 -0
- package/public/index.html +87 -9
- package/public/install.html +8 -8
- package/public/learn.html +39 -0
- package/public/numbers.html +2 -2
- package/public/peter.html +310 -0
- package/public/platform-partners.html +119 -0
- package/public/pricing.html +24 -3
- package/public/privacy.html +117 -0
- package/public/pro.html +17 -0
- package/public/support.html +62 -0
- package/public/terms.html +130 -0
- package/public/third-party-notices.html +95 -0
- package/public/yt.html +351 -0
- package/scripts/action-receipts.js +133 -3
- package/scripts/adaptive-governance-arena.js +349 -0
- package/scripts/admin-override.js +205 -0
- package/scripts/agent-action-inventory.js +869 -0
- package/scripts/agent-audit-trace.js +42 -2
- package/scripts/agent-egress-policy.js +1117 -0
- package/scripts/agent-memory-lifecycle.js +141 -2
- package/scripts/agent-operations-planner.js +441 -1
- package/scripts/agent-readiness.js +68 -0
- package/scripts/agent-security-central.js +647 -0
- package/scripts/allowlist-bridge-honesty.js +417 -0
- package/scripts/async-job-runner.js +102 -11
- package/scripts/audit-trail.js +212 -0
- package/scripts/auto-promote-gates.js +178 -27
- package/scripts/billing.js +1 -1
- package/scripts/broker-execution-receipts.js +719 -0
- package/scripts/budget-aware-gates-proof.js +423 -0
- package/scripts/claude-feedback-sync.js +29 -3
- package/scripts/claw-harness-production.js +237 -0
- package/scripts/cli-progress.js +111 -0
- package/scripts/cli-schema.js +163 -1
- package/scripts/codex-runbook-flywheel.js +318 -0
- package/scripts/context-footprint.js +186 -0
- package/scripts/contextfs.js +143 -61
- package/scripts/dashboard-limits.js +27 -0
- package/scripts/dashboard.js +279 -9
- package/scripts/deepseek-v4-runtime-guardrails.js +72 -6
- package/scripts/docker-sandbox-planner.js +18 -0
- package/scripts/double-blind-eval-protocol.js +252 -0
- package/scripts/edotenv-rl-gateway.js +259 -0
- package/scripts/ensure-production-search-corpus.js +162 -0
- package/scripts/eval-holdout.js +311 -0
- package/scripts/feedback-aggregate.js +21 -2
- package/scripts/feedback-loop.js +87 -5
- package/scripts/feedback-quality.js +9 -0
- package/scripts/file-ledger-lock.js +4 -1
- package/scripts/financial-control-plane.js +41 -1
- package/scripts/find-dormant-requires.js +118 -0
- package/scripts/fs-utils.js +84 -8
- package/scripts/gate-stats.js +2 -2
- package/scripts/gates-engine.js +859 -58
- package/scripts/generate-case-study-outreach.js +24 -15
- package/scripts/git-at-scale.js +628 -0
- package/scripts/governance-conflict-audit.js +1650 -0
- package/scripts/governance-difficulty-curriculum.js +328 -0
- package/scripts/graphrag-retrieval.js +275 -0
- package/scripts/gurobi-optimizer.js +324 -0
- package/scripts/gurobi_optimizer.py +485 -0
- package/scripts/harness-selector.js +82 -1
- package/scripts/hidden-entry-points.js +284 -0
- package/scripts/human-escalation.js +199 -1
- package/scripts/hybrid-feedback-context.js +152 -19
- package/scripts/intent-governed-execution.js +602 -0
- package/scripts/intervention-policy.js +123 -20
- package/scripts/jit-harness-compose.js +628 -0
- package/scripts/jsonl-watcher.js +10 -0
- package/scripts/lesson-embedding-index.js +95 -12
- package/scripts/lesson-retrieval.js +105 -19
- package/scripts/local-model-profile.js +19 -2
- package/scripts/mailer/resend-mailer.js +1 -1
- package/scripts/matryoshka-embedding.js +235 -0
- package/scripts/mcp-oauth.js +42 -4
- package/scripts/mcp-session-handles.js +1016 -0
- package/scripts/mcp-wiring-doctor.js +314 -0
- package/scripts/memory-firewall.js +115 -2
- package/scripts/memory-scope-readiness.js +299 -0
- package/scripts/memory-vs-rag-route.js +161 -0
- package/scripts/model-tier-router.js +148 -21
- package/scripts/nvidia-specdecode-al-doctor.js +536 -0
- package/scripts/openui-catalog-compose-honesty.js +593 -0
- package/scripts/operational-integrity.js +19 -1
- package/scripts/override-audit.js +213 -0
- package/scripts/package-manager-honesty-doctor.js +458 -0
- package/scripts/pr-manager.js +63 -1
- package/scripts/prove-herdr-adapter.js +52 -0
- package/scripts/prove-memory-pyramid-and-symbolic-canvas.js +95 -0
- package/scripts/prove-workos.js +73 -0
- package/scripts/provider-attestation-conformance.js +192 -0
- package/scripts/provider-receipt-contract.js +136 -0
- package/scripts/qwen38-max-cost-optimizer.js +401 -0
- package/scripts/radware-threat-defense.js +280 -0
- package/scripts/rag-embedding-identity.js +221 -0
- package/scripts/rag-precision-guardrails.js +112 -2
- package/scripts/remote-feedback-capture.js +159 -0
- package/scripts/research-agent-harness.js +256 -0
- package/scripts/rsi-safety-hillclimb.js +200 -0
- package/scripts/rule-sprawl.js +188 -0
- package/scripts/schedule-manager.js +147 -0
- package/scripts/self-heal.js +8 -0
- package/scripts/session-lease.js +415 -0
- package/scripts/simatree-data-governance.js +347 -0
- package/scripts/slo-alert-engine.js +172 -7
- package/scripts/solver-parity.js +539 -0
- package/scripts/stealth-memory-injection-gate.js +333 -0
- package/scripts/switchyard-router.js +366 -0
- package/scripts/telemetry-analytics.js +84 -27
- package/scripts/temporal-decay-weighting.js +138 -0
- package/scripts/test-all.js +165 -0
- package/scripts/token-savings.js +42 -0
- package/scripts/tool-kpi-tracker.js +108 -5
- package/scripts/tool-registry.js +193 -5
- package/scripts/universal-claim-evaluator.js +14 -2
- package/scripts/vector-store.js +279 -9
- package/scripts/workflow-notebook.js +391 -0
- package/scripts/workflow-sentinel.js +111 -12
- package/scripts/workos-production-guard.js +260 -0
- package/scripts/workspace-search-route.js +515 -0
- package/server.json +2 -2
- package/src/agent-identity-boundary.js +76 -0
- package/src/agent-retrieval-cache.js +155 -0
- package/src/alert-noise-ledger.js +502 -0
- package/src/api/server.js +802 -185
- package/src/git-fast-cache.js +220 -0
- package/src/git-wal-sync.js +156 -0
- package/src/hash-anchored-edit.js +82 -0
- package/src/hermes-platform-protocol.js +475 -0
- package/src/hermes-sync-plane.js +241 -0
- package/src/index.js +30 -1
- package/src/iso42001-compliance-guard.js +97 -0
- package/src/latency-budget.js +244 -0
- package/src/mcp-writeguard.js +316 -0
- package/src/miminions-adapter.js +106 -0
- package/src/pipeline-compass.js +104 -0
- package/src/ppl-alert-pipeline.js +284 -0
- package/src/rendezvous-router.js +90 -0
- package/src/security-questionnaire.js +195 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
+
<title>Third-Party Notices — ThumbGate</title>
|
|
7
|
+
<meta name="description" content="Third-party open-source notices and trademark attributions for ThumbGate.">
|
|
8
|
+
<link rel="canonical" href="https://thumbgate.ai/third-party-notices">
|
|
9
|
+
<style>
|
|
10
|
+
:root { --ink:#171d1a; --muted:#5b6761; --paper:#f5f2e9; --card:#fffdf8; --line:#d8d4c8; --green:#006e52; }
|
|
11
|
+
* { box-sizing:border-box; }
|
|
12
|
+
body { margin:0; color:var(--ink); background:var(--paper); font-family:Inter,ui-sans-serif,system-ui,-apple-system,sans-serif; line-height:1.6; }
|
|
13
|
+
a { color:var(--green); text-decoration:none; }
|
|
14
|
+
a:hover { text-decoration:underline; }
|
|
15
|
+
.shell { width:min(860px,calc(100% - 40px)); margin:0 auto; padding:48px 0 80px; }
|
|
16
|
+
nav { border-bottom:1px solid var(--line); background:rgba(245,242,233,.95); padding:16px 0; }
|
|
17
|
+
.nav-inner { width:min(860px,calc(100% - 40px)); margin:0 auto; display:flex; justify-content:space-between; align-items:center; }
|
|
18
|
+
.brand { font-weight:900; font-size:1.2rem; text-decoration:none; color:var(--ink); }
|
|
19
|
+
h1 { font-size:2.2rem; margin:24px 0 8px; letter-spacing:-.03em; }
|
|
20
|
+
h2 { font-size:1.35rem; margin:32px 0 12px; border-bottom:1px solid var(--line); padding-bottom:6px; letter-spacing:-.02em; }
|
|
21
|
+
table { width:100%; border-collapse:collapse; margin:18px 0; }
|
|
22
|
+
th, td { border:1px solid var(--line); padding:10px 12px; text-align:left; font-size:.92rem; }
|
|
23
|
+
th { background:#eae6d8; }
|
|
24
|
+
code { background:#eae6d8; padding:2px 6px; border-radius:4px; font-size:.9em; }
|
|
25
|
+
footer { margin-top:60px; padding-top:20px; border-top:1px solid var(--line); color:var(--muted); font-size:.88rem; }
|
|
26
|
+
.trademark { font-size:.8rem; color:var(--muted); margin-top:18px; line-height:1.5; }
|
|
27
|
+
</style>
|
|
28
|
+
</head>
|
|
29
|
+
<body>
|
|
30
|
+
<nav>
|
|
31
|
+
<div class="nav-inner">
|
|
32
|
+
<a class="brand" href="/">ThumbGate</a>
|
|
33
|
+
<div>
|
|
34
|
+
<a href="/pricing">Pricing</a> ·
|
|
35
|
+
<a href="/terms">Terms</a> ·
|
|
36
|
+
<a href="/privacy">Privacy</a>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
</nav>
|
|
40
|
+
|
|
41
|
+
<main class="shell">
|
|
42
|
+
<h1>Third-Party Notices</h1>
|
|
43
|
+
<p>The ThumbGate source code is released under the <a href="https://github.com/IgorGanapolsky/ThumbGate/blob/main/LICENSE">MIT License</a>. The following notices are required by the respective upstream licenses.</p>
|
|
44
|
+
|
|
45
|
+
<h2>Open-Source Dependencies</h2>
|
|
46
|
+
<p>Direct dependencies used in ThumbGate runtime services:</p>
|
|
47
|
+
<table>
|
|
48
|
+
<thead>
|
|
49
|
+
<tr><th>Package</th><th>License</th></tr>
|
|
50
|
+
</thead>
|
|
51
|
+
<tbody>
|
|
52
|
+
<tr><td><code>@anthropic-ai/sdk</code></td><td>MIT</td></tr>
|
|
53
|
+
<tr><td><code>@google/genai</code></td><td>Apache-2.0</td></tr>
|
|
54
|
+
<tr><td><code>@lancedb/lancedb</code></td><td>Apache-2.0</td></tr>
|
|
55
|
+
<tr><td><code>apache-arrow</code></td><td>Apache-2.0</td></tr>
|
|
56
|
+
<tr><td><code>better-sqlite3</code></td><td>MIT</td></tr>
|
|
57
|
+
<tr><td><code>dotenv</code></td><td>BSD-2-Clause</td></tr>
|
|
58
|
+
<tr><td><code>js-yaml</code></td><td>MIT</td></tr>
|
|
59
|
+
<tr><td><code>playwright-core</code></td><td>Apache-2.0</td></tr>
|
|
60
|
+
<tr><td><code>protobufjs</code></td><td>Apache-2.0 / BSD-3-Clause</td></tr>
|
|
61
|
+
<tr><td><code>stripe</code></td><td>MIT</td></tr>
|
|
62
|
+
</tbody>
|
|
63
|
+
</table>
|
|
64
|
+
|
|
65
|
+
<p>Development dependencies:</p>
|
|
66
|
+
<table>
|
|
67
|
+
<thead>
|
|
68
|
+
<tr><th>Package</th><th>License</th></tr>
|
|
69
|
+
</thead>
|
|
70
|
+
<tbody>
|
|
71
|
+
<tr><td><code>@changesets/changelog-github</code></td><td>MIT</td></tr>
|
|
72
|
+
<tr><td><code>@changesets/cli</code></td><td>MIT</td></tr>
|
|
73
|
+
<tr><td><code>@playwright/test</code></td><td>Apache-2.0</td></tr>
|
|
74
|
+
<tr><td><code>c8</code></td><td>MIT</td></tr>
|
|
75
|
+
<tr><td><code>undici</code></td><td>MIT</td></tr>
|
|
76
|
+
</tbody>
|
|
77
|
+
</table>
|
|
78
|
+
|
|
79
|
+
<p>Additional transitive dependencies are installed by npm. A complete dependency tree can be generated with <code>license-checker</code>.</p>
|
|
80
|
+
|
|
81
|
+
<h2>Trademark Attribution</h2>
|
|
82
|
+
<p>ThumbGate is an independent product. The following trademarks are owned by their respective owners and are referenced solely for compatibility and nominative fair use:</p>
|
|
83
|
+
<p>Anthropic, Claude, Claude Code, OpenAI, ChatGPT, Codex, Cursor, GitHub, Google, Gemini, Google Cloud Platform, Perplexity, Hermes, Model Context Protocol (MCP), Nvidia, Railway, Stripe, Supabase, PostHog, and Plausible.</p>
|
|
84
|
+
<p>Use of any third-party mark does not imply affiliation with, endorsement by, or sponsorship from the trademark owner.</p>
|
|
85
|
+
|
|
86
|
+
<h2>Proprietary Boundary</h2>
|
|
87
|
+
<p>The open-source <code>thumbgate</code> npm package (MIT licensed) covers the local CLI, MCP server, and public adapters. Hosted cloud services, enterprise dashboards, multi-tenant adapters, commercial policy-sync engines, and operational tooling for <code>thumbgate.app</code> are proprietary and governed by separate terms.</p>
|
|
88
|
+
|
|
89
|
+
<footer>
|
|
90
|
+
<p><a href="/">ThumbGate</a> · <a href="/terms">Terms of Service</a> · <a href="/privacy">Privacy Policy</a></p>
|
|
91
|
+
<p class="trademark">Third-party trademarks are the property of their respective owners.</p>
|
|
92
|
+
</footer>
|
|
93
|
+
</main>
|
|
94
|
+
</body>
|
|
95
|
+
</html>
|
package/public/yt.html
ADDED
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
__GOOGLE_SITE_VERIFICATION_META__
|
|
7
|
+
<title>ThumbGate maps six business-function agents onto existing pre-action gates</title>
|
|
8
|
+
<meta name="description" content="ThumbGate maps six business-function agents — lead gen, content, product, marketing, sales, ops — onto existing pre-action gates. Dedicated YouTube/CPC landing. Not an AI summit. Not a 6-agent OS. Not affiliated with Industry Rockstar.">
|
|
9
|
+
<meta property="og:title" content="Six business functions. Existing gates. Not a new agent OS.">
|
|
10
|
+
<meta property="og:description" content="YouTube and Google Ads traffic lands here, not the homepage. Install ThumbGate from GitHub, npm, or GitHub Marketplace. Free MIT license. No celebrity theater.">
|
|
11
|
+
<meta property="og:type" content="website">
|
|
12
|
+
<meta property="og:url" content="__APP_ORIGIN__/yt">
|
|
13
|
+
<link rel="canonical" href="__APP_ORIGIN__/yt">
|
|
14
|
+
<link rel="icon" type="image/png" href="/thumbgate-icon.png">
|
|
15
|
+
<meta property="og:image" content="/og.png">
|
|
16
|
+
<meta name="keywords" content="ThumbGate, pre-action gates, AI coding agents, YouTube landing, six-function agent team, context engineering, Infrastructure Firewall, Reliability Gateway">
|
|
17
|
+
<meta name="robots" content="index,follow">
|
|
18
|
+
|
|
19
|
+
<script defer data-domain="thumbgate.ai" src="https://plausible.io/js/script.js"></script>
|
|
20
|
+
__GA_BOOTSTRAP__
|
|
21
|
+
|
|
22
|
+
<script>
|
|
23
|
+
const gaMeasurementId = '__GA_MEASUREMENT_ID__';
|
|
24
|
+
const serverVisitorId = '__SERVER_VISITOR_ID__';
|
|
25
|
+
const serverSessionId = '__SERVER_SESSION_ID__';
|
|
26
|
+
const serverAcquisitionId = '__SERVER_ACQUISITION_ID__';
|
|
27
|
+
const serverTelemetryCaptured = '__SERVER_TELEMETRY_CAPTURED__' === 'true';
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<script type="application/ld+json">
|
|
31
|
+
{
|
|
32
|
+
"@context": "https://schema.org",
|
|
33
|
+
"@type": "SoftwareApplication",
|
|
34
|
+
"name": "ThumbGate",
|
|
35
|
+
"applicationCategory": "DeveloperApplication",
|
|
36
|
+
"operatingSystem": "Cross-platform, Node.js >=18.18.0",
|
|
37
|
+
"description": "Pre-action enforcement layer for AI coding agents. Maps six business functions onto existing gates. Not a 6-agent operating system.",
|
|
38
|
+
"url": "__APP_ORIGIN__/yt",
|
|
39
|
+
"license": "https://github.com/IgorGanapolsky/ThumbGate/blob/main/LICENSE",
|
|
40
|
+
"creator": { "@type": "Person", "name": "Igor Ganapolsky", "url": "https://github.com/IgorGanapolsky" }
|
|
41
|
+
}
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
<script type="application/ld+json">
|
|
45
|
+
{
|
|
46
|
+
"@context": "https://schema.org",
|
|
47
|
+
"@type": "FAQPage",
|
|
48
|
+
"mainEntity": [
|
|
49
|
+
{
|
|
50
|
+
"@type": "Question",
|
|
51
|
+
"name": "Is this the AI Unleashed Global Summit?",
|
|
52
|
+
"acceptedAnswer": {
|
|
53
|
+
"@type": "Answer",
|
|
54
|
+
"text": "No. ThumbGate is not affiliated with Industry Rockstar, Kane Minkus, Alessia Minkus, or the AI Unleashed Global Summit. Their event lives at events.aiunleashedglobalsummit.com. This page is a ThumbGate YouTube/CPC destination that maps six business functions onto gates that already ship."
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"@type": "Question",
|
|
59
|
+
"name": "How is this different from other AI events?",
|
|
60
|
+
"acceptedAnswer": {
|
|
61
|
+
"@type": "Answer",
|
|
62
|
+
"text": "Events teach. Gates enforce. ThumbGate is a PreToolUse hook layer: evaluate the proposed tool call, block known-bad actions, leave a receipt. You install it with npx thumbgate init. There is no webinar seat and no 6-agent operating system to buy."
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"@type": "Question",
|
|
67
|
+
"name": "Is this a new 6-agent OS?",
|
|
68
|
+
"acceptedAnswer": {
|
|
69
|
+
"@type": "Answer",
|
|
70
|
+
"text": "No. Lead gen, content, product, marketing, sales, and ops map onto existing ThumbGate surfaces: outbound-email-send, post-everywhere publish gates, eval-baseline, this dedicated landing, free GitHub/npm/Marketplace CTAs, and session-lease plus PreToolUse receipts."
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"@type": "Question",
|
|
75
|
+
"name": "What does it cost to start?",
|
|
76
|
+
"acceptedAnswer": {
|
|
77
|
+
"@type": "Answer",
|
|
78
|
+
"text": "GitHub, npm package thumbgate, and the free GitHub Marketplace Action listing are the CTAs on this page. npx thumbgate init is MIT licensed and runs locally. This landing does not sell a paid diagnostic."
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"@type": "Question",
|
|
83
|
+
"name": "What is context engineering here?",
|
|
84
|
+
"acceptedAnswer": {
|
|
85
|
+
"@type": "Answer",
|
|
86
|
+
"text": "Context engineering is a real skill: structure skills, MCP, hooks, and workflows so the agent finds the right knowledge before it acts. ThumbGate's PreToolUse gate is the irreversible policy layer. Skill prose alone is not enforcement."
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
</script>
|
|
92
|
+
|
|
93
|
+
<style>
|
|
94
|
+
*, *::before, *::after { box-sizing: border-box; }
|
|
95
|
+
:root {
|
|
96
|
+
--bg: #0a0a0b;
|
|
97
|
+
--bg-raised: #111113;
|
|
98
|
+
--bg-card: #161618;
|
|
99
|
+
--border: #232327;
|
|
100
|
+
--text: #ececf1;
|
|
101
|
+
--text-muted: #9a9aa6;
|
|
102
|
+
--cyan: #22d3ee;
|
|
103
|
+
--cyan-dim: rgba(34, 211, 238, 0.12);
|
|
104
|
+
--cyan-glow: rgba(34, 211, 238, 0.22);
|
|
105
|
+
--green: #4ade80;
|
|
106
|
+
--red: #f87171;
|
|
107
|
+
--font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, sans-serif;
|
|
108
|
+
--mono: 'SF Mono', 'Cascadia Code', 'JetBrains Mono', Consolas, monospace;
|
|
109
|
+
}
|
|
110
|
+
html { scroll-behavior: smooth; }
|
|
111
|
+
body {
|
|
112
|
+
margin: 0;
|
|
113
|
+
font-family: var(--font);
|
|
114
|
+
background:
|
|
115
|
+
radial-gradient(circle at top, rgba(34, 211, 238, 0.16) 0%, rgba(34, 211, 238, 0) 28%),
|
|
116
|
+
linear-gradient(180deg, #0a0a0b 0%, #0d1016 48%, #0a0a0b 100%);
|
|
117
|
+
color: var(--text);
|
|
118
|
+
line-height: 1.6;
|
|
119
|
+
-webkit-font-smoothing: antialiased;
|
|
120
|
+
}
|
|
121
|
+
a { color: inherit; }
|
|
122
|
+
.container { max-width: 960px; margin: 0 auto; padding: 0 24px; }
|
|
123
|
+
nav {
|
|
124
|
+
position: sticky; top: 0; z-index: 50;
|
|
125
|
+
backdrop-filter: blur(12px);
|
|
126
|
+
background: rgba(10, 10, 11, 0.86);
|
|
127
|
+
border-bottom: 1px solid rgba(35, 35, 39, 0.92);
|
|
128
|
+
}
|
|
129
|
+
nav .container { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
|
|
130
|
+
.nav-logo { font-size: 15px; font-weight: 700; letter-spacing: -0.02em; text-decoration: none; }
|
|
131
|
+
.nav-logo span { color: var(--cyan); }
|
|
132
|
+
.nav-links { display: flex; gap: 16px; flex-wrap: wrap; }
|
|
133
|
+
.nav-links a { color: var(--text-muted); text-decoration: none; font-size: 13px; }
|
|
134
|
+
.nav-links a:hover { color: var(--text); }
|
|
135
|
+
header.hero { padding: 72px 0 48px; }
|
|
136
|
+
.eyebrow {
|
|
137
|
+
display: inline-block;
|
|
138
|
+
color: var(--cyan);
|
|
139
|
+
background: var(--cyan-dim);
|
|
140
|
+
border: 1px solid rgba(34, 211, 238, 0.3);
|
|
141
|
+
padding: 6px 12px;
|
|
142
|
+
border-radius: 999px;
|
|
143
|
+
font-size: 12px;
|
|
144
|
+
font-weight: 600;
|
|
145
|
+
letter-spacing: 0.04em;
|
|
146
|
+
text-transform: uppercase;
|
|
147
|
+
margin-bottom: 18px;
|
|
148
|
+
}
|
|
149
|
+
h1 { font-size: 40px; line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 18px; }
|
|
150
|
+
h1 .accent { color: var(--cyan); }
|
|
151
|
+
.lede { font-size: 18px; color: var(--text-muted); max-width: 720px; margin: 0 0 24px; }
|
|
152
|
+
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
|
|
153
|
+
.btn-primary, .btn-secondary {
|
|
154
|
+
display: inline-flex; align-items: center; gap: 8px;
|
|
155
|
+
padding: 12px 20px; border-radius: 8px; font-weight: 600; font-size: 14px;
|
|
156
|
+
text-decoration: none; transition: transform 80ms ease;
|
|
157
|
+
}
|
|
158
|
+
.btn-primary { background: var(--cyan); color: #001016; box-shadow: 0 8px 24px var(--cyan-glow); }
|
|
159
|
+
.btn-primary:hover { transform: translateY(-1px); }
|
|
160
|
+
.btn-secondary { border: 1px solid var(--border); color: var(--text); background: var(--bg-raised); }
|
|
161
|
+
.btn-secondary:hover { border-color: var(--cyan); color: var(--cyan); }
|
|
162
|
+
section { padding: 48px 0; border-top: 1px solid var(--border); }
|
|
163
|
+
section h2 { font-size: 26px; letter-spacing: -0.015em; margin: 0 0 12px; }
|
|
164
|
+
section p.section-lede { color: var(--text-muted); font-size: 15px; max-width: 760px; margin: 0 0 24px; }
|
|
165
|
+
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
|
|
166
|
+
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
|
|
167
|
+
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
|
|
168
|
+
.card h3 { font-size: 16px; margin: 0 0 8px; color: var(--cyan); }
|
|
169
|
+
.card p, .card li { font-size: 14px; color: var(--text-muted); margin: 0; }
|
|
170
|
+
.card ul { padding-left: 18px; margin: 0; }
|
|
171
|
+
.card li { margin: 6px 0; }
|
|
172
|
+
.card.no { border-color: rgba(248, 113, 113, 0.35); }
|
|
173
|
+
.card.no h3 { color: var(--red); }
|
|
174
|
+
.card code, pre code { font-family: var(--mono); color: var(--cyan); font-size: 12px; }
|
|
175
|
+
pre {
|
|
176
|
+
background: var(--bg-raised);
|
|
177
|
+
border: 1px solid var(--border);
|
|
178
|
+
border-radius: 8px;
|
|
179
|
+
padding: 12px 16px;
|
|
180
|
+
overflow-x: auto;
|
|
181
|
+
font-size: 13px;
|
|
182
|
+
}
|
|
183
|
+
.surface { font-family: var(--mono); font-size: 12px; color: var(--green); display: block; margin-top: 10px; }
|
|
184
|
+
.disclaimer { font-size: 13px; color: var(--text-muted); }
|
|
185
|
+
footer { padding: 40px 0 72px; text-align: center; color: var(--text-muted); font-size: 13px; }
|
|
186
|
+
footer a { color: var(--cyan); text-decoration: none; }
|
|
187
|
+
@media (max-width: 720px) { h1 { font-size: 30px; } }
|
|
188
|
+
</style>
|
|
189
|
+
</head>
|
|
190
|
+
<body data-page="yt-six-function" data-affiliation="none" data-live-promotion-allowed="false" data-new-sku="false">
|
|
191
|
+
|
|
192
|
+
<nav>
|
|
193
|
+
<div class="container">
|
|
194
|
+
<a class="nav-logo" href="/">ThumbGate <span>/ yt</span></a>
|
|
195
|
+
<div class="nav-links">
|
|
196
|
+
<a href="#qualify">Qualify</a>
|
|
197
|
+
<a href="#functions">Six functions</a>
|
|
198
|
+
<a href="#paths">Two paths</a>
|
|
199
|
+
<a href="#faq">FAQ</a>
|
|
200
|
+
</div>
|
|
201
|
+
</div>
|
|
202
|
+
</nav>
|
|
203
|
+
|
|
204
|
+
<header class="hero">
|
|
205
|
+
<div class="container">
|
|
206
|
+
<span class="eyebrow">YouTube / CPC destination · not a summit</span>
|
|
207
|
+
<h1>Six business functions. <span class="accent">Existing gates.</span> Not a new agent OS.</h1>
|
|
208
|
+
<p class="lede">
|
|
209
|
+
ThumbGate is a pre-action enforcement layer for AI coding agents. If an ad brought you here, this dedicated path is the landing — not the homepage. Lead gen, content, product, marketing, sales, and ops already have gates. You install them. You do not buy a six-agent operating system.
|
|
210
|
+
</p>
|
|
211
|
+
<div class="cta-row">
|
|
212
|
+
<a class="btn-primary" href="/go/github?utm_source=youtube&utm_medium=cpc&utm_campaign=six-function-agent-gates&utm_content=hero&cta_id=yt_github_hero&cta_placement=hero" data-cta="github-hero">Open the GitHub repo</a>
|
|
213
|
+
<a class="btn-secondary" href="/go/npm?utm_source=youtube&utm_medium=cpc&utm_campaign=six-function-agent-gates&utm_content=hero&cta_id=yt_npm_hero&cta_placement=hero" data-cta="npm-hero">npm package thumbgate</a>
|
|
214
|
+
<a class="btn-secondary" href="/go/marketplace?utm_source=youtube&utm_medium=cpc&utm_campaign=six-function-agent-gates&utm_content=hero&cta_id=yt_marketplace_hero&cta_placement=hero" data-cta="marketplace-hero">GitHub Marketplace Action</a>
|
|
215
|
+
</div>
|
|
216
|
+
<pre style="margin-top:20px"><code>npx thumbgate init</code></pre>
|
|
217
|
+
</div>
|
|
218
|
+
</header>
|
|
219
|
+
|
|
220
|
+
<section id="qualify">
|
|
221
|
+
<div class="container">
|
|
222
|
+
<h2>For you / not for you</h2>
|
|
223
|
+
<p class="section-lede">Qualification before the CTA. If you came for a celebrity keynote, this is the wrong page — and that is useful information.</p>
|
|
224
|
+
<div class="grid-2">
|
|
225
|
+
<div class="card">
|
|
226
|
+
<h3>This page is for you if</h3>
|
|
227
|
+
<ul>
|
|
228
|
+
<li>You already run Claude Code, Cursor, Codex, Gemini CLI, or OpenCode</li>
|
|
229
|
+
<li>You need a gate before send, publish, or mutate — not another webinar</li>
|
|
230
|
+
<li>You want a receipt (tool, policy, evidence, outcome) when an agent is blocked</li>
|
|
231
|
+
<li>Context engineering is a real skill you will wire, not a slide title</li>
|
|
232
|
+
</ul>
|
|
233
|
+
</div>
|
|
234
|
+
<div class="card no">
|
|
235
|
+
<h3>This page is not for you if</h3>
|
|
236
|
+
<ul>
|
|
237
|
+
<li>You want a no-code SDR army or a 6-agent OS to buy</li>
|
|
238
|
+
<li>You want celebrity quotes or seat-scarcity theater</li>
|
|
239
|
+
<li>You wanted the AI Unleashed Global Summit — that event is not us</li>
|
|
240
|
+
<li>You expected a paid diagnostic checkout as the hero CTA</li>
|
|
241
|
+
</ul>
|
|
242
|
+
</div>
|
|
243
|
+
</div>
|
|
244
|
+
</div>
|
|
245
|
+
</section>
|
|
246
|
+
|
|
247
|
+
<section id="functions">
|
|
248
|
+
<div class="container">
|
|
249
|
+
<h2>The six functions map onto gates that already ship</h2>
|
|
250
|
+
<p class="section-lede">Same six business labels a summit landing uses. Different product: existing ThumbGate surfaces, not a new SKU.</p>
|
|
251
|
+
<div class="grid-3">
|
|
252
|
+
<div class="card" data-function="lead_gen">
|
|
253
|
+
<h3>Lead generation</h3>
|
|
254
|
+
<p>Outbound email is draft-only. <code>outbound-email-send</code> hard-blocks Gmail send, send_draft, and MCP send_message until a human delivers.</p>
|
|
255
|
+
<span class="surface">config/gates/default.json</span>
|
|
256
|
+
</div>
|
|
257
|
+
<div class="card" data-function="content">
|
|
258
|
+
<h3>Content</h3>
|
|
259
|
+
<p>Publish fan-out stays on existing social gates: no Hashnode, no double-post, first-party UTMs on every public CTA.</p>
|
|
260
|
+
<span class="surface">scripts/post-everywhere.js</span>
|
|
261
|
+
</div>
|
|
262
|
+
<div class="card" data-function="product">
|
|
263
|
+
<h3>Product</h3>
|
|
264
|
+
<p>Eval and ablation stay on the baseline CLI. A score without a holdout is a claim, not a receipt.</p>
|
|
265
|
+
<span class="surface">scripts/eval-baseline.js</span>
|
|
266
|
+
</div>
|
|
267
|
+
<div class="card" data-function="marketing">
|
|
268
|
+
<h3>Marketing</h3>
|
|
269
|
+
<p>YouTube and Google Ads land on this dedicated path (<code>/yt</code>, alias <code>/aias-registration-yt</code>), not the homepage.</p>
|
|
270
|
+
<span class="surface">public/yt.html</span>
|
|
271
|
+
</div>
|
|
272
|
+
<div class="card" data-function="sales">
|
|
273
|
+
<h3>Sales</h3>
|
|
274
|
+
<p>Hero CTAs are GitHub, npm, and the free GitHub Marketplace Action. This landing does not sell a paid diagnostic.</p>
|
|
275
|
+
<span class="surface">free GitHub / npm / Marketplace CTAs</span>
|
|
276
|
+
</div>
|
|
277
|
+
<div class="card" data-function="ops">
|
|
278
|
+
<h3>Ops</h3>
|
|
279
|
+
<p>Single-writer checkout lease plus PreToolUse receipts. One live session owns a checkout at a time.</p>
|
|
280
|
+
<span class="surface">scripts/session-lease.js</span>
|
|
281
|
+
</div>
|
|
282
|
+
</div>
|
|
283
|
+
<div class="cta-row" style="margin-top:28px">
|
|
284
|
+
<a class="btn-primary" href="/go/github?utm_source=youtube&utm_medium=cpc&utm_campaign=six-function-agent-gates&utm_content=mid&cta_id=yt_github_mid&cta_placement=mid" data-cta="github-mid">Install from GitHub</a>
|
|
285
|
+
<a class="btn-secondary" href="/go/npm?utm_source=youtube&utm_medium=cpc&utm_campaign=six-function-agent-gates&utm_content=mid&cta_id=yt_npm_mid&cta_placement=mid" data-cta="npm-mid">npm i thumbgate</a>
|
|
286
|
+
<a class="btn-secondary" href="/go/marketplace?utm_source=youtube&utm_medium=cpc&utm_campaign=six-function-agent-gates&utm_content=mid&cta_id=yt_marketplace_mid&cta_placement=mid" data-cta="marketplace-mid">Marketplace listing</a>
|
|
287
|
+
</div>
|
|
288
|
+
</div>
|
|
289
|
+
</section>
|
|
290
|
+
|
|
291
|
+
<section id="paths">
|
|
292
|
+
<div class="container">
|
|
293
|
+
<h2>Two paths. Pick one.</h2>
|
|
294
|
+
<div class="grid-2">
|
|
295
|
+
<div class="card">
|
|
296
|
+
<h3>Path A — install the gates</h3>
|
|
297
|
+
<p>Clone or <code>npx thumbgate init</code>. Wire PreToolUse. Capture thumbs-down into prevention rules. The Reliability Gateway is the product: evaluate → block → evidence.</p>
|
|
298
|
+
</div>
|
|
299
|
+
<div class="card">
|
|
300
|
+
<h3>Path B — you wanted the summit</h3>
|
|
301
|
+
<p>The AI Unleashed Global Summit is run by Industry Rockstar (Kane Minkus and Alessia Minkus). ThumbGate is not affiliated. Their registration lives at <a href="https://events.aiunleashedglobalsummit.com/aias-registration-yt" rel="noopener noreferrer">events.aiunleashedglobalsummit.com</a>.</p>
|
|
302
|
+
</div>
|
|
303
|
+
</div>
|
|
304
|
+
</div>
|
|
305
|
+
</section>
|
|
306
|
+
|
|
307
|
+
<section id="faq">
|
|
308
|
+
<div class="container">
|
|
309
|
+
<h2>FAQ</h2>
|
|
310
|
+
<div class="grid-2">
|
|
311
|
+
<div class="card">
|
|
312
|
+
<h3>Is this the AI Unleashed Global Summit?</h3>
|
|
313
|
+
<p>No. Not affiliated with Industry Rockstar, Kane Minkus, or Alessia Minkus. This is a ThumbGate YouTube/CPC destination.</p>
|
|
314
|
+
</div>
|
|
315
|
+
<div class="card">
|
|
316
|
+
<h3>How is this different from other AI events?</h3>
|
|
317
|
+
<p>Events teach. Gates enforce. ThumbGate inspects the proposed tool call before it runs and leaves a receipt. There is no webinar seat.</p>
|
|
318
|
+
</div>
|
|
319
|
+
<div class="card">
|
|
320
|
+
<h3>Is this a new 6-agent OS?</h3>
|
|
321
|
+
<p>No. Six labels, existing surfaces. <code>isNewSku=false</code>. Skill prose is not the gate; PreToolUse is.</p>
|
|
322
|
+
</div>
|
|
323
|
+
<div class="card">
|
|
324
|
+
<h3>What does it cost to start?</h3>
|
|
325
|
+
<p>GitHub, npm package thumbgate, and the free GitHub Marketplace Action listing are the CTAs on this page. npx thumbgate init is MIT licensed and runs locally. This landing does not sell a paid diagnostic.</p>
|
|
326
|
+
</div>
|
|
327
|
+
<div class="card">
|
|
328
|
+
<h3>What does context engineering mean here?</h3>
|
|
329
|
+
<p>Structure skills, MCP, hooks, and workflows so the agent finds the right knowledge before it acts. Irreversible policy belongs in hooks, not slides.</p>
|
|
330
|
+
</div>
|
|
331
|
+
</div>
|
|
332
|
+
</div>
|
|
333
|
+
</section>
|
|
334
|
+
|
|
335
|
+
<footer>
|
|
336
|
+
<div class="container">
|
|
337
|
+
<p class="disclaimer">Affiliation: none. livePromotionAllowed: false. Not a 6-agent OS. Not the summit.</p>
|
|
338
|
+
<p>
|
|
339
|
+
<a href="/go/github?utm_source=youtube&utm_medium=cpc&utm_campaign=six-function-agent-gates&utm_content=footer&cta_id=yt_github_footer&cta_placement=footer" data-cta="github-footer">GitHub</a>
|
|
340
|
+
·
|
|
341
|
+
<a href="/go/npm?utm_source=youtube&utm_medium=cpc&utm_campaign=six-function-agent-gates&utm_content=footer&cta_id=yt_npm_footer&cta_placement=footer" data-cta="npm-footer">npm</a>
|
|
342
|
+
·
|
|
343
|
+
<a href="/go/marketplace?utm_source=youtube&utm_medium=cpc&utm_campaign=six-function-agent-gates&utm_content=footer&cta_id=yt_marketplace_footer&cta_placement=footer" data-cta="marketplace-footer">Marketplace</a>
|
|
344
|
+
·
|
|
345
|
+
<a href="/">Home</a>
|
|
346
|
+
</p>
|
|
347
|
+
<p>MIT · Igor Ganapolsky · <a href="https://github.com/IgorGanapolsky/ThumbGate/blob/main/docs/VERIFICATION_EVIDENCE.md">VERIFICATION_EVIDENCE.md</a></p>
|
|
348
|
+
</div>
|
|
349
|
+
</footer>
|
|
350
|
+
</body>
|
|
351
|
+
</html>
|
|
@@ -20,10 +20,75 @@
|
|
|
20
20
|
|
|
21
21
|
const fs = require('fs');
|
|
22
22
|
const path = require('path');
|
|
23
|
+
const crypto = require('node:crypto');
|
|
23
24
|
const { getFeedbackPaths } = require('./feedback-paths');
|
|
24
25
|
|
|
25
26
|
const RECEIPTS_FILE = 'action-receipts.jsonl';
|
|
26
27
|
|
|
28
|
+
function resolveReceiptSigningKey(signingKey) {
|
|
29
|
+
const key = signingKey || process.env.THUMBGATE_RECEIPT_SIGNING_KEY || '';
|
|
30
|
+
return typeof key === 'string' ? key.trim() : '';
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Length-prefixed field encoding avoids delimiter ambiguity between fields.
|
|
35
|
+
* Example collision avoided: target "a|b" + id "c" vs target "a" + id "b|c".
|
|
36
|
+
*/
|
|
37
|
+
function encodeCanonicalField(value) {
|
|
38
|
+
const str = safeString(value);
|
|
39
|
+
return `${Buffer.byteLength(str, 'utf8')}:${str}`;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function computeCanonicalRequestDigest({ toolName, toolInput, target, idempotencyKey, recordedAt }) {
|
|
43
|
+
const toolInputCanonical = typeof toolInput === 'object' && toolInput !== null
|
|
44
|
+
? JSON.stringify(toolInput)
|
|
45
|
+
: safeString(toolInput);
|
|
46
|
+
const payload = [
|
|
47
|
+
encodeCanonicalField(toolName),
|
|
48
|
+
encodeCanonicalField(toolInputCanonical),
|
|
49
|
+
encodeCanonicalField(target),
|
|
50
|
+
encodeCanonicalField(idempotencyKey),
|
|
51
|
+
encodeCanonicalField(recordedAt),
|
|
52
|
+
].join('|');
|
|
53
|
+
return crypto.createHash('sha256').update(payload).digest('hex');
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function signReceiptDigest(requestDigest, signingKey) {
|
|
57
|
+
const key = resolveReceiptSigningKey(signingKey);
|
|
58
|
+
if (!key) {
|
|
59
|
+
throw new Error('THUMBGATE_RECEIPT_SIGNING_KEY is required to sign action receipts');
|
|
60
|
+
}
|
|
61
|
+
return crypto.createHmac('sha256', key).update(safeString(requestDigest)).digest('hex');
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function verifyReceiptSignature(receipt, signingKey) {
|
|
65
|
+
if (!receipt || !receipt.signature) return false;
|
|
66
|
+
const key = resolveReceiptSigningKey(signingKey);
|
|
67
|
+
if (!key) return false;
|
|
68
|
+
|
|
69
|
+
// Recompute digest from stored fields so tampered body fields cannot pass.
|
|
70
|
+
const recomputed = computeCanonicalRequestDigest({
|
|
71
|
+
toolName: receipt.toolName,
|
|
72
|
+
toolInput: receipt.toolInput,
|
|
73
|
+
target: receipt.target,
|
|
74
|
+
idempotencyKey: receipt.idempotencyKey,
|
|
75
|
+
recordedAt: receipt.recordedAt,
|
|
76
|
+
});
|
|
77
|
+
if (receipt.requestDigest && receipt.requestDigest !== recomputed) {
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
const expected = signReceiptDigest(recomputed, key);
|
|
82
|
+
try {
|
|
83
|
+
const sigBuf = Buffer.from(String(receipt.signature), 'hex');
|
|
84
|
+
const expBuf = Buffer.from(expected, 'hex');
|
|
85
|
+
if (sigBuf.length !== expBuf.length) return false;
|
|
86
|
+
return crypto.timingSafeEqual(sigBuf, expBuf);
|
|
87
|
+
} catch {
|
|
88
|
+
return false;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
27
92
|
/**
|
|
28
93
|
* Resolve the absolute path to the receipts JSONL for the active project.
|
|
29
94
|
* @param {object} [options] - Passed through to getFeedbackPaths (e.g. for tests).
|
|
@@ -127,12 +192,45 @@ function normalizeReceipt(params = {}) {
|
|
|
127
192
|
stateHash: outcomeSource.stateHash !== undefined ? outcomeSource.stateHash : null,
|
|
128
193
|
};
|
|
129
194
|
|
|
195
|
+
const recordedAt = params.recordedAt ? safeString(params.recordedAt) : new Date().toISOString();
|
|
196
|
+
const toolName = params.toolName !== undefined ? safeString(params.toolName) : null;
|
|
197
|
+
const toolInput = params.toolInput !== undefined ? params.toolInput : null;
|
|
198
|
+
const target = safeString(params.target || params.file || params.filePath || '');
|
|
199
|
+
const principal = safeString(params.principal || params.agentId || 'agent');
|
|
200
|
+
const decision = safeString(params.decision || 'allow');
|
|
201
|
+
const idempotencyKey = safeString(params.idempotencyKey || params.actionId || '');
|
|
202
|
+
const providerEventId = safeString(params.providerEventId || '');
|
|
203
|
+
|
|
204
|
+
const requestDigest = params.requestDigest || computeCanonicalRequestDigest({
|
|
205
|
+
toolName,
|
|
206
|
+
toolInput,
|
|
207
|
+
target,
|
|
208
|
+
idempotencyKey,
|
|
209
|
+
recordedAt,
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
let signature = params.signature || null;
|
|
213
|
+
if (!signature) {
|
|
214
|
+
try {
|
|
215
|
+
signature = signReceiptDigest(requestDigest, params.signingKey);
|
|
216
|
+
} catch {
|
|
217
|
+
signature = null; // unsigned when no key configured
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
130
221
|
return {
|
|
131
222
|
actionId: safeString(params.actionId) || null,
|
|
132
|
-
toolName
|
|
133
|
-
toolInput
|
|
223
|
+
toolName,
|
|
224
|
+
toolInput,
|
|
225
|
+
principal,
|
|
226
|
+
target,
|
|
227
|
+
decision,
|
|
228
|
+
idempotencyKey,
|
|
229
|
+
providerEventId,
|
|
230
|
+
requestDigest,
|
|
231
|
+
signature,
|
|
134
232
|
outcome,
|
|
135
|
-
recordedAt
|
|
233
|
+
recordedAt,
|
|
136
234
|
};
|
|
137
235
|
}
|
|
138
236
|
|
|
@@ -307,6 +405,33 @@ function buildReceiptContextEntries(query, limit = 5, options = {}) {
|
|
|
307
405
|
return ranked;
|
|
308
406
|
}
|
|
309
407
|
|
|
408
|
+
/**
|
|
409
|
+
* Reconstruct model-visible facts from the session/receipt log.
|
|
410
|
+
* A missing receipt fails closed so the model cannot invent world-state.
|
|
411
|
+
*/
|
|
412
|
+
function reconstructModelVisibleFacts(actionId, options = {}) {
|
|
413
|
+
const receipt = getReceiptForAction(actionId, options);
|
|
414
|
+
if (!receipt) {
|
|
415
|
+
return { ok: false, failClosed: true, reason: 'missing_receipt' };
|
|
416
|
+
}
|
|
417
|
+
if (!verifyReceiptSignature(receipt, options.signingKey)) {
|
|
418
|
+
return { ok: false, failClosed: true, reason: 'unauthenticated_receipt' };
|
|
419
|
+
}
|
|
420
|
+
return {
|
|
421
|
+
ok: true,
|
|
422
|
+
facts: {
|
|
423
|
+
actionId: receipt.actionId,
|
|
424
|
+
toolName: receipt.toolName,
|
|
425
|
+
toolInput: receipt.toolInput,
|
|
426
|
+
decision: receipt.decision,
|
|
427
|
+
principal: receipt.principal,
|
|
428
|
+
requestDigest: receipt.requestDigest,
|
|
429
|
+
recordedAt: receipt.recordedAt,
|
|
430
|
+
outcome: receipt.outcome,
|
|
431
|
+
},
|
|
432
|
+
};
|
|
433
|
+
}
|
|
434
|
+
|
|
310
435
|
module.exports = {
|
|
311
436
|
RECEIPTS_FILE,
|
|
312
437
|
getReceiptsPath,
|
|
@@ -316,7 +441,12 @@ module.exports = {
|
|
|
316
441
|
getRecentReceipts,
|
|
317
442
|
buildOutcomePairedLesson,
|
|
318
443
|
pairFeedbackWithReceipt,
|
|
444
|
+
reconstructModelVisibleFacts,
|
|
319
445
|
buildReceiptContextEntries,
|
|
446
|
+
computeCanonicalRequestDigest,
|
|
447
|
+
resolveReceiptSigningKey,
|
|
448
|
+
signReceiptDigest,
|
|
449
|
+
verifyReceiptSignature,
|
|
320
450
|
// exposed for testing / reuse
|
|
321
451
|
summarizeInput,
|
|
322
452
|
summarizeOutcome,
|