@alcyone-labs/arg-parser 2.0.0 → 2.1.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.
- package/README.md +371 -5
- package/dist/index.cjs +3362 -2603
- package/dist/index.cjs.map +1 -1
- package/dist/index.min.mjs +7569 -6957
- package/dist/index.min.mjs.map +1 -1
- package/dist/index.mjs +3362 -2603
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -4
- package/dist/src/config/ConfigurationManager.d.ts +0 -74
- package/dist/src/config/ConfigurationManager.d.ts.map +0 -1
- package/dist/src/config/plugins/ConfigPlugin.d.ts +0 -60
- package/dist/src/config/plugins/ConfigPlugin.d.ts.map +0 -1
- package/dist/src/config/plugins/ConfigPluginRegistry.d.ts +0 -72
- package/dist/src/config/plugins/ConfigPluginRegistry.d.ts.map +0 -1
- package/dist/src/config/plugins/TomlConfigPlugin.d.ts +0 -30
- package/dist/src/config/plugins/TomlConfigPlugin.d.ts.map +0 -1
- package/dist/src/config/plugins/YamlConfigPlugin.d.ts +0 -29
- package/dist/src/config/plugins/YamlConfigPlugin.d.ts.map +0 -1
- package/dist/src/config/plugins/index.d.ts +0 -5
- package/dist/src/config/plugins/index.d.ts.map +0 -1
- package/dist/src/core/ArgParser.d.ts +0 -332
- package/dist/src/core/ArgParser.d.ts.map +0 -1
- package/dist/src/core/ArgParserBase.d.ts +0 -206
- package/dist/src/core/ArgParserBase.d.ts.map +0 -1
- package/dist/src/core/FlagManager.d.ts +0 -16
- package/dist/src/core/FlagManager.d.ts.map +0 -1
- package/dist/src/core/types.d.ts +0 -194
- package/dist/src/core/types.d.ts.map +0 -1
- package/dist/src/dxt/DxtGenerator.d.ts +0 -115
- package/dist/src/dxt/DxtGenerator.d.ts.map +0 -1
- package/dist/src/index.d.ts +0 -11
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/mcp/ArgParserMcp.d.ts +0 -21
- package/dist/src/mcp/ArgParserMcp.d.ts.map +0 -1
- package/dist/src/mcp/mcp-integration.d.ts +0 -83
- package/dist/src/mcp/mcp-integration.d.ts.map +0 -1
- package/dist/src/mcp/mcp-notifications.d.ts +0 -138
- package/dist/src/mcp/mcp-notifications.d.ts.map +0 -1
- package/dist/src/mcp/mcp-prompts.d.ts +0 -132
- package/dist/src/mcp/mcp-prompts.d.ts.map +0 -1
- package/dist/src/mcp/mcp-resources.d.ts +0 -133
- package/dist/src/mcp/mcp-resources.d.ts.map +0 -1
- package/dist/src/testing/fuzzy-test-cli.d.ts +0 -5
- package/dist/src/testing/fuzzy-test-cli.d.ts.map +0 -1
- package/dist/src/testing/fuzzy-tester.d.ts +0 -101
- package/dist/src/testing/fuzzy-tester.d.ts.map +0 -1
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import type { ZodTypeAny } from "zod";
|
|
2
|
-
import { ArgParserBase } from "../core/ArgParserBase";
|
|
3
|
-
import type { IFlag, ProcessedFlag, TParsedArgs } from "../core/types";
|
|
4
|
-
/**
|
|
5
|
-
* Standard MCP response format
|
|
6
|
-
*/
|
|
7
|
-
export interface McpResponse {
|
|
8
|
-
content: Array<{
|
|
9
|
-
type: "text";
|
|
10
|
-
text: string;
|
|
11
|
-
}>;
|
|
12
|
-
isError?: boolean;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Create a standardized MCP success response
|
|
16
|
-
*/
|
|
17
|
-
export declare function createMcpSuccessResponse(data: any): McpResponse;
|
|
18
|
-
/**
|
|
19
|
-
* Create a standardized MCP error response
|
|
20
|
-
*/
|
|
21
|
-
export declare function createMcpErrorResponse(error: string | Error): McpResponse;
|
|
22
|
-
/**
|
|
23
|
-
* Convert a single ArgParser flag to JSON Schema property
|
|
24
|
-
*/
|
|
25
|
-
export declare function convertFlagToJsonSchemaProperty(flag: IFlag | ProcessedFlag): {
|
|
26
|
-
property: any;
|
|
27
|
-
isRequired: boolean;
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* Convert ArgParser flags to MCP JSON Schema
|
|
31
|
-
*/
|
|
32
|
-
export declare function convertFlagsToJsonSchema(flags: readonly (IFlag | ProcessedFlag)[]): {
|
|
33
|
-
type: "object";
|
|
34
|
-
properties: Record<string, any>;
|
|
35
|
-
required: string[];
|
|
36
|
-
};
|
|
37
|
-
/**
|
|
38
|
-
* Convert ArgParser flags to Zod schema for MCP tools
|
|
39
|
-
*/
|
|
40
|
-
export declare function convertFlagsToZodSchema(flags: readonly (IFlag | ProcessedFlag)[]): ZodTypeAny;
|
|
41
|
-
/**
|
|
42
|
-
* Simplified response format for testing and validation
|
|
43
|
-
*/
|
|
44
|
-
export interface SimplifiedToolResponse {
|
|
45
|
-
success: boolean;
|
|
46
|
-
data?: any;
|
|
47
|
-
error?: string;
|
|
48
|
-
message?: string;
|
|
49
|
-
exitCode?: number;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Extract simplified response from MCP protocol response
|
|
53
|
-
*/
|
|
54
|
-
export declare function extractSimplifiedResponse(mcpResponse: any): SimplifiedToolResponse;
|
|
55
|
-
export interface IMcpToolStructure {
|
|
56
|
-
name: string;
|
|
57
|
-
description?: string;
|
|
58
|
-
inputSchema: ZodTypeAny;
|
|
59
|
-
outputSchema?: ZodTypeAny;
|
|
60
|
-
execute: (args: any) => Promise<any>;
|
|
61
|
-
executeForTesting?: (args: any) => Promise<SimplifiedToolResponse>;
|
|
62
|
-
}
|
|
63
|
-
export interface GenerateMcpToolsOptions {
|
|
64
|
-
outputSchemaMap?: Record<string, ZodTypeAny>;
|
|
65
|
-
defaultOutputSchema?: ZodTypeAny;
|
|
66
|
-
generateToolName?: (commandPath: string[], appName?: string) => string;
|
|
67
|
-
includeSubCommands?: boolean;
|
|
68
|
-
toolNamePrefix?: string;
|
|
69
|
-
toolNameSuffix?: string;
|
|
70
|
-
}
|
|
71
|
-
interface ISpecialParseResultProps {
|
|
72
|
-
$commandChain?: string[];
|
|
73
|
-
$error?: {
|
|
74
|
-
type: string;
|
|
75
|
-
message: string;
|
|
76
|
-
details?: any;
|
|
77
|
-
};
|
|
78
|
-
handlerResponse?: any;
|
|
79
|
-
}
|
|
80
|
-
export type IParseExecutionResult = TParsedArgs<ProcessedFlag[]> & ISpecialParseResultProps;
|
|
81
|
-
export declare function generateMcpToolsFromArgParser(rootParser: ArgParserBase, options?: GenerateMcpToolsOptions): IMcpToolStructure[];
|
|
82
|
-
export {};
|
|
83
|
-
//# sourceMappingURL=mcp-integration.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-integration.d.ts","sourceRoot":"","sources":["../../../src/mcp/mcp-integration.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAe,UAAU,EAAE,MAAM,KAAK,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAE,KAAK,EAAmB,aAAa,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAKxF;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,KAAK,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;KACd,CAAC,CAAC;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,GAAG,GAAG,WAAW,CAS/D;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,GAAG,WAAW,CAWzE;AAoBD;;GAEG;AACH,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,KAAK,GAAG,aAAa,GAAG;IAC5E,QAAQ,EAAE,GAAG,CAAC;IACd,UAAU,EAAE,OAAO,CAAC;CACrB,CA4BA;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,SAAS,CAAC,KAAK,GAAG,aAAa,CAAC,EAAE,GAAG;IACnF,IAAI,EAAE,QAAQ,CAAC;IACf,UAAU,EAAE,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,MAAM,EAAE,CAAC;IACzB,MAAM,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,GAAG,CAAA;KAAE,CAAC;IAC1D,eAAe,CAAC,EAAE,GAAG,CAAC;CACvB;AACD,MAAM,MAAM,qBAAqB,GAAG,WAAW,CAAC,aAAa,EAAE,CAAC,GAC9D,wBAAwB,CAAC;AAE3B,wBAAgB,6BAA6B,CAC3C,UAAU,EAAE,aAAa,EACzB,OAAO,CAAC,EAAE,uBAAuB,GAChC,iBAAiB,EAAE,CAucrB"}
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MCP Change Notifications System
|
|
3
|
-
*
|
|
4
|
-
* This module provides functionality for managing MCP change notifications,
|
|
5
|
-
* allowing clients to subscribe to changes in tools, resources, and prompts.
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Types of MCP entities that can change
|
|
9
|
-
*/
|
|
10
|
-
export type McpChangeType = 'tools' | 'resources' | 'prompts';
|
|
11
|
-
/**
|
|
12
|
-
* Change notification event
|
|
13
|
-
*/
|
|
14
|
-
export interface McpChangeEvent {
|
|
15
|
-
type: McpChangeType;
|
|
16
|
-
timestamp: Date;
|
|
17
|
-
action: 'added' | 'removed' | 'updated';
|
|
18
|
-
entityName?: string;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Change listener function type
|
|
22
|
-
*/
|
|
23
|
-
export type McpChangeListener = (event: McpChangeEvent) => void;
|
|
24
|
-
/**
|
|
25
|
-
* Client subscription information
|
|
26
|
-
*/
|
|
27
|
-
export interface McpClientSubscription {
|
|
28
|
-
clientId: string;
|
|
29
|
-
subscriptions: Set<McpChangeType>;
|
|
30
|
-
connection: any;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* MCP Change Notifications Manager
|
|
34
|
-
*
|
|
35
|
-
* Manages client subscriptions and change notifications for MCP entities
|
|
36
|
-
*/
|
|
37
|
-
export declare class McpNotificationsManager {
|
|
38
|
-
private clients;
|
|
39
|
-
private globalListeners;
|
|
40
|
-
private changeHistory;
|
|
41
|
-
private maxHistorySize;
|
|
42
|
-
/**
|
|
43
|
-
* Add a client connection
|
|
44
|
-
*/
|
|
45
|
-
addClient(clientId: string, connection: any): void;
|
|
46
|
-
/**
|
|
47
|
-
* Remove a client connection
|
|
48
|
-
*/
|
|
49
|
-
removeClient(clientId: string): void;
|
|
50
|
-
/**
|
|
51
|
-
* Subscribe a client to changes of a specific type
|
|
52
|
-
*/
|
|
53
|
-
subscribe(clientId: string, type: McpChangeType): void;
|
|
54
|
-
/**
|
|
55
|
-
* Unsubscribe a client from changes of a specific type
|
|
56
|
-
*/
|
|
57
|
-
unsubscribe(clientId: string, type: McpChangeType): void;
|
|
58
|
-
/**
|
|
59
|
-
* Subscribe a client to all change types
|
|
60
|
-
*/
|
|
61
|
-
subscribeToAll(clientId: string): void;
|
|
62
|
-
/**
|
|
63
|
-
* Unsubscribe a client from all change types
|
|
64
|
-
*/
|
|
65
|
-
unsubscribeFromAll(clientId: string): void;
|
|
66
|
-
/**
|
|
67
|
-
* Get client subscription status
|
|
68
|
-
*/
|
|
69
|
-
getClientSubscriptions(clientId: string): Set<McpChangeType> | undefined;
|
|
70
|
-
/**
|
|
71
|
-
* Check if a client is subscribed to a specific change type
|
|
72
|
-
*/
|
|
73
|
-
isClientSubscribed(clientId: string, type: McpChangeType): boolean;
|
|
74
|
-
/**
|
|
75
|
-
* Notify all subscribed clients of a change
|
|
76
|
-
*/
|
|
77
|
-
notifyChange(type: McpChangeType, action: 'added' | 'removed' | 'updated', entityName?: string): void;
|
|
78
|
-
/**
|
|
79
|
-
* Add a global change listener (not client-specific)
|
|
80
|
-
*/
|
|
81
|
-
addGlobalListener(listener: McpChangeListener): void;
|
|
82
|
-
/**
|
|
83
|
-
* Remove a global change listener
|
|
84
|
-
*/
|
|
85
|
-
removeGlobalListener(listener: McpChangeListener): void;
|
|
86
|
-
/**
|
|
87
|
-
* Get change history
|
|
88
|
-
*/
|
|
89
|
-
getChangeHistory(limit?: number): McpChangeEvent[];
|
|
90
|
-
/**
|
|
91
|
-
* Clear change history
|
|
92
|
-
*/
|
|
93
|
-
clearHistory(): void;
|
|
94
|
-
/**
|
|
95
|
-
* Get connected client count
|
|
96
|
-
*/
|
|
97
|
-
getClientCount(): number;
|
|
98
|
-
/**
|
|
99
|
-
* Get subscription statistics
|
|
100
|
-
*/
|
|
101
|
-
getSubscriptionStats(): Record<McpChangeType, number>;
|
|
102
|
-
/**
|
|
103
|
-
* Send notification to a specific client
|
|
104
|
-
*/
|
|
105
|
-
private sendNotificationToClient;
|
|
106
|
-
/**
|
|
107
|
-
* Add event to change history
|
|
108
|
-
*/
|
|
109
|
-
private addToHistory;
|
|
110
|
-
/**
|
|
111
|
-
* Set maximum history size
|
|
112
|
-
*/
|
|
113
|
-
setMaxHistorySize(size: number): void;
|
|
114
|
-
/**
|
|
115
|
-
* Clear all subscriptions and clients
|
|
116
|
-
*/
|
|
117
|
-
clear(): void;
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Utility functions for working with change notifications
|
|
121
|
-
*/
|
|
122
|
-
/**
|
|
123
|
-
* Create a debounced change notifier to batch rapid changes
|
|
124
|
-
*/
|
|
125
|
-
export declare function createDebouncedNotifier(manager: McpNotificationsManager, delay?: number): (type: McpChangeType, action: 'added' | 'removed' | 'updated', entityName?: string) => void;
|
|
126
|
-
/**
|
|
127
|
-
* Create a filtered change listener that only responds to specific types
|
|
128
|
-
*/
|
|
129
|
-
export declare function createFilteredListener(types: McpChangeType[], listener: McpChangeListener): McpChangeListener;
|
|
130
|
-
/**
|
|
131
|
-
* Create a logging change listener for debugging
|
|
132
|
-
*/
|
|
133
|
-
export declare function createLoggingListener(prefix?: string): McpChangeListener;
|
|
134
|
-
/**
|
|
135
|
-
* Default global notifications manager instance
|
|
136
|
-
*/
|
|
137
|
-
export declare const globalNotificationsManager: McpNotificationsManager;
|
|
138
|
-
//# sourceMappingURL=mcp-notifications.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-notifications.d.ts","sourceRoot":"","sources":["../../../src/mcp/mcp-notifications.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,WAAW,GAAG,SAAS,CAAC;AAE9D;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,aAAa,CAAC;IACpB,SAAS,EAAE,IAAI,CAAC;IAChB,MAAM,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;IACxC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;AAEhE;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,GAAG,CAAC,aAAa,CAAC,CAAC;IAClC,UAAU,EAAE,GAAG,CAAC;CACjB;AAED;;;;GAIG;AACH,qBAAa,uBAAuB;IAClC,OAAO,CAAC,OAAO,CAA4C;IAC3D,OAAO,CAAC,eAAe,CAAgC;IACvD,OAAO,CAAC,aAAa,CAAwB;IAC7C,OAAO,CAAC,cAAc,CAAO;IAE7B;;OAEG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,GAAG,IAAI;IAQlD;;OAEG;IACH,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAIpC;;OAEG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,GAAG,IAAI;IAOtD;;OAEG;IACH,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,GAAG,IAAI;IAOxD;;OAEG;IACH,cAAc,CAAC,QAAQ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Aa,EAAE,EACtB,QAAQ,EAAE,iBAAiB,GAC1B,iBAAiB,CAMnB;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,GAAE,MAAgB,GAAG,iBAAiB,CAKjF;AAED;;GAEG;AACH,eAAO,MAAM,0BAA0B,yBAAgC,CAAC"}
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MCP Prompts Management
|
|
3
|
-
*
|
|
4
|
-
* This module provides functionality for managing MCP prompts - server-side prompt templates
|
|
5
|
-
* that clients can discover and execute with custom parameters for dynamic text generation.
|
|
6
|
-
*/
|
|
7
|
-
import { ZodTypeAny } from "zod";
|
|
8
|
-
/**
|
|
9
|
-
* Prompt message content types
|
|
10
|
-
*/
|
|
11
|
-
export interface McpPromptTextContent {
|
|
12
|
-
type: "text";
|
|
13
|
-
text: string;
|
|
14
|
-
}
|
|
15
|
-
export interface McpPromptImageContent {
|
|
16
|
-
type: "image";
|
|
17
|
-
data: string;
|
|
18
|
-
mimeType: string;
|
|
19
|
-
}
|
|
20
|
-
export type McpPromptContent = McpPromptTextContent | McpPromptImageContent;
|
|
21
|
-
/**
|
|
22
|
-
* Prompt message structure
|
|
23
|
-
*/
|
|
24
|
-
export interface McpPromptMessage {
|
|
25
|
-
role: "user" | "assistant" | "system";
|
|
26
|
-
content: McpPromptContent;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Prompt response structure
|
|
30
|
-
*/
|
|
31
|
-
export interface McpPromptResponse {
|
|
32
|
-
description?: string;
|
|
33
|
-
messages: McpPromptMessage[];
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Prompt handler function type
|
|
37
|
-
*/
|
|
38
|
-
export type McpPromptHandler = (args: any) => McpPromptResponse | Promise<McpPromptResponse>;
|
|
39
|
-
/**
|
|
40
|
-
* Prompt configuration for registration
|
|
41
|
-
*/
|
|
42
|
-
export interface McpPromptConfig {
|
|
43
|
-
name: string;
|
|
44
|
-
title?: string;
|
|
45
|
-
description?: string;
|
|
46
|
-
argsSchema: ZodTypeAny;
|
|
47
|
-
handler: McpPromptHandler;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Internal prompt storage structure
|
|
51
|
-
*/
|
|
52
|
-
export interface McpPromptEntry {
|
|
53
|
-
config: McpPromptConfig;
|
|
54
|
-
registeredAt: Date;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* MCP Prompts Manager
|
|
58
|
-
*
|
|
59
|
-
* Manages registration, storage, and execution of MCP prompts
|
|
60
|
-
*/
|
|
61
|
-
export declare class McpPromptsManager {
|
|
62
|
-
private prompts;
|
|
63
|
-
private changeListeners;
|
|
64
|
-
/**
|
|
65
|
-
* Register a new prompt
|
|
66
|
-
*/
|
|
67
|
-
addPrompt(config: McpPromptConfig): void;
|
|
68
|
-
/**
|
|
69
|
-
* Remove a prompt by name
|
|
70
|
-
*/
|
|
71
|
-
removePrompt(name: string): boolean;
|
|
72
|
-
/**
|
|
73
|
-
* Get all registered prompts
|
|
74
|
-
*/
|
|
75
|
-
getPrompts(): McpPromptConfig[];
|
|
76
|
-
/**
|
|
77
|
-
* Get a specific prompt by name
|
|
78
|
-
*/
|
|
79
|
-
getPrompt(name: string): McpPromptConfig | undefined;
|
|
80
|
-
/**
|
|
81
|
-
* Check if a prompt exists
|
|
82
|
-
*/
|
|
83
|
-
hasPrompt(name: string): boolean;
|
|
84
|
-
/**
|
|
85
|
-
* Execute a prompt with given arguments
|
|
86
|
-
*/
|
|
87
|
-
executePrompt(name: string, args: any): Promise<McpPromptResponse>;
|
|
88
|
-
/**
|
|
89
|
-
* Add change listener
|
|
90
|
-
*/
|
|
91
|
-
onPromptsChange(listener: () => void): void;
|
|
92
|
-
/**
|
|
93
|
-
* Remove change listener
|
|
94
|
-
*/
|
|
95
|
-
offPromptsChange(listener: () => void): void;
|
|
96
|
-
/**
|
|
97
|
-
* Clear all prompts
|
|
98
|
-
*/
|
|
99
|
-
clear(): void;
|
|
100
|
-
/**
|
|
101
|
-
* Get prompt count
|
|
102
|
-
*/
|
|
103
|
-
count(): number;
|
|
104
|
-
/**
|
|
105
|
-
* Validate prompt configuration
|
|
106
|
-
*/
|
|
107
|
-
private validatePromptConfig;
|
|
108
|
-
/**
|
|
109
|
-
* Notify all listeners of changes
|
|
110
|
-
*/
|
|
111
|
-
private notifyChange;
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* Helper function to create common prompt configurations
|
|
115
|
-
*/
|
|
116
|
-
/**
|
|
117
|
-
* Create a code review prompt
|
|
118
|
-
*/
|
|
119
|
-
export declare const createCodeReviewPrompt: () => McpPromptConfig;
|
|
120
|
-
/**
|
|
121
|
-
* Create a text summarization prompt
|
|
122
|
-
*/
|
|
123
|
-
export declare const createSummarizationPrompt: () => McpPromptConfig;
|
|
124
|
-
/**
|
|
125
|
-
* Create a translation prompt
|
|
126
|
-
*/
|
|
127
|
-
export declare const createTranslationPrompt: () => McpPromptConfig;
|
|
128
|
-
/**
|
|
129
|
-
* Create a documentation prompt
|
|
130
|
-
*/
|
|
131
|
-
export declare const createDocumentationPrompt: () => McpPromptConfig;
|
|
132
|
-
//# sourceMappingURL=mcp-prompts.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-prompts.d.ts","sourceRoot":"","sources":["../../../src/mcp/mcp-prompts.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAK,UAAU,EAAE,MAAM,KAAK,CAAC;AAEpC;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,GAAG,qBAAqB,CAAC;AAE5E;;G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M,IAAI,GAAG,IAAI;IAI3C;;OAEG;IACH,gBAAgB,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI;IAI5C;;OAEG;IACH,KAAK,IAAI,IAAI;IAQb;;OAEG;IACH,KAAK,IAAI,MAAM;IAIf;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAkB5B;;OAEG;IACH,OAAO,CAAC,YAAY;CASrB;AAED;;GAEG;AAEH;;GAEG;AACH,eAAO,MAAM,sBAAsB,QAAO,eAmBxC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,yBAAyB,QAAO,eA6B3C,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,uBAAuB,QAAO,eAyBzC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,yBAAyB,QAAO,eAyB3C,CAAC"}
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MCP Resources Management
|
|
3
|
-
*
|
|
4
|
-
* This module provides functionality for managing MCP resources - server-side data sources
|
|
5
|
-
* that clients can access using URI templates. Resources are similar to GET endpoints
|
|
6
|
-
* in a REST API and should provide data without significant computation or side effects.
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* Resource response content item
|
|
10
|
-
*/
|
|
11
|
-
export interface McpResourceContent {
|
|
12
|
-
uri: string;
|
|
13
|
-
text?: string;
|
|
14
|
-
blob?: Uint8Array;
|
|
15
|
-
mimeType?: string;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Resource response structure
|
|
19
|
-
*/
|
|
20
|
-
export interface McpResourceResponse {
|
|
21
|
-
contents: McpResourceContent[];
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Resource handler function type
|
|
25
|
-
*/
|
|
26
|
-
export type McpResourceHandler = (uri: URL, params: Record<string, string>) => Promise<McpResourceResponse>;
|
|
27
|
-
/**
|
|
28
|
-
* Resource configuration for registration
|
|
29
|
-
*/
|
|
30
|
-
export interface McpResourceConfig {
|
|
31
|
-
name: string;
|
|
32
|
-
uriTemplate: string;
|
|
33
|
-
title?: string;
|
|
34
|
-
description?: string;
|
|
35
|
-
mimeType?: string;
|
|
36
|
-
handler: McpResourceHandler;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Internal resource storage structure
|
|
40
|
-
*/
|
|
41
|
-
export interface McpResourceEntry {
|
|
42
|
-
config: McpResourceConfig;
|
|
43
|
-
registeredAt: Date;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Resource template parser for URI patterns like "users://{userId}/profile"
|
|
47
|
-
*/
|
|
48
|
-
export declare class ResourceTemplateParser {
|
|
49
|
-
private pattern;
|
|
50
|
-
private paramNames;
|
|
51
|
-
constructor(template: string);
|
|
52
|
-
/**
|
|
53
|
-
* Parse a URI against this template and extract parameters
|
|
54
|
-
*/
|
|
55
|
-
parse(uri: string): Record<string, string> | null;
|
|
56
|
-
/**
|
|
57
|
-
* Check if a URI matches this template
|
|
58
|
-
*/
|
|
59
|
-
matches(uri: string): boolean;
|
|
60
|
-
/**
|
|
61
|
-
* Get the parameter names for this template
|
|
62
|
-
*/
|
|
63
|
-
getParameterNames(): string[];
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* MCP Resources Manager
|
|
67
|
-
*
|
|
68
|
-
* Manages registration, storage, and retrieval of MCP resources
|
|
69
|
-
*/
|
|
70
|
-
export declare class McpResourcesManager {
|
|
71
|
-
private resources;
|
|
72
|
-
private changeListeners;
|
|
73
|
-
/**
|
|
74
|
-
* Register a new resource
|
|
75
|
-
*/
|
|
76
|
-
addResource(config: McpResourceConfig): void;
|
|
77
|
-
/**
|
|
78
|
-
* Remove a resource by name
|
|
79
|
-
*/
|
|
80
|
-
removeResource(name: string): boolean;
|
|
81
|
-
/**
|
|
82
|
-
* Get all registered resources
|
|
83
|
-
*/
|
|
84
|
-
getResources(): McpResourceConfig[];
|
|
85
|
-
/**
|
|
86
|
-
* Get a specific resource by name
|
|
87
|
-
*/
|
|
88
|
-
getResource(name: string): McpResourceConfig | undefined;
|
|
89
|
-
/**
|
|
90
|
-
* Check if a resource exists
|
|
91
|
-
*/
|
|
92
|
-
hasResource(name: string): boolean;
|
|
93
|
-
/**
|
|
94
|
-
* Find resource that matches a URI
|
|
95
|
-
*/
|
|
96
|
-
findResourceForUri(uri: string): {
|
|
97
|
-
config: McpResourceConfig;
|
|
98
|
-
params: Record<string, string>;
|
|
99
|
-
} | null;
|
|
100
|
-
/**
|
|
101
|
-
* Add change listener
|
|
102
|
-
*/
|
|
103
|
-
onResourcesChange(listener: () => void): void;
|
|
104
|
-
/**
|
|
105
|
-
* Remove change listener
|
|
106
|
-
*/
|
|
107
|
-
offResourcesChange(listener: () => void): void;
|
|
108
|
-
/**
|
|
109
|
-
* Clear all resources
|
|
110
|
-
*/
|
|
111
|
-
clear(): void;
|
|
112
|
-
/**
|
|
113
|
-
* Get resource count
|
|
114
|
-
*/
|
|
115
|
-
count(): number;
|
|
116
|
-
/**
|
|
117
|
-
* Validate resource configuration
|
|
118
|
-
*/
|
|
119
|
-
private validateResourceConfig;
|
|
120
|
-
/**
|
|
121
|
-
* Notify all listeners of changes
|
|
122
|
-
*/
|
|
123
|
-
private notifyChange;
|
|
124
|
-
}
|
|
125
|
-
/**
|
|
126
|
-
* Helper function to create common resource configurations
|
|
127
|
-
*/
|
|
128
|
-
export declare const createFileResource: (basePath?: string) => McpResourceConfig;
|
|
129
|
-
/**
|
|
130
|
-
* Helper function to create JSON data resource
|
|
131
|
-
*/
|
|
132
|
-
export declare const createJsonResource: (name: string, data: any) => McpResourceConfig;
|
|
133
|
-
//# sourceMappingURL=mcp-resources.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-resources.d.ts","sourceRoot":"","sources":["../../../src/mcp/mcp-resources.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAC;IAC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Ac,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAQrC;;OAEG;IACH,YAAY,IAAI,iBAAiB,EAAE;IAInC;;OAEG;IACH,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,iBAAiB,GAAG,SAAS;IAIxD;;OAEG;IACH,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAIlC;;OAEG;IACH,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG;QAAE,MAAM,EAAE,iBAAiB,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,GAAG,IAAI;IAWrG;;OAEG;IACH,iBAAiB,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI;IAI7C;;OAEG;IACH,kBAAkB,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI;IAI9C;;OAEG;IACH,KAAK,IAAI,IAAI;IAQb;;OAEG;IACH,KAAK,IAAI,MAAM;IAIf;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAyB9B;;OAEG;IACH,OAAO,CAAC,YAAY;CASrB;AAED;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,WAAU,MAAW,KAAG,iBAuBzD,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,MAAM,MAAM,EAAE,MAAM,GAAG,KAAG,iBAa3D,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fuzzy-test-cli.d.ts","sourceRoot":"","sources":["../../../src/testing/fuzzy-test-cli.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAgB9C,QAAA,MAAM,YAAY,iBAmEhB,CAAC;AAkPH,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import type { ArgParserBase } from "../core/ArgParserBase";
|
|
2
|
-
export interface FuzzyTestOptions {
|
|
3
|
-
/** Maximum depth for command path exploration */
|
|
4
|
-
maxDepth?: number;
|
|
5
|
-
/** Number of random test cases to generate per command path */
|
|
6
|
-
randomTestCases?: number;
|
|
7
|
-
/** Include performance timing in results */
|
|
8
|
-
includePerformance?: boolean;
|
|
9
|
-
/** Test invalid combinations to verify error handling */
|
|
10
|
-
testErrorCases?: boolean;
|
|
11
|
-
/** Verbose output for debugging */
|
|
12
|
-
verbose?: boolean;
|
|
13
|
-
}
|
|
14
|
-
export interface TestResult {
|
|
15
|
-
commandPath: string[];
|
|
16
|
-
args: string[];
|
|
17
|
-
success: boolean;
|
|
18
|
-
error?: string;
|
|
19
|
-
executionTime?: number;
|
|
20
|
-
parsedResult?: any;
|
|
21
|
-
}
|
|
22
|
-
export interface FuzzyTestReport {
|
|
23
|
-
totalTests: number;
|
|
24
|
-
successfulTests: number;
|
|
25
|
-
failedTests: number;
|
|
26
|
-
commandPaths: string[][];
|
|
27
|
-
results: TestResult[];
|
|
28
|
-
summary: {
|
|
29
|
-
coverageByPath: Record<string, {
|
|
30
|
-
total: number;
|
|
31
|
-
passed: number;
|
|
32
|
-
}>;
|
|
33
|
-
errorTypes: Record<string, number>;
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
export declare class ArgParserFuzzyTester {
|
|
37
|
-
private parser;
|
|
38
|
-
private options;
|
|
39
|
-
constructor(parser: ArgParserBase, options?: FuzzyTestOptions);
|
|
40
|
-
/**
|
|
41
|
-
* Run comprehensive fuzzy testing on the ArgParser instance
|
|
42
|
-
*/
|
|
43
|
-
runFuzzyTest(): Promise<FuzzyTestReport>;
|
|
44
|
-
/**
|
|
45
|
-
* Discover all possible command paths in the parser
|
|
46
|
-
*/
|
|
47
|
-
private discoverCommandPaths;
|
|
48
|
-
/**
|
|
49
|
-
* Recursively discover subcommand paths
|
|
50
|
-
*/
|
|
51
|
-
private discoverSubCommandPaths;
|
|
52
|
-
/**
|
|
53
|
-
* Get subcommands from a parser instance
|
|
54
|
-
*/
|
|
55
|
-
private getSubCommands;
|
|
56
|
-
/**
|
|
57
|
-
* Get flags from a parser instance
|
|
58
|
-
*/
|
|
59
|
-
private getFlags;
|
|
60
|
-
/**
|
|
61
|
-
* Test a specific command path with various flag combinations
|
|
62
|
-
*/
|
|
63
|
-
private testCommandPath;
|
|
64
|
-
/**
|
|
65
|
-
* Get the parser instance for a specific command path
|
|
66
|
-
*/
|
|
67
|
-
private getParserForPath;
|
|
68
|
-
/**
|
|
69
|
-
* Generate valid flag combinations for testing
|
|
70
|
-
*/
|
|
71
|
-
private generateValidFlagCombinations;
|
|
72
|
-
/**
|
|
73
|
-
* Generate random flag combination
|
|
74
|
-
*/
|
|
75
|
-
private generateRandomFlagCombination;
|
|
76
|
-
/**
|
|
77
|
-
* Generate error test cases
|
|
78
|
-
*/
|
|
79
|
-
private generateErrorCases;
|
|
80
|
-
/**
|
|
81
|
-
* Generate arguments for a specific flag
|
|
82
|
-
*/
|
|
83
|
-
private generateFlagArgs;
|
|
84
|
-
/**
|
|
85
|
-
* Generate values for a flag based on its type and constraints
|
|
86
|
-
*/
|
|
87
|
-
private generateFlagValues;
|
|
88
|
-
/**
|
|
89
|
-
* Generate a single value for a flag
|
|
90
|
-
*/
|
|
91
|
-
private generateSingleFlagValue;
|
|
92
|
-
/**
|
|
93
|
-
* Execute a single test case
|
|
94
|
-
*/
|
|
95
|
-
private executeTest;
|
|
96
|
-
/**
|
|
97
|
-
* Generate comprehensive test report
|
|
98
|
-
*/
|
|
99
|
-
private generateReport;
|
|
100
|
-
}
|
|
101
|
-
//# sourceMappingURL=fuzzy-tester.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fuzzy-tester.d.ts","sourceRoot":"","sources":["../../../src/testing/fuzzy-tester.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAG3D,MAAM,WAAW,gBAAgB;IAC/B,iDAAiD;IACjD,QAAQ,CAAC,EAAE,MAAM,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