veryfront 0.1.141 → 0.1.142
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/esm/cli/mcp/jsonrpc.d.ts +33 -1
- package/esm/cli/mcp/jsonrpc.d.ts.map +1 -1
- package/esm/cli/mcp/jsonrpc.js +63 -4
- package/esm/cli/mcp/remote-file-tools.d.ts.map +1 -1
- package/esm/cli/mcp/remote-file-tools.js +39 -0
- package/esm/cli/mcp/server.d.ts.map +1 -1
- package/esm/cli/mcp/server.js +57 -34
- package/esm/cli/mcp/standalone.d.ts.map +1 -1
- package/esm/cli/mcp/standalone.js +24 -11
- package/esm/cli/mcp/tools/catalog-tools.d.ts.map +1 -1
- package/esm/cli/mcp/tools/catalog-tools.js +15 -5
- package/esm/cli/mcp/tools/cicd-tools.d.ts.map +1 -1
- package/esm/cli/mcp/tools/cicd-tools.js +8 -0
- package/esm/cli/mcp/tools/dev-tools.d.ts.map +1 -1
- package/esm/cli/mcp/tools/dev-tools.js +32 -10
- package/esm/cli/mcp/tools/introspection-tools.d.ts.map +1 -1
- package/esm/cli/mcp/tools/introspection-tools.js +6 -2
- package/esm/cli/mcp/tools/project-tools.d.ts.map +1 -1
- package/esm/cli/mcp/tools/project-tools.js +12 -4
- package/esm/cli/mcp/tools/scaffold-tools.d.ts.map +1 -1
- package/esm/cli/mcp/tools/scaffold-tools.js +6 -2
- package/esm/cli/mcp/tools/skill-tools.d.ts.map +1 -1
- package/esm/cli/mcp/tools/skill-tools.js +6 -2
- package/esm/cli/mcp/tools.d.ts.map +1 -1
- package/esm/cli/mcp/tools.js +36 -16
- package/esm/deno.js +1 -1
- package/esm/src/agent/runtime/index.js +1 -1
- package/esm/src/agent/runtime/tool-helpers.d.ts.map +1 -1
- package/esm/src/agent/runtime/tool-helpers.js +59 -30
- package/esm/src/agent/schemas/agent.schema.d.ts +4 -4
- package/esm/src/channels/invoke.d.ts +4 -4
- package/esm/src/issues/mcp.d.ts.map +1 -1
- package/esm/src/issues/mcp.js +39 -10
- package/esm/src/mcp/index.d.ts +1 -1
- package/esm/src/mcp/index.d.ts.map +1 -1
- package/esm/src/mcp/server.d.ts.map +1 -1
- package/esm/src/mcp/server.js +85 -25
- package/esm/src/mcp/types.d.ts +22 -0
- package/esm/src/mcp/types.d.ts.map +1 -1
- package/esm/src/tool/types.d.ts +5 -0
- package/esm/src/tool/types.d.ts.map +1 -1
- package/esm/src/utils/version-constant.d.ts +1 -1
- package/esm/src/utils/version-constant.js +1 -1
- package/esm/src/workflow/schemas/workflow.schema.d.ts +6 -6
- package/package.json +1 -1
- package/src/cli/mcp/jsonrpc.ts +72 -4
- package/src/cli/mcp/remote-file-tools.ts +39 -0
- package/src/cli/mcp/server.ts +66 -33
- package/src/cli/mcp/standalone.ts +28 -10
- package/src/cli/mcp/tools/catalog-tools.ts +15 -5
- package/src/cli/mcp/tools/cicd-tools.ts +8 -0
- package/src/cli/mcp/tools/dev-tools.ts +34 -10
- package/src/cli/mcp/tools/introspection-tools.ts +7 -2
- package/src/cli/mcp/tools/project-tools.ts +12 -4
- package/src/cli/mcp/tools/scaffold-tools.ts +6 -2
- package/src/cli/mcp/tools/skill-tools.ts +6 -2
- package/src/cli/mcp/tools.ts +52 -16
- package/src/deno.js +1 -1
- package/src/src/agent/runtime/index.ts +1 -1
- package/src/src/agent/runtime/tool-helpers.ts +86 -36
- package/src/src/issues/mcp.ts +43 -10
- package/src/src/mcp/index.ts +7 -1
- package/src/src/mcp/server.ts +92 -31
- package/src/src/mcp/types.ts +24 -0
- package/src/src/tool/types.ts +7 -0
- package/src/src/utils/version-constant.ts +1 -1
package/esm/src/issues/mcp.js
CHANGED
|
@@ -31,8 +31,11 @@ const issuesCreateInput = createIssueSchema.extend({
|
|
|
31
31
|
}).merge(projectDirSchema);
|
|
32
32
|
const issuesCreate = {
|
|
33
33
|
name: "issues_create",
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
title: "Create Issue",
|
|
35
|
+
annotations: { readOnlyHint: false, destructiveHint: false, openWorldHint: false },
|
|
36
|
+
description: "Use this when you need to create a new issue, task, or plan as a markdown file. " +
|
|
37
|
+
"Use prefix 'TASK' for small work items, 'PLAN' for proposals/RFCs, 'ISSUE' for bugs/features. " +
|
|
38
|
+
"Returns the created issue. Do not use for updating — use issues_update instead.",
|
|
36
39
|
inputSchema: issuesCreateInput,
|
|
37
40
|
execute: async (input) => {
|
|
38
41
|
const manager = getManager(input.projectDir);
|
|
@@ -54,7 +57,9 @@ const issuesGetInput = projectDirSchema.extend({
|
|
|
54
57
|
});
|
|
55
58
|
const issuesGet = {
|
|
56
59
|
name: "issues_get",
|
|
57
|
-
|
|
60
|
+
title: "Get Issue",
|
|
61
|
+
annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false },
|
|
62
|
+
description: "Use this when you need to retrieve a specific issue by its ID. Returns the issue or null if not found. Do not use for listing — use issues_list instead.",
|
|
58
63
|
inputSchema: issuesGetInput,
|
|
59
64
|
execute: async (input) => {
|
|
60
65
|
const manager = getManager(input.projectDir);
|
|
@@ -75,8 +80,15 @@ const issuesUpdateInput = updateIssueSchema.extend({
|
|
|
75
80
|
}).merge(projectDirSchema);
|
|
76
81
|
const issuesUpdate = {
|
|
77
82
|
name: "issues_update",
|
|
78
|
-
|
|
79
|
-
|
|
83
|
+
title: "Update Issue",
|
|
84
|
+
annotations: {
|
|
85
|
+
readOnlyHint: false,
|
|
86
|
+
destructiveHint: false,
|
|
87
|
+
idempotentHint: true,
|
|
88
|
+
openWorldHint: false,
|
|
89
|
+
},
|
|
90
|
+
description: "Use this when you need to modify an existing issue. Only provided fields are updated. " +
|
|
91
|
+
"Returns the updated issue or null if not found. Do not use to close — use issues_close instead.",
|
|
80
92
|
inputSchema: issuesUpdateInput,
|
|
81
93
|
execute: async (input) => {
|
|
82
94
|
const manager = getManager(input.projectDir);
|
|
@@ -114,8 +126,10 @@ const issuesListInput = listIssuesSchema.extend({
|
|
|
114
126
|
}).merge(projectDirSchema);
|
|
115
127
|
const issuesList = {
|
|
116
128
|
name: "issues_list",
|
|
117
|
-
|
|
118
|
-
|
|
129
|
+
title: "List Issues",
|
|
130
|
+
annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false },
|
|
131
|
+
description: "Use this when you need to find issues matching criteria. " +
|
|
132
|
+
"Returns matching issues and total count. Do not use to get a single known issue — use issues_get instead.",
|
|
119
133
|
inputSchema: issuesListInput,
|
|
120
134
|
execute: async (input) => {
|
|
121
135
|
const manager = getManager(input.projectDir);
|
|
@@ -139,7 +153,14 @@ const issuesCloseInput = projectDirSchema.extend({
|
|
|
139
153
|
});
|
|
140
154
|
const issuesClose = {
|
|
141
155
|
name: "issues_close",
|
|
142
|
-
|
|
156
|
+
title: "Close Issue",
|
|
157
|
+
annotations: {
|
|
158
|
+
readOnlyHint: false,
|
|
159
|
+
destructiveHint: false,
|
|
160
|
+
idempotentHint: true,
|
|
161
|
+
openWorldHint: false,
|
|
162
|
+
},
|
|
163
|
+
description: "Use this when you need to close an issue. Returns the updated issue or null if not found. Do not use to delete — use issues_delete instead.",
|
|
143
164
|
inputSchema: issuesCloseInput,
|
|
144
165
|
execute: async (input) => {
|
|
145
166
|
const manager = getManager(input.projectDir);
|
|
@@ -154,8 +175,16 @@ const issuesDeleteInput = projectDirSchema.extend({
|
|
|
154
175
|
});
|
|
155
176
|
const issuesDelete = {
|
|
156
177
|
name: "issues_delete",
|
|
157
|
-
|
|
158
|
-
|
|
178
|
+
title: "Delete Issue",
|
|
179
|
+
annotations: {
|
|
180
|
+
readOnlyHint: false,
|
|
181
|
+
destructiveHint: true,
|
|
182
|
+
idempotentHint: true,
|
|
183
|
+
openWorldHint: false,
|
|
184
|
+
},
|
|
185
|
+
description: "Use this when you need to permanently delete an issue. Returns {deleted: true/false}. " +
|
|
186
|
+
"WARNING: this is irreversible and cannot be undone. Prefer issues_close unless permanent deletion is explicitly requested. " +
|
|
187
|
+
"Do not use to close — use issues_close instead.",
|
|
159
188
|
inputSchema: issuesDeleteInput,
|
|
160
189
|
execute: async (input) => {
|
|
161
190
|
const manager = getManager(input.projectDir);
|
package/esm/src/mcp/index.d.ts
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* ```
|
|
23
23
|
*/
|
|
24
24
|
import "../../_dnt.polyfills.js";
|
|
25
|
-
export type { MCPServerConfig, MCPStats, MCPTool } from "./types.js";
|
|
25
|
+
export type { MCPServerConfig, MCPStats, MCPTool, ToolAnnotations, ToolListEntry, } from "./types.js";
|
|
26
26
|
export { clearMCPRegistry, getMCPRegistry, getMCPStats, registerPrompt, registerResource, registerTool, } from "./registry.js";
|
|
27
27
|
export { createMCPServer, type IntegrationLoaderConfig, MCPServer } from "./server.js";
|
|
28
28
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/src/mcp/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,yBAAyB,CAAC;AAGjC,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/src/mcp/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,yBAAyB,CAAC;AAGjC,YAAY,EACV,eAAe,EACf,QAAQ,EACR,OAAO,EACP,eAAe,EACf,aAAa,GACd,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,WAAW,EACX,cAAc,EACd,gBAAgB,EAChB,YAAY,GACb,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,eAAe,EAAE,KAAK,uBAAuB,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../src/src/mcp/server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,qBAAqB,CAAC;AAG/C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAI7D,OAAO,KAAK,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../src/src/mcp/server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,qBAAqB,CAAC;AAG/C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAI7D,OAAO,KAAK,EAAE,eAAe,EAAiB,MAAM,YAAY,CAAC;AAMjE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAWzE,KAAK,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,EAAE,CAAC;AA4DzD,UAAU,cAAc;IACtB,OAAO,EAAE,KAAK,CAAC;IACf,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,aAAa,CAAC;CACxB;AAED,UAAU,eAAe;IACvB,OAAO,EAAE,KAAK,CAAC;IACf,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,OAAO,CAAC;KAChB,CAAC;CACH;AAED,MAAM,WAAW,uBAAuB;IACtC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,wBAAwB,GAAG,SAAS,CAAC,CAAC;IACnE,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAID,qBAAa,SAAS;IACpB,OAAO,CAAC,MAAM,CAAkB;IAChC,OAAO,CAAC,iBAAiB,CAAC,CAA0B;IACpD,OAAO,CAAC,kBAAkB,CAAS;gBAEvB,MAAM,EAAE,eAAe;IAQnC;;;;;;OAMG;IACH,oBAAoB,CAAC,MAAM,EAAE,uBAAuB,GAAG,IAAI;IAK3D,aAAa,CAAC,OAAO,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,eAAe,CAAC;IAmBhG,OAAO,CAAC,QAAQ;IAgChB,OAAO,CAAC,UAAU;YA0BJ,SAAS;IA6BvB,OAAO,CAAC,QAAQ;IAgDhB,OAAO,CAAC,aAAa;IAgBrB,OAAO,CAAC,YAAY;IA6CpB,OAAO,CAAC,WAAW;IAcnB,OAAO,CAAC,SAAS;IAuCjB,iBAAiB,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC;IAuD5E,OAAO,CAAC,qBAAqB;YAgBf,YAAY;IAsB1B,OAAO,CAAC,cAAc;YAqBR,0BAA0B;CAqBzC;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,eAAe,GAAG,SAAS,CAElE"}
|
package/esm/src/mcp/server.js
CHANGED
|
@@ -16,6 +16,29 @@ const MAX_CONTEXT_HEADER_LENGTH = 255;
|
|
|
16
16
|
const JSON_CONTENT_TYPE = "application/json";
|
|
17
17
|
const END_USER_ID_PATTERN = /^[a-zA-Z0-9._@-]+$/;
|
|
18
18
|
const PROJECT_ID_PATTERN = /^[a-zA-Z0-9._-]+$/;
|
|
19
|
+
class JsonRpcError extends Error {
|
|
20
|
+
code;
|
|
21
|
+
constructor(code, message) {
|
|
22
|
+
super(message);
|
|
23
|
+
this.code = code;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
function errorCode(error) {
|
|
27
|
+
if (typeof error === "object" && error !== null && "code" in error) {
|
|
28
|
+
const code = error.code;
|
|
29
|
+
if (typeof code === "number")
|
|
30
|
+
return code;
|
|
31
|
+
}
|
|
32
|
+
return -32603;
|
|
33
|
+
}
|
|
34
|
+
function errorMessage(error) {
|
|
35
|
+
if (error instanceof Error)
|
|
36
|
+
return error.message;
|
|
37
|
+
if (typeof error === "object" && error !== null && "message" in error) {
|
|
38
|
+
return String(error.message);
|
|
39
|
+
}
|
|
40
|
+
return String(error);
|
|
41
|
+
}
|
|
19
42
|
function toParamsRecord(params) {
|
|
20
43
|
if (!params || Array.isArray(params))
|
|
21
44
|
return {};
|
|
@@ -40,6 +63,7 @@ function readAllowedHeader(request, headerName, pattern) {
|
|
|
40
63
|
}
|
|
41
64
|
return value;
|
|
42
65
|
}
|
|
66
|
+
const MCP_SUPPORTED_VERSIONS = ["2025-11-25", "2024-11-05"];
|
|
43
67
|
export class MCPServer {
|
|
44
68
|
config;
|
|
45
69
|
integrationLoader;
|
|
@@ -71,10 +95,7 @@ export class MCPServer {
|
|
|
71
95
|
return {
|
|
72
96
|
jsonrpc: "2.0",
|
|
73
97
|
id: request.id,
|
|
74
|
-
error: {
|
|
75
|
-
code: -32603,
|
|
76
|
-
message: error instanceof Error ? error.message : String(error),
|
|
77
|
-
},
|
|
98
|
+
error: { code: errorCode(error), message: errorMessage(error) },
|
|
78
99
|
};
|
|
79
100
|
}
|
|
80
101
|
}, { "mcp.method": request.method });
|
|
@@ -95,6 +116,8 @@ export class MCPServer {
|
|
|
95
116
|
return this.getPrompt(params);
|
|
96
117
|
case "initialize":
|
|
97
118
|
return this.initialize(params);
|
|
119
|
+
case "notifications/initialized":
|
|
120
|
+
return Promise.resolve({});
|
|
98
121
|
default:
|
|
99
122
|
throw toError(createError({
|
|
100
123
|
type: "agent",
|
|
@@ -102,15 +125,26 @@ export class MCPServer {
|
|
|
102
125
|
}));
|
|
103
126
|
}
|
|
104
127
|
}
|
|
105
|
-
initialize(
|
|
128
|
+
initialize(params) {
|
|
129
|
+
const p = toParamsRecord(params);
|
|
130
|
+
const requested = typeof p.protocolVersion === "string" ? p.protocolVersion : undefined;
|
|
131
|
+
const negotiated = requested && MCP_SUPPORTED_VERSIONS.includes(requested)
|
|
132
|
+
? requested
|
|
133
|
+
: MCP_SUPPORTED_VERSIONS[0];
|
|
106
134
|
return Promise.resolve({
|
|
107
|
-
protocolVersion:
|
|
108
|
-
serverInfo: {
|
|
135
|
+
protocolVersion: negotiated,
|
|
136
|
+
serverInfo: {
|
|
137
|
+
name: "veryfront-mcp",
|
|
138
|
+
title: "Veryfront MCP Server",
|
|
139
|
+
version: VERSION,
|
|
140
|
+
description: "Veryfront development server tools for real-time errors, route preview, HMR control, and scaffolding",
|
|
141
|
+
},
|
|
109
142
|
capabilities: {
|
|
110
|
-
tools: {},
|
|
111
|
-
resources: { subscribe: true },
|
|
112
|
-
prompts: {},
|
|
143
|
+
tools: { listChanged: true },
|
|
144
|
+
resources: { subscribe: true, listChanged: true },
|
|
145
|
+
prompts: { listChanged: true },
|
|
113
146
|
},
|
|
147
|
+
instructions: "Veryfront MCP server provides development tools. Use vf_get_errors to check for code errors, vf_get_logs for server logs, vf_scaffold for code generation, and vf_get_project_context for project structure.",
|
|
114
148
|
});
|
|
115
149
|
}
|
|
116
150
|
async listTools() {
|
|
@@ -128,33 +162,54 @@ export class MCPServer {
|
|
|
128
162
|
for (const [id, tool] of registry.tools.entries()) {
|
|
129
163
|
if (tool.mcp?.enabled === false)
|
|
130
164
|
continue;
|
|
131
|
-
|
|
165
|
+
const entry = {
|
|
132
166
|
name: id,
|
|
133
167
|
description: tool.description,
|
|
134
168
|
inputSchema: tool.inputSchemaJson ?? zodToJsonSchema(tool.inputSchema),
|
|
135
|
-
}
|
|
169
|
+
};
|
|
170
|
+
if (tool.mcp?.title)
|
|
171
|
+
entry.title = tool.mcp.title;
|
|
172
|
+
if (tool.mcp?.annotations)
|
|
173
|
+
entry.annotations = tool.mcp.annotations;
|
|
174
|
+
tools.push(entry);
|
|
136
175
|
}
|
|
137
176
|
return { tools };
|
|
138
177
|
}
|
|
139
178
|
callTool(params, context) {
|
|
140
179
|
const { name, arguments: args } = toParamsRecord(params);
|
|
141
180
|
if (!name) {
|
|
142
|
-
throw toError(createError({
|
|
143
|
-
type: "agent",
|
|
144
|
-
message: "Tool name is required",
|
|
145
|
-
}));
|
|
181
|
+
throw toError(createError({ type: "agent", message: "Tool name is required" }));
|
|
146
182
|
}
|
|
147
183
|
const toolName = String(name);
|
|
184
|
+
const registry = getMCPRegistry();
|
|
185
|
+
const tool = registry.tools.get(toolName);
|
|
186
|
+
if (!tool) {
|
|
187
|
+
throw new JsonRpcError(-32602, `Unknown tool: ${toolName}`);
|
|
188
|
+
}
|
|
189
|
+
if (tool.inputSchema && typeof tool.inputSchema.parse === "function") {
|
|
190
|
+
try {
|
|
191
|
+
tool.inputSchema.parse(args ?? {});
|
|
192
|
+
}
|
|
193
|
+
catch (error) {
|
|
194
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
195
|
+
throw new JsonRpcError(-32602, `Invalid arguments for tool ${toolName}: ${message}`);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
148
198
|
return withSpan("mcp.callTool", async () => {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
{
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
199
|
+
try {
|
|
200
|
+
const result = await executeTool(toolName, args, context);
|
|
201
|
+
return {
|
|
202
|
+
content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
|
|
203
|
+
isError: false,
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
catch (error) {
|
|
207
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
208
|
+
return {
|
|
209
|
+
content: [{ type: "text", text: message }],
|
|
210
|
+
isError: true,
|
|
211
|
+
};
|
|
212
|
+
}
|
|
158
213
|
}, { "mcp.tool.name": toolName });
|
|
159
214
|
}
|
|
160
215
|
listResources() {
|
|
@@ -242,6 +297,11 @@ export class MCPServer {
|
|
|
242
297
|
if (request.method === "OPTIONS") {
|
|
243
298
|
return new dntShim.Response(null, { status: 204, headers: this.getCORSHeaders(requestOrigin) });
|
|
244
299
|
}
|
|
300
|
+
if (requestOrigin && this.config.cors?.enabled && this.config.cors.origins?.length) {
|
|
301
|
+
if (!this.config.cors.origins.includes(requestOrigin)) {
|
|
302
|
+
return createJSONRPCErrorResponse(403, -32600, "Forbidden: Origin not allowed");
|
|
303
|
+
}
|
|
304
|
+
}
|
|
245
305
|
if (this.config.auth?.type && this.config.auth.type !== "none") {
|
|
246
306
|
const authorized = await this.validateAuth(request);
|
|
247
307
|
if (!authorized)
|
package/esm/src/mcp/types.d.ts
CHANGED
|
@@ -2,6 +2,16 @@ import type { z } from "zod";
|
|
|
2
2
|
import type { Tool } from "../tool/index.js";
|
|
3
3
|
import type { Resource } from "../resource/index.js";
|
|
4
4
|
import type { Prompt } from "../prompt/index.js";
|
|
5
|
+
/**
|
|
6
|
+
* Behavioral hints for MCP clients (MCP 2025-11-25).
|
|
7
|
+
* Guides auto-approval, confirmation prompts, and caching.
|
|
8
|
+
*/
|
|
9
|
+
export interface ToolAnnotations {
|
|
10
|
+
readOnlyHint?: boolean;
|
|
11
|
+
destructiveHint?: boolean;
|
|
12
|
+
idempotentHint?: boolean;
|
|
13
|
+
openWorldHint?: boolean;
|
|
14
|
+
}
|
|
5
15
|
/**
|
|
6
16
|
* Generic MCP tool definition
|
|
7
17
|
*/
|
|
@@ -10,6 +20,18 @@ export interface MCPTool<TInput = any, TOutput = any> {
|
|
|
10
20
|
description: string;
|
|
11
21
|
inputSchema: z.ZodType<TInput, any, any>;
|
|
12
22
|
execute: (input: TInput) => Promise<TOutput>;
|
|
23
|
+
title?: string;
|
|
24
|
+
annotations?: ToolAnnotations;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Wire format for a single tool in a tools/list response.
|
|
28
|
+
*/
|
|
29
|
+
export interface ToolListEntry {
|
|
30
|
+
name: string;
|
|
31
|
+
description: string;
|
|
32
|
+
inputSchema: unknown;
|
|
33
|
+
title?: string;
|
|
34
|
+
annotations?: ToolAnnotations;
|
|
13
35
|
}
|
|
14
36
|
export interface MCPRegistry {
|
|
15
37
|
tools: Map<string, Tool>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/src/mcp/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjD;;GAEG;AAEH,MAAM,WAAW,OAAO,CAAC,MAAM,GAAG,GAAG,EAAE,OAAO,GAAG,GAAG;IAClD,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IAEpB,WAAW,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IACzC,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/src/mcp/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjD;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;GAEG;AAEH,MAAM,WAAW,OAAO,CAAC,MAAM,GAAG,GAAG,EAAE,OAAO,GAAG,GAAG;IAClD,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IAEpB,WAAW,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IACzC,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,eAAe,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,eAAe,CAAC;CAC/B;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACzB,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IACjC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9B;AAGD,YAAY,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC"}
|
package/esm/src/tool/types.d.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import type { z } from "zod";
|
|
5
5
|
import type { JsonSchema } from "./schema/json-schema.js";
|
|
6
6
|
import type { BlobStorage } from "../workflow/blob/types.js";
|
|
7
|
+
import type { ToolAnnotations } from "../mcp/types.js";
|
|
7
8
|
/**
|
|
8
9
|
* Tool configuration options
|
|
9
10
|
*/
|
|
@@ -31,6 +32,10 @@ export interface ToolConfig<TInput = any, TOutput = any> {
|
|
|
31
32
|
requiresAuth?: boolean;
|
|
32
33
|
/** Cache policy */
|
|
33
34
|
cachePolicy?: "no-cache" | "cache" | "cache-first";
|
|
35
|
+
/** Human-readable title for display */
|
|
36
|
+
title?: string;
|
|
37
|
+
/** Behavioral hints for clients (MCP 2025-11-25) */
|
|
38
|
+
annotations?: ToolAnnotations;
|
|
34
39
|
};
|
|
35
40
|
}
|
|
36
41
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/src/tool/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE7D;;GAEG;AAEH,MAAM,WAAW,UAAU,CAAC,MAAM,GAAG,GAAG,EAAE,OAAO,GAAG,GAAG;IACrD,yDAAyD;IACzD,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ,wCAAwC;IACxC,WAAW,EAAE,MAAM,CAAC;IAEpB,gCAAgC;IAChC,WAAW,EAAE,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAEjC;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B;;OAEG;IACH,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,oBAAoB,KAAK,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;IAEvF,wBAAwB;IACxB,GAAG,CAAC,EAAE;QACJ,qBAAqB;QACrB,OAAO,CAAC,EAAE,OAAO,CAAC;QAElB,6BAA6B;QAC7B,YAAY,CAAC,EAAE,OAAO,CAAC;QAEvB,mBAAmB;QACnB,WAAW,CAAC,EAAE,UAAU,GAAG,OAAO,GAAG,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/src/tool/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEvD;;GAEG;AAEH,MAAM,WAAW,UAAU,CAAC,MAAM,GAAG,GAAG,EAAE,OAAO,GAAG,GAAG;IACrD,yDAAyD;IACzD,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ,wCAAwC;IACxC,WAAW,EAAE,MAAM,CAAC;IAEpB,gCAAgC;IAChC,WAAW,EAAE,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAEjC;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B;;OAEG;IACH,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,oBAAoB,KAAK,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;IAEvF,wBAAwB;IACxB,GAAG,CAAC,EAAE;QACJ,qBAAqB;QACrB,OAAO,CAAC,EAAE,OAAO,CAAC;QAElB,6BAA6B;QAC7B,YAAY,CAAC,EAAE,OAAO,CAAC;QAEvB,mBAAmB;QACnB,WAAW,CAAC,EAAE,UAAU,GAAG,OAAO,GAAG,aAAa,CAAC;QAEnD,uCAAuC;QACvC,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,oDAAoD;QACpD,WAAW,CAAC,EAAE,eAAe,CAAC;KAC/B,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,gDAAgD;IAChD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,4DAA4D;IAC5D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2EAA2E;IAC3E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yBAAyB;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,sDAAsD;IACtD,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAED;;;;GAIG;AACH,KAAK,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC;AAEvC;;GAEG;AAEH,MAAM,WAAW,IAAI,CAAC,MAAM,GAAG,GAAG,EAAE,OAAO,GAAG,GAAG;IAC/C,cAAc;IACd,EAAE,EAAE,MAAM,CAAC;IACX,2FAA2F;IAC3F,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAEhC;;;;OAIG;IACH,IAAI,EAAE,QAAQ,CAAC;IAEf,uBAAuB;IACvB,WAAW,EAAE,MAAM,CAAC;IAEpB,yBAAyB;IACzB,WAAW,EAAE,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAEjC;;;OAGG;IACH,eAAe,CAAC,EAAE,UAAU,CAAC;IAE7B;;OAEG;IACH,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,oBAAoB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAE7E,wBAAwB;IACxB,GAAG,CAAC,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,UAAU,CAAC;CACxB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.1.
|
|
1
|
+
export declare const VERSION = "0.1.142";
|
|
2
2
|
//# sourceMappingURL=version-constant.d.ts.map
|
|
@@ -10,8 +10,8 @@ import { z } from "zod";
|
|
|
10
10
|
export declare const WorkflowStatusSchema: z.ZodEnum<{
|
|
11
11
|
waiting: "waiting";
|
|
12
12
|
failed: "failed";
|
|
13
|
-
completed: "completed";
|
|
14
13
|
pending: "pending";
|
|
14
|
+
completed: "completed";
|
|
15
15
|
running: "running";
|
|
16
16
|
cancelled: "cancelled";
|
|
17
17
|
}>;
|
|
@@ -21,8 +21,8 @@ export declare const WorkflowStatusSchema: z.ZodEnum<{
|
|
|
21
21
|
export declare const NodeStatusSchema: z.ZodEnum<{
|
|
22
22
|
skipped: "skipped";
|
|
23
23
|
failed: "failed";
|
|
24
|
-
completed: "completed";
|
|
25
24
|
pending: "pending";
|
|
25
|
+
completed: "completed";
|
|
26
26
|
running: "running";
|
|
27
27
|
}>;
|
|
28
28
|
/**
|
|
@@ -76,8 +76,8 @@ export declare const NodeStateSchema: z.ZodObject<{
|
|
|
76
76
|
status: z.ZodEnum<{
|
|
77
77
|
skipped: "skipped";
|
|
78
78
|
failed: "failed";
|
|
79
|
-
completed: "completed";
|
|
80
79
|
pending: "pending";
|
|
80
|
+
completed: "completed";
|
|
81
81
|
running: "running";
|
|
82
82
|
}>;
|
|
83
83
|
input: z.ZodOptional<z.ZodUnknown>;
|
|
@@ -108,8 +108,8 @@ export declare const CheckpointSchema: z.ZodObject<{
|
|
|
108
108
|
status: z.ZodEnum<{
|
|
109
109
|
skipped: "skipped";
|
|
110
110
|
failed: "failed";
|
|
111
|
-
completed: "completed";
|
|
112
111
|
pending: "pending";
|
|
112
|
+
completed: "completed";
|
|
113
113
|
running: "running";
|
|
114
114
|
}>;
|
|
115
115
|
input: z.ZodOptional<z.ZodUnknown>;
|
|
@@ -184,15 +184,15 @@ export declare const RunFilterSchema: z.ZodObject<{
|
|
|
184
184
|
status: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
185
185
|
waiting: "waiting";
|
|
186
186
|
failed: "failed";
|
|
187
|
-
completed: "completed";
|
|
188
187
|
pending: "pending";
|
|
188
|
+
completed: "completed";
|
|
189
189
|
running: "running";
|
|
190
190
|
cancelled: "cancelled";
|
|
191
191
|
}>, z.ZodArray<z.ZodEnum<{
|
|
192
192
|
waiting: "waiting";
|
|
193
193
|
failed: "failed";
|
|
194
|
-
completed: "completed";
|
|
195
194
|
pending: "pending";
|
|
195
|
+
completed: "completed";
|
|
196
196
|
running: "running";
|
|
197
197
|
cancelled: "cancelled";
|
|
198
198
|
}>>]>>;
|
package/package.json
CHANGED
package/src/cli/mcp/jsonrpc.ts
CHANGED
|
@@ -43,6 +43,18 @@ export const JSONRPC_ERRORS = {
|
|
|
43
43
|
INTERNAL_ERROR: -32603,
|
|
44
44
|
} as const;
|
|
45
45
|
|
|
46
|
+
/**
|
|
47
|
+
* Error with a JSON-RPC error code attached.
|
|
48
|
+
* Preserves stack traces unlike throwing plain objects.
|
|
49
|
+
*/
|
|
50
|
+
export class JsonRpcError extends Error {
|
|
51
|
+
readonly code: number;
|
|
52
|
+
constructor(code: number, message: string) {
|
|
53
|
+
super(message);
|
|
54
|
+
this.code = code;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
46
58
|
/**
|
|
47
59
|
* Create a JSON-RPC parse error response
|
|
48
60
|
*/
|
|
@@ -70,15 +82,71 @@ export function successResponse(id: string | number | undefined, result: unknown
|
|
|
70
82
|
export function errorResponse(
|
|
71
83
|
id: string | number | undefined,
|
|
72
84
|
e: unknown,
|
|
73
|
-
code
|
|
85
|
+
code?: number,
|
|
74
86
|
): JSONRPCResponse {
|
|
87
|
+
const errorCode = typeof e === "object" && e !== null && "code" in e
|
|
88
|
+
? (e as { code: unknown }).code
|
|
89
|
+
: undefined;
|
|
90
|
+
const resolvedCode = code ??
|
|
91
|
+
(typeof errorCode === "number" ? errorCode : JSONRPC_ERRORS.INTERNAL_ERROR);
|
|
92
|
+
const message = e instanceof Error
|
|
93
|
+
? e.message
|
|
94
|
+
: typeof e === "object" && e !== null && "message" in e
|
|
95
|
+
? String((e as { message: unknown }).message)
|
|
96
|
+
: String(e);
|
|
75
97
|
return {
|
|
76
98
|
jsonrpc: "2.0",
|
|
77
99
|
id,
|
|
78
|
-
error: {
|
|
79
|
-
|
|
80
|
-
|
|
100
|
+
error: { code: resolvedCode, message },
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Supported MCP protocol versions (newest first).
|
|
106
|
+
* Shared across all CLI MCP servers so the version list is maintained in one place.
|
|
107
|
+
*/
|
|
108
|
+
export const MCP_SUPPORTED_VERSIONS: [string, ...string[]] = ["2025-11-25", "2024-11-05"];
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Safely extract a record from unknown params (mirrors src/mcp toParamsRecord).
|
|
112
|
+
*/
|
|
113
|
+
export function toParamsRecord(params: unknown): Record<string, unknown> {
|
|
114
|
+
if (params && typeof params === "object" && !Array.isArray(params)) {
|
|
115
|
+
return params as Record<string, unknown>;
|
|
116
|
+
}
|
|
117
|
+
return {};
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Negotiate MCP protocol version: echo the client's version if supported,
|
|
122
|
+
* otherwise fall back to the newest supported version.
|
|
123
|
+
*/
|
|
124
|
+
export function negotiateVersion(params: unknown): string {
|
|
125
|
+
const p = toParamsRecord(params);
|
|
126
|
+
const requested = typeof p.protocolVersion === "string" ? p.protocolVersion : undefined;
|
|
127
|
+
return requested && MCP_SUPPORTED_VERSIONS.includes(requested)
|
|
128
|
+
? requested
|
|
129
|
+
: MCP_SUPPORTED_VERSIONS[0];
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Build a complete MCP initialize result with negotiated version,
|
|
134
|
+
* capabilities, serverInfo, and instructions.
|
|
135
|
+
*/
|
|
136
|
+
export function buildInitializeResult(
|
|
137
|
+
params: unknown,
|
|
138
|
+
serverInfo: { name: string; title: string; version: string; description: string },
|
|
139
|
+
instructions: string,
|
|
140
|
+
): Record<string, unknown> {
|
|
141
|
+
return {
|
|
142
|
+
protocolVersion: negotiateVersion(params),
|
|
143
|
+
capabilities: {
|
|
144
|
+
tools: { listChanged: true },
|
|
145
|
+
resources: { listChanged: true },
|
|
146
|
+
prompts: { listChanged: true },
|
|
81
147
|
},
|
|
148
|
+
serverInfo,
|
|
149
|
+
instructions,
|
|
82
150
|
};
|
|
83
151
|
}
|
|
84
152
|
|
|
@@ -200,6 +200,8 @@ interface RemoteListFilesOutput {
|
|
|
200
200
|
|
|
201
201
|
export const vfRemoteListFiles: MCPTool<RemoteListFilesInput, RemoteListFilesOutput> = {
|
|
202
202
|
name: "vf_remote_list_files",
|
|
203
|
+
title: "List Remote Files",
|
|
204
|
+
annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false },
|
|
203
205
|
description:
|
|
204
206
|
"List files in a remote Veryfront project. Returns file paths, types, and sizes. Use this to explore a project's structure.",
|
|
205
207
|
inputSchema: remoteListFilesInput,
|
|
@@ -249,6 +251,8 @@ interface RemoteGetFileOutput {
|
|
|
249
251
|
|
|
250
252
|
export const vfRemoteGetFile: MCPTool<RemoteGetFileInput, RemoteGetFileOutput> = {
|
|
251
253
|
name: "vf_remote_get_file",
|
|
254
|
+
title: "Get Remote File",
|
|
255
|
+
annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false },
|
|
252
256
|
description:
|
|
253
257
|
"Read the content of a file from a remote Veryfront project. Always use this before modifying a file.",
|
|
254
258
|
inputSchema: remoteGetFileInput,
|
|
@@ -296,6 +300,13 @@ interface RemoteUpdateFileOutput {
|
|
|
296
300
|
|
|
297
301
|
export const vfRemoteUpdateFile: MCPTool<RemoteUpdateFileInput, RemoteUpdateFileOutput> = {
|
|
298
302
|
name: "vf_remote_update_file",
|
|
303
|
+
title: "Update Remote File",
|
|
304
|
+
annotations: {
|
|
305
|
+
readOnlyHint: false,
|
|
306
|
+
destructiveHint: true,
|
|
307
|
+
idempotentHint: true,
|
|
308
|
+
openWorldHint: false,
|
|
309
|
+
},
|
|
299
310
|
description:
|
|
300
311
|
"Create or update a file in a remote Veryfront project. Always read the file first before updating to understand its current state.",
|
|
301
312
|
inputSchema: remoteUpdateFileInput,
|
|
@@ -341,6 +352,13 @@ interface RemoteDeleteFileOutput {
|
|
|
341
352
|
|
|
342
353
|
export const vfRemoteDeleteFile: MCPTool<RemoteDeleteFileInput, RemoteDeleteFileOutput> = {
|
|
343
354
|
name: "vf_remote_delete_file",
|
|
355
|
+
title: "Delete Remote File",
|
|
356
|
+
annotations: {
|
|
357
|
+
readOnlyHint: false,
|
|
358
|
+
destructiveHint: true,
|
|
359
|
+
idempotentHint: true,
|
|
360
|
+
openWorldHint: false,
|
|
361
|
+
},
|
|
344
362
|
description: "Delete a file from a remote Veryfront project.",
|
|
345
363
|
inputSchema: remoteDeleteFileInput,
|
|
346
364
|
execute: async (input) => {
|
|
@@ -378,6 +396,8 @@ interface RemoteSearchFilesOutput {
|
|
|
378
396
|
|
|
379
397
|
export const vfRemoteSearchFiles: MCPTool<RemoteSearchFilesInput, RemoteSearchFilesOutput> = {
|
|
380
398
|
name: "vf_remote_search_files",
|
|
399
|
+
title: "Search Remote Files",
|
|
400
|
+
annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false },
|
|
381
401
|
description:
|
|
382
402
|
"Search for text patterns within file contents in a remote Veryfront project. Supports regex and glob patterns.",
|
|
383
403
|
inputSchema: remoteSearchFilesInput,
|
|
@@ -430,6 +450,8 @@ interface RemoteMoveFileOutput {
|
|
|
430
450
|
|
|
431
451
|
export const vfRemoteMoveFile: MCPTool<RemoteMoveFileInput, RemoteMoveFileOutput> = {
|
|
432
452
|
name: "vf_remote_move_file",
|
|
453
|
+
title: "Move Remote File",
|
|
454
|
+
annotations: { readOnlyHint: false, destructiveHint: false, openWorldHint: false },
|
|
433
455
|
description: "Move or rename a file in a remote Veryfront project.",
|
|
434
456
|
inputSchema: remoteMoveFileInput,
|
|
435
457
|
execute: async (input) => {
|
|
@@ -477,6 +499,8 @@ interface RemoteListBranchesOutput {
|
|
|
477
499
|
|
|
478
500
|
export const vfRemoteListBranches: MCPTool<RemoteListBranchesInput, RemoteListBranchesOutput> = {
|
|
479
501
|
name: "vf_remote_list_branches",
|
|
502
|
+
title: "List Remote Branches",
|
|
503
|
+
annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false },
|
|
480
504
|
description: "List branches in a remote Veryfront project.",
|
|
481
505
|
inputSchema: remoteListBranchesInput,
|
|
482
506
|
execute: async (input) => {
|
|
@@ -514,6 +538,8 @@ interface RemoteCreateBranchOutput {
|
|
|
514
538
|
|
|
515
539
|
export const vfRemoteCreateBranch: MCPTool<RemoteCreateBranchInput, RemoteCreateBranchOutput> = {
|
|
516
540
|
name: "vf_remote_create_branch",
|
|
541
|
+
title: "Create Remote Branch",
|
|
542
|
+
annotations: { readOnlyHint: false, destructiveHint: false, openWorldHint: false },
|
|
517
543
|
description:
|
|
518
544
|
"Create a new branch in a remote Veryfront project. Branch from main by default, or specify a base branch.",
|
|
519
545
|
inputSchema: remoteCreateBranchInput,
|
|
@@ -552,6 +578,8 @@ interface RemoteMergeBranchOutput {
|
|
|
552
578
|
|
|
553
579
|
export const vfRemoteMergeBranch: MCPTool<RemoteMergeBranchInput, RemoteMergeBranchOutput> = {
|
|
554
580
|
name: "vf_remote_merge_branch",
|
|
581
|
+
title: "Merge Remote Branch",
|
|
582
|
+
annotations: { readOnlyHint: false, destructiveHint: true, openWorldHint: false },
|
|
555
583
|
description: "Merge a branch into the target branch (or main if not specified).",
|
|
556
584
|
inputSchema: remoteMergeBranchInput,
|
|
557
585
|
execute: async (input) => {
|
|
@@ -596,6 +624,13 @@ interface RemoteDeleteBranchOutput {
|
|
|
596
624
|
|
|
597
625
|
export const vfRemoteDeleteBranch: MCPTool<RemoteDeleteBranchInput, RemoteDeleteBranchOutput> = {
|
|
598
626
|
name: "vf_remote_delete_branch",
|
|
627
|
+
title: "Delete Remote Branch",
|
|
628
|
+
annotations: {
|
|
629
|
+
readOnlyHint: false,
|
|
630
|
+
destructiveHint: true,
|
|
631
|
+
idempotentHint: true,
|
|
632
|
+
openWorldHint: false,
|
|
633
|
+
},
|
|
599
634
|
description: "Delete a branch from a remote Veryfront project.",
|
|
600
635
|
inputSchema: remoteDeleteBranchInput,
|
|
601
636
|
execute: async (input) => {
|
|
@@ -633,6 +668,8 @@ interface RemoteCreateProjectOutput {
|
|
|
633
668
|
|
|
634
669
|
export const vfRemoteCreateProject: MCPTool<RemoteCreateProjectInput, RemoteCreateProjectOutput> = {
|
|
635
670
|
name: "vf_remote_create_project",
|
|
671
|
+
title: "Create Remote Project",
|
|
672
|
+
annotations: { readOnlyHint: false, destructiveHint: false, openWorldHint: false },
|
|
636
673
|
description: "Create a new Veryfront project. Returns the project details including ID and slug.",
|
|
637
674
|
inputSchema: remoteCreateProjectInput,
|
|
638
675
|
execute: async (input) => {
|
|
@@ -671,6 +708,8 @@ interface RemoteCloneProjectOutput {
|
|
|
671
708
|
|
|
672
709
|
export const vfRemoteCloneProject: MCPTool<RemoteCloneProjectInput, RemoteCloneProjectOutput> = {
|
|
673
710
|
name: "vf_remote_clone_project",
|
|
711
|
+
title: "Clone Remote Project",
|
|
712
|
+
annotations: { readOnlyHint: false, destructiveHint: false, openWorldHint: false },
|
|
674
713
|
description:
|
|
675
714
|
"Clone a Veryfront project by creating a new project and copying all files from the source.",
|
|
676
715
|
inputSchema: remoteCloneProjectInput,
|