@hasna/mcps 0.0.10 → 0.0.12
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 +51 -100
- package/bin/index.js +5486 -2969
- package/bin/mcp.js +5501 -3249
- package/dist/index.d.ts +4 -1
- package/dist/index.js +4420 -2912
- package/dist/lib/fleet.d.ts +29 -0
- package/dist/lib/machines.d.ts +9 -0
- package/dist/lib/version.d.ts +1 -0
- package/dist/types.d.ts +91 -0
- package/package.json +4 -4
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { FleetHealthReport, FleetInstallReport, HasnaMcpCatalogEntry, MachineEntry, MachineInstaller } from "../types.js";
|
|
2
|
+
interface RemoteRunnerResult {
|
|
3
|
+
stdout: string;
|
|
4
|
+
stderr: string;
|
|
5
|
+
exitCode: number;
|
|
6
|
+
}
|
|
7
|
+
export interface FleetDependencies {
|
|
8
|
+
fetchImpl?: typeof fetch;
|
|
9
|
+
runRemoteScript?: (machine: MachineEntry, script: string, timeoutMs: number) => Promise<RemoteRunnerResult>;
|
|
10
|
+
now?: () => Date;
|
|
11
|
+
}
|
|
12
|
+
export interface FleetHealthOptions {
|
|
13
|
+
machineIds?: string[];
|
|
14
|
+
packages?: string[];
|
|
15
|
+
refreshCatalog?: boolean;
|
|
16
|
+
timeoutMs?: number;
|
|
17
|
+
}
|
|
18
|
+
export interface FleetInstallOptions extends FleetHealthOptions {
|
|
19
|
+
mode?: "missing" | "missing-or-outdated" | "all";
|
|
20
|
+
installer?: MachineInstaller;
|
|
21
|
+
}
|
|
22
|
+
export declare function listHasnaMcpCatalog(options?: {
|
|
23
|
+
fetchImpl?: typeof fetch;
|
|
24
|
+
refresh?: boolean;
|
|
25
|
+
cacheTtlMs?: number;
|
|
26
|
+
}): Promise<HasnaMcpCatalogEntry[]>;
|
|
27
|
+
export declare function runFleetHealthCheck(options?: FleetHealthOptions, dependencies?: FleetDependencies): Promise<FleetHealthReport[]>;
|
|
28
|
+
export declare function runFleetInstall(options?: FleetInstallOptions, dependencies?: FleetDependencies): Promise<FleetInstallReport[]>;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { AddMachineOptions, MachineEntry } from "../types.js";
|
|
2
|
+
export declare function listMachines(): MachineEntry[];
|
|
3
|
+
export declare function getMachine(id: string): MachineEntry | null;
|
|
4
|
+
export declare function addMachine(opts: AddMachineOptions): MachineEntry;
|
|
5
|
+
export declare function upsertMachine(opts: AddMachineOptions): MachineEntry;
|
|
6
|
+
export declare function updateMachine(id: string, updates: Partial<Pick<MachineEntry, "name" | "host" | "username" | "port" | "platform" | "arch" | "bun_path" | "npm_path" | "installer" | "ssh_key_path" | "enabled" | "last_seen_at" | "last_error">>): MachineEntry;
|
|
7
|
+
export declare function removeMachine(id: string): void;
|
|
8
|
+
export declare const DEFAULT_MACHINE_SEEDS: AddMachineOptions[];
|
|
9
|
+
export declare function seedDefaultMachines(): MachineEntry[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function readPackageVersion(moduleUrl: string, fallback?: string): string;
|
package/dist/types.d.ts
CHANGED
|
@@ -101,3 +101,94 @@ export interface AddSourceOptions {
|
|
|
101
101
|
url: string;
|
|
102
102
|
description?: string;
|
|
103
103
|
}
|
|
104
|
+
export type MachinePlatform = "linux" | "darwin" | "unknown";
|
|
105
|
+
export type MachineArch = "arm64" | "x64" | "unknown";
|
|
106
|
+
export type MachineInstaller = "auto" | "bun" | "npm";
|
|
107
|
+
export interface MachineEntry {
|
|
108
|
+
id: string;
|
|
109
|
+
name: string;
|
|
110
|
+
host: string;
|
|
111
|
+
username: string;
|
|
112
|
+
port: number;
|
|
113
|
+
platform: MachinePlatform;
|
|
114
|
+
arch: MachineArch;
|
|
115
|
+
bun_path: string | null;
|
|
116
|
+
npm_path: string | null;
|
|
117
|
+
installer: MachineInstaller;
|
|
118
|
+
ssh_key_path: string | null;
|
|
119
|
+
enabled: boolean;
|
|
120
|
+
created_at: string;
|
|
121
|
+
updated_at: string;
|
|
122
|
+
last_seen_at: string | null;
|
|
123
|
+
last_error: string | null;
|
|
124
|
+
}
|
|
125
|
+
export interface AddMachineOptions {
|
|
126
|
+
id?: string;
|
|
127
|
+
name?: string;
|
|
128
|
+
host: string;
|
|
129
|
+
username?: string;
|
|
130
|
+
port?: number;
|
|
131
|
+
platform?: MachinePlatform;
|
|
132
|
+
arch?: MachineArch;
|
|
133
|
+
bun_path?: string;
|
|
134
|
+
npm_path?: string;
|
|
135
|
+
installer?: MachineInstaller;
|
|
136
|
+
ssh_key_path?: string;
|
|
137
|
+
enabled?: boolean;
|
|
138
|
+
}
|
|
139
|
+
export interface HasnaMcpCatalogEntry {
|
|
140
|
+
name: string;
|
|
141
|
+
version: string;
|
|
142
|
+
description: string;
|
|
143
|
+
keywords: string[];
|
|
144
|
+
repository: string | null;
|
|
145
|
+
bins: Record<string, string>;
|
|
146
|
+
mcpBin: string | null;
|
|
147
|
+
}
|
|
148
|
+
export interface MachinePackageHealth {
|
|
149
|
+
packageName: string;
|
|
150
|
+
latestVersion: string;
|
|
151
|
+
installedVersion: string | null;
|
|
152
|
+
drift: "missing" | "outdated" | "current";
|
|
153
|
+
binaryName: string | null;
|
|
154
|
+
binaryPath: string | null;
|
|
155
|
+
handshakeOk: boolean | null;
|
|
156
|
+
handshakeError: string | null;
|
|
157
|
+
}
|
|
158
|
+
export interface FleetHealthReport {
|
|
159
|
+
machine: MachineEntry;
|
|
160
|
+
checkedAt: string;
|
|
161
|
+
runtime: {
|
|
162
|
+
hostname: string | null;
|
|
163
|
+
platform: MachinePlatform;
|
|
164
|
+
arch: MachineArch;
|
|
165
|
+
nodePath: string | null;
|
|
166
|
+
npmPath: string | null;
|
|
167
|
+
bunPath: string | null;
|
|
168
|
+
};
|
|
169
|
+
packages: MachinePackageHealth[];
|
|
170
|
+
summary: {
|
|
171
|
+
total: number;
|
|
172
|
+
current: number;
|
|
173
|
+
missing: number;
|
|
174
|
+
outdated: number;
|
|
175
|
+
unresponsive: number;
|
|
176
|
+
};
|
|
177
|
+
error: string | null;
|
|
178
|
+
}
|
|
179
|
+
export interface FleetInstallPackageResult {
|
|
180
|
+
packageName: string;
|
|
181
|
+
requestedVersion: string;
|
|
182
|
+
installer: Exclude<MachineInstaller, "auto">;
|
|
183
|
+
command: string;
|
|
184
|
+
success: boolean;
|
|
185
|
+
stdout: string;
|
|
186
|
+
stderr: string;
|
|
187
|
+
}
|
|
188
|
+
export interface FleetInstallReport {
|
|
189
|
+
machine: MachineEntry;
|
|
190
|
+
installer: Exclude<MachineInstaller, "auto"> | null;
|
|
191
|
+
attempted: number;
|
|
192
|
+
results: FleetInstallPackageResult[];
|
|
193
|
+
error: string | null;
|
|
194
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hasna/mcps",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "Meta-MCP registry & CLI
|
|
3
|
+
"version": "0.0.12",
|
|
4
|
+
"description": "Meta-MCP registry & CLI — discover, manage, and proxy MCP servers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"postinstall": "mkdir -p $HOME/.hasna/mcps/cache 2>/dev/null || true"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@hasna/cloud": "^0.1.
|
|
38
|
+
"@hasna/cloud": "^0.1.24",
|
|
39
39
|
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
40
40
|
"chalk": "^5.3.0",
|
|
41
41
|
"commander": "^12.1.0",
|
|
@@ -59,4 +59,4 @@
|
|
|
59
59
|
"registry": "https://registry.npmjs.org",
|
|
60
60
|
"access": "public"
|
|
61
61
|
}
|
|
62
|
-
}
|
|
62
|
+
}
|