diff --git a/vibn-agent-runner/dist/agent-session-runner.js b/vibn-agent-runner/dist/agent-session-runner.js index 633db8b5..0daaa3ac 100644 --- a/vibn-agent-runner/dist/agent-session-runner.js +++ b/vibn-agent-runner/dist/agent-session-runner.js @@ -240,6 +240,7 @@ function parseTaskItems(repoRoot) { const fs = require("fs"); const path = require("path"); const tasksDir = findTasksDir(repoRoot); + console.log(`[Orchestrator] repoRoot: "${repoRoot}", resolved tasksDir: "${tasksDir}"`); if (!tasksDir) return []; const items = []; @@ -247,19 +248,23 @@ function parseTaskItems(repoRoot) { const files = fs .readdirSync(tasksDir) .filter((f) => f.endsWith(".md")); + console.log(`[Orchestrator] Found task files:`, files); files.sort(); for (const file of files) { const filePath = path.join(tasksDir, file); const content = fs.readFileSync(filePath, "utf8"); + console.log(`[Orchestrator] Reading ${file} (length: ${content.length} bytes). Head:\n${content.slice(0, 500)}`); const lines = content.split("\n"); lines.forEach((line, lineIndex) => { const match = line.match(/^(\s*)(?:-\s*)?\[([ xX])\]\s+(.+)$/); if (match && match[2] !== undefined && match[3] !== undefined) { + const checked = match[2].toLowerCase() === "x"; + console.log(`[Orchestrator] Parsed line ${lineIndex + 1}: isChecked=${checked}, text="${match[3].trim()}"`); items.push({ text: match[3].trim(), filePath, lineIndex, - isChecked: match[2].toLowerCase() === "x", + isChecked: checked, fileName: file, }); } diff --git a/vibn-agent-runner/src/agent-session-runner.ts b/vibn-agent-runner/src/agent-session-runner.ts index dd937e12..864410a4 100644 --- a/vibn-agent-runner/src/agent-session-runner.ts +++ b/vibn-agent-runner/src/agent-session-runner.ts @@ -333,6 +333,9 @@ function parseTaskItems(repoRoot: string): TaskItem[] { const fs = require("fs") as typeof import("fs"); const path = require("path") as typeof import("path"); const tasksDir = findTasksDir(repoRoot); + console.log( + `[Orchestrator] repoRoot: "${repoRoot}", resolved tasksDir: "${tasksDir}"`, + ); if (!tasksDir) return []; const items: TaskItem[] = []; @@ -340,20 +343,29 @@ function parseTaskItems(repoRoot: string): TaskItem[] { const files = fs .readdirSync(tasksDir) .filter((f: string) => f.endsWith(".md")); + console.log(`[Orchestrator] Found task files:`, files); files.sort(); for (const file of files) { const filePath = path.join(tasksDir, file); const content = fs.readFileSync(filePath, "utf8"); + console.log( + `[Orchestrator] Reading ${file} (length: ${content.length} bytes). Head:\n${content.slice(0, 500)}`, + ); + const lines = content.split("\n"); lines.forEach((line: string, lineIndex: number) => { const match = line.match(/^(\s*)(?:-\s*)?\[([ xX])\]\s+(.+)$/); if (match && match[2] !== undefined && match[3] !== undefined) { + const checked = match[2].toLowerCase() === "x"; + console.log( + `[Orchestrator] Parsed line ${lineIndex + 1}: isChecked=${checked}, text="${match[3].trim()}"`, + ); items.push({ text: match[3].trim(), filePath, lineIndex, - isChecked: match[2].toLowerCase() === "x", + isChecked: checked, fileName: file, }); }