@aidemd-mcp/server 0.3.2 → 0.3.3

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.
@@ -47,7 +47,10 @@ export default function buildTree(files, root) {
47
47
  const connector = isLastFile ? "└──" : "├──";
48
48
  const name = basename(file.relativePath);
49
49
  const tag = `[${file.type}]`;
50
- const summary = file.summary ? ` ${file.summary}` : "";
50
+ const label = file.type === "intent" || file.type === "research"
51
+ ? file.description || ""
52
+ : file.summary || "";
53
+ const summary = label ? ` — ${label}` : "";
51
54
  lines.push(` ${connector} ${name} ${tag}${summary}`);
52
55
  }
53
56
  if (d < sortedDirs.length - 1)
@@ -3,31 +3,22 @@ import { join, relative } from "node:path";
3
3
  import { classifyFile } from "../../util/classify/index.js";
4
4
  import { SKIP_DIRS } from "../../types/index.js";
5
5
  import parseFrontmatter from "../../util/parseFrontmatter/index.js";
6
- /** Extract the first meaningful body line as the summary, truncated to ~80 chars. */
7
- function extractSummary(content) {
6
+ /** Count checked and total checkbox items in content. */
7
+ function countCheckboxes(content) {
8
8
  const lines = content.split("\n");
9
- let bodyStart = 0;
10
- // Skip YAML frontmatter if present
11
- if (lines[0] && lines[0].trim() === "---") {
12
- let closingIdx = -1;
13
- for (let i = 1; i < lines.length; i++) {
14
- if (lines[i].trim() === "---") {
15
- closingIdx = i;
16
- break;
17
- }
9
+ let done = 0;
10
+ let total = 0;
11
+ for (const line of lines) {
12
+ const trimmed = line.trim();
13
+ if (trimmed.startsWith("- [x]") || trimmed.startsWith("- [X]")) {
14
+ done++;
15
+ total++;
16
+ }
17
+ else if (trimmed.startsWith("- [ ]")) {
18
+ total++;
18
19
  }
19
- bodyStart = closingIdx !== -1 ? closingIdx + 1 : lines.length;
20
- }
21
- // Find the first non-empty, non-heading line after frontmatter
22
- for (let i = bodyStart; i < lines.length; i++) {
23
- const line = lines[i].trim();
24
- if (!line || line.startsWith("#"))
25
- continue;
26
- if (line.length <= 80)
27
- return line;
28
- return line.slice(0, 77) + "...";
29
20
  }
30
- return "";
21
+ return { done, total };
31
22
  }
32
23
  /** Normalize a Windows or mixed path to POSIX forward slashes. */
33
24
  function toPosix(p) {
@@ -66,14 +57,18 @@ async function walk(dir, root, files, shallow) {
66
57
  let summary = "";
67
58
  let description = "";
68
59
  let status;
60
+ const type = classifyFile(entry.name);
69
61
  if (!shallow) {
70
62
  try {
71
63
  const buf = await readFile(fullPath, { encoding: "utf-8" });
72
- summary = extractSummary(buf.slice(0, 1000));
73
64
  const { frontmatter } = parseFrontmatter(buf);
74
65
  description = deriveDescription(frontmatter);
75
66
  if (frontmatter?.status)
76
67
  status = frontmatter.status;
68
+ if (type === "plan" || type === "todo") {
69
+ const { done, total } = countCheckboxes(buf);
70
+ summary = total > 0 ? `${done}/${total} done` : "";
71
+ }
77
72
  }
78
73
  catch {
79
74
  // skip unreadable files
@@ -97,7 +92,7 @@ async function walk(dir, root, files, shallow) {
97
92
  files.push({
98
93
  path: fullPath,
99
94
  relativePath: toPosix(relative(root, fullPath)),
100
- type: classifyFile(entry.name),
95
+ type,
101
96
  summary,
102
97
  description,
103
98
  status,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aidemd-mcp/server",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "MCP server that teaches any agent the AIDE methodology through tool descriptions and progressive disclosure tooling",
5
5
  "type": "module",
6
6
  "bin": {