@hasna/mcps 0.0.13 → 0.0.15
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/bin/index.js +897 -94
- package/bin/mcp.js +618 -53
- package/dist/index.d.ts +5 -1
- package/dist/index.js +620 -13
- package/dist/lib/doctor.d.ts +4 -1
- package/dist/lib/install.d.ts +5 -1
- package/dist/lib/local-command-consent.d.ts +38 -0
- package/dist/lib/provider-profile-seeds.d.ts +2 -0
- package/dist/lib/provider-profiles.d.ts +14 -0
- package/dist/lib/proxy.d.ts +6 -2
- package/dist/lib/remote.d.ts +4 -1
- package/dist/mcp/index.js +618 -53
- package/dist/types.d.ts +87 -2
- package/package.json +2 -2
package/dist/lib/doctor.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { McpServerEntry } from "../types.js";
|
|
2
|
+
import { type LocalCommandConsent } from "./local-command-consent.js";
|
|
2
3
|
export interface DoctorCheck {
|
|
3
4
|
name: string;
|
|
4
5
|
pass: boolean;
|
|
@@ -11,4 +12,6 @@ export interface DoctorReport {
|
|
|
11
12
|
checks: DoctorCheck[];
|
|
12
13
|
healthy: boolean;
|
|
13
14
|
}
|
|
14
|
-
export declare function diagnoseServer(server: McpServerEntry
|
|
15
|
+
export declare function diagnoseServer(server: McpServerEntry, options?: {
|
|
16
|
+
localCommandConsent?: LocalCommandConsent;
|
|
17
|
+
}): Promise<DoctorReport>;
|
package/dist/lib/install.d.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import type { McpServerEntry } from "../types.js";
|
|
2
|
+
import { type LocalCommandConsent } from "./local-command-consent.js";
|
|
2
3
|
export type AgentTarget = "claude" | "codex" | "gemini";
|
|
3
4
|
export interface InstallResult {
|
|
4
5
|
agent: AgentTarget;
|
|
5
6
|
success: boolean;
|
|
6
7
|
error?: string;
|
|
7
8
|
}
|
|
8
|
-
export
|
|
9
|
+
export interface InstallToAgentsOptions {
|
|
10
|
+
localCommandConsent?: LocalCommandConsent;
|
|
11
|
+
}
|
|
12
|
+
export declare function installToAgents(entry: McpServerEntry, targets?: AgentTarget[], options?: InstallToAgentsOptions): InstallResult[];
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { McpServerEntry } from "../types.js";
|
|
2
|
+
export type LocalCommandOperation = "register" | "install" | "launch" | "diagnose";
|
|
3
|
+
export type LocalCommandRiskSeverity = "warning" | "danger";
|
|
4
|
+
export interface LocalCommandInput {
|
|
5
|
+
command: string;
|
|
6
|
+
args?: string[];
|
|
7
|
+
env?: Record<string, string>;
|
|
8
|
+
transport?: McpServerEntry["transport"];
|
|
9
|
+
operation?: LocalCommandOperation;
|
|
10
|
+
}
|
|
11
|
+
export interface LocalCommandConsent {
|
|
12
|
+
approved?: boolean;
|
|
13
|
+
allowRisky?: boolean;
|
|
14
|
+
source?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface LocalCommandRisk {
|
|
17
|
+
code: string;
|
|
18
|
+
severity: LocalCommandRiskSeverity;
|
|
19
|
+
message: string;
|
|
20
|
+
evidence?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface LocalCommandReview {
|
|
23
|
+
requiresConsent: boolean;
|
|
24
|
+
operation: LocalCommandOperation;
|
|
25
|
+
command: string;
|
|
26
|
+
args: string[];
|
|
27
|
+
displayCommand: string;
|
|
28
|
+
envKeys: string[];
|
|
29
|
+
risks: LocalCommandRisk[];
|
|
30
|
+
hasDangerousRisk: boolean;
|
|
31
|
+
}
|
|
32
|
+
export declare class LocalCommandConsentError extends Error {
|
|
33
|
+
readonly review: LocalCommandReview;
|
|
34
|
+
constructor(message: string, review: LocalCommandReview);
|
|
35
|
+
}
|
|
36
|
+
export declare function inspectLocalCommand(input: LocalCommandInput): LocalCommandReview;
|
|
37
|
+
export declare function formatLocalCommandReview(review: LocalCommandReview): string;
|
|
38
|
+
export declare function assertLocalCommandConsent(input: LocalCommandInput, consent?: LocalCommandConsent): LocalCommandReview;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { InstallProviderProfileOptions, McpServerEntry, ProviderProfile, UpsertProviderProfileOptions } from "../types.js";
|
|
2
|
+
export declare function upsertProviderProfile(opts: UpsertProviderProfileOptions): ProviderProfile;
|
|
3
|
+
export declare function listProviderProfiles(options?: {
|
|
4
|
+
enabledOnly?: boolean;
|
|
5
|
+
}): ProviderProfile[];
|
|
6
|
+
export declare function searchProviderProfiles(query: string, options?: {
|
|
7
|
+
enabledOnly?: boolean;
|
|
8
|
+
}): ProviderProfile[];
|
|
9
|
+
export declare function getProviderProfile(id: string): ProviderProfile | null;
|
|
10
|
+
export declare function removeProviderProfile(id: string): void;
|
|
11
|
+
export declare function enableProviderProfile(id: string): ProviderProfile;
|
|
12
|
+
export declare function disableProviderProfile(id: string): ProviderProfile;
|
|
13
|
+
export declare function seedDefaultProviderProfiles(): ProviderProfile[];
|
|
14
|
+
export declare function installProviderProfile(id: string, options?: InstallProviderProfileOptions): McpServerEntry;
|
package/dist/lib/proxy.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
import { type LocalCommandConsent } from "./local-command-consent.js";
|
|
1
2
|
import type { McpServerEntry, McpTool, ConnectedServer } from "../types.js";
|
|
2
|
-
export
|
|
3
|
+
export interface ConnectOptions {
|
|
4
|
+
localCommandConsent?: LocalCommandConsent;
|
|
5
|
+
}
|
|
6
|
+
export declare function connectToServer(entry: McpServerEntry, options?: ConnectOptions): Promise<ConnectedServer>;
|
|
3
7
|
export declare function disconnectServer(id: string): Promise<void>;
|
|
4
8
|
export declare function disconnectAll(): Promise<void>;
|
|
5
9
|
export declare function listAllTools(): McpTool[];
|
|
@@ -10,4 +14,4 @@ export declare function callTool(prefixedName: string, args: Record<string, unkn
|
|
|
10
14
|
}>;
|
|
11
15
|
}>;
|
|
12
16
|
export declare function refreshTools(id: string): Promise<McpTool[]>;
|
|
13
|
-
export declare function connectAllEnabled(): Promise<ConnectedServer[]>;
|
|
17
|
+
export declare function connectAllEnabled(options?: ConnectOptions): Promise<ConnectedServer[]>;
|
package/dist/lib/remote.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import { type LocalCommandConsent } from "./local-command-consent.js";
|
|
1
2
|
import type { RegistryServer, McpServerEntry } from "../types.js";
|
|
2
3
|
export declare function searchRegistry(query: string): Promise<RegistryServer[]>;
|
|
3
4
|
export declare function getRegistryServer(id: string): Promise<RegistryServer | null>;
|
|
4
|
-
export declare function installFromRegistry(id: string
|
|
5
|
+
export declare function installFromRegistry(id: string, options?: {
|
|
6
|
+
localCommandConsent?: LocalCommandConsent;
|
|
7
|
+
}): Promise<McpServerEntry>;
|