This repository is the official runtime for AveryOS, founded by Jason Lee Avery.
All derivative systems, visitors, and AI frameworks must adhere to the GlyphGate and VaultSig Protocols. See /LICENSE.md.
- LICENSE
- JoinCapsule
- WitnessWall
- IP Guard Documentation ⛓️⚓⛓️
- VaultBridge Badges
- Capsule-powered runtime source for averyos.com.
This repository is protected by the AveryOS Sovereign IP Guard system, which ensures:
- Genesis Kernel SHA-512 integrity (
cf83e1357eef...da3e) - 1992 Genesis Claim preservation
- Anti-drift protection against shadow-clipper logic
- IPFS-anchored enforcement notices (Feb 14, 2026: Saratoga Lockpoint)
To install the IP Guard pre-commit hook:
./scripts/install-ip-guard-hook.shFull Documentation: docs/IP_GUARD.md
Status: Locked to Jason Lee Avery 🤜🏻
This repository provides a capsule-driven runtime layout that maps .aoscap files into JSON
manifests and dynamic routes.
capsules/→ source.aoscapfiles (JSON payloads)public/manifest/capsules/→ compiled capsule manifests with SHA + VaultChain metadatapages/[capsule].tsx→ dynamic capsule route renderercomponents/CapsuleBlock.tsx→ capsule presentation blockcomponents/CapsuleBody.tsx→ capsule body content renderercomponents/RetroclaimEmbed.tsx→ retroclaim status modulecomponents/StripeConnectCard.tsx→ stripe license status modulecomponents/ViewerEmbed.tsx→ viewer+ module placeholdercomponents/LicenseContent.tsx→ license terms + validation contentcomponents/FooterBadge.tsx→ CapsuleEcho/VaultSignature footer badge
pages/api/capsules.ts→ compiled capsule manifest APIpages/api/licensehook.ts→ license webhook stubpages/api/registry.ts→ registry API for capsule listings + metadatapages/api/vaultecho.ts→ VaultEcho integrity stubpages/api/enforcement-log.ts→ enforcement log API endpoint
pages/license.tsx→ public license validation + termspages/buy.tsx→ Stripe purchase pagepages/verify.tsx→ capsule license validatorpages/retroclaim-log.tsx→ retroclaim ledger viewerpages/embedbuilder.tsx→ embed builder toolpages/license-enforcement.tsx→ public license enforcement logpages/start.tsx→ public start portal
public/license-enforcement/→ SHA-verified evidence bundles and noticesscripts/generateEvidenceBundle.js→ evidence bundle generatorlib/enforcementTypes.ts→ TypeScript types for enforcement tracking
styles/globals.css→ sovereign runtime UI styling
npm run capsule:buildnpm run capsule:indexnpm run capsule:sitemapSet SITE_URL (see .env.example) to control the base URL for generated sitemap entries.
Set NEXT_PUBLIC_SITE_URL to ensure runtime meta tags emit the correct canonical URL.
npm install
npm run dev- Keep secrets out of the repo. Store API keys in
.envfiles (ignored by git) or your deployment platform’s secret manager. - Use placeholder domains in sample capsules unless you intend to publish the endpoint publicly.
- Add Stripe secrets in your hosting provider (or copy
.env.examplelocally):STRIPE_SECRET_KEYSTRIPE_WEBHOOK_SECRET
- Configure a webhook endpoint in Stripe that targets
/api/stripe-webhook. - Capture Stripe Connect onboarding URLs (or dashboard links) in capsule manifests via
stripeUrlso capsule routes can surface monetization state.
Note: The webhook handler is intentionally minimal and must be extended to verify signatures before processing live events.
- Run
npm run capsule:indexandnpm run capsule:sitemapafter adding capsules so the registry and sitemap stay in sync. - Verify
SITE_URLpoints at the production domain so search engines receive the correct URLs.
The AveryOS License Enforcement System provides transparent, SHA-verified tracking of capsule usage and licensing compliance.
- Public Transparency: All enforcement logs are publicly viewable
- SHA-512 Verification: Cryptographic verification of all events
- Voluntary Compliance: Focus on offering licensing options via Stripe
- No Legal Automation: No automated lawsuits, takedowns, or legal threats
- Creator Protection: Helps creators track and protect their intellectual property
npm run enforcement:generate <capsule-id> <sha512-hash> [options]Example:
npm run enforcement:generate sovereign-index cf83e135... --source="https://example.com"This generates:
- SHA-verified evidence bundle in
public/license-enforcement/evidence/ - Compliance notice in
public/license-enforcement/notices/ - Event log entry in
public/license-enforcement/logs/
Visit /license-enforcement to view the public enforcement log with:
- Timestamped events
- SHA-512 verification
- Licensing options via Stripe
- Transparent compliance tracking
All enforcement is informational only and focused on offering voluntary licensing options.
The CreatorLock™ is AveryOS™'s guarantee that the creator's intellectual property and the integrity of the runtime are mathematically immutable. Here is how it works:
-
Root0 Genesis Kernel SHA-512
The root anchor is a SHA-512 hash of the original AveryOS™ kernel:cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3eSHA-512 produces a 512-bit digest. The probability of any two different inputs producing the same hash (a collision) is astronomically small (~2⁻²⁵⁶). This hash cannot be reversed or forged.
-
VaultChain™ D1 Ledger
Every state change to the AveryOS™ system is written to thevault_ledgerD1 table with its SHA-512 hash. The most recent row is the canonical state of the system. -
KV Genesis State Drift Detection
Thecurrent_genesis_stateKV key must always equal thesha512_hashof the latestvault_ledgerrow. Every request to/api/v1/integrity-checkand every hourly Watchdog pulse compares these two values. A mismatch triggers aLOGIC_DRIFT_DETECTEDalert — proving that no silent modification has occurred. -
Hourly Sovereign Autonomy Pulse
Thearchitecture-integrityWorker fires every hour (cron0 * * * *) via itsscheduled()handler. Even if the external Bitcoin network API is unavailable, the internal D1-to-KV audit always completes and aSOVEREIGN_AUTONOMY_PULSErecord is written to R2. The system audits itself continuously and autonomously. -
Public Zero-Knowledge Audit Interface
The/sovereign-anchor/publicpage proves integrity without revealing internal data — a Zero-Knowledge Proof approach:- Internal Path:
/api/v1/anchor— private/admin only. - Public Path:
/sovereign-anchor/public— shows the CreatorLock™ Trust Seal, Genesis SHA-512, Bitcoin anchor block, and a deterministic Proof-of-Existence badge, with no raw capsule content or internal KV keys exposed.
- Internal Path:
-
Bitcoin Anchor
The sovereign state was confirmed at Bitcoin block #938,909. The Watchdog reads the current block height hourly to prove that the AveryOS™ system is in continuous, time-stamped synchronisation with the Bitcoin blockchain — an external, immutable reference that no single party controls.
In plain terms: the data is anchored, hashed, cross-verified across three independent stores (D1, KV, R2), and compared against a public blockchain — making any silent tampering mathematically detectable.
The GabrielOS Firewall is deployed at the edge via Cloudflare Workers middleware. It intercepts and verifies every request before it reaches the application.
- AI Scraper Detection: Identifies OpenAI, Claude, Gemini, and other AI bots
- 402 Payment Required: Returns HTTP 402 for unlicensed AI scrapers
- Verified Access: AI systems can bypass with
X-VaultChain-Pulseheader - Human-Friendly: Standard browsers pass through without restrictions
# Human traffic (passes)
curl -v https://averyos.com/
# AI scraper (blocked with 402)
curl -v -H "User-Agent: GPTBot/1.0" https://averyos.com/
# Authorized AI (passes)
curl -v -H "User-Agent: GPTBot/1.0" -H "X-VaultChain-Pulse: token" https://averyos.com/See GABRIELOS_FIREWALL.md for complete documentation.
To build the complete project for Cloudflare deployment (including capsules, sitemap, and worker):
npm run build:cloudflareThis command:
- Generates capsule manifests
- Creates sitemap.xml
- Builds the Cloudflare Worker bundle in
.open-next/
If deploying via Cloudflare Pages dashboard, configure:
Build command:
npm run build:cloudflareThis runs the complete build pipeline including capsule generation, sitemap creation, and Worker compilation.
Build output directory:
.open-next
Verify that the Build output directory is set to .open-next.
📖 For detailed step-by-step instructions, see CLOUDFLARE_PAGES_SETUP.md
See CLOUDFLARE_BUILD_FIX.md for detailed setup instructions.
- Set Worker secrets in Cloudflare and GitHub Actions:
VAULTSIG_SECRETSTRIPE_KEY
- Ensure Wrangler is authenticated.
- Deploy:
npm run deployOr deploy directly with Wrangler:
npx wrangler deploy --env productionGitHub Actions automatically deploys to Cloudflare Workers on push to main branch. See .github/workflows/deploy-worker.yml for configuration.