@undesirables/plugin-tcg-oracle 1.0.0 → 2.0.0

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/LICENSE CHANGED
@@ -2,20 +2,81 @@ Business Source License 1.1
2
2
 
3
3
  Parameters
4
4
 
5
- Licensor: The Undesirables LLC
6
- Licensed Work: plugin-undesirables
7
- The Licensed Work is (c) 2026 The Undesirables LLC
8
- Additional Use Grant: You may use the Licensed Work for non-production purposes,
9
- personal projects, and evaluation. Production use requires
10
- a commercial license from The Undesirables LLC.
11
- Change Date: 2030-04-24
12
- Change License: MIT
13
-
14
- Notice
15
-
16
- The Business Source License (this document, or the "License") is not an Open
17
- Source license. However, the Licensed Work will eventually be made available
18
- under an Open Source License, as stated in this License.
19
-
20
- For more information on the Business Source License, please visit:
21
- https://mariadb.com/bsl11/
5
+ Licensor: The Undesirables LLC
6
+ Licensed Work: Plugin TCG Oracle
7
+ Copyright (c) 2026 The Undesirables LLC.
8
+ All Rights Reserved.
9
+ Additional Use Grant: You may make production use of the Licensed Work,
10
+ provided Your use does not include offering the
11
+ Licensed Work to third parties on a hosted or
12
+ embedded basis as a Competitive Offering.
13
+
14
+ A "Competitive Offering" is a product or service
15
+ offered to third parties on a paid basis (including
16
+ through paid support arrangements) that provides
17
+ TCG market intelligence, pricing aggregation, AI
18
+ card grading, or on-chain price oracle functionality
19
+ as a primary feature.
20
+
21
+ If Your product is not a Competitive Offering when
22
+ You first make it generally available, it will not
23
+ become a Competitive Offering later due to the
24
+ Licensor releasing a new version of the Licensed
25
+ Work with additional capabilities.
26
+
27
+ Products that are not provided on a paid basis are
28
+ not Competitive Offerings.
29
+
30
+ Change Date: June 1, 2030
31
+ Change License: MIT
32
+
33
+ For alternative licensing arrangements, contact:
34
+ theundesirables7@gmail.com
35
+
36
+ ─────────────────────────────────────────────────────────────────────────
37
+
38
+ Terms
39
+
40
+ The Licensor hereby grants you the right to copy, modify, create derivative
41
+ works, redistribute, and make non-production use of the Licensed Work. The
42
+ Licensor may make an Additional Use Grant, above, permitting limited
43
+ production use.
44
+
45
+ Effective on the Change Date, or the fourth anniversary of the first publicly
46
+ available distribution of a specific version of the Licensed Work under this
47
+ License, whichever comes first, the Licensor hereby grants you rights under
48
+ the terms of the Change License, and the rights granted in the paragraph
49
+ above terminate.
50
+
51
+ If your use of the Licensed Work does not comply with the requirements
52
+ currently in effect as described in this License, you must purchase a
53
+ commercial license from the Licensor, its affiliated entities, or authorized
54
+ resellers, or you must refrain from using the Licensed Work.
55
+
56
+ All copies of the original and modified Licensed Work, and derivative works
57
+ of the Licensed Work, are subject to this License. This License applies
58
+ separately for each version of the Licensed Work and the Change Date may
59
+ vary for each version of the Licensed Work released by Licensor.
60
+
61
+ You must conspicuously display this License on each original or modified copy
62
+ of the Licensed Work. If you receive the Licensed Work in original or
63
+ modified form from a third party, the terms and conditions set forth in this
64
+ License apply to your use of that work.
65
+
66
+ Any use of the Licensed Work in violation of this License will automatically
67
+ terminate your rights under this License for the current and all other
68
+ versions of the Licensed Work.
69
+
70
+ This License does not grant you any right in any trademark or logo of
71
+ Licensor or its affiliates (provided that you may use a trademark or logo of
72
+ Licensor as expressly required by this License).
73
+
74
+ TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
75
+ AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
76
+ EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
77
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
78
+ TITLE.
79
+
80
+ ─────────────────────────────────────────────────────────────────────────
81
+ "Business Source License" is a trademark of MariaDB Corporation Ab.
82
+ BUSL-1.1 license template: https://mariadb.com/bsl11/
package/README.md CHANGED
@@ -1,11 +1,36 @@
1
- # @undesirables/plugin-tcg-oracle
1
+ <div align="center">
2
2
 
3
3
  ![TCG Oracle Banner](./images/banner.jpg)
4
4
 
5
- [![npm](https://img.shields.io/npm/v/@undesirables/plugin-tcg-oracle)](https://www.npmjs.com/package/@undesirables/plugin-tcg-oracle)
6
- [![License: BUSL-1.1](https://img.shields.io/badge/License-BUSL--1.1-blue)](LICENSE)
5
+ # @undesirables/plugin-tcg-oracle
6
+
7
+ **Give any ElizaOS agent real trading card market intelligence — search, grade, and forecast.**
8
+
9
+ [![npm](https://img.shields.io/npm/v/@undesirables/plugin-tcg-oracle?style=flat-square)](https://www.npmjs.com/package/@undesirables/plugin-tcg-oracle)
10
+ [![npm downloads](https://img.shields.io/npm/dm/@undesirables/plugin-tcg-oracle?style=flat-square)](https://www.npmjs.com/package/@undesirables/plugin-tcg-oracle)
11
+ [![License: BUSL-1.1](https://img.shields.io/badge/License-BUSL--1.1-red?style=flat-square)](LICENSE)
12
+ [![ElizaOS](https://img.shields.io/badge/ElizaOS-Compatible-5A67D8?style=flat-square&logo=data:image/svg+xml;base64,&logoColor=white)](https://elizaos.ai)
13
+ [![Games](https://img.shields.io/badge/Games-Pok%C3%A9mon%20%C2%B7%20MTG%20%C2%B7%20Yu--Gi--Oh!-ff14a0?style=flat-square)](https://tcgcsv.com)
14
+
15
+ [npm](https://www.npmjs.com/package/@undesirables/plugin-tcg-oracle) · [TCG Oracle API](https://the-undesirables.com/docs) · [Kaggle Dataset](https://www.kaggle.com/datasets/sailorpepe/tcg-market-intelligence)
16
+
17
+ </div>
18
+
19
+ ---
20
+
21
+ ## Table of Contents
7
22
 
8
- > Give any ElizaOS agent real trading card market intelligence — search 370K+ products, grade cards with AI vision, and simulate future prices with Monte Carlo models.
23
+ - [Why This Exists](#why-this-exists)
24
+ - [Quick Start](#quick-start)
25
+ - [Actions](#actions)
26
+ - [How It Works](#how-it-works)
27
+ - [Supported Games](#supported-games-25)
28
+ - [How the Data Works](#how-the-data-works)
29
+ - [Self-Hosting](#self-hosting)
30
+ - [Configuration](#configuration)
31
+ - [Architecture](#architecture)
32
+ - [Related Projects](#related-projects)
33
+ - [License & Commercial Use](#-license--commercial-use)
9
34
 
10
35
  ---
11
36
 
@@ -15,9 +40,9 @@ The trading card market is worth **$50 billion** and growing. Millions of people
15
40
 
16
41
  This plugin gives your ElizaOS agent the ability to do all of that in one conversation:
17
42
 
18
- 1. **"Search for Charizard cards"** → Instantly searches 370K+ real products across 25 games
43
+ 1. **"Search for Charizard cards"** → Instantly searches 446K+ real products across 25+ games
19
44
  2. **"Grade this card"** → AI vision analyzes centering, corners, edges, surface → predicts PSA/Beckett score
20
- 3. **"Simulate Charizard VMAX at $350 for 60 days"** → Runs 10,000 Monte Carlo simulations using Heston, Merton, or Kou stochastic models → returns percentile price bands
45
+ 3. **"Simulate Charizard VMAX at $350 for 60 days"** → Runs a calibrated conformal risk forecast → returns honest VaR + percentile price bands
21
46
  4. **"Show me the Pokemon market"** → Pulls the latest daily market snapshot with top movers and volume trends
22
47
 
23
48
  No API keys required from third parties. You just point it at the TCG Oracle server (self-hosted or public).
@@ -55,10 +80,44 @@ That's it. Your agent can now search cards, grade images, and run simulations.
55
80
 
56
81
  | Action | What It Does | Example Prompt |
57
82
  |--------|-------------|----------------|
58
- | `TCG_ORACLE_SEARCH` | Search 370K+ products by card name, set, or keyword | "Search for Base Set Charizard" |
83
+ | `TCG_ORACLE_SEARCH` | Search 446K+ products by card name, set, or keyword | "Search for Base Set Charizard" |
59
84
  | `TCG_ORACLE_GRADE` | Grade a card image URL — returns PSA/Beckett prediction | "Grade this card: https://..." |
60
- | `TCG_ORACLE_SIMULATE` | Monte Carlo price forecast with 3 stochastic models | "Simulate Charizard at $350 for 60 days" |
85
+ | `TCG_ORACLE_SIMULATE` | Calibrated risk forecast — honest VaR (conformal default; Monte Carlo opt-in) | "Simulate Charizard at $350 for 60 days" |
61
86
  | `TCG_ORACLE_MARKET` | Pull the latest daily market snapshot for any game | "Show me the Pokemon market" |
87
+ | `TCG_ORACLE_GRADE_OR_NOT` | Grade-or-Not ROI engine — "will grading this make me money?" | "Should I grade my Charizard?" |
88
+ | `TCG_ORACLE_TRENDING` | Trending cards by 30-day sales volume and price velocity | "What Pokemon cards are trending?" |
89
+
90
+ ---
91
+
92
+ ## How It Works
93
+
94
+ ```
95
+ ┌────────────────────────────────────────────────────────────────┐
96
+ │ ElizaOS Agent │
97
+ │ │
98
+ │ User: "Simulate Charizard VMAX at $350 for 60 days" │
99
+ │ │ │
100
+ │ ▼ │
101
+ │ ┌─────────────────────┐ │
102
+ │ │ Action Router │ │
103
+ │ │ (LLM selects best │ │
104
+ │ │ action + params) │ │
105
+ │ └────────┬────────────┘ │
106
+ └───────────────────────┼────────────────────────────────────────┘
107
+ │ fetch() + 30s timeout
108
+ ▼
109
+ ┌────────────────────────────────────────────────────────────────┐
110
+ │ TCG Oracle API Server │
111
+ │ │
112
+ │ /api/v1/search ─────── 446K+ products (TCGCSV) │
113
+ │ /api/v1/grade ──────── Vision LLM + OpenCV → PSA/BGS score │
114
+ │ /api/v1/simulate ───── Conformal forecast + card grades │
115
+ │ /api/v1/market ─────── Daily snapshot + top movers │
116
+ │ /api/v1/trending ───── 30-day volume + price velocity │
117
+ │ /api/v1/grade-or-not ─ PSA fee × grade × value = GO/NO-GO │
118
+ │ │
119
+ └────────────────────────────────────────────────────────────────┘
120
+ ```
62
121
 
63
122
  ---
64
123
 
@@ -70,12 +129,11 @@ Pokémon · Magic: The Gathering · Yu-Gi-Oh! · Disney Lorcana · One Piece ·
70
129
 
71
130
  ## How the Data Works
72
131
 
73
- All market data comes from [TCGCSV](https://tcgcsv.com) — a community project that snapshots pricing data daily for 25 TCG games. Our GitLab CI pipeline automatically refreshes this data every 24 hours. The full dataset (370K+ products) is also available on [Kaggle](https://www.kaggle.com/datasets/sailorpepe/tcg-market-intelligence).
132
+ All market data comes from [TCGCSV](https://tcgcsv.com) — a community project that snapshots pricing data daily for 25 TCG games. Our GitLab CI pipeline automatically refreshes this data every 24 hours. The full dataset (446K+ products) is also available on [Kaggle](https://www.kaggle.com/datasets/sailorpepe/tcg-market-intelligence).
74
133
 
75
- **Monte Carlo models explained:**
76
- - **Heston** — Models volatility itself as stochastic (volatility changes over time). Best for cards with unpredictable hype cycles.
77
- - **Merton** — Adds random jumps to the price process. Best for cards that can spike on tournament results or reprints.
78
- - **Kou** — Uses double-exponential jump distribution. Best for modeling asymmetric risk (big upside spikes vs gradual decline).
134
+ **Risk model — conformal calibration (default):**
135
+
136
+ Price forecasts default to a **regime-aware split-conformal** model: distribution-free bands calibrated on real cross-card price history, so the published downside risk (VaR) is *honest* — out-of-sample, a "5% loss" actually happens about 5% of the time — and fully **deterministic**, so anyone can reproduce the exact numbers. Each card also gets two letter grades: **Safe-Hold** (downside protection) and **Momentum** (direction). Monte Carlo models (GBM and Merton jump-diffusion) remain available via `model=`, seeded from the public **drand** randomness beacon for provably-fair draws. Forecast responses include the model parameters (e.g. `drift_mu`, `diffusion_sigma`, `regime`) for full transparency.
79
137
 
80
138
  ---
81
139
 
@@ -114,6 +172,43 @@ This is a **native TypeScript** ElizaOS plugin. It runs natively in the ElizaOS
114
172
 
115
173
  ---
116
174
 
117
- ## License
175
+ ## 📝 License & Commercial Use
176
+
177
+ This project is licensed under the **[Business Source License 1.1 (BUSL-1.1)](LICENSE)**.
178
+
179
+ We build in public and support the developer ecosystem — but we also protect the infrastructure and IP of **The Undesirables LLC**.
180
+
181
+ ### ✅ What You CAN Do (Free)
182
+
183
+ - **Personal & Educational Use** — Download, modify, and run locally for learning, research, or personal projects.
184
+ - **Non-Competing Applications** — Integrate our packages into your app, provided your app does not offer TCG market intelligence, pricing aggregation, AI card grading, or on-chain price oracle services as its primary function.
185
+ - **MCP / Agent Integration** — Connect your AI agent to our tools for non-commercial use.
186
+ - **Community Contributions** — Security audits, bug fixes, and PRs are always welcome.
187
+
188
+ ### 🚫 What You CANNOT Do (Use Limitation)
189
+
190
+ - **Competing Service** — You may not use this code to operate a competing TCG market intelligence, pricing aggregation, AI card grading, or on-chain price oracle service.
191
+ - **Commercial Resale** — You may not wrap our API, data pipelines, or AI models into a paid service without a commercial license.
192
+ - **Hosted SaaS** — You may not host this software as a service for third parties without written permission.
193
+
194
+ ### 🔓 Open-Source Conversion
195
+
196
+ On **June 1, 2030** (or 4 years after the first public release of each version), this code automatically converts to the **MIT License** — fully open source, forever.
197
+
198
+ ### 🤝 Commercial Licensing
199
+
200
+ Building a commercial product? Want guaranteed API access or white-label integration? Contact us:
201
+
202
+ 📧 **theundesirables7@gmail.com** · 🐦 **[@undesirables_ai](https://x.com/undesirables_ai)**
203
+
204
+ © 2026 The Undesirables LLC
205
+
206
+ ---
207
+
208
+ <div align="center">
209
+
210
+ ⭐ **If this project helped you, please star this repo** — it helps others find it.
211
+
212
+ [Report Bug](../../issues) · [Request Feature](../../issues)
118
213
 
119
- [BUSL-1.1](LICENSE) — Business Source License 1.1. Copyright © 2026 The Undesirables LLC.
214
+ </div>
package/dist/index.d.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import { Plugin } from '@elizaos/core';
2
+
1
3
  /**
2
4
  * TCG Oracle — ElizaOS Plugin v1.0.0
3
5
  * ====================================
@@ -5,19 +7,19 @@
5
7
  * Native TypeScript rewrite of the Python G.A.M.E. SDK version.
6
8
  *
7
9
  * Features:
8
- * - Search 370K+ TCG products across 25 games (Pokemon, MTG, Yu-Gi-Oh, etc.)
10
+ * - Search 446K+ TCG products across 25+ games (Pokemon, MTG, Yu-Gi-Oh, etc.)
9
11
  * - AI Vision card grading (PSA/Beckett prediction via Qwen VL)
10
- * - Monte Carlo price simulation (Heston, Merton, Kou stochastic models)
12
+ * - Conformal-calibrated risk forecasts (honest VaR + Safe-Hold/Momentum grades);
13
+ * Monte Carlo (GBM/Merton) opt-in via the model parameter
11
14
  * - Real-time market snapshots from TCGCSV daily data
12
15
  * - License key purchase & verification (Ethereum NFT)
13
16
  *
14
17
  * @see https://the-undesirables.com
15
18
  * @see https://github.com/sailorpepe/elizaos-tcg-oracle-plugin
16
19
  */
17
- import type { Plugin } from "@elizaos/core";
20
+
18
21
  declare const SUPPORTED_GAMES: readonly ["Pokemon", "Magic: The Gathering", "Yu-Gi-Oh!", "Lorcana", "One Piece", "Flesh and Blood", "Star Wars: Unlimited", "Dragon Ball Super", "Digimon", "MetaZoo", "Union Arena", "Gundam Card Game", "LoL Riftbound"];
19
- declare const SIMULATION_MODELS: readonly ["heston", "merton", "kou"];
22
+ declare const SIMULATION_MODELS: readonly ["conformal", "merton", "gbm"];
20
23
  declare const tcgOraclePlugin: Plugin;
21
- export default tcgOraclePlugin;
22
- export { SUPPORTED_GAMES, SIMULATION_MODELS };
23
- //# sourceMappingURL=index.d.ts.map
24
+
25
+ export { SIMULATION_MODELS, SUPPORTED_GAMES, tcgOraclePlugin as default };