chore: removes the optional from projectRoot.

This commit is contained in:
Eyal Toledano
2025-03-31 15:58:52 -04:00
parent 059ce5e716
commit 22bd13c197
15 changed files with 11 additions and 15 deletions

View File

@@ -22,7 +22,7 @@ export function registerAddDependencyTool(server) {
id: z.string().describe("ID of task that will depend on another task"), id: z.string().describe("ID of task that will depend on another task"),
dependsOn: z.string().describe("ID of task that will become a dependency"), dependsOn: z.string().describe("ID of task that will become a dependency"),
file: z.string().optional().describe("Path to the tasks file (default: tasks/tasks.json)"), file: z.string().optional().describe("Path to the tasks file (default: tasks/tasks.json)"),
projectRoot: z.string().optional().describe("Root directory of the project (default: current working directory)") projectRoot: z.string().describe("Root directory of the project (default: current working directory)")
}), }),
execute: async (args, { log }) => { execute: async (args, { log }) => {
try { try {

View File

@@ -28,7 +28,7 @@ export function registerAddSubtaskTool(server) {
dependencies: z.string().optional().describe("Comma-separated list of dependency IDs for the new subtask"), dependencies: z.string().optional().describe("Comma-separated list of dependency IDs for the new subtask"),
file: z.string().optional().describe("Path to the tasks file (default: tasks/tasks.json)"), file: z.string().optional().describe("Path to the tasks file (default: tasks/tasks.json)"),
skipGenerate: z.boolean().optional().describe("Skip regenerating task files"), skipGenerate: z.boolean().optional().describe("Skip regenerating task files"),
projectRoot: z.string().optional().describe("Root directory of the project (default: current working directory)") projectRoot: z.string().describe("Root directory of the project (default: current working directory)")
}), }),
execute: async (args, { log }) => { execute: async (args, { log }) => {
try { try {

View File

@@ -23,7 +23,7 @@ export function registerAddTaskTool(server) {
dependencies: z.string().optional().describe("Comma-separated list of task IDs this task depends on"), dependencies: z.string().optional().describe("Comma-separated list of task IDs this task depends on"),
priority: z.string().optional().describe("Task priority (high, medium, low)"), priority: z.string().optional().describe("Task priority (high, medium, low)"),
file: z.string().optional().describe("Path to the tasks file"), file: z.string().optional().describe("Path to the tasks file"),
projectRoot: z.string().optional().describe("Root directory of the project (default: current working directory)") projectRoot: z.string().describe("Root directory of the project (default: current working directory)")
}), }),
execute: async ({ prompt, dependencies, priority, file, projectRoot }, log) => { execute: async ({ prompt, dependencies, priority, file, projectRoot }, log) => {
try { try {

View File

@@ -24,7 +24,7 @@ export function registerAnalyzeTool(server) {
threshold: z.union([z.number(), z.string()]).optional().describe("Minimum complexity score to recommend expansion (1-10) (default: 5)"), threshold: z.union([z.number(), z.string()]).optional().describe("Minimum complexity score to recommend expansion (1-10) (default: 5)"),
file: z.string().optional().describe("Path to the tasks file (default: tasks/tasks.json)"), file: z.string().optional().describe("Path to the tasks file (default: tasks/tasks.json)"),
research: z.boolean().optional().describe("Use Perplexity AI for research-backed complexity analysis"), research: z.boolean().optional().describe("Use Perplexity AI for research-backed complexity analysis"),
projectRoot: z.string().optional().describe("Root directory of the project (default: current working directory)") projectRoot: z.string().describe("Root directory of the project (default: current working directory)")
}), }),
execute: async (args, { log }) => { execute: async (args, { log }) => {
try { try {

View File

@@ -22,7 +22,7 @@ export function registerClearSubtasksTool(server) {
id: z.string().optional().describe("Task IDs (comma-separated) to clear subtasks from"), id: z.string().optional().describe("Task IDs (comma-separated) to clear subtasks from"),
all: z.boolean().optional().describe("Clear subtasks from all tasks"), all: z.boolean().optional().describe("Clear subtasks from all tasks"),
file: z.string().optional().describe("Path to the tasks file (default: tasks/tasks.json)"), file: z.string().optional().describe("Path to the tasks file (default: tasks/tasks.json)"),
projectRoot: z.string().optional().describe("Root directory of the project (default: current working directory)") projectRoot: z.string().describe("Root directory of the project (default: current working directory)")
}).refine(data => data.id || data.all, { }).refine(data => data.id || data.all, {
message: "Either 'id' or 'all' parameter must be provided", message: "Either 'id' or 'all' parameter must be provided",
path: ["id", "all"] path: ["id", "all"]

View File

@@ -20,7 +20,7 @@ export function registerComplexityReportTool(server) {
description: "Display the complexity analysis report in a readable format", description: "Display the complexity analysis report in a readable format",
parameters: z.object({ parameters: z.object({
file: z.string().optional().describe("Path to the report file (default: scripts/task-complexity-report.json)"), file: z.string().optional().describe("Path to the report file (default: scripts/task-complexity-report.json)"),
projectRoot: z.string().optional().describe("Root directory of the project (default: current working directory)") projectRoot: z.string().describe("Root directory of the project (default: current working directory)")
}), }),
execute: async (args, { log }) => { execute: async (args, { log }) => {
try { try {

View File

@@ -24,7 +24,7 @@ export function registerExpandAllTool(server) {
prompt: z.string().optional().describe("Additional context to guide subtask generation"), prompt: z.string().optional().describe("Additional context to guide subtask generation"),
force: z.boolean().optional().describe("Force regeneration of subtasks for tasks that already have them"), force: z.boolean().optional().describe("Force regeneration of subtasks for tasks that already have them"),
file: z.string().optional().describe("Path to the tasks file (default: tasks/tasks.json)"), file: z.string().optional().describe("Path to the tasks file (default: tasks/tasks.json)"),
projectRoot: z.string().optional().describe("Root directory of the project (default: current working directory)") projectRoot: z.string().describe("Root directory of the project (default: current working directory)")
}), }),
execute: async (args, { log }) => { execute: async (args, { log }) => {
try { try {

View File

@@ -27,7 +27,6 @@ export function registerExpandTaskTool(server) {
file: z.string().optional().describe("Path to the tasks file"), file: z.string().optional().describe("Path to the tasks file"),
projectRoot: z projectRoot: z
.string() .string()
.optional()
.describe( .describe(
"Root directory of the project (default: current working directory)" "Root directory of the project (default: current working directory)"
), ),

View File

@@ -20,7 +20,7 @@ export function registerFixDependenciesTool(server) {
description: "Fix invalid dependencies in tasks automatically", description: "Fix invalid dependencies in tasks automatically",
parameters: z.object({ parameters: z.object({
file: z.string().optional().describe("Path to the tasks file"), file: z.string().optional().describe("Path to the tasks file"),
projectRoot: z.string().optional().describe("Root directory of the project (default: current working directory)") projectRoot: z.string().describe("Root directory of the project (default: current working directory)")
}), }),
execute: async (args, { log }) => { execute: async (args, { log }) => {
try { try {

View File

@@ -23,7 +23,6 @@ export function registerGenerateTool(server) {
output: z.string().optional().describe("Output directory (default: same directory as tasks file)"), output: z.string().optional().describe("Output directory (default: same directory as tasks file)"),
projectRoot: z projectRoot: z
.string() .string()
.optional()
.describe( .describe(
"Root directory of the project (default: current working directory)" "Root directory of the project (default: current working directory)"
), ),

View File

@@ -27,7 +27,7 @@ export function registerListTasksTool(server) {
file: z.string().optional().describe("Path to the tasks file"), file: z.string().optional().describe("Path to the tasks file"),
projectRoot: z projectRoot: z
.string() .string()
.optional() // .optional()
.describe( .describe(
"Root directory of the project (default: current working directory)" "Root directory of the project (default: current working directory)"
), ),

View File

@@ -22,7 +22,6 @@ export function registerNextTaskTool(server) {
file: z.string().optional().describe("Path to the tasks file"), file: z.string().optional().describe("Path to the tasks file"),
projectRoot: z projectRoot: z
.string() .string()
.optional()
.describe( .describe(
"Root directory of the project (default: current working directory)" "Root directory of the project (default: current working directory)"
), ),

View File

@@ -24,7 +24,6 @@ export function registerParsePRDTool(server) {
output: z.string().optional().describe("Output path for tasks.json file (default: tasks/tasks.json)"), output: z.string().optional().describe("Output path for tasks.json file (default: tasks/tasks.json)"),
projectRoot: z projectRoot: z
.string() .string()
.optional()
.describe( .describe(
"Root directory of the project (default: current working directory)" "Root directory of the project (default: current working directory)"
), ),

View File

@@ -22,7 +22,7 @@ export function registerRemoveDependencyTool(server) {
id: z.string().describe("Task ID to remove dependency from"), id: z.string().describe("Task ID to remove dependency from"),
dependsOn: z.string().describe("Task ID to remove as a dependency"), dependsOn: z.string().describe("Task ID to remove as a dependency"),
file: z.string().optional().describe("Path to the tasks file (default: tasks/tasks.json)"), file: z.string().optional().describe("Path to the tasks file (default: tasks/tasks.json)"),
projectRoot: z.string().optional().describe("Root directory of the project (default: current working directory)") projectRoot: z.string().describe("Root directory of the project (default: current working directory)")
}), }),
execute: async (args, { log }) => { execute: async (args, { log }) => {
try { try {

View File

@@ -23,7 +23,7 @@ export function registerRemoveSubtaskTool(server) {
convert: z.boolean().optional().describe("Convert the subtask to a standalone task instead of deleting it"), convert: z.boolean().optional().describe("Convert the subtask to a standalone task instead of deleting it"),
file: z.string().optional().describe("Path to the tasks file (default: tasks/tasks.json)"), file: z.string().optional().describe("Path to the tasks file (default: tasks/tasks.json)"),
skipGenerate: z.boolean().optional().describe("Skip regenerating task files"), skipGenerate: z.boolean().optional().describe("Skip regenerating task files"),
projectRoot: z.string().optional().describe("Root directory of the project (default: current working directory)") projectRoot: z.string().describe("Root directory of the project (default: current working directory)")
}), }),
execute: async (args, { log }) => { execute: async (args, { log }) => {
try { try {