@riotprompt/riotprompt 1.0.3-dev.0 → 1.0.4

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,3 @@
1
+ import { McpTool, ToolResult, ToolExecutionContext } from '../types.js';
2
+ export declare const getVersionTool: McpTool;
3
+ export declare function executeGetVersion(_args: any, _context: ToolExecutionContext): Promise<ToolResult>;
@@ -0,0 +1,9 @@
1
+ import { McpTool, ToolResult, ToolExecutionContext } from '../types.js';
2
+ /**
3
+ * Base tool executor - wraps command logic
4
+ */
5
+ export declare function executeTool(toolName: string, args: Record<string, any>, context: ToolExecutionContext): Promise<ToolResult>;
6
+ /**
7
+ * Tool definitions array
8
+ */
9
+ export declare const tools: McpTool[];
@@ -0,0 +1,3 @@
1
+ import { McpTool, ToolResult, ToolExecutionContext } from '../types.js';
2
+ export declare const processTool: McpTool;
3
+ export declare function executeProcess(args: any, context: ToolExecutionContext): Promise<ToolResult>;
@@ -0,0 +1,157 @@
1
+ /**
2
+ * MCP Type Definitions for RiotPrompt
3
+ *
4
+ * This module defines types for the Model Context Protocol integration,
5
+ * including protocol types, RiotPrompt-specific types, and resource result types.
6
+ */
7
+ /**
8
+ * MCP Tool definition
9
+ * Represents a callable tool exposed via MCP
10
+ */
11
+ export interface McpTool {
12
+ name: string;
13
+ description: string;
14
+ inputSchema: {
15
+ type: 'object';
16
+ properties: Record<string, McpToolParameter>;
17
+ required?: string[];
18
+ };
19
+ }
20
+ /**
21
+ * MCP Tool Parameter definition
22
+ * Describes a single parameter for a tool
23
+ */
24
+ export interface McpToolParameter {
25
+ type: string;
26
+ description: string;
27
+ enum?: string[];
28
+ items?: {
29
+ type: string;
30
+ };
31
+ }
32
+ /**
33
+ * MCP Resource definition
34
+ * Represents a readable resource exposed via MCP
35
+ */
36
+ export interface McpResource {
37
+ uri: string;
38
+ name: string;
39
+ description: string;
40
+ mimeType?: string;
41
+ }
42
+ /**
43
+ * MCP Prompt definition
44
+ * Represents a workflow prompt template
45
+ */
46
+ export interface McpPrompt {
47
+ name: string;
48
+ description: string;
49
+ arguments?: Array<{
50
+ name: string;
51
+ description: string;
52
+ required: boolean;
53
+ }>;
54
+ }
55
+ /**
56
+ * MCP Prompt Message
57
+ * Represents a message in a prompt template
58
+ */
59
+ export interface McpPromptMessage {
60
+ role: 'user' | 'assistant';
61
+ content: {
62
+ type: 'text' | 'image' | 'resource';
63
+ text?: string;
64
+ data?: string;
65
+ mimeType?: string;
66
+ };
67
+ }
68
+ /**
69
+ * Parsed riotprompt:// URI
70
+ * Represents the structured components of a riotprompt URI
71
+ */
72
+ export interface RiotPromptUri {
73
+ scheme: 'riotprompt';
74
+ type: 'config' | 'prompt' | 'templates' | 'version';
75
+ path?: string;
76
+ query?: Record<string, string>;
77
+ }
78
+ /**
79
+ * Tool Execution Context
80
+ * Provides context for tool execution
81
+ */
82
+ export interface ToolExecutionContext {
83
+ workingDirectory: string;
84
+ config?: any;
85
+ logger?: any;
86
+ sendNotification?: (notification: {
87
+ method: string;
88
+ params: {
89
+ progressToken?: string | number;
90
+ progress: number;
91
+ total?: number;
92
+ message?: string;
93
+ };
94
+ }) => Promise<void>;
95
+ progressToken?: string | number;
96
+ }
97
+ /**
98
+ * Tool Result
99
+ * Standard result format for tool execution
100
+ */
101
+ export interface ToolResult {
102
+ success: boolean;
103
+ data?: any;
104
+ error?: string;
105
+ message?: string;
106
+ context?: Record<string, any>;
107
+ recovery?: string[];
108
+ details?: {
109
+ stdout?: string;
110
+ stderr?: string;
111
+ exitCode?: number;
112
+ files?: string[];
113
+ phase?: string;
114
+ };
115
+ logs?: string[];
116
+ }
117
+ /**
118
+ * Configuration Resource
119
+ * Result of reading a riotprompt configuration
120
+ */
121
+ export interface ConfigResource {
122
+ path: string;
123
+ exists: boolean;
124
+ config?: any;
125
+ }
126
+ /**
127
+ * Prompt Resource
128
+ * Result of reading a prompt structure
129
+ */
130
+ export interface PromptResource {
131
+ path: string;
132
+ name: string;
133
+ structure: {
134
+ hasPersona: boolean;
135
+ hasInstructions: boolean;
136
+ hasContext: boolean;
137
+ contextFiles?: string[];
138
+ };
139
+ }
140
+ /**
141
+ * Templates Resource
142
+ * Result of reading registered templates
143
+ */
144
+ export interface TemplatesResource {
145
+ templates: Array<{
146
+ name: string;
147
+ description?: string;
148
+ }>;
149
+ }
150
+ /**
151
+ * Version Resource
152
+ * Result of reading riotprompt version information
153
+ */
154
+ export interface VersionResource {
155
+ version: string;
156
+ name: string;
157
+ }