@dexto/registry 1.4.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.
@@ -0,0 +1,61 @@
1
+ /**
2
+ * MCP Server Registry Service
3
+ *
4
+ * Provides access to the built-in registry of MCP servers.
5
+ * This is a shared service used by both CLI and WebUI.
6
+ */
7
+ import type { ServerRegistryEntry, ServerRegistryFilter } from './types.js';
8
+ /**
9
+ * MCP Server Registry Service
10
+ *
11
+ * Manages a registry of available MCP servers that can be quickly added to agents.
12
+ * The built-in registry data is loaded from an external JSON file.
13
+ */
14
+ export declare class ServerRegistryService {
15
+ private static instance;
16
+ private registryEntries;
17
+ private isInitialized;
18
+ private constructor();
19
+ static getInstance(): ServerRegistryService;
20
+ /**
21
+ * Initialize the registry with default entries
22
+ */
23
+ initialize(): Promise<void>;
24
+ /**
25
+ * Get all registry entries with optional filtering
26
+ */
27
+ getEntries(filter?: ServerRegistryFilter): Promise<ServerRegistryEntry[]>;
28
+ /**
29
+ * Update an existing registry entry's state
30
+ */
31
+ updateEntry(id: string, updates: Partial<ServerRegistryEntry>): Promise<boolean>;
32
+ /**
33
+ * Mark a server as installed/uninstalled
34
+ */
35
+ setInstalled(id: string, installed: boolean): Promise<boolean>;
36
+ /**
37
+ * Sync registry installed status with a list of connected server IDs
38
+ */
39
+ syncInstalledStatus(connectedServerIds: string[]): Promise<void>;
40
+ /**
41
+ * Get a single server configuration by ID
42
+ */
43
+ getServerConfig(id: string): Promise<ServerRegistryEntry | null>;
44
+ /**
45
+ * Get all available categories
46
+ */
47
+ getCategories(): Promise<string[]>;
48
+ /**
49
+ * Get all available tags
50
+ */
51
+ getTags(): Promise<string[]>;
52
+ }
53
+ /**
54
+ * Get the singleton registry instance
55
+ */
56
+ export declare function getServerRegistry(): ServerRegistryService;
57
+ /**
58
+ * Export singleton instance for convenience
59
+ */
60
+ export declare const serverRegistry: ServerRegistryService;
61
+ //# sourceMappingURL=server-registry.d.ts.map
@@ -0,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
+ * Defines types for the MCP server registry, which provides
5
+ * preset server configurations for easy installation.
6
+ */
7
+ /**
8
+ * Server category for organization and filtering
9
+ */
10
+ export type ServerCategory = 'productivity' | 'development' | 'research' | 'creative' | 'data' | 'communication' | 'custom';
11
+ /**
12
+ * Server configuration for different transport types
13
+ */
14
+ export interface ServerConfig {
15
+ type: 'stdio' | 'sse' | 'http';
16
+ command?: string;
17
+ args?: string[];
18
+ url?: string;
19
+ baseUrl?: string;
20
+ env?: Record<string, string>;
21
+ headers?: Record<string, string>;
22
+ timeout?: number;
23
+ }
24
+ /**
25
+ * Platform and dependency requirements for a server
26
+ */
27
+ export interface ServerRequirements {
28
+ platform?: 'win32' | 'darwin' | 'linux' | 'all';
29
+ node?: string;
30
+ python?: string;
31
+ dependencies?: string[];
32
+ }
33
+ /**
34
+ * A single entry in the MCP server registry
35
+ */
36
+ export interface ServerRegistryEntry {
37
+ /** Unique identifier for the server */
38
+ id: string;
39
+ /** Display name */
40
+ name: string;
41
+ /** Description of what the server does */
42
+ description: string;
43
+ /** Category for organization */
44
+ category: ServerCategory;
45
+ /** Emoji icon for display */
46
+ icon?: string;
47
+ /** Author or maintainer */
48
+ author?: string;
49
+ /** Homepage or documentation URL */
50
+ homepage?: string;
51
+ /** Server connection configuration */
52
+ config: ServerConfig;
53
+ /** Tags for search and filtering */
54
+ tags: string[];
55
+ /** Whether this is an official/verified server */
56
+ isOfficial: boolean;
57
+ /** Whether this server is currently installed (runtime state) */
58
+ isInstalled: boolean;
59
+ /** System requirements */
60
+ requirements?: ServerRequirements;
61
+ /** Alternative IDs used to match against connected servers */
62
+ matchIds?: string[];
63
+ }
64
+ /**
65
+ * Filter options for querying the registry
66
+ */
67
+ export interface ServerRegistryFilter {
68
+ category?: string;
69
+ tags?: string[];
70
+ search?: string;
71
+ installed?: boolean;
72
+ official?: boolean;
73
+ }
74
+ /**
75
+ * State container for registry UI
76
+ */
77
+ export interface ServerRegistryState {
78
+ entries: ServerRegistryEntry[];
79
+ isLoading: boolean;
80
+ error?: string;
81
+ lastUpdated?: Date;
82
+ }
83
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/mcp/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,MAAM,cAAc,GACpB,cAAc,GACd,aAAa,GACb,UAAU,GACV,UAAU,GACV,MAAM,GACN,eAAe,GACf,QAAQ,CAAC;AAEf;;GAEG;AACH,MAAM,WAAW,YAAY;IACzB,IAAI,EAAE,OAAO,GAAG,KAAK,GAAG,MAAM,CAAC;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAC/B,QAAQ,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,KAAK,CAAC;IAChD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAChC,uCAAuC;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,mBAAmB;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,0CAA0C;IAC1C,WAAW,EAAE,MAAM,CAAC;IACpB,gCAAgC;IAChC,QAAQ,EAAE,cAAc,CAAC;IACzB,6BAA6B;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2BAA2B;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sCAAsC;IACtC,MAAM,EAAE,YAAY,CAAC;IACrB,oCAAoC;IACpC,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,kDAAkD;IAClD,UAAU,EAAE,OAAO,CAAC;IACpB,iEAAiE;IACjE,WAAW,EAAE,OAAO,CAAC;IACrB,0BAA0B;IAC1B,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAClC,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAChC,OAAO,EAAE,mBAAmB,EAAE,CAAC;IAC/B,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,IAAI,CAAC;CACtB"}
package/package.json ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "@dexto/registry",
3
+ "version": "1.4.0",
4
+ "private": false,
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "import": "./dist/index.js",
12
+ "require": "./dist/index.cjs"
13
+ },
14
+ "./package.json": "./package.json"
15
+ },
16
+ "files": [
17
+ "dist",
18
+ "README.md"
19
+ ],
20
+ "publishConfig": {
21
+ "access": "public"
22
+ },
23
+ "sideEffects": false,
24
+ "devDependencies": {
25
+ "tsup": "^8.0.0",
26
+ "typescript": "^5"
27
+ },
28
+ "scripts": {
29
+ "build": "tsup && tsc -p tsconfig.json --emitDeclarationOnly",
30
+ "dev": "tsup --watch",
31
+ "typecheck": "tsc -p tsconfig.typecheck.json --noEmit",
32
+ "lint": "eslint . --ext .ts"
33
+ }
34
+ }