No description
- TypeScript 92.8%
- JavaScript 4.6%
- CSS 1.8%
- Shell 0.7%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| .forgejo/workflows | ||
| .github/workflows | ||
| apps | ||
| config | ||
| docs | ||
| examples/mysterygift-development | ||
| packages | ||
| plans | ||
| scripts | ||
| services | ||
| workers/api-proxy | ||
| .dockerignore | ||
| .eslintrc.js | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| .gitmodules | ||
| CLAUDE.md | ||
| CODE_OF_CONDUCT.md | ||
| CONTRIBUTING.md | ||
| CREDENTIALS_ROTATION.md | ||
| DEPLOYMENT.md | ||
| ecosystem.config.js | ||
| LICENSE | ||
| package.json | ||
| phala-cvms.json | ||
| pnpm-lock.yaml | ||
| pnpm-workspace.yaml | ||
| README.md | ||
| SECURITY.md | ||
| tsconfig.json | ||
| turbo.json | ||
| vitest.config.ts | ||
Mystery Gift
Mystery Gift is shipping two narrowed production agents:
MISSfor Pokemon data, graded pricing, randomness, and purchase analysisOpenClawMachinefor 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_randomnessat$0.01mystery_gift_card_lookupat$0.01mystery_gift_graded_price_lookupat$0.01mystery_gift_tcg_analysisat$1.00
OpenClawMachine
openclawmachine_graded_priceat$0.02openclawmachine_graded_analysisat$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.funwhen 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
24hfreshness for requested or hot items and roughly48hfreshness for the long-tail stored catalog. - Responses now expose
updated_onso 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
MISSis the regular ACP agent and uses@virtuals-protocol/acp-nodeinside runtime.ts.OpenClawMachineshould be registered and served through the official OpenClaw ACP seller runtime in external repoopenclawmachine/acp.- The old OpenClaw gacha and commission offerings are not part of the current release plan.
Docs
- Internal operations: DEPLOYMENT.md
- Backup automation: scripts/backups/README.md
- OpenClaw product: separate repo https://github.com/openclawmachine/openclawmachine