Make Tool inputSchema optional

This commit is contained in:
Alex Gleason committed 2025-09-11 16:03:06 -05:00
1 parent ba2cfe7b68
commit 0f67f64936
8 files changed
+40 -52

No files matched your search

+2 -8
View File
@@ -1,25 +1,19 @@
import { z } from "zod";
import type { Tool } from "./Tool";
import type { JSRuntimeFS } from "../JSRuntime";
import { buildProject } from "../build";
type BuildProjectParams = Record<string, never>;
export class BuildProjectTool implements Tool<BuildProjectParams> {
export class BuildProjectTool implements Tool<void> {
private fs: JSRuntimeFS;
private cwd: string;
readonly description = "Build the project using esbuild. Creates optimized production files in the dist directory.";
readonly inputSchema = z.object({});
constructor(fs: JSRuntimeFS, cwd: string) {
this.fs = fs;
this.cwd = cwd;
}
async execute(_args: BuildProjectParams): Promise<string> {
async execute(): Promise<string> {
try {
// Check if we're in a valid project directory
try {