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.
Files changed (66) hide show
  1. package/esm/cli/mcp/jsonrpc.d.ts +33 -1
  2. package/esm/cli/mcp/jsonrpc.d.ts.map +1 -1
  3. package/esm/cli/mcp/jsonrpc.js +63 -4
  4. package/esm/cli/mcp/remote-file-tools.d.ts.map +1 -1
  5. package/esm/cli/mcp/remote-file-tools.js +39 -0
  6. package/esm/cli/mcp/server.d.ts.map +1 -1
  7. package/esm/cli/mcp/server.js +57 -34
  8. package/esm/cli/mcp/standalone.d.ts.map +1 -1
  9. package/esm/cli/mcp/standalone.js +24 -11
  10. package/esm/cli/mcp/tools/catalog-tools.d.ts.map +1 -1
  11. package/esm/cli/mcp/tools/catalog-tools.js +15 -5
  12. package/esm/cli/mcp/tools/cicd-tools.d.ts.map +1 -1
  13. package/esm/cli/mcp/tools/cicd-tools.js +8 -0
  14. package/esm/cli/mcp/tools/dev-tools.d.ts.map +1 -1
  15. package/esm/cli/mcp/tools/dev-tools.js +32 -10
  16. package/esm/cli/mcp/tools/introspection-tools.d.ts.map +1 -1
  17. package/esm/cli/mcp/tools/introspection-tools.js +6 -2
  18. package/esm/cli/mcp/tools/project-tools.d.ts.map +1 -1
  19. package/esm/cli/mcp/tools/project-tools.js +12 -4
  20. package/esm/cli/mcp/tools/scaffold-tools.d.ts.map +1 -1
  21. package/esm/cli/mcp/tools/scaffold-tools.js +6 -2
  22. package/esm/cli/mcp/tools/skill-tools.d.ts.map +1 -1
  23. package/esm/cli/mcp/tools/skill-tools.js +6 -2
  24. package/esm/cli/mcp/tools.d.ts.map +1 -1
  25. package/esm/cli/mcp/tools.js +36 -16
  26. package/esm/deno.js +1 -1
  27. package/esm/src/agent/runtime/index.js +1 -1
  28. package/esm/src/agent/runtime/tool-helpers.d.ts.map +1 -1
  29. package/esm/src/agent/runtime/tool-helpers.js +59 -30
  30. package/esm/src/agent/schemas/agent.schema.d.ts +4 -4
  31. package/esm/src/channels/invoke.d.ts +4 -4
  32. package/esm/src/issues/mcp.d.ts.map +1 -1
  33. package/esm/src/issues/mcp.js +39 -10
  34. package/esm/src/mcp/index.d.ts +1 -1
  35. package/esm/src/mcp/index.d.ts.map +1 -1
  36. package/esm/src/mcp/server.d.ts.map +1 -1
  37. package/esm/src/mcp/server.js +85 -25
  38. package/esm/src/mcp/types.d.ts +22 -0
  39. package/esm/src/mcp/types.d.ts.map +1 -1
  40. package/esm/src/tool/types.d.ts +5 -0
  41. package/esm/src/tool/types.d.ts.map +1 -1
  42. package/esm/src/utils/version-constant.d.ts +1 -1
  43. package/esm/src/utils/version-constant.js +1 -1
  44. package/esm/src/workflow/schemas/workflow.schema.d.ts +6 -6
  45. package/package.json +1 -1
  46. package/src/cli/mcp/jsonrpc.ts +72 -4
  47. package/src/cli/mcp/remote-file-tools.ts +39 -0
  48. package/src/cli/mcp/server.ts +66 -33
  49. package/src/cli/mcp/standalone.ts +28 -10
  50. package/src/cli/mcp/tools/catalog-tools.ts +15 -5
  51. package/src/cli/mcp/tools/cicd-tools.ts +8 -0
  52. package/src/cli/mcp/tools/dev-tools.ts +34 -10
  53. package/src/cli/mcp/tools/introspection-tools.ts +7 -2
  54. package/src/cli/mcp/tools/project-tools.ts +12 -4
  55. package/src/cli/mcp/tools/scaffold-tools.ts +6 -2
  56. package/src/cli/mcp/tools/skill-tools.ts +6 -2
  57. package/src/cli/mcp/tools.ts +52 -16
  58. package/src/deno.js +1 -1
  59. package/src/src/agent/runtime/index.ts +1 -1
  60. package/src/src/agent/runtime/tool-helpers.ts +86 -36
  61. package/src/src/issues/mcp.ts +43 -10
  62. package/src/src/mcp/index.ts +7 -1
  63. package/src/src/mcp/server.ts +92 -31
  64. package/src/src/mcp/types.ts +24 -0
  65. package/src/src/tool/types.ts +7 -0
  66. package/src/src/utils/version-constant.ts +1 -1
@@ -15,11 +15,18 @@ const hotReloadInput = z.object({
15
15
  file: z
16
16
  .string()
17
17
  .optional()
18
- .describe("Specific file to trigger reload for (optional - reloads all if not specified)"),
18
+ .describe("Specific file to trigger reload for. Example: 'app/page.tsx'. Omit to reload all."),
19
19
  });
20
20
  export const vfHotReload = {
21
21
  name: "vf_hot_reload",
22
- description: "Trigger a hot reload of the dev server. Use after making changes to see them instantly.",
22
+ title: "Hot Reload",
23
+ annotations: {
24
+ readOnlyHint: false,
25
+ destructiveHint: false,
26
+ idempotentHint: true,
27
+ openWorldHint: false,
28
+ },
29
+ description: "Use this when you need to signal that a hot reload should occur. Note: currently a no-op stub that returns success without triggering an actual reload. For file-level HMR that sends a WebSocket update, use vf_trigger_hmr instead.",
23
30
  inputSchema: hotReloadInput,
24
31
  execute: () => Promise.resolve({
25
32
  success: true,
@@ -39,7 +46,9 @@ const getDebugContextInput = z.object({
39
46
  });
40
47
  export const vfGetDebugContext = {
41
48
  name: "vf_get_debug_context",
42
- description: "Get the current server context including project info, environment, and mode. Useful for debugging server configuration issues.",
49
+ title: "Debug Context",
50
+ annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false },
51
+ description: "Use this when you need the dev server's debug context including project slug, environment, request context mode, and multi-project configuration. Returns project info and server mode. Do not use for error details — use vf_get_errors instead.",
43
52
  inputSchema: getDebugContextInput,
44
53
  execute: (input) => withSpan("cli.mcp.tool.vf_get_debug_context", async () => {
45
54
  const host = input.project ? `${input.project}.veryfront.me` : "veryfront.me";
@@ -72,12 +81,19 @@ export const vfGetDebugContext = {
72
81
  // Tool: vf_trigger_hmr
73
82
  // ============================================================================
74
83
  const triggerHmrInput = z.object({
75
- path: z.string().describe("File path that changed (e.g., 'app/page.tsx')"),
84
+ path: z.string().describe("File path that changed. Example: 'app/page.tsx'."),
76
85
  port: z.number().int().min(1).max(65535).optional().default(8080).describe("Dev server port (defaults to 8080)"),
77
86
  });
78
87
  export const vfTriggerHmr = {
79
88
  name: "vf_trigger_hmr",
80
- description: "Trigger Hot Module Replacement for a specific file. The browser will update without a full reload.",
89
+ title: "Trigger HMR",
90
+ annotations: {
91
+ readOnlyHint: false,
92
+ destructiveHint: false,
93
+ idempotentHint: true,
94
+ openWorldHint: false,
95
+ },
96
+ description: "Use this when you need to force an HMR update for a specific file path. Sends a WebSocket reload notification to connected browsers. Returns success status and active listener count. Do not use if no browser is connected — check vf_get_flywheel_status first.",
81
97
  inputSchema: triggerHmrInput,
82
98
  execute: (input) => {
83
99
  const metrics = ReloadNotifier.getMetrics();
@@ -98,17 +114,19 @@ export const vfTriggerHmr = {
98
114
  // Tool: vf_preview_route
99
115
  // ============================================================================
100
116
  const previewRouteInput = z.object({
101
- route: z.string().startsWith("/", "Route must start with /").describe("Route path to preview (e.g., '/', '/dashboard', '/api/users')"),
117
+ route: z.string().startsWith("/", "Route must start with /").describe("Route path to preview. Example: '/', '/dashboard', '/api/users'."),
102
118
  port: z.number().int().min(1).max(65535).optional().default(8080).describe("Dev server port (defaults to 8080)"),
103
119
  format: z
104
120
  .enum(["html", "json", "status"])
105
121
  .optional()
106
122
  .default("status")
107
- .describe("Output format: html (full page), json (API response), status (just HTTP status)"),
123
+ .describe("Output format: 'html' for full page, 'json' for API response, 'status' for just HTTP status. Defaults to 'status'."),
108
124
  });
109
125
  export const vfPreviewRoute = {
110
126
  name: "vf_preview_route",
111
- description: "Preview a route by making a request to the dev server. Returns the rendered output, HTTP status, and render time. Perfect for testing changes instantly.",
127
+ title: "Preview Route",
128
+ annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false },
129
+ description: "Use this when you need to test-render a route and inspect the response. Returns rendered output, HTTP status, and render time. Note: API routes may have side effects. Do not use for listing routes — use vf_list_routes instead.",
112
130
  inputSchema: previewRouteInput,
113
131
  execute: (input) => withSpan("cli.mcp.tool.vf_preview_route", async () => {
114
132
  const url = `http://localhost:${input.port}${input.route}`;
@@ -165,7 +183,9 @@ const waitForReadyInput = z.object({
165
183
  });
166
184
  export const vfWaitForReady = {
167
185
  name: "vf_wait_for_ready",
168
- description: "Wait for the server to be ready by polling the health endpoint. Use this after starting the server to ensure it's accepting requests.",
186
+ title: "Wait for Ready",
187
+ annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false },
188
+ description: "Use this when you need to wait for the dev server to become ready after restart. Polls the health endpoint until responsive. Returns success status and elapsed time. Do not use for error counts or uptime — use vf_get_status instead.",
169
189
  inputSchema: waitForReadyInput,
170
190
  execute: (input) => withSpan("cli.mcp.tool.vf_wait_for_ready", async () => {
171
191
  const startTime = Date.now();
@@ -202,7 +222,9 @@ const getFlywheelStatusInput = z.object({
202
222
  });
203
223
  export const vfGetFlywheelStatus = {
204
224
  name: "vf_get_flywheel_status",
205
- description: "Get aggregated status for the development flywheel. Shows server state, error counts, log summary, and HMR status in one view.",
225
+ title: "Flywheel Status",
226
+ annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false },
227
+ description: "Use this when you need a comprehensive status overview combining server health, error counts, and HMR statistics. Returns server status, error/log counts, and HMR metrics in one response. Do not use for detailed error or log content — use vf_get_errors or vf_get_logs instead.",
206
228
  inputSchema: getFlywheelStatusInput,
207
229
  execute: (input) => withSpan("cli.mcp.tool.vf_get_flywheel_status", async () => {
208
230
  const port = input.port;
@@ -1 +1 @@
1
- {"version":3,"file":"introspection-tools.d.ts","sourceRoot":"","sources":["../../../../src/cli/mcp/tools/introspection-tools.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAyCzD,eAAO,MAAM,kBAAkB,EAAE,OAAO,EAGvC,CAAC"}
1
+ {"version":3,"file":"introspection-tools.d.ts","sourceRoot":"","sources":["../../../../src/cli/mcp/tools/introspection-tools.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AA8CzD,eAAO,MAAM,kBAAkB,EAAE,OAAO,EAGvC,CAAC"}
@@ -7,7 +7,9 @@ const getSchemaInput = z.object({
7
7
  });
8
8
  const vfGetSchema = {
9
9
  name: "vf_get_schema",
10
- description: "Get the CLI command schema for discovering available commands, arguments, and flags.",
10
+ title: "Get CLI Schema",
11
+ annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false },
12
+ description: "Use this when you need to discover available CLI commands, their arguments, and flags. Returns the command schema as JSON. Do not use for project info — use vf_get_project_info instead.",
11
13
  inputSchema: getSchemaInput,
12
14
  execute: async (input) => {
13
15
  if (input.command) {
@@ -19,7 +21,9 @@ const vfGetSchema = {
19
21
  const getProjectInfoInput = z.object({});
20
22
  const vfGetProjectInfo = {
21
23
  name: "vf_get_project_info",
22
- description: "Get project metadata including project slug, version, and environment.",
24
+ title: "Get Project Info",
25
+ annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false },
26
+ description: "Use this when you need project metadata including project slug, version, and environment. Returns slug, version, and environment config. Do not use for CLI commands — use vf_get_schema instead.",
23
27
  inputSchema: getProjectInfoInput,
24
28
  execute: async () => {
25
29
  const { getEnvironmentConfig } = await import("../../../src/config/index.js");
@@ -1 +1 @@
1
- {"version":3,"file":"project-tools.d.ts","sourceRoot":"","sources":["../../../../src/cli/mcp/tools/project-tools.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAKL,KAAK,cAAc,EAEnB,KAAK,SAAS,EAGf,MAAM,cAAc,CAAC;AAMtB,QAAA,MAAM,eAAe;;;;;;;;iBAOnB,CAAC;AAEH,KAAK,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAEvD,eAAO,MAAM,YAAY,EAAE,OAAO,CAAC,eAAe,EAAE,SAAS,EAAE,CAyB9D,CAAC;AAMF,QAAA,MAAM,sBAAsB;;iBAI1B,CAAC;AAEH,KAAK,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAoErE,eAAO,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CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAErE,UAAU,gBAAgB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;IACf,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AA8ED,eAAO,MAAM,mBAAmB,EAAE,OAAO,CAAC,sBAAsB,EAAE,gBAAgB,EAAE,CAiBnF,CAAC"}
@@ -15,7 +15,9 @@ const listRoutesInput = z.object({
15
15
  });
16
16
  export const vfListRoutes = {
17
17
  name: "vf_list_routes",
18
- description: "Discover all routes in the project. Returns pages, API routes, layouts, and special routes. Use this to understand the project structure before making changes.",
18
+ title: "List Routes",
19
+ annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false },
20
+ description: "Use this when you need to discover all routes in the project including pages, API routes, layouts, error, loading, and not-found routes. Returns an array of route info with path, type, and file. Do not use for rendering a route — use vf_preview_route instead.",
19
21
  inputSchema: listRoutesInput,
20
22
  execute: (input) => withSpan("cli.mcp.tool.vf_list_routes", async () => {
21
23
  const projectDir = getProjectDir(input.projectPath);
@@ -95,7 +97,9 @@ async function getProjectName(projectDir, fs) {
95
97
  }
96
98
  export const vfGetProjectContext = {
97
99
  name: "vf_get_project_context",
98
- description: "Get deep understanding of the project structure, conventions, and capabilities. Use this at the start of any coding session to understand the project before making changes.",
100
+ title: "Project Context",
101
+ annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false },
102
+ description: "Use this when you need to understand the project structure, conventions, and capabilities at the start of a coding session. Also returns route information. Do not use for detailed per-route rendering — use vf_preview_route instead.",
99
103
  inputSchema: getProjectContextInput,
100
104
  execute: (input) => withSpan("cli.mcp.tool.vf_get_project_context", async () => {
101
105
  const projectDir = getProjectDir(input.projectPath);
@@ -136,7 +140,9 @@ function toRelativePath(absolutePath, projectDir) {
136
140
  }
137
141
  export const vfGetComponentTree = {
138
142
  name: "vf_get_component_tree",
139
- description: "Analyze the component hierarchy for a route. Shows layouts, providers, and components that render on this route. Helps understand the rendering structure.",
143
+ title: "Component Tree",
144
+ annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false },
145
+ description: "Use this when you need to analyze the component hierarchy for a specific route including layouts, providers, and nested components. Returns the component tree structure. Do not use for listing all routes — use vf_list_routes instead.",
140
146
  inputSchema: getComponentTreeInput,
141
147
  execute: (input) => withSpan("cli.mcp.tool.vf_get_component_tree", async () => {
142
148
  const projectDir = getProjectDir(input.projectPath);
@@ -262,7 +268,9 @@ async function scanForProjects(baseDir, depth, projects) {
262
268
  }
263
269
  export const vfListLocalProjects = {
264
270
  name: "vf_list_local_projects",
265
- description: "Discover Veryfront projects on the local filesystem. Scans for veryfront.config.ts files and returns project info including template type and integrations.",
271
+ title: "List Local Projects",
272
+ annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false },
273
+ description: "Use this when you need to discover Veryfront projects on the local filesystem by scanning for veryfront.config.ts files. Returns project info including template type and integrations. Do not use for project structure details — use vf_get_project_context instead.",
266
274
  inputSchema: listLocalProjectsInput,
267
275
  execute: (input) => withSpan("cli.mcp.tool.vf_list_local_projects", async () => {
268
276
  const projects = [];
@@ -1 +1 @@
1
- {"version":3,"file":"scaffold-tools.d.ts","sourceRoot":"","sources":["../../../../src/cli/mcp/tools/scaffold-tools.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAML,KAAK,cAAc,EAGpB,MAAM,cAAc,CAAC;AAkItB,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;iBAajB,CAAC;AAEH,KAAK,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AA+CnD,eAAO,MAAM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,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACtE;AA4HD,eAAO,MAAM,gBAAgB,EAAE,OAAO,CAAC,mBAAmB,EAAE,UAAU,EAAE,CAevE,CAAC"}
@@ -167,7 +167,9 @@ const SCAFFOLD_CONFIGS = {
167
167
  };
168
168
  export const vfScaffold = {
169
169
  name: "vf_scaffold",
170
- description: "Generate new entities (pages, API routes, layouts, components, AI tools, agents, prompts) with proper conventions. This is the recommended way to create new files in a Veryfront project.",
170
+ title: "Scaffold Code",
171
+ annotations: { readOnlyHint: false, destructiveHint: false, openWorldHint: false },
172
+ description: "Use this when you need to generate new pages, API routes, layouts, components, AI tools, agents, or prompts with proper Veryfront conventions. Returns the created file path and content. May overwrite existing files at the target path. Do not use for creating entire projects — use vf_create_project instead.",
171
173
  inputSchema: scaffoldInput,
172
174
  execute: (input) => withSpan("cli.mcp.tool.vf_scaffold", async () => {
173
175
  const projectDir = getProjectDir(input.projectPath);
@@ -337,7 +339,9 @@ const CONVENTIONS = {
337
339
  };
338
340
  export const vfGetConventions = {
339
341
  name: "vf_get_conventions",
340
- description: "Get Veryfront coding conventions and best practices. Use this as guardrails when writing code to ensure consistency with the project standards.",
342
+ title: "Get Conventions",
343
+ annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false },
344
+ description: "Use this when you need Veryfront coding conventions and best practices for routing, API, components, AI, or styling. Do not use for project structure — use vf_get_project_context instead.",
341
345
  inputSchema: getConventionsInput,
342
346
  execute: (input) => {
343
347
  if (input.topic === "all")
@@ -1 +1 @@
1
- {"version":3,"file":"skill-tools.d.ts","sourceRoot":"","sources":["../../../../src/cli/mcp/tools/skill-tools.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AA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AO,cAAc,CAAC,CAAC;AAErD,UAAU,aAAa;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,UAAU,YAAa,SAAQ,aAAa;IAC1C,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB;AAED,UAAU,eAAe;IACvB,MAAM,CAAC,EAAE,aAAa,EAAE,CAAC;IACzB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,WAAW,EAAE,OAAO,CAAC,cAAc,EAAE,eAAe,CAiEhE,CAAC;AAEF,QAAA,MAAM,sBAAsB;;;iBAG1B,CAAC;AAEH,KAAK,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAErE,UAAU,uBAAuB;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,mBAAmB,EAAE,OAAO,CAAC,sBAAsB,EAAE,uBAAuB,CAkBxF,CAAC"}
@@ -54,7 +54,9 @@ const getSkillsInput = z.object({
54
54
  });
55
55
  export const vfGetSkills = {
56
56
  name: "vf_get_skills",
57
- description: "Discover available Agent Skills for Veryfront development. Skills provide procedural knowledge for using MCP tools effectively. Call without name param to list all skills, or with name to get full skill content.",
57
+ title: "Get Skills",
58
+ annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false },
59
+ description: "Use this when you need to discover available Agent Skills or load a specific skill's procedural knowledge. Returns skill names and descriptions, or full skill content when name is provided. Do not use for skill reference docs — use vf_get_skill_reference instead.",
58
60
  inputSchema: getSkillsInput,
59
61
  execute: (input) => withSpan("cli.mcp.tool.vf_get_skills", async () => {
60
62
  const fs = getFs();
@@ -113,7 +115,9 @@ const getSkillReferenceInput = z.object({
113
115
  });
114
116
  export const vfGetSkillReference = {
115
117
  name: "vf_get_skill_reference",
116
- description: "Get a specific reference document from a skill. Use this to load detailed documentation on demand.",
118
+ title: "Get Skill Reference",
119
+ annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false },
120
+ description: "Use this when you need to load a specific reference document from a skill. Returns the document content as text. Do not use for skill discovery — use vf_get_skills instead.",
117
121
  inputSchema: getSkillReferenceInput,
118
122
  execute: async (input) => {
119
123
  const fs = getFs();
@@ -1 +1 @@
1
- {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/cli/mcp/tools.ts"],"names":[],"mappings":"AAAA;;4BAE4B;AAE5B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,KAAK,QAAQ,EAIb,KAAK,QAAQ,EAEd,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,KAAK,iBAAiB,EAAwB,MAAM,2BAA2B,CAAC;AACzF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAMtD,YAAY,EAAE,OAAO,EAAE,CAAC;AAUxB,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAErD;AAED,QAAA,MAAM,cAAc;;;;;;;;;;iBAMlB,CAAC;AAEH,KAAK,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAErD,eAAO,MAAM,WAAW,EAAE,OAAO,CAAC,cAAc,EAAE,QAAQ,EAAE,CAc3D,CAAC;AAEF,QAAA,MAAM,YAAY;;;;;;;;;;;iBAQhB,CAAC;AAEH,KAAK,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAEjD,eAAO,MAAM,SAAS,EAAE,OAAO,CAAC,YAAY,EAAE,QAAQ,EAAE,CAcvD,C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cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAErD,UAAU,YAAY;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,iBAAiB,CAC/B,GAAG,GAAE,iBAA0C,GAC9C,OAAO,CAAC,cAAc,EAAE,YAAY,CAAC,CAyBvC;AAED,eAAO,MAAM,WAAW,8CAAsB,CAAC;AAE/C,QAAA,MAAM,gBAAgB;;;;;;;;;iBAOpB,CAAC;AAEH,KAAK,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEzD,UAAU,iBAAiB;IACzB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,aAAa,EAAE,OAAO,CAAC,gBAAgB,EAAE,iBAAiB,CAsBtE,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,OAAO,EAS7B,CAAC;AAEF,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAEzD;AAED,wBAAgB,SAAS,IAAI,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAAC,CAExE"}
@@ -19,13 +19,15 @@ export function setServerStartTime(time) {
19
19
  serverStartTime = time;
20
20
  }
21
21
  const getErrorsInput = z.object({
22
- type: z.enum(["compile", "runtime", "bundle", "hmr", "module"]).optional().describe("Filter by error type"),
23
- file: z.string().optional().describe("Filter by file path"),
24
- limit: z.number().optional().default(50).describe("Maximum number of errors to return"),
22
+ type: z.enum(["compile", "runtime", "bundle", "hmr", "module"]).optional().describe("Filter by error type. Example: 'compile'. Omit to return all types."),
23
+ file: z.string().optional().describe("Filter by file path. Example: 'app/page.tsx'. Omit to return errors from all files."),
24
+ limit: z.number().optional().default(50).describe("Maximum number of errors to return. Defaults to 50."),
25
25
  });
26
26
  export const vfGetErrors = {
27
27
  name: "vf_get_errors",
28
- description: "Get compilation, runtime, and build errors from the dev server. Use this to debug issues with your code.",
28
+ title: "Get Errors",
29
+ annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false },
30
+ description: "Use this when you need to check for compilation, runtime, bundle, HMR, or module errors in the dev server. Returns error details including file path, line number, and message. Do not use for server logs — use vf_get_logs instead.",
29
31
  inputSchema: getErrorsInput,
30
32
  execute: async (input) => {
31
33
  const errors = getErrorCollector().getAll({
@@ -38,15 +40,17 @@ export const vfGetErrors = {
38
40
  },
39
41
  };
40
42
  const getLogsInput = z.object({
41
- level: z.enum(["debug", "info", "warn", "error"]).optional().describe("Filter by log level"),
42
- source: z.string().optional().describe("Filter by log source (e.g., 'server', 'hmr', 'transform')"),
43
- pattern: z.string().optional().describe("Filter by pattern (case-insensitive substring match)"),
44
- limit: z.number().optional().default(100).describe("Maximum number of log entries to return"),
45
- since: z.number().optional().describe("Only return logs after this timestamp"),
43
+ level: z.enum(["debug", "info", "warn", "error"]).optional().describe("Filter by log level. Example: 'error'. Omit to return all levels."),
44
+ source: z.string().optional().describe("Filter by log source. Example: 'server', 'hmr', 'transform'. Omit to return all sources."),
45
+ pattern: z.string().optional().describe("Filter by pattern (case-insensitive substring match). Example: 'timeout'."),
46
+ limit: z.number().optional().default(100).describe("Maximum number of log entries to return. Defaults to 100."),
47
+ since: z.number().optional().describe("Only return logs after this Unix timestamp in milliseconds."),
46
48
  });
47
49
  export const vfGetLogs = {
48
50
  name: "vf_get_logs",
49
- description: "Get recent server logs. Use this to understand what the server is doing and debug runtime issues.",
51
+ title: "Get Logs",
52
+ annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false },
53
+ description: "Use this when you need to inspect server logs to understand runtime behavior or debug request handling. Returns log entries with timestamp, level, source, and message. Do not use for build/compile errors — use vf_get_errors instead.",
50
54
  inputSchema: getLogsInput,
51
55
  execute: async (input) => {
52
56
  return getLogBuffer().query({
@@ -59,11 +63,18 @@ export const vfGetLogs = {
59
63
  },
60
64
  };
61
65
  const clearCacheInput = z.object({
62
- type: z.enum(["all", "modules", "mdx"]).optional().default("all").describe("Type of cache to clear"),
66
+ type: z.enum(["all", "modules", "mdx"]).optional().default("all").describe("Type of cache to clear. Example: 'modules'. Defaults to 'all'."),
63
67
  });
64
68
  export const vfClearCache = {
65
69
  name: "vf_clear_cache",
66
- description: "Clear module and build caches. Use this when changes aren't being reflected or to force a rebuild.",
70
+ title: "Clear Cache",
71
+ annotations: {
72
+ readOnlyHint: false,
73
+ destructiveHint: true,
74
+ idempotentHint: true,
75
+ openWorldHint: false,
76
+ },
77
+ description: "Use this when the dev server shows stale modules or MDX content. Returns the list of cleared cache directories. Do not use to fix code errors — those require code changes.",
67
78
  inputSchema: clearCacheInput,
68
79
  execute: async (input) => {
69
80
  const fs = createFileSystem();
@@ -86,7 +97,9 @@ const getStatusInput = z.object({});
86
97
  export function createVfGetStatus(env = getEnvironmentConfig()) {
87
98
  return {
88
99
  name: "vf_get_status",
89
- description: "Get the current status of the dev server including error counts and uptime.",
100
+ title: "Server Status",
101
+ annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false },
102
+ description: "Use this when you need a quick summary of the dev server's uptime, error counts, and warning counts. Note: always reports running=true when the MCP server is reachable. Do not use for detailed error info — use vf_get_errors instead.",
90
103
  inputSchema: getStatusInput,
91
104
  execute: async () => {
92
105
  const errors = getErrorCollector();
@@ -107,12 +120,19 @@ export function createVfGetStatus(env = getEnvironmentConfig()) {
107
120
  }
108
121
  export const vfGetStatus = createVfGetStatus();
109
122
  const clearErrorsInput = z.object({
110
- file: z.string().optional().describe("Clear errors for a specific file only"),
111
- type: z.enum(["compile", "runtime", "bundle", "hmr", "module"]).optional().describe("Clear errors of a specific type only"),
123
+ file: z.string().optional().describe("Clear errors for a specific file only. Example: 'app/page.tsx'. Omit to clear all files."),
124
+ type: z.enum(["compile", "runtime", "bundle", "hmr", "module"]).optional().describe("Clear errors of a specific type only. Example: 'compile'. Omit to clear all types."),
112
125
  });
113
126
  export const vfClearErrors = {
114
127
  name: "vf_clear_errors",
115
- description: "Clear errors from the error collector. Useful after fixing issues.",
128
+ title: "Clear Errors",
129
+ annotations: {
130
+ readOnlyHint: false,
131
+ destructiveHint: true,
132
+ idempotentHint: true,
133
+ openWorldHint: false,
134
+ },
135
+ description: "Use this when you need to clear accumulated errors from the error collector, optionally filtering by file or type. Returns the number of cleared errors. Do not use for viewing errors — use vf_get_errors instead.",
116
136
  inputSchema: clearErrorsInput,
117
137
  execute: async (input) => {
118
138
  const collector = getErrorCollector();
package/esm/deno.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  "name": "veryfront",
3
- "version": "0.1.141",
3
+ "version": "0.1.142",
4
4
  "license": "Apache-2.0",
5
5
  "nodeModulesDir": "auto",
6
6
  "exclude": [
@@ -272,7 +272,7 @@ export class AgentRuntime {
272
272
  logger.error("Agent stream error", { error });
273
273
  sendSSE(controller, encoder, {
274
274
  type: "error",
275
- error: "An internal error occurred",
275
+ error: error instanceof Error ? error.message : String(error),
276
276
  });
277
277
  closeSSEStream(controller);
278
278
  }
@@ -1 +1 @@
1
- {"version":3,"file":"tool-helpers.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/runtime/tool-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAYtF;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,MAAM,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ProviderDefinition } from "../../tool/registry.js";
10
10
  import { SKILL_TOOL_IDS } from "../../skill/types.js";
11
11
  import { serverLogger } from "../../utils/index.js";
12
+ import { createError, toError } from "../../errors/veryfront-error.js";
12
13
  import { executeRemoteIntegrationTool, isRemoteIntegrationTool, } from "../../integrations/remote-tools.js";
13
14
  const logger = serverLogger.component("agent");
14
15
  /**
@@ -43,6 +44,34 @@ export function parseToolArgs(rawArgs) {
43
44
  export function isDynamicTool(name) {
44
45
  return toolRegistry.get(name)?.type === "dynamic";
45
46
  }
47
+ function formatAvailableToolNames(names) {
48
+ const sorted = [...new Set(names)].sort();
49
+ return sorted.length > 0 ? sorted.join(", ") : "(none)";
50
+ }
51
+ function throwUnknownConfiguredToolsError(unknownToolNames, availableLocalToolNames, availableRemoteToolNames) {
52
+ const unknownList = unknownToolNames.sort().join(", ");
53
+ const availableNames = formatAvailableToolNames([
54
+ ...availableLocalToolNames,
55
+ ...availableRemoteToolNames,
56
+ ]);
57
+ throw toError(createError({
58
+ type: "agent",
59
+ message: `Unknown tool reference${unknownToolNames.length === 1 ? "" : "s"}: ${unknownList}. ` +
60
+ `Tool names must exactly match tool({ id: "..." }). Available tools: ${availableNames}`,
61
+ }));
62
+ }
63
+ async function getRemoteToolDefinitions(options) {
64
+ if (options?.includeIntegrationTools === false) {
65
+ return [];
66
+ }
67
+ try {
68
+ const { getRemoteIntegrationToolDefinitions } = await import("../../integrations/remote-tools.js");
69
+ return (await getRemoteIntegrationToolDefinitions()).filter((def) => !options?.allowedRemoteToolNames || options.allowedRemoteToolNames.includes(def.name));
70
+ }
71
+ catch {
72
+ return [];
73
+ }
74
+ }
46
75
  export function resolveConfiguredTool(toolsConfig, toolName) {
47
76
  if (!toolsConfig) {
48
77
  return null;
@@ -113,51 +142,51 @@ export async function getAvailableTools(toolsConfig, options) {
113
142
  return true;
114
143
  });
115
144
  // Append remote integration tools (per-request, project-scoped)
116
- if (options?.includeIntegrationTools !== false) {
117
- try {
118
- const { getRemoteIntegrationToolDefinitions } = await import("../../integrations/remote-tools.js");
119
- const remoteDefs = (await getRemoteIntegrationToolDefinitions()).filter((def) => !options?.allowedRemoteToolNames || options.allowedRemoteToolNames.includes(def.name));
120
- for (const def of remoteDefs) {
121
- logToolDefinition(def.name, def);
122
- }
123
- tools.push(...remoteDefs);
124
- }
125
- catch {
126
- // Integration tools unavailable — non-fatal
127
- }
145
+ const remoteDefs = await getRemoteToolDefinitions(options);
146
+ for (const def of remoteDefs) {
147
+ logToolDefinition(def.name, def);
128
148
  }
149
+ tools.push(...remoteDefs);
129
150
  return tools;
130
151
  }
131
152
  const tools = [];
153
+ const remoteDefs = await getRemoteToolDefinitions(options);
154
+ const remoteToolNames = new Set(remoteDefs.map((def) => def.name));
155
+ const explicitlyRequestedRemoteToolNames = new Set();
156
+ const unresolvedConfiguredToolNames = [];
132
157
  for (const [name, entry] of Object.entries(toolsConfig)) {
133
158
  if (entry === true) {
134
159
  const tool = toolRegistry.get(name);
135
- if (tool)
160
+ if (tool) {
136
161
  addToolDefinition(tools, name, tool);
162
+ continue;
163
+ }
164
+ if (remoteToolNames.has(name)) {
165
+ explicitlyRequestedRemoteToolNames.add(name);
166
+ continue;
167
+ }
168
+ unresolvedConfiguredToolNames.push(name);
137
169
  continue;
138
170
  }
139
171
  if (entry && typeof entry === "object") {
140
172
  addToolDefinition(tools, name, entry);
141
173
  }
142
174
  }
143
- // Also append remote integration tools for explicit-object configs.
144
- // The internal streaming path converts `tools: true` to an explicit object
145
- // from the local registry, so remote tools would be missed without this.
146
- if (options?.includeIntegrationTools !== false) {
147
- try {
148
- const { getRemoteIntegrationToolDefinitions } = await import("../../integrations/remote-tools.js");
149
- const remoteDefs = (await getRemoteIntegrationToolDefinitions()).filter((def) => !options?.allowedRemoteToolNames || options.allowedRemoteToolNames.includes(def.name));
150
- for (const def of remoteDefs) {
151
- // Skip if already present (e.g., explicitly configured by name)
152
- if (!tools.some((t) => t.name === def.name)) {
153
- logToolDefinition(def.name, def);
154
- tools.push(def);
155
- }
156
- }
157
- }
158
- catch {
159
- // Integration tools unavailable — non-fatal
175
+ // Explicit-object configs should only expose remote definitions that were
176
+ // explicitly requested, except for the internal runtime path that expands
177
+ // `tools: true` into an explicit local-tool map and passes the remote allowlist.
178
+ const remoteDefsToAppend = explicitlyRequestedRemoteToolNames.size > 0
179
+ ? remoteDefs.filter((def) => explicitlyRequestedRemoteToolNames.has(def.name))
180
+ : remoteDefs.filter((def) => options?.allowedRemoteToolNames?.includes(def.name));
181
+ for (const def of remoteDefsToAppend) {
182
+ // Skip if already present (e.g., explicitly configured by name)
183
+ if (!tools.some((t) => t.name === def.name)) {
184
+ logToolDefinition(def.name, def);
185
+ tools.push(def);
160
186
  }
161
187
  }
188
+ if (unresolvedConfiguredToolNames.length > 0) {
189
+ throwUnknownConfiguredToolsError(unresolvedConfiguredToolNames, toolRegistry.getAll().keys(), remoteToolNames);
190
+ }
162
191
  return tools;
163
192
  }
@@ -7,11 +7,11 @@ export declare const modelProviderSchema: z.ZodEnum<{
7
7
  }>;
8
8
  export declare const agentStatusSchema: z.ZodEnum<{
9
9
  error: "error";
10
+ completed: "completed";
10
11
  idle: "idle";
11
12
  thinking: "thinking";
12
13
  tool_execution: "tool_execution";
13
14
  streaming: "streaming";
14
- completed: "completed";
15
15
  }>;
16
16
  export declare const MemoryConfigSchema: z.ZodObject<{
17
17
  type: z.ZodEnum<{
@@ -128,9 +128,9 @@ export declare const ToolCallSchema: z.ZodObject<{
128
128
  args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
129
129
  status: z.ZodEnum<{
130
130
  error: "error";
131
- completed: "completed";
132
131
  pending: "pending";
133
132
  executing: "executing";
133
+ completed: "completed";
134
134
  }>;
135
135
  result: z.ZodOptional<z.ZodUnknown>;
136
136
  error: z.ZodOptional<z.ZodString>;
@@ -179,9 +179,9 @@ export declare const AgentResponseSchema: z.ZodObject<{
179
179
  args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
180
180
  status: z.ZodEnum<{
181
181
  error: "error";
182
- completed: "completed";
183
182
  pending: "pending";
184
183
  executing: "executing";
184
+ completed: "completed";
185
185
  }>;
186
186
  result: z.ZodOptional<z.ZodUnknown>;
187
187
  error: z.ZodOptional<z.ZodString>;
@@ -189,11 +189,11 @@ export declare const AgentResponseSchema: z.ZodObject<{
189
189
  }, z.core.$strip>>;
190
190
  status: z.ZodEnum<{
191
191
  error: "error";
192
+ completed: "completed";
192
193
  idle: "idle";
193
194
  thinking: "thinking";
194
195
  tool_execution: "tool_execution";
195
196
  streaming: "streaming";
196
- completed: "completed";
197
197
  }>;
198
198
  thinking: z.ZodOptional<z.ZodString>;
199
199
  usage: z.ZodOptional<z.ZodObject<{
@@ -71,9 +71,9 @@ export declare const ChannelResponsePartSchema: z.ZodDiscriminatedUnion<[z.ZodOb
71
71
  input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
72
72
  state: z.ZodEnum<{
73
73
  error: "error";
74
- streaming: "streaming";
75
- completed: "completed";
76
74
  pending: "pending";
75
+ completed: "completed";
76
+ streaming: "streaming";
77
77
  }>;
78
78
  }, z.core.$strip>, z.ZodObject<{
79
79
  type: z.ZodLiteral<"tool_result">;
@@ -100,9 +100,9 @@ export declare const ChannelInvokeResponseSchema: z.ZodObject<{
100
100
  input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
101
101
  state: z.ZodEnum<{
102
102
  error: "error";
103
- streaming: "streaming";
104
- completed: "completed";
105
103
  pending: "pending";
104
+ completed: "completed";
105
+ streaming: "streaming";
106
106
  }>;
107
107
  }, z.core.$strip>, z.ZodObject<{
108
108
  type: z.ZodLiteral<"tool_result">;
@@ -1 +1 @@
1
- {"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../../src/src/issues/mcp.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAoN/C;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,OAAO,EAOnC,CAAC"}
1
+ {"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../../src/src/issues/mcp.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAqP/C;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,OAAO,EAOnC,CAAC"}