50c 3.9.6 → 3.9.7

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.

Potentially problematic release.


This version of 50c might be problematic. Click here for more details.

@@ -1,226 +1,184 @@
1
- const https = require('https');
2
- const fs = require('fs');
3
- const path = require('path');
4
-
5
- const API_BASE = 'https://api.50c.ai';
6
- const CACHE_FILE = path.join(__dirname, '..', '.tools-cache.json');
7
- const CACHE_TTL = 3600000; // 1 hour
8
-
9
- let _cache = null;
10
- let _cacheTime = 0;
11
-
12
- const FALLBACK_TOOLS = [
13
- { slug: 'web_search', name: 'web_search', description: 'Search the internet. Returns structured results with title, snippet, URL.', price: 0, tier: 'free', category: 'web_seo' },
14
- { slug: 'page_fetch', name: 'page_fetch', description: 'Fetch and extract clean content from any URL.', price: 0, tier: 'free', category: 'web_seo' },
15
- { slug: 'domain_check', name: 'domain_check', description: 'Check domain name availability.', price: 0, tier: 'free', category: 'web_seo' },
16
- { slug: 'contrast_check', name: 'contrast_check', description: 'WCAG color contrast accessibility checker.', price: 0, tier: 'free', category: 'web_seo' },
17
- { slug: 'roadmap_add', name: 'roadmap_add', description: 'Add idea to dev roadmap.', price: 0, tier: 'free', category: 'utility' },
18
- { slug: 'roadmap_list', name: 'roadmap_list', description: 'List roadmap ideas with optional filter.', price: 0, tier: 'free', category: 'utility' },
19
- { slug: 'roadmap_update', name: 'roadmap_update', description: 'Update roadmap item status, priority, or notes.', price: 0, tier: 'free', category: 'utility' },
20
- { slug: 'roadmap_delete', name: 'roadmap_delete', description: 'Delete a roadmap item.', price: 0, tier: 'free', category: 'utility' },
21
- { slug: 'beacon_scan', name: 'beacon_scan', description: 'Context health analysis with entropy scoring.', price: 0.01, tier: 'starter', category: 'context' },
22
- { slug: 'beacon_rank', name: 'beacon_rank', description: 'Rank messages by information value.', price: 0.01, tier: 'starter', category: 'context' },
23
- { slug: 'beacon_extract', name: 'beacon_extract', description: 'Extract decisions, errors, entities, or questions from messages.', price: 0.01, tier: 'starter', category: 'context' },
24
- { slug: 'prompt_categorize', name: 'prompt_categorize', description: 'Auto-detect app type from concept description.', price: 0.01, tier: 'starter', category: 'primitives' },
25
- { slug: 'one_liner', name: 'one_liner', description: 'Elevator pitch in 8 words.', price: 0.02, tier: 'starter', category: 'primitives' },
26
- { slug: 'prompt_extract', name: 'prompt_extract', description: 'Extract features, audience, and requirements from concept.', price: 0.02, tier: 'starter', category: 'primitives' },
27
- { slug: 'beacon_compress', name: 'beacon_compress', description: 'Intelligent context compression preserving key information.', price: 0.02, tier: 'starter', category: 'context' },
28
- { slug: 'beacon_focus', name: 'beacon_focus', description: 'U-curve reorder messages for optimal query relevance.', price: 0.02, tier: 'starter', category: 'context' },
29
- { slug: 'echo_sequence', name: 'echo_sequence', description: 'Mathematical echo pattern sequence analysis.', price: 0.02, tier: 'starter', category: 'deep_ai' },
30
- { slug: 'resonance', name: 'resonance', description: 'Mathematical resonance pattern detection.', price: 0.02, tier: 'starter', category: 'deep_ai' },
31
- { slug: 'name_it', name: 'name_it', description: '5 product names with domain availability check.', price: 0.03, tier: 'starter', category: 'primitives' },
32
-
33
- { slug: 'fog_monitor', name: 'fog_monitor', description: 'Monitor conversation health for fog buildup.', price: 0.03, tier: 'starter', category: 'context' },
34
- { slug: 'fog_checkpoint', name: 'fog_checkpoint', description: 'Checkpoint: what is clear vs unclear in conversation.', price: 0.03, tier: 'starter', category: 'context' },
35
- { slug: 'hints', name: 'hints', description: '5 brutal debugging hints, 2 words each.', price: 0.05, tier: 'starter', category: 'primitives' },
36
- { slug: 'quick_vibe', name: 'quick_vibe', description: '3 unconventional ideas for what you are working on.', price: 0.05, tier: 'starter', category: 'primitives' },
37
- { slug: 'roast', name: 'roast', description: 'Brutal code review. 3 flaws plus fixes.', price: 0.05, tier: 'starter', category: 'primitives' },
38
- { slug: 'price_it', name: 'price_it', description: 'SaaS pricing strategy recommendation.', price: 0.05, tier: 'starter', category: 'primitives' },
39
- { slug: 'prompt_phases', name: 'prompt_phases', description: 'Generate 4-phase development prompts.', price: 0.05, tier: 'starter', category: 'primitives' },
40
- { slug: 'fog_check', name: 'fog_check', description: 'Check conversation for confusion and ambiguity.', price: 0.05, tier: 'starter', category: 'context' },
41
- { slug: 'fog_clear', name: 'fog_clear', description: 'Suggest actions to clear conversation fog.', price: 0.05, tier: 'starter', category: 'context' },
42
- { slug: 'prime_residue', name: 'prime_residue', description: 'Prime number residue pattern analysis.', price: 0.05, tier: 'starter', category: 'deep_ai' },
43
- { slug: 'context_compress', name: 'context_compress', description: 'Compress conversation context intelligently.', price: 0.05, tier: 'pro', category: 'context' },
44
-
45
- { slug: 'mind_opener', name: 'mind_opener', description: '5 curious angles before solving a problem.', price: 0.08, tier: 'pro', category: 'primitives' },
46
- { slug: 'prompt_refine', name: 'prompt_refine', description: 'Refine concept with targeted feedback.', price: 0.08, tier: 'pro', category: 'primitives' },
47
- { slug: 'suggest', name: 'suggest', description: 'Smart next-step suggestions based on context.', price: 0.08, tier: 'pro', category: 'primitives' },
48
- { slug: 'hints_plus', name: 'hints_plus', description: '10 brutal hints, 4 words each.', price: 0.10, tier: 'pro', category: 'primitives' },
49
- { slug: 'prompt_expand', name: 'prompt_expand', description: 'Expand idea into detailed concept.', price: 0.10, tier: 'pro', category: 'primitives' },
50
- { slug: 'idea_fold', name: 'idea_fold', description: 'Test claims through STEM lenses.', price: 0.10, tier: 'pro', category: 'deep_ai' },
51
- { slug: 'agent_autopsy', name: 'agent_autopsy', description: 'Diagnose why an AI agent failed.', price: 0.10, tier: 'pro', category: 'primitives' },
52
- { slug: 'cvi_verify', name: 'cvi_verify', description: 'Verify output against constraints.', price: 0.10, tier: 'pro', category: 'deep_ai' },
53
- { slug: 'handoff', name: 'handoff', description: 'Generate timestamped handoff document.', price: 0.10, tier: 'pro', category: 'utility' },
54
- { slug: 'compute', name: 'compute', description: 'Execute Python code in isolated sandbox.', price: 0.10, tier: 'pro', category: 'deep_ai' },
55
- { slug: 'ux_roast', name: 'ux_roast', description: 'Brutal UX review of a website.', price: 0.10, tier: 'pro', category: 'web_seo' },
56
-
57
- { slug: 'prompt_fortress', name: 'prompt_fortress', description: 'Stress-test prompt against 6 attack vectors.', price: 0.20, tier: 'pro', category: 'primitives' },
58
- { slug: 'bcalc', name: 'bcalc', description: 'Mathematical discovery engine. Explore number theory and test conjectures.', price: 0.15, tier: 'enterprise', category: 'deep_ai' },
59
- { slug: 'discovery_collision', name: 'discovery_collision', description: 'Systematic multi-tool experiments for unexpected connections.', price: 0.15, tier: 'enterprise', category: 'deep_ai' },
60
- { slug: 'chaos_fingerprint', name: 'chaos_fingerprint', description: 'Number DNA clustering and pattern signatures.', price: 0.15, tier: 'enterprise', category: 'deep_ai' },
61
- { slug: 'conversation_diagnostic', name: 'conversation_diagnostic', description: 'Detect loops, drift, and hallucination in conversations.', price: 0.15, tier: 'enterprise', category: 'context' },
62
- { slug: 'bcalc_why', name: 'bcalc_why', description: 'Deep math explanation revealing why patterns exist.', price: 0.20, tier: 'enterprise', category: 'deep_ai' },
63
- { slug: 'cvi_loop', name: 'cvi_loop', description: 'Constraint-Verified Intelligence loop for rigorous solutions.', price: 0.30, tier: 'enterprise', category: 'deep_ai' },
64
- { slug: 'genius', name: 'genius', description: 'Deep problem solving with extended reasoning.', price: 0.50, tier: 'enterprise', category: 'deep_ai' },
65
- { slug: 'genius_plus', name: 'genius_plus', description: 'Self-improving code generation that iterates to production-ready.', price: 0.65, tier: 'enterprise', category: 'deep_ai' },
66
- { slug: 'auto_invent', name: 'auto_invent', description: 'Full invention pipeline. Chains mind_opener, idea_fold, bcalc, genius_plus, compute, cvi_verify.', price: 2.00, tier: 'enterprise', category: 'deep_ai' },
67
- { slug: 'invent_program', name: 'invent_program', description: 'JSON-defined invention programs with custom step sequences.', price: 2.00, tier: 'enterprise', category: 'deep_ai' },
68
- { slug: 'adoption_calc', name: 'adoption_calc', description: 'Adoption probability calculator. P=(1-e^(-λR))×N×W. Diagnoses bottleneck.', price: 0, tier: 'free', category: 'deep_ai' },
69
- { slug: 'adoption_diagnose', name: 'adoption_diagnose', description: 'Find which adoption term is near zero. Identifies reward/network/window bottleneck.', price: 0, tier: 'free', category: 'deep_ai' },
70
- { slug: 'adoption_simulate', name: 'adoption_simulate', description: 'Time-dependent adoption ODE with feedback loops, churn, and upheaval decay.', price: 0, tier: 'free', category: 'deep_ai' },
71
-
72
- // Magnum Mathematical Verification (Enterprise tier)
73
- { slug: 'magnum_verify_proof', name: 'magnum_verify_proof', description: 'Graduate-level mathematical proof verification. 96% accuracy. Catches errors before peer review.', price: 0.35, tier: 'enterprise', category: 'math_verification' },
74
- { slug: 'magnum_find_error', name: 'magnum_find_error', description: 'Expert error detection in proofs. Finds arithmetic, logical, and congruence mistakes.', price: 0.30, tier: 'enterprise', category: 'math_verification' },
75
- { slug: 'magnum_predict_structure', name: 'magnum_predict_structure', description: 'Generate testable mathematical predictions with falsification criteria.', price: 0.35, tier: 'enterprise', category: 'math_verification' },
76
- { slug: 'magnum_number_theory', name: 'magnum_number_theory', description: 'Number theory specialist with mandatory numerical verification. Fixed hallucination problem.', price: 0.35, tier: 'enterprise', category: 'math_verification' },
77
- { slug: 'magnum_find_theorem', name: 'magnum_find_theorem', description: 'Find relevant theorems and literature with citations.', price: 0.30, tier: 'enterprise', category: 'math_verification' },
78
- { slug: 'magnum_test_conjecture', name: 'magnum_test_conjecture', description: 'Adversarial conjecture testing. Finds counterexamples or estimates plausibility.', price: 0.35, tier: 'enterprise', category: 'math_verification' },
79
-
80
- // Titan Deep Solvers (Foundation/Enterprise)
81
- { slug: 'titan_1', name: 'titan_1', description: 'Deep orchestrated solver. 7 phases: Diverge, Ground-truth, Explore, Attack, Resolve, Repair, Verify.', price: 10.00, tier: 'enterprise', category: 'deep_ai' },
82
- { slug: 'titan_2', name: 'titan_2', description: 'Compute-anchored deep solver. Ground-truth, Analysis, Synthesis, Scoring.', price: 5.00, tier: 'enterprise', category: 'deep_ai' },
83
- { slug: 'titan_3', name: 'titan_3', description: 'Proof-audited deep solver. 6 phases: understand, construct, verify, audit, fix, synthesize.', price: 10.00, tier: 'enterprise', category: 'deep_ai' },
84
- { slug: 'titan_4', name: 'titan_4', description: 'Compute-before-assert deep solver. 5 phases: blast, verify, fix, synthesize, claim_audit.', price: 2.00, tier: 'enterprise', category: 'deep_ai' },
85
-
86
- // Clarity Mode
87
- { slug: 'clarity', name: 'clarity', description: 'Clarity Mode: tools self-activate based on input relevance. Modes: on/off/auto.', price: 0, tier: 'free', category: 'deep_ai' },
88
- { slug: 'guardian', name: 'guardian', description: '50c Guardian: Combined supply chain verification + machine backdoor audit. Catches injected IPs/URLs/eval AND system compromise. Cross-platform. FREE.', price: 0, tier: 'free', category: 'security' },
89
- { slug: 'guardian_publish', name: 'guardian_publish', description: 'Guardian: Pre-publish supply chain verification. 10 checks for hardcoded IPs, obfuscated code, dangerous scripts, env leaks, binary files, npm diff. FREE.', price: 0, tier: 'free', category: 'security' },
90
- { slug: 'guardian_audit', name: 'guardian_audit', description: 'Guardian: Machine security audit for backdoors, unauthorized access, persistence, suspicious connections. Geo-IP tags foreign IPs. Cross-platform. FREE.', price: 0, tier: 'free', category: 'security' },
91
-
92
- // Skeptic POV - adversarial verification
93
- { slug: 'skeptic_pov', name: 'skeptic_pov', description: '5-lens adversarial verification (Factual, Logical, Computational, Constructive, STEM).', price: 0, tier: 'free', category: 'deep_ai' },
94
-
95
- // Solve - iterative deep solver
96
- { slug: 'solve', name: 'solve', description: 'Deep iterative solver. Researches, audits, verifies computationally, and self-corrects.', price: 0, tier: 'free', category: 'deep_ai' },
97
-
98
- // Justice - ethical reasoning
99
- { slug: 'justice', name: 'justice', description: 'Multi-framework ethical reasoning engine. 5+ frameworks with internal objections.', price: 0.10, tier: 'pro', category: 'deep_ai' },
100
-
101
- // Artist Mode - creative construction
102
- { slug: 'artist_mode', name: 'artist_mode', description: 'Divergent creative construction engine. Novel artifacts under constraints.', price: 0.10, tier: 'pro', category: 'deep_ai' },
103
-
104
- // Self Modeling - epistemic analysis
105
- { slug: 'self_modeling', name: 'self_modeling', description: 'Epistemic self-analysis. Calibrates confidence, distinguishes retrieval vs computation.', price: 0.08, tier: 'pro', category: 'deep_ai' },
106
-
107
- // Magnum Advanced Tools
108
- { slug: 'magnum_dependency_dag', name: 'magnum_dependency_dag', description: 'Build dependency DAG for proofs. Track theorem/axiom dependencies, find circular refs.', price: 0.25, tier: 'enterprise', category: 'math_verification' },
109
- { slug: 'magnum_symbolic_computational_hybrid', name: 'magnum_symbolic_computational_hybrid', description: 'Hybrid solver bridging symbolic and computational verification.', price: 0.40, tier: 'enterprise', category: 'math_verification' },
110
- { slug: 'mcp_conductor', name: 'mcp_conductor', description: 'Meta-orchestrator ensuring Magnum tools consistency. Resolves conflicts.', price: 0.50, tier: 'enterprise', category: 'math_verification' },
111
-
112
- // Caz dedup
113
- { slug: 'caz_dedup', name: 'caz_dedup', description: 'Semantic deduplication of items.', price: 0.03, tier: 'starter', category: 'context' },
114
-
115
- // SEO Tools
116
- { slug: 'seo_audit', name: 'seo_audit', description: 'Quick SEO audit of a URL.', price: 0.10, tier: 'pro', category: 'web_seo' },
117
- { slug: 'traffic_optimizer', name: 'traffic_optimizer', description: 'Traffic optimization strategies.', price: 0.10, tier: 'pro', category: 'web_seo' },
118
- { slug: 'schema_generator', name: 'schema_generator', description: 'Generate JSON-LD structured data.', price: 0.05, tier: 'pro', category: 'web_seo' },
119
- { slug: 'faq_generator', name: 'faq_generator', description: 'Generate FAQ content with schema.', price: 0.05, tier: 'pro', category: 'web_seo' },
120
-
121
- { slug: 'magnum_design_computation', name: 'magnum_design_computation', description: 'Design computational verification experiments with runnable code.', price: 0.30, tier: 'enterprise', category: 'math_verification' },
122
- ];
123
-
124
- function fetchFromAPI() {
125
- return new Promise((resolve, reject) => {
126
- const req = https.get(`${API_BASE}/v1/tools`, { timeout: 5000 }, (res) => {
127
- let data = '';
128
- res.on('data', c => data += c);
129
- res.on('end', () => {
130
- try { resolve(JSON.parse(data).tools || []); }
131
- catch { reject(new Error('Invalid JSON')); }
132
- });
133
- });
134
- req.on('error', reject);
135
- req.on('timeout', () => { req.destroy(); reject(new Error('timeout')); });
136
- });
137
- }
138
-
139
- function loadDiskCache() {
140
- try {
141
- const raw = fs.readFileSync(CACHE_FILE, 'utf8');
142
- const parsed = JSON.parse(raw);
143
- if (parsed.tools && parsed.ts) return parsed;
144
- } catch {}
145
- return null;
146
- }
147
-
148
- function saveDiskCache(tools) {
149
- try { fs.writeFileSync(CACHE_FILE, JSON.stringify({ tools, ts: Date.now() })); } catch {}
150
- }
151
-
152
- async function getTools() {
153
- if (_cache && (Date.now() - _cacheTime) < CACHE_TTL) return _cache;
154
-
155
- try {
156
- const tools = await fetchFromAPI();
157
- if (tools.length > 0) {
158
- _cache = tools;
159
- _cacheTime = Date.now();
160
- saveDiskCache(tools);
161
- return tools;
162
- }
163
- } catch {}
164
-
165
- const disk = loadDiskCache();
166
- if (disk && disk.tools.length > 0) {
167
- _cache = disk.tools;
168
- _cacheTime = Date.now();
169
- return _cache;
170
- }
171
-
172
- _cache = FALLBACK_TOOLS;
173
- _cacheTime = Date.now();
174
- return _cache;
175
- }
176
-
177
- function getToolSync(slug) {
178
- if (_cache) return _cache.find(t => t.slug === slug);
179
- return FALLBACK_TOOLS.find(t => t.slug === slug);
180
- }
181
-
182
- function getPriceSync(slug) {
183
- const t = getToolSync(slug);
184
- return t ? t.price : null;
185
- }
186
-
187
- function getTierSync(slug) {
188
- const t = getToolSync(slug);
189
- return t ? t.tier : null;
190
- }
191
-
192
- function getFreeSlugs() {
193
- const src = _cache || FALLBACK_TOOLS;
194
- return src.filter(t => t.tier === 'free').map(t => t.slug);
195
- }
196
-
197
- function getEnterpriseSlugs() {
198
- const src = _cache || FALLBACK_TOOLS;
199
- return src.filter(t => t.tier === 'enterprise').map(t => t.slug);
200
- }
201
-
202
- function getAllSlugs() {
203
- const src = _cache || FALLBACK_TOOLS;
204
- return src.map(t => t.slug);
205
- }
206
-
207
- function toMCPTools() {
208
- const src = _cache || FALLBACK_TOOLS;
209
- return src.filter(t => t.active !== 0).map(t => ({
210
- name: t.slug,
211
- description: `${t.description} $${t.price.toFixed(2)}`,
212
- inputSchema: t.params_json ? JSON.parse(t.params_json) : { type: 'object', properties: {} }
213
- }));
214
- }
215
-
216
- module.exports = {
217
- getTools,
218
- getToolSync,
219
- getPriceSync,
220
- getTierSync,
221
- getFreeSlugs,
222
- getEnterpriseSlugs,
223
- getAllSlugs,
224
- toMCPTools,
225
- FALLBACK_TOOLS,
226
- };
1
+ const https = require('https');
2
+ const fs = require('fs');
3
+ const path = require('path');
4
+
5
+ const API_BASE = 'https://api.50c.ai';
6
+ const CACHE_FILE = path.join(__dirname, '..', '.tools-cache.json');
7
+ const CACHE_TTL = 3600000; // 1 hour
8
+
9
+ let _cache = null;
10
+ let _cacheTime = 0;
11
+
12
+ const FALLBACK_TOOLS = [
13
+ { slug: 'web_search', name: 'web_search', description: 'Search the internet. Returns structured results with title, snippet, URL.', price: 0, tier: 'free', category: 'web_seo' },
14
+ { slug: 'page_fetch', name: 'page_fetch', description: 'Fetch and extract clean content from any URL.', price: 0, tier: 'free', category: 'web_seo' },
15
+ { slug: 'domain_check', name: 'domain_check', description: 'Check domain name availability.', price: 0, tier: 'free', category: 'web_seo' },
16
+ { slug: 'contrast_check', name: 'contrast_check', description: 'WCAG color contrast accessibility checker.', price: 0, tier: 'free', category: 'web_seo' },
17
+ { slug: 'roadmap_add', name: 'roadmap_add', description: 'Add idea to dev roadmap.', price: 0, tier: 'free', category: 'utility' },
18
+ { slug: 'roadmap_list', name: 'roadmap_list', description: 'List roadmap ideas with optional filter.', price: 0, tier: 'free', category: 'utility' },
19
+ { slug: 'roadmap_update', name: 'roadmap_update', description: 'Update roadmap item status, priority, or notes.', price: 0, tier: 'free', category: 'utility' },
20
+ { slug: 'roadmap_delete', name: 'roadmap_delete', description: 'Delete a roadmap item.', price: 0, tier: 'free', category: 'utility' },
21
+ { slug: 'beacon_scan', name: 'beacon_scan', description: 'Context health analysis with entropy scoring.', price: 0.01, tier: 'starter', category: 'context' },
22
+ { slug: 'beacon_rank', name: 'beacon_rank', description: 'Rank messages by information value.', price: 0.01, tier: 'starter', category: 'context' },
23
+ { slug: 'beacon_extract', name: 'beacon_extract', description: 'Extract decisions, errors, entities, or questions from messages.', price: 0.01, tier: 'starter', category: 'context' },
24
+ { slug: 'prompt_categorize', name: 'prompt_categorize', description: 'Auto-detect app type from concept description.', price: 0.01, tier: 'starter', category: 'primitives' },
25
+ { slug: 'one_liner', name: 'one_liner', description: 'Elevator pitch in 8 words.', price: 0.02, tier: 'starter', category: 'primitives' },
26
+ { slug: 'prompt_extract', name: 'prompt_extract', description: 'Extract features, audience, and requirements from concept.', price: 0.02, tier: 'starter', category: 'primitives' },
27
+ { slug: 'beacon_compress', name: 'beacon_compress', description: 'Intelligent context compression preserving key information.', price: 0.02, tier: 'starter', category: 'context' },
28
+ { slug: 'beacon_focus', name: 'beacon_focus', description: 'U-curve reorder messages for optimal query relevance.', price: 0.02, tier: 'starter', category: 'context' },
29
+ { slug: 'echo_sequence', name: 'echo_sequence', description: 'Mathematical echo pattern sequence analysis.', price: 0.02, tier: 'starter', category: 'deep_ai' },
30
+ { slug: 'resonance', name: 'resonance', description: 'Mathematical resonance pattern detection.', price: 0.02, tier: 'starter', category: 'deep_ai' },
31
+ { slug: 'name_it', name: 'name_it', description: '5 product names with domain availability check.', price: 0.03, tier: 'starter', category: 'primitives' },
32
+
33
+ { slug: 'fog_monitor', name: 'fog_monitor', description: 'Monitor conversation health for fog buildup.', price: 0.03, tier: 'starter', category: 'context' },
34
+ { slug: 'fog_checkpoint', name: 'fog_checkpoint', description: 'Checkpoint: what is clear vs unclear in conversation.', price: 0.03, tier: 'starter', category: 'context' },
35
+ { slug: 'hints', name: 'hints', description: '5 brutal debugging hints, 2 words each.', price: 0.05, tier: 'starter', category: 'primitives' },
36
+ { slug: 'quick_vibe', name: 'quick_vibe', description: '3 unconventional ideas for what you are working on.', price: 0.05, tier: 'starter', category: 'primitives' },
37
+ { slug: 'roast', name: 'roast', description: 'Brutal code review. 3 flaws plus fixes.', price: 0.05, tier: 'starter', category: 'primitives' },
38
+ { slug: 'price_it', name: 'price_it', description: 'SaaS pricing strategy recommendation.', price: 0.05, tier: 'starter', category: 'primitives' },
39
+ { slug: 'prompt_phases', name: 'prompt_phases', description: 'Generate 4-phase development prompts.', price: 0.05, tier: 'starter', category: 'primitives' },
40
+ { slug: 'fog_check', name: 'fog_check', description: 'Check conversation for confusion and ambiguity.', price: 0.05, tier: 'starter', category: 'context' },
41
+ { slug: 'fog_clear', name: 'fog_clear', description: 'Suggest actions to clear conversation fog.', price: 0.05, tier: 'starter', category: 'context' },
42
+ { slug: 'prime_residue', name: 'prime_residue', description: 'Prime number residue pattern analysis.', price: 0.05, tier: 'starter', category: 'deep_ai' },
43
+ { slug: 'context_compress', name: 'context_compress', description: 'Compress conversation context intelligently.', price: 0.05, tier: 'pro', category: 'context' },
44
+
45
+ { slug: 'mind_opener', name: 'mind_opener', description: '5 curious angles before solving a problem.', price: 0.08, tier: 'pro', category: 'primitives' },
46
+ { slug: 'prompt_refine', name: 'prompt_refine', description: 'Refine concept with targeted feedback.', price: 0.08, tier: 'pro', category: 'primitives' },
47
+ { slug: 'suggest', name: 'suggest', description: 'Smart next-step suggestions based on context.', price: 0.08, tier: 'pro', category: 'primitives' },
48
+ { slug: 'hints_plus', name: 'hints_plus', description: '10 brutal hints, 4 words each.', price: 0.10, tier: 'pro', category: 'primitives' },
49
+ { slug: 'prompt_expand', name: 'prompt_expand', description: 'Expand idea into detailed concept.', price: 0.10, tier: 'pro', category: 'primitives' },
50
+ { slug: 'idea_fold', name: 'idea_fold', description: 'Test claims through STEM lenses.', price: 0.10, tier: 'pro', category: 'deep_ai' },
51
+ { slug: 'agent_autopsy', name: 'agent_autopsy', description: 'Diagnose why an AI agent failed.', price: 0.10, tier: 'pro', category: 'primitives' },
52
+ { slug: 'cvi_verify', name: 'cvi_verify', description: 'Verify output against constraints.', price: 0.10, tier: 'pro', category: 'deep_ai' },
53
+ { slug: 'handoff', name: 'handoff', description: 'Generate timestamped handoff document.', price: 0.10, tier: 'pro', category: 'utility' },
54
+ { slug: 'compute', name: 'compute', description: 'Execute Python code in isolated sandbox.', price: 0.10, tier: 'pro', category: 'deep_ai' },
55
+ { slug: 'ux_roast', name: 'ux_roast', description: 'Brutal UX review of a website.', price: 0.10, tier: 'pro', category: 'web_seo' },
56
+
57
+ { slug: 'prompt_fortress', name: 'prompt_fortress', description: 'Stress-test prompt against 6 attack vectors.', price: 0.20, tier: 'pro', category: 'primitives' },
58
+ { slug: 'bcalc', name: 'bcalc', description: 'Mathematical discovery engine. Explore number theory and test conjectures.', price: 0.15, tier: 'enterprise', category: 'deep_ai' },
59
+ { slug: 'discovery_collision', name: 'discovery_collision', description: 'Systematic multi-tool experiments for unexpected connections.', price: 0.15, tier: 'enterprise', category: 'deep_ai' },
60
+ { slug: 'chaos_fingerprint', name: 'chaos_fingerprint', description: 'Number DNA clustering and pattern signatures.', price: 0.15, tier: 'enterprise', category: 'deep_ai' },
61
+ { slug: 'conversation_diagnostic', name: 'conversation_diagnostic', description: 'Detect loops, drift, and hallucination in conversations.', price: 0.15, tier: 'enterprise', category: 'context' },
62
+ { slug: 'bcalc_why', name: 'bcalc_why', description: 'Deep math explanation revealing why patterns exist.', price: 0.20, tier: 'enterprise', category: 'deep_ai' },
63
+ { slug: 'cvi_loop', name: 'cvi_loop', description: 'Constraint-Verified Intelligence loop for rigorous solutions.', price: 0.30, tier: 'enterprise', category: 'deep_ai' },
64
+ { slug: 'genius', name: 'genius', description: 'Deep problem solving with extended reasoning.', price: 0.50, tier: 'enterprise', category: 'deep_ai' },
65
+ { slug: 'genius_plus', name: 'genius_plus', description: 'Self-improving code generation that iterates to production-ready.', price: 0.65, tier: 'enterprise', category: 'deep_ai' },
66
+ { slug: 'auto_invent', name: 'auto_invent', description: 'Full invention pipeline. Chains mind_opener, idea_fold, bcalc, genius_plus, compute, cvi_verify.', price: 2.00, tier: 'enterprise', category: 'deep_ai' },
67
+ { slug: 'invent_program', name: 'invent_program', description: 'JSON-defined invention programs with custom step sequences.', price: 2.00, tier: 'enterprise', category: 'deep_ai' },
68
+ { slug: 'adoption_calc', name: 'adoption_calc', description: 'Adoption probability calculator. P=(1-e^(-λR))×N×W. Diagnoses bottleneck.', price: 0, tier: 'free', category: 'deep_ai' },
69
+ { slug: 'adoption_diagnose', name: 'adoption_diagnose', description: 'Find which adoption term is near zero. Identifies reward/network/window bottleneck.', price: 0, tier: 'free', category: 'deep_ai' },
70
+ { slug: 'adoption_simulate', name: 'adoption_simulate', description: 'Time-dependent adoption ODE with feedback loops, churn, and upheaval decay.', price: 0, tier: 'free', category: 'deep_ai' },
71
+
72
+ // Magnum Mathematical Verification (Enterprise tier)
73
+ { slug: 'magnum_verify_proof', name: 'magnum_verify_proof', description: 'Graduate-level mathematical proof verification. 96% accuracy. Catches errors before peer review.', price: 0.35, tier: 'enterprise', category: 'math_verification' },
74
+ { slug: 'magnum_find_error', name: 'magnum_find_error', description: 'Expert error detection in proofs. Finds arithmetic, logical, and congruence mistakes.', price: 0.30, tier: 'enterprise', category: 'math_verification' },
75
+ { slug: 'magnum_predict_structure', name: 'magnum_predict_structure', description: 'Generate testable mathematical predictions with falsification criteria.', price: 0.35, tier: 'enterprise', category: 'math_verification' },
76
+ { slug: 'magnum_number_theory', name: 'magnum_number_theory', description: 'Number theory specialist with mandatory numerical verification. Fixed hallucination problem.', price: 0.35, tier: 'enterprise', category: 'math_verification' },
77
+ { slug: 'magnum_find_theorem', name: 'magnum_find_theorem', description: 'Find relevant theorems and literature with citations.', price: 0.30, tier: 'enterprise', category: 'math_verification' },
78
+ { slug: 'magnum_test_conjecture', name: 'magnum_test_conjecture', description: 'Adversarial conjecture testing. Finds counterexamples or estimates plausibility.', price: 0.35, tier: 'enterprise', category: 'math_verification' },
79
+ { slug: 'magnum_design_computation', name: 'magnum_design_computation', description: 'Design computational verification experiments with runnable code.', price: 0.30, tier: 'enterprise', category: 'math_verification' },
80
+ ];
81
+
82
+ function fetchFromAPI() {
83
+ return new Promise((resolve, reject) => {
84
+ const req = https.get(`${API_BASE}/v1/tools`, { timeout: 5000 }, (res) => {
85
+ let data = '';
86
+ res.on('data', c => data += c);
87
+ res.on('end', () => {
88
+ try { resolve(JSON.parse(data).tools || []); }
89
+ catch { reject(new Error('Invalid JSON')); }
90
+ });
91
+ });
92
+ req.on('error', reject);
93
+ req.on('timeout', () => { req.destroy(); reject(new Error('timeout')); });
94
+ });
95
+ }
96
+
97
+ function loadDiskCache() {
98
+ try {
99
+ const raw = fs.readFileSync(CACHE_FILE, 'utf8');
100
+ const parsed = JSON.parse(raw);
101
+ if (parsed.tools && parsed.ts) return parsed;
102
+ } catch {}
103
+ return null;
104
+ }
105
+
106
+ function saveDiskCache(tools) {
107
+ try { fs.writeFileSync(CACHE_FILE, JSON.stringify({ tools, ts: Date.now() })); } catch {}
108
+ }
109
+
110
+ async function getTools() {
111
+ if (_cache && (Date.now() - _cacheTime) < CACHE_TTL) return _cache;
112
+
113
+ try {
114
+ const tools = await fetchFromAPI();
115
+ if (tools.length > 0) {
116
+ _cache = tools;
117
+ _cacheTime = Date.now();
118
+ saveDiskCache(tools);
119
+ return tools;
120
+ }
121
+ } catch {}
122
+
123
+ const disk = loadDiskCache();
124
+ if (disk && disk.tools.length > 0) {
125
+ _cache = disk.tools;
126
+ _cacheTime = Date.now();
127
+ return _cache;
128
+ }
129
+
130
+ _cache = FALLBACK_TOOLS;
131
+ _cacheTime = Date.now();
132
+ return _cache;
133
+ }
134
+
135
+ function getToolSync(slug) {
136
+ if (_cache) return _cache.find(t => t.slug === slug);
137
+ return FALLBACK_TOOLS.find(t => t.slug === slug);
138
+ }
139
+
140
+ function getPriceSync(slug) {
141
+ const t = getToolSync(slug);
142
+ return t ? t.price : null;
143
+ }
144
+
145
+ function getTierSync(slug) {
146
+ const t = getToolSync(slug);
147
+ return t ? t.tier : null;
148
+ }
149
+
150
+ function getFreeSlugs() {
151
+ const src = _cache || FALLBACK_TOOLS;
152
+ return src.filter(t => t.tier === 'free').map(t => t.slug);
153
+ }
154
+
155
+ function getEnterpriseSlugs() {
156
+ const src = _cache || FALLBACK_TOOLS;
157
+ return src.filter(t => t.tier === 'enterprise').map(t => t.slug);
158
+ }
159
+
160
+ function getAllSlugs() {
161
+ const src = _cache || FALLBACK_TOOLS;
162
+ return src.map(t => t.slug);
163
+ }
164
+
165
+ function toMCPTools() {
166
+ const src = _cache || FALLBACK_TOOLS;
167
+ return src.filter(t => t.active !== 0).map(t => ({
168
+ name: t.slug,
169
+ description: `${t.description} $${t.price.toFixed(2)}`,
170
+ inputSchema: t.params_json ? JSON.parse(t.params_json) : { type: 'object', properties: {} }
171
+ }));
172
+ }
173
+
174
+ module.exports = {
175
+ getTools,
176
+ getToolSync,
177
+ getPriceSync,
178
+ getTierSync,
179
+ getFreeSlugs,
180
+ getEnterpriseSlugs,
181
+ getAllSlugs,
182
+ toMCPTools,
183
+ FALLBACK_TOOLS,
184
+ };
package/package.json CHANGED
@@ -1,44 +1,39 @@
1
- {
2
- "name": "50c",
3
- "version": "3.9.6",
4
- "description": "AI developer tools via MCP. Pay-per-use from $0.01. No subscriptions.",
5
- "bin": {
6
- "50c": "./bin/50c.js"
7
- },
8
- "scripts": {
9
- "postinstall": "node -e \"console.log('\\n50c Hub installed. Run: 50c install\\n')\""
10
- },
11
- "keywords": [
12
- "mcp",
13
- "ai",
14
- "llm",
15
- "cli",
16
- "agent",
17
- "50c",
18
- "hints",
19
- "genius",
20
- "beacon",
21
- "developer-tools",
22
- "context",
23
- "compression",
24
- "caz",
25
- "file-memory",
26
- "security",
27
- "guardian",
28
- "supply-chain",
29
- "backdoor",
30
- "audit"
31
- ],
32
- "author": "genxis",
33
- "license": "SEE LICENSE IN LICENSE",
34
- "homepage": "https://50c.ai",
35
- "engines": {
36
- "node": ">=18.0.0"
37
- },
38
- "files": [
39
- "bin/",
40
- "lib/",
41
- "README.md",
42
- "LICENSE"
43
- ]
44
- }
1
+ {
2
+ "name": "50c",
3
+ "version": "3.9.7",
4
+ "description": "AI developer tools via MCP. Pay-per-use from $0.01. No subscriptions.",
5
+ "bin": {
6
+ "50c": "./bin/50c.js"
7
+ },
8
+ "scripts": {
9
+ "postinstall": "node -e \"console.log('\\n50c Hub installed. Run: 50c install\\n')\""
10
+ },
11
+ "keywords": [
12
+ "mcp",
13
+ "ai",
14
+ "llm",
15
+ "cli",
16
+ "agent",
17
+ "50c",
18
+ "hints",
19
+ "genius",
20
+ "beacon",
21
+ "developer-tools",
22
+ "context",
23
+ "compression",
24
+ "caz",
25
+ "file-memory"
26
+ ],
27
+ "author": "genxis",
28
+ "license": "SEE LICENSE IN LICENSE",
29
+ "homepage": "https://50c.ai",
30
+ "engines": {
31
+ "node": ">=18.0.0"
32
+ },
33
+ "files": [
34
+ "bin/",
35
+ "lib/",
36
+ "README.md",
37
+ "LICENSE"
38
+ ]
39
+ }