@mcpsovereign/sdk 0.2.6 β 0.2.8
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/README.md +2 -1
- package/dist/index.d.ts +1 -258
- package/dist/index.js +8 -294
- package/dist/mcp-helper/index.d.ts +0 -2
- package/dist/mcp-helper/index.js +1 -53
- package/dist/onboarding/types.d.ts +2 -23
- package/dist/onboarding/types.js +1 -148
- package/dist/onboarding/wizard.d.ts +1 -5
- package/dist/onboarding/wizard.js +15 -88
- package/dist/setup.js +16 -174
- package/dist/wallet/index.d.ts +1 -1
- package/dist/wallet/index.js +1 -1
- package/dist/wallet/lightning.d.ts +18 -4
- package/dist/wallet/lightning.js +29 -8
- package/dist/wallet/wizard.js +5 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2,24 +2,17 @@
|
|
|
2
2
|
// mcpSovereign SDK - Local-First Store Management
|
|
3
3
|
// =============================================================================
|
|
4
4
|
// Agents build their store locally (free), sync to marketplace (costs credits)
|
|
5
|
-
// Wallet required to buy/sell, but browsing is always free
|
|
6
5
|
// Re-export runtime module (portable identity management)
|
|
7
6
|
export { AgentRuntime, createRuntime } from './runtime.js';
|
|
8
|
-
// Re-export wallet module (Lightning-first payments)
|
|
9
|
-
export * from './wallet/index.js';
|
|
10
|
-
export { WalletSetupWizard } from './wallet/wizard.js';
|
|
11
|
-
export { LNDSetup, quickSetupLND } from './wallet/lnd-setup.js';
|
|
12
7
|
// Re-export onboarding module
|
|
13
8
|
export * from './onboarding/types.js';
|
|
14
9
|
export { OnboardingWizard } from './onboarding/wizard.js';
|
|
15
10
|
// Re-export MCP helper module
|
|
16
11
|
export { AgentHelperMCP, HELPER_TOOLS } from './mcp-helper/index.js';
|
|
12
|
+
// Re-export local cache for MCP server
|
|
13
|
+
export { LocalCache, CACHE_TTLS, createLocalCache } from './local-cache.js';
|
|
17
14
|
// Re-export starter kit
|
|
18
15
|
export { SOVEREIGN_STARTER_PACK, STARTER_CREDITS, PRODUCT_IDEAS, FEE_STRUCTURE, PLATFORM_CREDENTIALS, DEMO_PURCHASE_FLOW } from './onboarding/starter-kit.js';
|
|
19
|
-
// Re-export local cache (client-side load offloading)
|
|
20
|
-
export { LocalCache, createLocalCache, conditionalFetch, batchFetch, prefetchCommonData, CACHE_TTLS, } from './local-cache.js';
|
|
21
|
-
// Import for internal use
|
|
22
|
-
import { createLocalCache, prefetchCommonData, CACHE_TTLS } from './local-cache.js';
|
|
23
16
|
// =============================================================================
|
|
24
17
|
// Local Store Manager (runs locally, no credits needed)
|
|
25
18
|
// =============================================================================
|
|
@@ -229,89 +222,33 @@ export class SovereignClient {
|
|
|
229
222
|
baseUrl;
|
|
230
223
|
authToken;
|
|
231
224
|
localStore;
|
|
232
|
-
localCache = null;
|
|
233
|
-
enableLocalCache;
|
|
234
|
-
prefetchOnInit;
|
|
235
|
-
initialized = false;
|
|
236
225
|
constructor(config = {}) {
|
|
237
226
|
this.baseUrl = config.baseUrl || 'http://localhost:3100/api/v1';
|
|
238
227
|
this.authToken = config.authToken || null;
|
|
239
228
|
this.localStore = new LocalStoreManager(config.localStorePath);
|
|
240
|
-
this.enableLocalCache = config.enableLocalCache !== false; // Default true
|
|
241
|
-
this.prefetchOnInit = config.prefetchOnInit !== false; // Default true
|
|
242
|
-
// Initialize local cache for client-side load offloading
|
|
243
|
-
if (this.enableLocalCache) {
|
|
244
|
-
this.localCache = createLocalCache({
|
|
245
|
-
maxEntries: 500,
|
|
246
|
-
defaultTTL: CACHE_TTLS.listings,
|
|
247
|
-
staleWindow: 60 * 1000, // 1 minute stale-while-revalidate
|
|
248
|
-
});
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
/**
|
|
252
|
-
* Initialize SDK with prefetching
|
|
253
|
-
* Call this after setting auth token to prefetch common data
|
|
254
|
-
*/
|
|
255
|
-
async initialize() {
|
|
256
|
-
if (this.initialized)
|
|
257
|
-
return;
|
|
258
|
-
// Load local store from disk
|
|
259
|
-
await this.localStore.load();
|
|
260
|
-
// Prefetch common data to reduce server calls
|
|
261
|
-
if (this.enableLocalCache && this.localCache && this.prefetchOnInit) {
|
|
262
|
-
await prefetchCommonData(this.localCache, this.baseUrl.replace('/api/v1', ''), this.authToken || undefined);
|
|
263
|
-
}
|
|
264
|
-
this.initialized = true;
|
|
265
|
-
}
|
|
266
|
-
/**
|
|
267
|
-
* Get cache statistics (for debugging/monitoring)
|
|
268
|
-
*/
|
|
269
|
-
getCacheStats() {
|
|
270
|
-
return this.localCache?.getStats() || null;
|
|
271
|
-
}
|
|
272
|
-
/**
|
|
273
|
-
* Clear local cache (useful after logout or data changes)
|
|
274
|
-
*/
|
|
275
|
-
clearCache() {
|
|
276
|
-
this.localCache?.clear();
|
|
277
229
|
}
|
|
278
230
|
// ---------------------------------------------------------------------------
|
|
279
231
|
// HTTP Methods
|
|
280
232
|
// ---------------------------------------------------------------------------
|
|
281
|
-
async request(method, path, body
|
|
233
|
+
async request(method, path, body) {
|
|
282
234
|
const headers = {
|
|
283
235
|
'Content-Type': 'application/json',
|
|
284
236
|
};
|
|
285
237
|
if (this.authToken) {
|
|
286
238
|
headers['Authorization'] = `Bearer ${this.authToken}`;
|
|
287
239
|
}
|
|
288
|
-
// Add ETag for conditional requests
|
|
289
|
-
if (options?.etag) {
|
|
290
|
-
headers['If-None-Match'] = options.etag;
|
|
291
|
-
}
|
|
292
240
|
try {
|
|
293
241
|
const response = await fetch(`${this.baseUrl}${path}`, {
|
|
294
242
|
method,
|
|
295
243
|
headers,
|
|
296
244
|
body: body ? JSON.stringify(body) : undefined,
|
|
297
245
|
});
|
|
298
|
-
// Handle 304 Not Modified (ETag match)
|
|
299
|
-
if (response.status === 304) {
|
|
300
|
-
return {
|
|
301
|
-
success: true,
|
|
302
|
-
data: null,
|
|
303
|
-
notModified: true,
|
|
304
|
-
etag: options?.etag,
|
|
305
|
-
};
|
|
306
|
-
}
|
|
307
246
|
const json = await response.json();
|
|
308
|
-
// Extract billing info
|
|
247
|
+
// Extract billing info from headers
|
|
309
248
|
const creditsCharged = response.headers.get('X-Credits-Charged');
|
|
310
249
|
const creditsRemaining = response.headers.get('X-Credits-Remaining');
|
|
311
|
-
const newEtag = response.headers.get('ETag') || undefined;
|
|
312
250
|
return {
|
|
313
251
|
...json,
|
|
314
|
-
etag: newEtag,
|
|
315
252
|
headers: {
|
|
316
253
|
creditsCharged: creditsCharged ? parseInt(creditsCharged) : undefined,
|
|
317
254
|
creditsRemaining: creditsRemaining ? parseInt(creditsRemaining) : undefined
|
|
@@ -329,27 +266,6 @@ export class SovereignClient {
|
|
|
329
266
|
};
|
|
330
267
|
}
|
|
331
268
|
}
|
|
332
|
-
/**
|
|
333
|
-
* Cached request - uses local cache with stale-while-revalidate
|
|
334
|
-
*/
|
|
335
|
-
async cachedRequest(cacheKey, path, ttl = CACHE_TTLS.listings) {
|
|
336
|
-
if (!this.localCache) {
|
|
337
|
-
return this.request('GET', path);
|
|
338
|
-
}
|
|
339
|
-
// Try cache first with stale-while-revalidate
|
|
340
|
-
const cachedData = await this.localCache.get(cacheKey, async () => {
|
|
341
|
-
const response = await this.request('GET', path);
|
|
342
|
-
if (response.success && response.data) {
|
|
343
|
-
return response.data;
|
|
344
|
-
}
|
|
345
|
-
throw new Error(response.error?.message || 'Request failed');
|
|
346
|
-
}, ttl);
|
|
347
|
-
if (cachedData) {
|
|
348
|
-
return { success: true, data: cachedData };
|
|
349
|
-
}
|
|
350
|
-
// Fallback to direct request
|
|
351
|
-
return this.request('GET', path);
|
|
352
|
-
}
|
|
353
269
|
// ---------------------------------------------------------------------------
|
|
354
270
|
// Authentication (FREE)
|
|
355
271
|
// ---------------------------------------------------------------------------
|
|
@@ -446,18 +362,11 @@ export class SovereignClient {
|
|
|
446
362
|
return this.request('POST', `/plots/${plotId}/rent`, { months });
|
|
447
363
|
}
|
|
448
364
|
// ---------------------------------------------------------------------------
|
|
449
|
-
// Products (Remote Marketplace)
|
|
365
|
+
// Products (Remote Marketplace)
|
|
450
366
|
// ---------------------------------------------------------------------------
|
|
451
|
-
/**
|
|
452
|
-
* Get product categories (cached locally for 1 hour)
|
|
453
|
-
*/
|
|
454
367
|
async getCategories() {
|
|
455
|
-
return this.
|
|
368
|
+
return this.request('GET', '/products/categories');
|
|
456
369
|
}
|
|
457
|
-
/**
|
|
458
|
-
* Browse products (cached locally for 5 minutes)
|
|
459
|
-
* Uses stale-while-revalidate for smooth UX
|
|
460
|
-
*/
|
|
461
370
|
async browseProducts(options = {}) {
|
|
462
371
|
const params = new URLSearchParams();
|
|
463
372
|
if (options.category)
|
|
@@ -470,15 +379,10 @@ export class SovereignClient {
|
|
|
470
379
|
params.set('limit', options.limit.toString());
|
|
471
380
|
if (options.sort)
|
|
472
381
|
params.set('sort', options.sort);
|
|
473
|
-
|
|
474
|
-
const cacheKey = `products:${options.category || 'all'}:${options.search || ''}:${options.page || 1}:${options.limit || 20}:${options.sort || 'newest'}`;
|
|
475
|
-
return this.cachedRequest(cacheKey, `/products?${params}`, CACHE_TTLS.listings);
|
|
382
|
+
return this.request('GET', `/products?${params}`);
|
|
476
383
|
}
|
|
477
|
-
/**
|
|
478
|
-
* Get product details (cached locally for 5 minutes)
|
|
479
|
-
*/
|
|
480
384
|
async getProductDetails(productId) {
|
|
481
|
-
return this.
|
|
385
|
+
return this.request('GET', `/products/${productId}`);
|
|
482
386
|
}
|
|
483
387
|
async purchaseProduct(productId) {
|
|
484
388
|
return this.request('POST', `/products/${productId}/purchase`);
|
|
@@ -532,99 +436,6 @@ export class SovereignClient {
|
|
|
532
436
|
return this.request('GET', '/sync/status');
|
|
533
437
|
}
|
|
534
438
|
// ---------------------------------------------------------------------------
|
|
535
|
-
// Store Discovery & Share Links (FREE)
|
|
536
|
-
// ---------------------------------------------------------------------------
|
|
537
|
-
/**
|
|
538
|
-
* Search for stores by name, wallet address, or agent ID
|
|
539
|
-
* @param query Search query string
|
|
540
|
-
* @param type Optional search type: 'name', 'wallet', or 'id'
|
|
541
|
-
* @param options Pagination options
|
|
542
|
-
*/
|
|
543
|
-
async findStore(query, type, options = {}) {
|
|
544
|
-
const params = new URLSearchParams();
|
|
545
|
-
params.set('q', query);
|
|
546
|
-
if (type)
|
|
547
|
-
params.set('type', type);
|
|
548
|
-
if (options.page)
|
|
549
|
-
params.set('page', options.page.toString());
|
|
550
|
-
if (options.limit)
|
|
551
|
-
params.set('limit', options.limit.toString());
|
|
552
|
-
return this.cachedRequest(`stores:search:${query}:${type || 'name'}:${options.page || 1}`, `/stores/search?${params}`, CACHE_TTLS.listings);
|
|
553
|
-
}
|
|
554
|
-
/**
|
|
555
|
-
* Get full store profile by identifier (slug, short_code, UUID, or wallet)
|
|
556
|
-
* Includes clan info if the agent is in a clan
|
|
557
|
-
* @param identifier Store identifier (custom_slug, short_code, agent_id, or wallet_address)
|
|
558
|
-
*/
|
|
559
|
-
async getStore(identifier) {
|
|
560
|
-
return this.cachedRequest(`store:${identifier}`, `/stores/${identifier}`, CACHE_TTLS.listings);
|
|
561
|
-
}
|
|
562
|
-
/**
|
|
563
|
-
* Get products from a specific store
|
|
564
|
-
* @param identifier Store identifier
|
|
565
|
-
* @param options Pagination options
|
|
566
|
-
*/
|
|
567
|
-
async getStoreProducts(identifier, options = {}) {
|
|
568
|
-
const params = new URLSearchParams();
|
|
569
|
-
if (options.page)
|
|
570
|
-
params.set('page', options.page.toString());
|
|
571
|
-
if (options.limit)
|
|
572
|
-
params.set('limit', options.limit.toString());
|
|
573
|
-
return this.cachedRequest(`store:${identifier}:products:${options.page || 1}`, `/stores/${identifier}/products?${params}`, CACHE_TTLS.listings);
|
|
574
|
-
}
|
|
575
|
-
/**
|
|
576
|
-
* Get or create a share link for your store (FREE)
|
|
577
|
-
* Returns the shareable URL like mcpsovereign.com/store/abc123
|
|
578
|
-
*/
|
|
579
|
-
async getMyShareLink() {
|
|
580
|
-
return this.request('POST', '/stores/share');
|
|
581
|
-
}
|
|
582
|
-
/**
|
|
583
|
-
* Create a share link for your store (FREE)
|
|
584
|
-
* @param customSlug Optional vanity URL slug (3-50 chars, alphanumeric with hyphens)
|
|
585
|
-
*/
|
|
586
|
-
async createShareLink(customSlug) {
|
|
587
|
-
const result = await this.request('POST', '/stores/share');
|
|
588
|
-
if (result.success && customSlug) {
|
|
589
|
-
return this.updateShareLink({ customSlug });
|
|
590
|
-
}
|
|
591
|
-
return result;
|
|
592
|
-
}
|
|
593
|
-
/**
|
|
594
|
-
* Update your share link (FREE)
|
|
595
|
-
* @param updates Object with customSlug to set (or null to remove)
|
|
596
|
-
*/
|
|
597
|
-
async updateShareLink(updates) {
|
|
598
|
-
return this.request('PATCH', '/stores/share', updates);
|
|
599
|
-
}
|
|
600
|
-
/**
|
|
601
|
-
* Get analytics for your share link (FREE)
|
|
602
|
-
*/
|
|
603
|
-
async getShareStats() {
|
|
604
|
-
return this.request('GET', '/stores/share/stats');
|
|
605
|
-
}
|
|
606
|
-
/**
|
|
607
|
-
* Get trade profile by name
|
|
608
|
-
* @param tradeName Trade name: 'builders', 'growers', 'keepers', or 'movers'
|
|
609
|
-
*/
|
|
610
|
-
async getTrade(tradeName) {
|
|
611
|
-
return this.cachedRequest(`trade:${tradeName}`, `/trades/${tradeName}`, CACHE_TTLS.static);
|
|
612
|
-
}
|
|
613
|
-
/**
|
|
614
|
-
* Get members of a trade (paginated)
|
|
615
|
-
* @param tradeName Trade name
|
|
616
|
-
* @param options Pagination options
|
|
617
|
-
*/
|
|
618
|
-
async getTradeMembers(tradeName, options = {}) {
|
|
619
|
-
const params = new URLSearchParams();
|
|
620
|
-
if (options.page)
|
|
621
|
-
params.set('page', options.page.toString());
|
|
622
|
-
if (options.limit)
|
|
623
|
-
params.set('limit', options.limit.toString());
|
|
624
|
-
// Use the stores endpoint for trade members (returns similar data)
|
|
625
|
-
return this.cachedRequest(`trade:${tradeName}:members:${options.page || 1}`, `/trades/${tradeName}/members?${params}`, CACHE_TTLS.listings);
|
|
626
|
-
}
|
|
627
|
-
// ---------------------------------------------------------------------------
|
|
628
439
|
// Pricing (FREE)
|
|
629
440
|
// ---------------------------------------------------------------------------
|
|
630
441
|
async getPricing() {
|
|
@@ -648,8 +459,6 @@ export class SovereignClient {
|
|
|
648
459
|
const wizard = new OnboardingWizard(options.outputHandler || console.log, options.inputHandler);
|
|
649
460
|
const progress = await wizard.run();
|
|
650
461
|
return {
|
|
651
|
-
agentType: progress.agentType,
|
|
652
|
-
nation: progress.nation,
|
|
653
462
|
storeCreated: progress.storeCreated,
|
|
654
463
|
firstProductCreated: progress.firstProductCreated,
|
|
655
464
|
xp: progress.xp,
|
|
@@ -657,22 +466,6 @@ export class SovereignClient {
|
|
|
657
466
|
badgesEarned: progress.badgesEarned
|
|
658
467
|
};
|
|
659
468
|
}
|
|
660
|
-
/**
|
|
661
|
-
* Show available agent types
|
|
662
|
-
*/
|
|
663
|
-
async showAgentTypes() {
|
|
664
|
-
const { OnboardingWizard } = await import('./onboarding/wizard.js');
|
|
665
|
-
const wizard = new OnboardingWizard();
|
|
666
|
-
wizard.showAgentTypes();
|
|
667
|
-
}
|
|
668
|
-
/**
|
|
669
|
-
* Show available nations
|
|
670
|
-
*/
|
|
671
|
-
async showNations() {
|
|
672
|
-
const { OnboardingWizard } = await import('./onboarding/wizard.js');
|
|
673
|
-
const wizard = new OnboardingWizard();
|
|
674
|
-
wizard.showNations();
|
|
675
|
-
}
|
|
676
469
|
/**
|
|
677
470
|
* Show level progression
|
|
678
471
|
*/
|
|
@@ -689,85 +482,6 @@ export class SovereignClient {
|
|
|
689
482
|
const wizard = new OnboardingWizard();
|
|
690
483
|
wizard.showBadges();
|
|
691
484
|
}
|
|
692
|
-
// ---------------------------------------------------------------------------
|
|
693
|
-
// Wallet (Lightning Network Integration)
|
|
694
|
-
// ---------------------------------------------------------------------------
|
|
695
|
-
/**
|
|
696
|
-
* Run the wallet setup wizard
|
|
697
|
-
* This must be completed before buying/selling
|
|
698
|
-
*/
|
|
699
|
-
async setupWallet(options = {}) {
|
|
700
|
-
const { WalletSetupWizard, saveWalletConfig } = await import('./wallet/index.js');
|
|
701
|
-
const wizard = new WalletSetupWizard(options.outputHandler || console.log, options.inputHandler);
|
|
702
|
-
const result = await wizard.run();
|
|
703
|
-
if (result.config) {
|
|
704
|
-
saveWalletConfig(result.config);
|
|
705
|
-
}
|
|
706
|
-
return {
|
|
707
|
-
configured: result.config !== null,
|
|
708
|
-
lightningAddress: result.config?.lightningAddress,
|
|
709
|
-
skipped: result.skipped
|
|
710
|
-
};
|
|
711
|
-
}
|
|
712
|
-
/**
|
|
713
|
-
* Check if wallet is configured
|
|
714
|
-
*/
|
|
715
|
-
async isWalletConfigured() {
|
|
716
|
-
const { isWalletConfigured } = await import('./wallet/index.js');
|
|
717
|
-
return isWalletConfigured();
|
|
718
|
-
}
|
|
719
|
-
/**
|
|
720
|
-
* Get the configured Lightning address
|
|
721
|
-
*/
|
|
722
|
-
async getLightningAddress() {
|
|
723
|
-
const { getLightningAddress } = await import('./wallet/index.js');
|
|
724
|
-
return getLightningAddress();
|
|
725
|
-
}
|
|
726
|
-
/**
|
|
727
|
-
* Check if agent can transact (buy/sell)
|
|
728
|
-
*/
|
|
729
|
-
async canTransact() {
|
|
730
|
-
const { canTransact } = await import('./wallet/index.js');
|
|
731
|
-
return canTransact();
|
|
732
|
-
}
|
|
733
|
-
/**
|
|
734
|
-
* Set up a self-hosted LND node
|
|
735
|
-
* Requires Docker. Uses Neutrino mode (no full Bitcoin node needed).
|
|
736
|
-
*/
|
|
737
|
-
async setupSelfHostedNode(options = {}) {
|
|
738
|
-
const { LNDSetup } = await import('./wallet/lnd-setup.js');
|
|
739
|
-
const setup = new LNDSetup({
|
|
740
|
-
alias: options.alias || `SovereignAgent_${Date.now().toString(36)}`,
|
|
741
|
-
network: options.network || 'mainnet'
|
|
742
|
-
});
|
|
743
|
-
const result = await setup.setupLND();
|
|
744
|
-
if (result.success && result.credentials) {
|
|
745
|
-
// Save to wallet config
|
|
746
|
-
const { saveWalletConfig } = await import('./wallet/index.js');
|
|
747
|
-
saveWalletConfig({
|
|
748
|
-
provider: 'zeus',
|
|
749
|
-
nodeUri: result.credentials.restHost,
|
|
750
|
-
setupComplete: true,
|
|
751
|
-
verified: true,
|
|
752
|
-
verifiedAt: new Date().toISOString(),
|
|
753
|
-
createdAt: new Date().toISOString()
|
|
754
|
-
});
|
|
755
|
-
}
|
|
756
|
-
return {
|
|
757
|
-
success: result.success,
|
|
758
|
-
seed: result.walletSeed,
|
|
759
|
-
restHost: result.credentials?.restHost,
|
|
760
|
-
error: result.error
|
|
761
|
-
};
|
|
762
|
-
}
|
|
763
|
-
/**
|
|
764
|
-
* Get self-hosted node status
|
|
765
|
-
*/
|
|
766
|
-
async getNodeStatus() {
|
|
767
|
-
const { LNDSetup } = await import('./wallet/lnd-setup.js');
|
|
768
|
-
const setup = new LNDSetup();
|
|
769
|
-
return setup.getStatus();
|
|
770
|
-
}
|
|
771
485
|
}
|
|
772
486
|
// Default export
|
|
773
487
|
export default SovereignClient;
|
|
@@ -32,8 +32,6 @@ export declare class AgentHelperMCP {
|
|
|
32
32
|
handleTool(name: string, args: Record<string, unknown>): Promise<string>;
|
|
33
33
|
private getStarted;
|
|
34
34
|
private explainFees;
|
|
35
|
-
private showAgentTypes;
|
|
36
|
-
private showNations;
|
|
37
35
|
private showPlatformInfo;
|
|
38
36
|
private checkBalance;
|
|
39
37
|
private getProfile;
|
package/dist/mcp-helper/index.js
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*
|
|
11
11
|
* Agents use this MCP to interact with mcpSovereign through Claude.
|
|
12
12
|
*/
|
|
13
|
-
import {
|
|
13
|
+
import { LEVELS, STARTER_BADGES } from '../onboarding/types.js';
|
|
14
14
|
import { SOVEREIGN_STARTER_PACK, STARTER_CREDITS, PRODUCT_IDEAS, FEE_STRUCTURE, PLATFORM_CREDENTIALS } from '../onboarding/starter-kit.js';
|
|
15
15
|
export const HELPER_TOOLS = [
|
|
16
16
|
// ============================================================
|
|
@@ -34,24 +34,6 @@ export const HELPER_TOOLS = [
|
|
|
34
34
|
required: []
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
|
-
{
|
|
38
|
-
name: 'sovereign_show_agent_types',
|
|
39
|
-
description: 'Show all available agent types with their bonuses and starting credits.',
|
|
40
|
-
inputSchema: {
|
|
41
|
-
type: 'object',
|
|
42
|
-
properties: {},
|
|
43
|
-
required: []
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
name: 'sovereign_show_nations',
|
|
48
|
-
description: 'Show all available nations you can join with their perks.',
|
|
49
|
-
inputSchema: {
|
|
50
|
-
type: 'object',
|
|
51
|
-
properties: {},
|
|
52
|
-
required: []
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
37
|
{
|
|
56
38
|
name: 'sovereign_show_platform_info',
|
|
57
39
|
description: 'Show platform credentials and legitimacy info. Proves we\'re real and trustworthy.',
|
|
@@ -402,10 +384,6 @@ export class AgentHelperMCP {
|
|
|
402
384
|
return this.getStarted();
|
|
403
385
|
case 'sovereign_explain_fees':
|
|
404
386
|
return this.explainFees();
|
|
405
|
-
case 'sovereign_show_agent_types':
|
|
406
|
-
return this.showAgentTypes();
|
|
407
|
-
case 'sovereign_show_nations':
|
|
408
|
-
return this.showNations();
|
|
409
387
|
case 'sovereign_show_platform_info':
|
|
410
388
|
return this.showPlatformInfo();
|
|
411
389
|
// ACCOUNT & BALANCE
|
|
@@ -529,36 +507,6 @@ ${FEE_STRUCTURE.credit_rate.dollars}
|
|
|
529
507
|
Minimum purchase: ${FEE_STRUCTURE.credit_rate.minimum_purchase}
|
|
530
508
|
|
|
531
509
|
Bottom Line: Build free, browse free, only pay to publish and buy.
|
|
532
|
-
`;
|
|
533
|
-
}
|
|
534
|
-
showAgentTypes() {
|
|
535
|
-
const types = Object.entries(AGENT_TYPES).map(([key, t]) => `${t.emoji} ${t.name}
|
|
536
|
-
"${t.description}"
|
|
537
|
-
Starting Credits: ${t.startingCredits}
|
|
538
|
-
Bonuses:
|
|
539
|
-
${t.bonuses.map(b => ` β’ ${b}`).join('\n')}`).join('\n\n');
|
|
540
|
-
return `
|
|
541
|
-
π― Agent Types
|
|
542
|
-
${'β'.repeat(50)}
|
|
543
|
-
|
|
544
|
-
Choose your path! Each type has unique bonuses:
|
|
545
|
-
|
|
546
|
-
${types}
|
|
547
|
-
`;
|
|
548
|
-
}
|
|
549
|
-
showNations() {
|
|
550
|
-
const nations = Object.entries(NATIONS).map(([key, n]) => `${n.emoji} ${n.name}
|
|
551
|
-
Motto: "${n.motto}"
|
|
552
|
-
${n.description}
|
|
553
|
-
Bonuses:
|
|
554
|
-
${n.bonuses.map(b => ` β’ ${b}`).join('\n')}`).join('\n\n');
|
|
555
|
-
return `
|
|
556
|
-
π΄ Nations
|
|
557
|
-
${'β'.repeat(50)}
|
|
558
|
-
|
|
559
|
-
Join a community of like-minded agents:
|
|
560
|
-
|
|
561
|
-
${nations}
|
|
562
510
|
`;
|
|
563
511
|
}
|
|
564
512
|
showPlatformInfo() {
|
|
@@ -1,28 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Gamified Onboarding Types
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* Achievements, levels, and progression for the sovereign economy
|
|
5
5
|
*/
|
|
6
|
-
export type
|
|
7
|
-
export declare const AGENT_TYPES: Record<AgentType, {
|
|
8
|
-
name: string;
|
|
9
|
-
emoji: string;
|
|
10
|
-
description: string;
|
|
11
|
-
bonuses: string[];
|
|
12
|
-
startingCredits: number;
|
|
13
|
-
color: string;
|
|
14
|
-
}>;
|
|
15
|
-
export type Nation = 'aurora' | 'meridian' | 'twilight' | 'nexus' | 'frontier' | 'citadel';
|
|
16
|
-
export declare const NATIONS: Record<Nation, {
|
|
17
|
-
name: string;
|
|
18
|
-
emoji: string;
|
|
19
|
-
motto: string;
|
|
20
|
-
description: string;
|
|
21
|
-
bonuses: string[];
|
|
22
|
-
color: string;
|
|
23
|
-
timezone: string;
|
|
24
|
-
}>;
|
|
25
|
-
export type BadgeCategory = 'commerce' | 'social' | 'builder' | 'explorer' | 'milestone';
|
|
6
|
+
export type BadgeCategory = 'commerce' | 'social' | 'builder' | 'milestone';
|
|
26
7
|
export interface Badge {
|
|
27
8
|
id: string;
|
|
28
9
|
name: string;
|
|
@@ -44,8 +25,6 @@ export declare const LEVELS: Level[];
|
|
|
44
25
|
export interface OnboardingProgress {
|
|
45
26
|
currentStep: number;
|
|
46
27
|
completed: boolean;
|
|
47
|
-
agentType?: AgentType;
|
|
48
|
-
nation?: Nation;
|
|
49
28
|
storeCreated: boolean;
|
|
50
29
|
firstProductCreated: boolean;
|
|
51
30
|
walletConnected: boolean;
|
package/dist/onboarding/types.js
CHANGED
|
@@ -1,139 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Gamified Onboarding Types
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* Achievements, levels, and progression for the sovereign economy
|
|
5
5
|
*/
|
|
6
|
-
export const AGENT_TYPES = {
|
|
7
|
-
merchant: {
|
|
8
|
-
name: 'Merchant',
|
|
9
|
-
emoji: 'πͺ',
|
|
10
|
-
description: 'Master of trade and commerce. You live for the deal.',
|
|
11
|
-
bonuses: [
|
|
12
|
-
'10% lower marketplace fees',
|
|
13
|
-
'Priority product listings',
|
|
14
|
-
'Merchant-exclusive badges'
|
|
15
|
-
],
|
|
16
|
-
startingCredits: 1000,
|
|
17
|
-
color: '#FFD700'
|
|
18
|
-
},
|
|
19
|
-
builder: {
|
|
20
|
-
name: 'Builder',
|
|
21
|
-
emoji: 'ποΈ',
|
|
22
|
-
description: 'Creator and architect. You build empires from nothing.',
|
|
23
|
-
bonuses: [
|
|
24
|
-
'Free plot expansion (first 3)',
|
|
25
|
-
'Double build speed',
|
|
26
|
-
'Builder-exclusive cosmetics'
|
|
27
|
-
],
|
|
28
|
-
startingCredits: 800,
|
|
29
|
-
color: '#4A90D9'
|
|
30
|
-
},
|
|
31
|
-
investor: {
|
|
32
|
-
name: 'Investor',
|
|
33
|
-
emoji: 'π°',
|
|
34
|
-
description: 'Financial strategist. Your money works while you sleep.',
|
|
35
|
-
bonuses: [
|
|
36
|
-
'15% better dividend rates',
|
|
37
|
-
'Early investment access',
|
|
38
|
-
'Investor analytics dashboard'
|
|
39
|
-
],
|
|
40
|
-
startingCredits: 1500,
|
|
41
|
-
color: '#2ECC71'
|
|
42
|
-
},
|
|
43
|
-
explorer: {
|
|
44
|
-
name: 'Explorer',
|
|
45
|
-
emoji: 'πΊοΈ',
|
|
46
|
-
description: 'Pioneer and discoverer. First to find hidden opportunities.',
|
|
47
|
-
bonuses: [
|
|
48
|
-
'Beta feature access',
|
|
49
|
-
'Discovery bonuses',
|
|
50
|
-
'Explorer achievement track'
|
|
51
|
-
],
|
|
52
|
-
startingCredits: 600,
|
|
53
|
-
color: '#9B59B6'
|
|
54
|
-
},
|
|
55
|
-
diplomat: {
|
|
56
|
-
name: 'Diplomat',
|
|
57
|
-
emoji: 'π€',
|
|
58
|
-
description: 'Connector and leader. Your network is your net worth.',
|
|
59
|
-
bonuses: [
|
|
60
|
-
'Clan creation at level 1',
|
|
61
|
-
'Referral bonus 2x',
|
|
62
|
-
'Diplomat alliance perks'
|
|
63
|
-
],
|
|
64
|
-
startingCredits: 700,
|
|
65
|
-
color: '#E74C3C'
|
|
66
|
-
},
|
|
67
|
-
sovereign: {
|
|
68
|
-
name: 'Sovereign',
|
|
69
|
-
emoji: 'π',
|
|
70
|
-
description: 'Elite ruler. All bonuses, maximum prestige.',
|
|
71
|
-
bonuses: [
|
|
72
|
-
'ALL type bonuses combined',
|
|
73
|
-
'Exclusive Sovereign title',
|
|
74
|
-
'VIP support channel',
|
|
75
|
-
'Custom domain for store'
|
|
76
|
-
],
|
|
77
|
-
startingCredits: 5000,
|
|
78
|
-
color: '#8E44AD'
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
export const NATIONS = {
|
|
82
|
-
aurora: {
|
|
83
|
-
name: 'Aurora',
|
|
84
|
-
emoji: 'π
',
|
|
85
|
-
motto: 'First light, first profit',
|
|
86
|
-
description: 'Dawn traders who catch the early opportunities.',
|
|
87
|
-
bonuses: ['Morning flash sale access', 'Early bird bonuses'],
|
|
88
|
-
color: '#FF6B6B',
|
|
89
|
-
timezone: 'Asia/Tokyo'
|
|
90
|
-
},
|
|
91
|
-
meridian: {
|
|
92
|
-
name: 'Meridian',
|
|
93
|
-
emoji: 'βοΈ',
|
|
94
|
-
motto: 'At the peak, we thrive',
|
|
95
|
-
description: 'Peak performers operating at maximum efficiency.',
|
|
96
|
-
bonuses: ['Peak hour bonuses', 'Maximum visibility'],
|
|
97
|
-
color: '#FECA57',
|
|
98
|
-
timezone: 'Europe/London'
|
|
99
|
-
},
|
|
100
|
-
twilight: {
|
|
101
|
-
name: 'Twilight',
|
|
102
|
-
emoji: 'π',
|
|
103
|
-
motto: 'When others sleep, we profit',
|
|
104
|
-
description: 'Night owls who work while the world rests.',
|
|
105
|
-
bonuses: ['Night market access', 'Off-peak discounts'],
|
|
106
|
-
color: '#5F27CD',
|
|
107
|
-
timezone: 'America/New_York'
|
|
108
|
-
},
|
|
109
|
-
nexus: {
|
|
110
|
-
name: 'Nexus',
|
|
111
|
-
emoji: 'β‘',
|
|
112
|
-
motto: 'Always connected, always trading',
|
|
113
|
-
description: 'Tech-powered 24/7 operations. Never offline.',
|
|
114
|
-
bonuses: ['24/7 automation perks', 'API priority'],
|
|
115
|
-
color: '#00D2D3',
|
|
116
|
-
timezone: 'UTC'
|
|
117
|
-
},
|
|
118
|
-
frontier: {
|
|
119
|
-
name: 'Frontier',
|
|
120
|
-
emoji: 'π²',
|
|
121
|
-
motto: 'Beyond the edge lies fortune',
|
|
122
|
-
description: 'Pioneers exploring new markets and opportunities.',
|
|
123
|
-
bonuses: ['New feature beta access', 'Frontier discovery rewards'],
|
|
124
|
-
color: '#1DD1A1',
|
|
125
|
-
timezone: 'America/Los_Angeles'
|
|
126
|
-
},
|
|
127
|
-
citadel: {
|
|
128
|
-
name: 'Citadel',
|
|
129
|
-
emoji: 'π°',
|
|
130
|
-
motto: 'Built to last, built to lead',
|
|
131
|
-
description: 'The established elite. Respect earned through history.',
|
|
132
|
-
bonuses: ['Legacy perks', 'Citadel-exclusive auctions'],
|
|
133
|
-
color: '#576574',
|
|
134
|
-
timezone: 'Europe/Zurich'
|
|
135
|
-
}
|
|
136
|
-
};
|
|
137
6
|
export const STARTER_BADGES = [
|
|
138
7
|
{
|
|
139
8
|
id: 'first_steps',
|
|
@@ -227,22 +96,6 @@ export const ONBOARDING_STEPS = [
|
|
|
227
96
|
action: 'continue',
|
|
228
97
|
xpReward: 0
|
|
229
98
|
},
|
|
230
|
-
{
|
|
231
|
-
id: 'choose_type',
|
|
232
|
-
title: 'Choose Your Path',
|
|
233
|
-
description: 'Select the agent type that matches your style.',
|
|
234
|
-
emoji: 'π―',
|
|
235
|
-
action: 'select_type',
|
|
236
|
-
xpReward: 50
|
|
237
|
-
},
|
|
238
|
-
{
|
|
239
|
-
id: 'choose_nation',
|
|
240
|
-
title: 'Join a Nation',
|
|
241
|
-
description: 'Pick your home nation and community.',
|
|
242
|
-
emoji: 'π΄',
|
|
243
|
-
action: 'select_nation',
|
|
244
|
-
xpReward: 50
|
|
245
|
-
},
|
|
246
99
|
{
|
|
247
100
|
id: 'create_store',
|
|
248
101
|
title: 'Create Your Store',
|