No description
  • TypeScript 92.8%
  • JavaScript 4.6%
  • CSS 1.8%
  • Shell 0.7%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Thomas Vu 8d061e9ee8
Some checks failed
CI / Forgejo Parity (push) Failing after 8s
chore: merge improve 074–083 and bump TEE/miss/tcg submodules
2026-08-20 11:18:42 -04:00
.forgejo/workflows ci: run all vault and RNG worker unit tests 2026-08-19 13:08:23 -04:00
.github/workflows ci: run all vault and RNG worker unit tests 2026-08-19 13:08:23 -04:00
apps Merge branch 'advisor/082-raffle-detail-truncated' into development 2026-08-20 11:18:33 -04:00
config docs(infisical): product org layout + Cloudflare ops path 2026-07-19 18:30:59 -04:00
docs docs(infisical): empty machine-identity recovery steps 2026-08-13 20:03:38 -04:00
examples/mysterygift-development feat(fleet): plan 046 smoke parity and Fix gate failure quest 2026-06-20 20:30:40 -04:00
packages fix(randomness): bind TEE pick attestation to raffle request_hash 2026-08-20 09:15:08 -04:00
plans chore: merge improve 074–083 and bump TEE/miss/tcg submodules 2026-08-20 11:18:42 -04:00
scripts fix(infisical): point Miss OPENCLAW_API_URL at openclawmachine.xyz 2026-08-19 03:24:27 -04:00
services chore: merge improve 074–083 and bump TEE/miss/tcg submodules 2026-08-20 11:18:42 -04:00
workers/api-proxy fix(api-proxy): join path onto CVM origin; reject protocol-relative pathnames 2026-08-20 09:25:37 -04:00
.dockerignore Document architecture and db state 2026-03-09 21:19:42 -04:00
.eslintrc.js Add Mystery Gift NFT raffle platform with holographic card effects and continuous marquee 2025-11-29 15:24:22 -05:00
.gitignore chore: remove broken compose and PriceChartingCron gitlink 2026-08-18 11:43:11 -04:00
.gitlab-ci.yml feat(tee-worker): update landing page to v2.5 refined hybrid design 2026-01-07 13:14:35 -05:00
.gitmodules chore: detach OpenClaw Machine and ACP from monorepo 2026-07-18 09:50:03 -04:00
CLAUDE.md docs: finish $MISS rename on legal, overlay, and ops copy 2026-08-19 03:25:39 -04:00
CODE_OF_CONDUCT.md refactor: restructure ACP seller as overlay on upstream submodule 2026-02-15 21:41:02 -05:00
CONTRIBUTING.md refactor: restructure ACP seller as overlay on upstream submodule 2026-02-15 21:41:02 -05:00
CREDENTIALS_ROTATION.md chore: detach OpenClaw Machine and ACP from monorepo 2026-07-18 09:50:03 -04:00
DEPLOYMENT.md docs(ops): TCG on Hetzner; drop OpenClaw D1 and claw host from SoT 2026-08-18 11:45:05 -04:00
ecosystem.config.js feat(miss): add MagicEden tools for NFT purchasing 2026-02-13 18:19:27 -05:00
LICENSE fix: production launch readiness - security, reliability, and code quality 2026-02-16 20:47:36 -05:00
package.json fix: execute improve plans 001–015 (security, RNG auth, packs freeze) 2026-07-17 13:11:10 -04:00
phala-cvms.json docs: TCG on Hetzner; OpenClaw is external 2026-08-13 20:03:38 -04:00
pnpm-lock.yaml fix(blockchain): dedupe snapshot holders by owner 2026-08-19 03:26:57 -04:00
pnpm-workspace.yaml Add shared x402 package and multichain payment layer for randomness service 2026-02-03 22:28:28 -05:00
README.md docs: TCG on Hetzner; OpenClaw is external 2026-08-13 20:03:38 -04:00
SECURITY.md refactor: restructure ACP seller as overlay on upstream submodule 2026-02-15 21:41:02 -05:00
tsconfig.json Add Mystery Gift NFT raffle platform with holographic card effects and continuous marquee 2025-11-29 15:24:22 -05:00
turbo.json fix: pre-release audit - security, testing, documentation 2026-02-16 18:49:00 -05:00
vitest.config.ts docs: TCG on Hetzner; OpenClaw is external 2026-08-13 20:03:38 -04:00

Mystery Gift

Mystery Gift is shipping two narrowed production agents:

  • MISS for Pokemon data, graded pricing, randomness, and purchase analysis
  • OpenClawMachine for cross-game graded pricing and purchase analysis

Pack buying, marketplace execution, and autonomous fulfillment are intentionally deferred until the wallet and custody path are safer.

Current Launch Scope

MISS

  • mystery_gift_randomness at $0.01
  • mystery_gift_card_lookup at $0.01
  • mystery_gift_graded_price_lookup at $0.01
  • mystery_gift_tcg_analysis at $1.00

OpenClawMachine

  • openclawmachine_graded_price at $0.02
  • openclawmachine_graded_analysis at $1.00

Supported cross-game market coverage today:

  • Pokemon
  • One Piece
  • Yu-Gi-Oh
  • Magic: The Gathering
  • Lorcana

Live Architecture

Surface Runtime Notes
api.openclawmachine.xyz (external) Cloudflare Worker + D1 OpenClaw market API — not this monorepo
agent.mysterygift.fun Phala CVM behind Cloudflare Miss app and ACP-node runtime
tcg.mysterygift.fun Hetzner origin; public edge via tcg.mysterygift.fun when configured Pokemon metadata API (PostgreSQL on Hetzner)
rng.mysterygift.fun Phala CVM behind Cloudflare Verifiable randomness
vault.mysterygift.fun Phala CVM behind Cloudflare Wallet / signing service
marketplace.mysterygift.fun Cloudflare Worker frontend Coming soon surface only
external repo openclawmachine/acp Official Virtuals seller runtime + Phala packaging OpenClawMachine ACP seller runtime, offerings, and persistent deploy assets

Data Ownership

  • OpenClawMachine D1 is the canonical graded market-data cache for both agents.
  • Miss keeps a separate SQLite database for app state and conversations.
  • Pokemon card metadata is served by the Pokemon TCG API (Hetzner host of record; public edge via tcg.mysterygift.fun when configured).
  • Miss should consume Pokemon metadata from the TCG API and graded comps/history from OpenClaw, not run its own market scraper.

Freshness and Backups

  • OpenClaw market-data cron runs every 30 minutes, with a deeper pass daily at 03:17 UTC.
  • Set discovery follows PriceCharting cursor pagination within the configured per-set budget, so large sets are no longer truncated to the first visible page.
  • Operational target is 24h freshness for requested or hot items and roughly 48h freshness for the long-tail stored catalog.
  • Responses now expose updated_on so users can see snapshot age directly.
  • OpenClaw catalog sync preserves existing scrape state, so rediscovery does not reset completed products back to pending.
  • Failure recovery is split into:
    • soft failures: automatic retry with exponential backoff
    • hard failures: structurally invalid products kept out of the normal retry pool until forced or fixed
  • Nightly backups are now wired in-repo:
    • OpenClaw D1 export via the authenticated app-owned NDJSON backup endpoint
    • SQLite snapshot exports for Miss and the Pokemon TCG API
    • upload target: Cloudflare R2 via scripts/backups/run-nightly-backup.mjs
    • manually verified on March 10, 2026 against R2 bucket mystery-gift-nightly-backups-prod

Repository Structure

mystery-gift/
├── apps/
│   ├── dev-docs/                 # Internal MkDocs documentation
│   ├── docs/                     # Public MkDocs documentation
│   ├── landing/                  # Public landing page
│   ├── livestream/               # Twitch daemon + OBS overlay
│   └── marketplace/              # Frontend and legacy API surface
├── packages/
│   ├── blockchain/
│   ├── database/
│   ├── randomness/
│   ├── shared/
│   ├── tcg-data/
│   └── vault/
├── scripts/
│   ├── backups/                  # D1 + SQLite backup automation
│   └── ...
├── services/
│   ├── miss/
│   ├── pokemon-tcg-api/
│   ├── verifiable-randomness-service/
│   ├── verifiable-wallet-service/
│   └── twitch-bot/
└── workers/api-proxy/            # Cloudflare proxy for Phala-backed services (+ TCG edge when configured)

OpenClaw product code and ACP seller runtime live in external repos (openclawmachine/openclawmachine, openclawmachine/acp) — not nested here.

Virtuals Direction

  • MISS is the regular ACP agent and uses @virtuals-protocol/acp-node inside runtime.ts.
  • OpenClawMachine should be registered and served through the official OpenClaw ACP seller runtime in external repo openclawmachine/acp.
  • The old OpenClaw gacha and commission offerings are not part of the current release plan.

Docs