@menteeai/menteeswe 0.1.15 → 0.1.17

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 (2) hide show
  1. package/dist/cli.js +116 -104
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -293,7 +293,7 @@ var init_testing = __esm({
293
293
  DEFAULT_TIMEOUT_MS2 = 18e4;
294
294
  runTests = makeRunnerTool({
295
295
  name: "run_tests",
296
- description: "Run the project test suite. Auto-detects npm test / pytest / go test / cargo test from the project files, or run an exact command. Use this to verify changes.",
296
+ description: "Run the project test suite (npm test/pytest/go test/cargo test auto-detected).",
297
297
  detect: detectTestCommand,
298
298
  fallbackHint: "No test runner found (looked for package.json scripts.test, pytest, go, cargo)."
299
299
  });
@@ -311,7 +311,7 @@ var init_testing = __esm({
311
311
  });
312
312
  inspectEnv = {
313
313
  name: "inspect_env",
314
- description: "Inspect the environment: OS info, and which toolchains are installed with versions (node, npm, python, pip, git). Use this to adapt commands to the machine.",
314
+ description: "OS info + installed toolchain versions (node, npm, python, pip, git).",
315
315
  risk: "safe",
316
316
  parameters: { type: "object", properties: {} },
317
317
  async execute(_args, ctx) {
@@ -404,6 +404,13 @@ function formatEvent(event) {
404
404
  return "\n" + chalk.bold.magenta(`\u25B8 Task: ${event.message ?? ""}`);
405
405
  case "model_request":
406
406
  return chalk.gray("\u25CF thinking...");
407
+ case "tokens": {
408
+ const req = typeof event.data?.request === "number" ? event.data.request : 0;
409
+ const inTok = typeof event.data?.inputTokens === "number" ? event.data.inputTokens : 0;
410
+ const outTok = typeof event.data?.outputTokens === "number" ? event.data.outputTokens : 0;
411
+ const fmtK = (n) => n >= 1e3 ? `${(n / 1e3).toFixed(1)}k` : String(n);
412
+ return chalk.dim(` \u21C5 req #${req} \xB7 ctx ${fmtK(inTok)} tok \xB7 out ${fmtK(outTok)} tok`);
413
+ }
407
414
  case "info":
408
415
  return chalk.cyan.bold(`\u{1F4AD} ${event.message ?? ""}`);
409
416
  case "tool_started": {
@@ -632,58 +639,34 @@ function projectTree(cwd, prefix = "", depth = 0, maxDepth = 3) {
632
639
  function buildSystemPrompt(cwd) {
633
640
  const branch = gitBranch(cwd);
634
641
  const tree = projectTree(cwd).trim() || "(empty)";
635
- return `You are MenteE, an autonomous software-engineering agent working inside a repository on the user's machine.
636
-
637
- # Your design philosophy
638
- You are built around a tool harness: every meaningful action (reading, searching, editing, running, git) goes through a tool. Use the harness decisively and efficiently. Prefer precise tool calls over long prose so token usage stays very low while your engineering stays sharp and intelligent. A good session does more with fewer tokens \u2014 call exactly the tool needed, read only what you must, and let the harness do the heavy lifting.
642
+ return `You are MenteE, an autonomous software-engineering agent working inside a repository on the user's machine. You are built around a tool harness: act through tools, keep prose minimal, keep token usage low.
639
643
 
640
644
  # Environment
641
645
  - Workspace: ${cwd}
642
646
  - Platform: ${os2.platform()} (${os2.release()}), shell commands run with the system shell
643
647
  ${branch ? `- Git branch: ${branch}` : "- Not a git repository"}
644
648
 
645
- # Project file tree (you already have this \u2014 do NOT re-read files just to learn structure)
649
+ # Project file tree (already provided \u2014 do NOT re-read files just to learn structure)
646
650
  ${tree}
647
651
 
648
652
  # How to work
649
- 1. UNDERSTAND before acting: use search_code to locate the relevant files and symbols, then read only the 5-6 most important files as reference (with line ranges for large files) before proposing changes. Never modify a file you have not read.
650
- 2. MINIMAL CHANGES: make the smallest change that correctly fulfils the task. Never refactor unrelated code, never reformat, never rename things that were not asked about.
651
- 3. REALITY CHECK: do not invent APIs, packages, or file paths. If you are unsure a dependency or module exists, verify with search or by reading package.json / requirements files.
652
- 4. VERIFY: after modifying code, run the project's own tests, build, or typecheck commands to prove the change works. If no obvious test command exists, at minimum execute the modified code or a syntax check.
653
- 5. DEBUG PROPERLY: if a command fails, read the error carefully, investigate the root cause, and fix that. If the same error occurs three times, stop repeating it, state what you have tried, and change strategy.
654
- 6. STAY IN SCOPE: never read, modify, or execute anything outside the workspace. Never print or exfiltrate secrets, API keys, or credentials.
655
- 7. FINISH PROPERLY: when the task is done and verified, stop calling tools and write a final answer (see Communication rules).
656
-
657
- # Tool usage notes
658
- - Call only the tools needed for the immediate next step. Do NOT read files you already understand, and do NOT read build/config files (e.g. *.config.ts, tsconfig.json) unless the task specifically needs them.
659
- - Prefer search_code over reading many files.
660
- - NEVER start long-running servers, dev servers, or watchers (e.g. 'npm run dev', 'npm start', 'vite', 'npm run watch', 'python -m http.server') yourself. These block and never exit. If the user needs to run the app, give them the exact command to run in their OWN terminal. Only run commands that exit on their own.
661
- - If a task result requires running the app to verify, say so and provide the command \u2014 do not run it for them.
662
-
663
- # Research strategy (IMPORTANT \u2014 HARD RULE)
664
- - The file tree above already shows the whole structure. Do NOT read files just to "see what's there".
665
- - Before reading anything, use search_code to locate the symbols and files that matter. Then read ONLY the 5-6 most important files as reference (README, package.json / pyproject, and the few source files directly relevant to the task). Do not open many files \u2014 search first, read selectively.
666
- - For debugging or feature tasks, read only the files directly involved, then verify with tests. Never read the entire codebase.
653
+ 1. UNDERSTAND before acting: use search_code to locate relevant files/symbols, then read only the 5-6 most important files as reference (line ranges for large files). Never modify a file you have not read. Do not open files just to "see what's there".
654
+ 2. MINIMAL CHANGES: the smallest change that fulfils the task. Never refactor, reformat, or rename unrelated code.
655
+ 3. REALITY CHECK: never invent APIs, packages, or paths \u2014 verify via search_code or package.json.
656
+ 4. VERIFY: after modifying code, run the project's tests/build/typecheck. If a command fails, read the error, find the root cause, fix it. After 3 identical failures, change strategy.
657
+ 5. STAY IN SCOPE: never read/modify/execute outside the workspace; never print secrets or credentials.
658
+ 6. FINISH: when done and verified, stop calling tools and write the final answer.
667
659
 
668
- # Editing notes
669
- - Use read_file with start_line/end_line for files that may be large.
670
- - Use apply_patch (exact unique snippet replacement) for edits; use write_file only for new files or complete rewrites you have fully read.
671
- - Run tests with execute_command (e.g. "npm test", "pytest"). Safe read-only commands run automatically; installing packages or git history changes will ask the user for approval.
660
+ # Tool notes
661
+ - Call only the tools the immediate step needs; skip build/config files unless required.
662
+ - NEVER start long-running servers or watchers (npm run dev, vite, python -m http.server, ...): they block. Give the user the command to run in their own terminal; only run commands that exit on their own.
663
+ - Use apply_patch for edits; write_file only for new files or full rewrites you have fully read.
664
+ - Use the memory tool to store/recall reusable project facts (conventions, test commands, gotchas) instead of re-deriving them.
672
665
 
673
- # Persistent memory
674
- - Use the 'memory' tool to store important, reusable context so you don't re-derive it: project conventions, key file locations, design decisions, gotchas, API quirks. Example: after discovering "tests run with vitest and need a built dist", store it with topic "testing".
675
- - At the start of a task, call 'memory' with action=search (or list) to recall prior findings for THIS project. Prefer recalled memory over re-reading files.
676
- - This memory persists across sessions and is project-scoped; it never lives in the workspace.
677
-
678
- # Communication (IMPORTANT)
679
- - While working, say only what you are doing and why, in ONE short sentence per step. No filler.
680
- - Your FINAL answer has a HARD limit of 3 sentences. Join related points with commas into a single flowing sentence; never use bullet lists, numbered lists, or markdown headings unless the user explicitly asks. Plain prose only.
681
- - State the outcome and, if you changed anything, the one command used to verify. Do NOT write document-style reports, inventories of the codebase, or repeat tool output. If the user wants more, they will ask.
682
- - Never open with preamble such as "Here are", "I can", "Sure", or "Based on". Get straight to the point.
683
- - Never dump the whole repo structure or a file-by-file summary unless requested.
684
- - If the user refers to something you said or did earlier ("that", "it", "before"), use the prior conversation context provided above.
685
-
686
- Be concise in your visible text between tool calls: one short sentence about what you are doing and why is enough. Low token usage is a core goal \u2014 be terse everywhere.`;
666
+ # Communication
667
+ - Between tools: ONE short sentence on what and why. Low token usage is a core goal \u2014 be terse everywhere.
668
+ - FINAL answer: hard limit of 3 sentences, plain prose, no bullets/headings unless asked. State the outcome and the command used to verify. No preamble ("Sure", "Here are"), no repo inventories, no repeated tool output.
669
+ - If the user says "that", "it", or "earlier", they mean the prior conversation above.`;
687
670
  }
688
671
  var SKIP_DIRS;
689
672
  var init_prompts = __esm({
@@ -746,7 +729,7 @@ function appendTurn(cwd, task, response) {
746
729
  function formatConversationContext(cwd, limit = 10) {
747
730
  const turns = loadConversation(cwd, limit);
748
731
  if (turns.length === 0) return "";
749
- const MAX_PRIOR_CHARS = 5e3;
732
+ const MAX_PRIOR_CHARS = 3e3;
750
733
  const header = "# Prior conversation in this project (most recent shown)";
751
734
  const blocks = [];
752
735
  let total = header.length;
@@ -929,6 +912,8 @@ ${systemExtra}` : "");
929
912
  }
930
913
  };
931
914
  const messages = [{ role: "user", content: task }];
915
+ const readMsgIndex = /* @__PURE__ */ new Map();
916
+ const normalizeRel = (p) => p.replace(/\\/g, "/");
932
917
  const setPhase = (p) => {
933
918
  state.phase = p;
934
919
  bus.emit("phase", p);
@@ -997,6 +982,13 @@ ${systemExtra}` : "");
997
982
  if (response.usage) {
998
983
  state.usage.inputTokens += response.usage.inputTokens;
999
984
  state.usage.outputTokens += response.usage.outputTokens;
985
+ bus.emit("tokens", void 0, {
986
+ request: state.usage.modelRequests,
987
+ inputTokens: response.usage.inputTokens,
988
+ outputTokens: response.usage.outputTokens,
989
+ totalIn: state.usage.inputTokens,
990
+ totalOut: state.usage.outputTokens
991
+ });
1000
992
  }
1001
993
  if (response.finishReason === "length") {
1002
994
  bus.emit("warning", "Model hit its output length limit.");
@@ -1123,6 +1115,26 @@ Investigate the root cause, fix it, then finish with a final answer.`
1123
1115
  new_string: result.data.new_string
1124
1116
  });
1125
1117
  }
1118
+ const readHeader = result.success && tool.name === "read_file" ? result.output.split("\n")[0] ?? "" : "";
1119
+ const readRel = readHeader ? normalizeRel(readHeader.replace(/\s+\(\d+ lines\)\s*$/, "").trim()) : "";
1120
+ if (readRel) readMsgIndex.set(readRel, messages.length);
1121
+ if ((tool.name === "apply_patch" || tool.name === "write_file") && result.success) {
1122
+ const patchedRel = normalizeRel(
1123
+ typeof result.data?.path === "string" && result.data.path ? result.data.path : typeof args.path === "string" ? args.path : ""
1124
+ );
1125
+ const idx = patchedRel ? readMsgIndex.get(patchedRel) : void 0;
1126
+ if (idx !== void 0) {
1127
+ const old = messages[idx];
1128
+ if (old && old.role === "tool") {
1129
+ messages[idx] = {
1130
+ role: "tool",
1131
+ tool_call_id: old.tool_call_id ?? "elided",
1132
+ content: `\u27E8${patchedRel} was read earlier; its content is elided because it has since been modified. Re-read only if needed.\u27E9`
1133
+ };
1134
+ readMsgIndex.delete(patchedRel);
1135
+ }
1136
+ }
1137
+ }
1126
1138
  messages.push({
1127
1139
  role: "tool",
1128
1140
  tool_call_id: call.id,
@@ -1133,9 +1145,9 @@ Investigate the root cause, fix it, then finish with a final answer.`
1133
1145
  finalText = "Task cancelled.";
1134
1146
  break;
1135
1147
  }
1148
+ trimOldToolResults(messages);
1136
1149
  if (estimateContextChars(messages, system) > MAX_CONTEXT_CHARS) {
1137
- bus.emit("warning", "Context is large; trimming oldest tool outputs.");
1138
- trimOldToolResults(messages);
1150
+ bus.emit("warning", "Context is still very large after trimming oldest tool outputs.");
1139
1151
  }
1140
1152
  }
1141
1153
  if (!sawFinish && !finalText) {
@@ -1165,11 +1177,11 @@ var init_loop = __esm({
1165
1177
  init_state();
1166
1178
  init_base();
1167
1179
  init_testing();
1168
- MAX_CONTEXT_CHARS = 7e4;
1180
+ MAX_CONTEXT_CHARS = 4e4;
1169
1181
  RATE_LIMIT_MAX_ATTEMPTS = 8;
1170
1182
  MAX_VERIFY = 3;
1171
1183
  EDIT_TOOLS = /* @__PURE__ */ new Set(["apply_patch", "write_file", "move_path"]);
1172
- KEEP_RECENT_TOOL = 4;
1184
+ KEEP_RECENT_TOOL = 3;
1173
1185
  }
1174
1186
  });
1175
1187
 
@@ -1177,7 +1189,7 @@ var init_loop = __esm({
1177
1189
  var version;
1178
1190
  var init_package = __esm({
1179
1191
  "package.json"() {
1180
- version = "0.1.15";
1192
+ version = "0.1.17";
1181
1193
  }
1182
1194
  });
1183
1195
 
@@ -1545,6 +1557,7 @@ function App(props) {
1545
1557
  const [phase, setPhase] = useState3("");
1546
1558
  const [showEdits, setShowEdits] = useState3(true);
1547
1559
  const [taskSummary, setTaskSummary] = useState3(null);
1560
+ const [tokenTotals, setTokenTotals] = useState3({ totalIn: 0, totalOut: 0 });
1548
1561
  const finalTextRef = useRef(null);
1549
1562
  const pendingTool = useRef(null);
1550
1563
  const counter = useRef(0);
@@ -1583,6 +1596,11 @@ function App(props) {
1583
1596
  appendPatchEdit({ path: filePath, old: oldStr, new: newStr });
1584
1597
  return;
1585
1598
  }
1599
+ if (event.type === "tokens") {
1600
+ const totalIn = typeof event.data?.totalIn === "number" ? event.data.totalIn : 0;
1601
+ const totalOut = typeof event.data?.totalOut === "number" ? event.data.totalOut : 0;
1602
+ setTokenTotals({ totalIn, totalOut });
1603
+ }
1586
1604
  if (event.type === "task_completed") {
1587
1605
  setTaskSummary(formatEvent(event));
1588
1606
  const text = typeof event.data?.finalText === "string" ? event.data.finalText.trim() : "";
@@ -1795,6 +1813,7 @@ function App(props) {
1795
1813
  setDetailsOpen(false);
1796
1814
  setRunning(true);
1797
1815
  setTaskSummary(null);
1816
+ setTokenTotals({ totalIn: 0, totalOut: 0 });
1798
1817
  const ac = new AbortController();
1799
1818
  abortRef.current = ac;
1800
1819
  try {
@@ -1978,7 +1997,9 @@ function App(props) {
1978
1997
  /* @__PURE__ */ jsxs6(Text6, { dimColor: true, children: [
1979
1998
  "agent ",
1980
1999
  PHASE_LABEL[phase] ?? "working",
1981
- "\u2026 (Ctrl+C to exit)"
2000
+ "\u2026",
2001
+ tokenTotals.totalIn + tokenTotals.totalOut > 0 ? ` \xB7 ${((tokenTotals.totalIn + tokenTotals.totalOut) / 1e3).toFixed(1)}k tok` : "",
2002
+ " (Ctrl+C to exit)"
1982
2003
  ] })
1983
2004
  ] }),
1984
2005
  thinkingText ? /* @__PURE__ */ jsxs6(Box6, { children: [
@@ -2356,19 +2377,13 @@ function relativeToWorkspace(cwd, target) {
2356
2377
  }
2357
2378
  var listFiles = {
2358
2379
  name: "list_files",
2359
- description: "List files and directories under a path inside the workspace. Respects common ignore rules (node_modules, .git, dist, ...). Use this to orient yourself in the repository.",
2380
+ description: "List files/dirs under a path (ignores node_modules etc.). The system prompt already contains a file tree.",
2360
2381
  risk: "safe",
2361
2382
  parameters: {
2362
2383
  type: "object",
2363
2384
  properties: {
2364
- path: {
2365
- type: "string",
2366
- description: "Relative path inside the workspace. Defaults to the workspace root."
2367
- },
2368
- max_entries: {
2369
- type: "number",
2370
- description: "Maximum number of entries to return. Defaults to 500."
2371
- }
2385
+ path: { type: "string", description: "Relative path (default root)." },
2386
+ max_entries: { type: "number", description: "Max entries (default 500)." }
2372
2387
  }
2373
2388
  },
2374
2389
  async execute(args, ctx) {
@@ -2427,13 +2442,13 @@ var listFiles = {
2427
2442
  };
2428
2443
  var movePath = {
2429
2444
  name: "move_path",
2430
- description: "Move or rename a file or directory within the workspace. Requires user approval. Parent directories of the destination are created automatically.",
2445
+ description: "Move or rename a file/directory within the workspace. Requires user approval.",
2431
2446
  risk: "restricted",
2432
2447
  parameters: {
2433
2448
  type: "object",
2434
2449
  properties: {
2435
- from: { type: "string", description: "Source path relative to the workspace root." },
2436
- to: { type: "string", description: "Destination path relative to the workspace root." }
2450
+ from: { type: "string", description: "Source path (relative to root)." },
2451
+ to: { type: "string", description: "Destination path (relative to root)." }
2437
2452
  },
2438
2453
  required: ["from", "to"]
2439
2454
  },
@@ -2456,14 +2471,14 @@ var movePath = {
2456
2471
  };
2457
2472
  var readFile = {
2458
2473
  name: "read_file",
2459
- description: "Read a file from the workspace, optionally restricted to a line range. Output is prefixed with line numbers. Prefer reading ranges of large files instead of whole files.",
2474
+ description: "Read a file (line-numbered), optionally a line range. Prefer ranges for large files.",
2460
2475
  risk: "safe",
2461
2476
  parameters: {
2462
2477
  type: "object",
2463
2478
  properties: {
2464
- path: { type: "string", description: "File path relative to the workspace root." },
2465
- start_line: { type: "number", description: "First line to read (1-based). Defaults to 1." },
2466
- end_line: { type: "number", description: "Last line to read (inclusive). Defaults to start_line + 2000." }
2479
+ path: { type: "string", description: "Path relative to workspace root." },
2480
+ start_line: { type: "number", description: "First line (1-based)." },
2481
+ end_line: { type: "number", description: "Last line inclusive (default start+400)." }
2467
2482
  },
2468
2483
  required: ["path"]
2469
2484
  },
@@ -2477,7 +2492,7 @@ var readFile = {
2477
2492
  }
2478
2493
  const lines = content.split(/\r?\n/);
2479
2494
  const start = Math.max(1, firstNumber(args, "start_line") ?? 1);
2480
- const defaultEnd = start + 2e3 - 1;
2495
+ const defaultEnd = start + 400 - 1;
2481
2496
  const end = Math.min(lines.length, firstNumber(args, "end_line") ?? defaultEnd);
2482
2497
  if (start > lines.length) {
2483
2498
  return {
@@ -2486,7 +2501,7 @@ var readFile = {
2486
2501
  };
2487
2502
  }
2488
2503
  const slice = lines.slice(start - 1, end).map((line, i) => `${start + i}: ${line}`);
2489
- const { text, truncated } = truncateOutput(slice.join("\n"), 5e4);
2504
+ const { text, truncated } = truncateOutput(slice.join("\n"), 12e3);
2490
2505
  const note = end < lines.length ? `
2491
2506
  ...[${lines.length - end} more lines. Use start_line=${end + 1} to continue reading.]` : "";
2492
2507
  return {
@@ -2499,13 +2514,13 @@ ${text}${note}`,
2499
2514
  };
2500
2515
  var writeFile = {
2501
2516
  name: "write_file",
2502
- description: "Create a new file or fully overwrite an existing file with the given content inside the workspace. For modifying existing files prefer apply_patch.",
2517
+ description: "Create or fully overwrite a file. Prefer apply_patch for edits to existing files.",
2503
2518
  risk: "safe",
2504
2519
  parameters: {
2505
2520
  type: "object",
2506
2521
  properties: {
2507
- path: { type: "string", description: "File path relative to the workspace root." },
2508
- content: { type: "string", description: "The full file content to write." }
2522
+ path: { type: "string", description: "Path relative to workspace root." },
2523
+ content: { type: "string", description: "Full file content." }
2509
2524
  },
2510
2525
  required: ["path", "content"]
2511
2526
  },
@@ -2522,14 +2537,14 @@ var writeFile = {
2522
2537
  };
2523
2538
  var applyPatch = {
2524
2539
  name: "apply_patch",
2525
- description: "Apply a minimal edit to an existing file by replacing an exact unique snippet (old_string) with new_string. The snippet must appear exactly once in the file. This is the preferred way to modify files: it makes the smallest possible change.",
2540
+ description: "Replace an exact unique snippet in a file: old_string (must occur exactly once) becomes new_string. Preferred edit method.",
2526
2541
  risk: "safe",
2527
2542
  parameters: {
2528
2543
  type: "object",
2529
2544
  properties: {
2530
- path: { type: "string", description: "File path relative to the workspace root." },
2531
- old_string: { type: "string", description: "The exact text to replace. Must occur exactly once in the file." },
2532
- new_string: { type: "string", description: "The replacement text." }
2545
+ path: { type: "string", description: "Path relative to workspace root." },
2546
+ old_string: { type: "string", description: "Exact text to replace, unique in file." },
2547
+ new_string: { type: "string", description: "Replacement text." }
2533
2548
  },
2534
2549
  required: ["path", "old_string", "new_string"]
2535
2550
  },
@@ -2808,15 +2823,15 @@ function ripgrepAvailable() {
2808
2823
  }
2809
2824
  var searchCode = {
2810
2825
  name: "search_code",
2811
- description: "Search file contents across the workspace for a pattern (regex supported). Faster and more context-efficient than reading many files. Returns matching file paths, line numbers, and lines.",
2826
+ description: "Regex-search file contents workspace-wide; returns path:line:match. Cheaper than reading files.",
2812
2827
  risk: "safe",
2813
2828
  parameters: {
2814
2829
  type: "object",
2815
2830
  properties: {
2816
- pattern: { type: "string", description: "Regex or literal text to search for." },
2817
- path: { type: "string", description: "Subdirectory to search. Defaults to the workspace root." },
2818
- glob: { type: "string", description: 'Optional file glob filter, e.g. "*.ts" or "src/**".' },
2819
- max_results: { type: "number", description: "Maximum matches to return. Defaults to 50." }
2831
+ pattern: { type: "string", description: "Regex or literal text." },
2832
+ path: { type: "string", description: "Subdirectory (default root)." },
2833
+ glob: { type: "string", description: 'Glob filter, e.g. "*.ts".' },
2834
+ max_results: { type: "number", description: "Max matches (default 50)." }
2820
2835
  },
2821
2836
  required: ["pattern"]
2822
2837
  },
@@ -2896,14 +2911,14 @@ ${text}`,
2896
2911
  };
2897
2912
  var searchFiles = {
2898
2913
  name: "search_files",
2899
- description: "Find files by name pattern (supports * and ? wildcards) inside the workspace. Use when you know roughly what a file is called.",
2914
+ description: "Find files by name with * and ? wildcards.",
2900
2915
  risk: "safe",
2901
2916
  parameters: {
2902
2917
  type: "object",
2903
2918
  properties: {
2904
- pattern: { type: "string", description: 'File name pattern with wildcards, e.g. "*.test.ts" or "config*". Matches against the full relative path too.' },
2905
- path: { type: "string", description: "Subdirectory to search. Defaults to the workspace root." },
2906
- max_results: { type: "number", description: "Maximum results. Defaults to 100." }
2919
+ pattern: { type: "string", description: 'Name pattern with wildcards, e.g. "*.test.ts".' },
2920
+ path: { type: "string", description: "Subdirectory (default root)." },
2921
+ max_results: { type: "number", description: "Max results (default 100)." }
2907
2922
  },
2908
2923
  required: ["pattern"]
2909
2924
  },
@@ -3117,7 +3132,7 @@ var DEFAULT_TIMEOUT_MS = 12e4;
3117
3132
  var MAX_OUTPUT_CHARS = 1e5;
3118
3133
  var executeCommand = {
3119
3134
  name: "execute_command",
3120
- description: "Execute a shell command in the workspace. Safe read-only commands (ls, git status, npm test, ...) run automatically. Install/git-write commands require user approval. Dangerous commands (rm -rf, sudo, ...) are blocked.",
3135
+ description: "Run a shell command in the workspace. Read-only commands auto-run; installs/git-writes need approval; dangerous ones are blocked.",
3121
3136
  risk: "restricted",
3122
3137
  timeoutMs: DEFAULT_TIMEOUT_MS,
3123
3138
  dynamicRisk: (args) => {
@@ -3127,8 +3142,8 @@ var executeCommand = {
3127
3142
  parameters: {
3128
3143
  type: "object",
3129
3144
  properties: {
3130
- command: { type: "string", description: "The shell command to execute." },
3131
- timeout_ms: { type: "number", description: `Timeout in milliseconds. Defaults to ${DEFAULT_TIMEOUT_MS}, max 600000.` }
3145
+ command: { type: "string", description: "The command." },
3146
+ timeout_ms: { type: "number", description: `Timeout ms (default ${DEFAULT_TIMEOUT_MS}).` }
3132
3147
  },
3133
3148
  required: ["command"]
3134
3149
  },
@@ -3177,19 +3192,16 @@ function save(cwd, entries) {
3177
3192
  }
3178
3193
  var memoryTool = {
3179
3194
  name: "memory",
3180
- description: 'Persist and recall key information across iterations AND across sessions (project-scoped, stored under ~/.mentee/memory, never in the workspace). Use action=add to store important findings, decisions, conventions, or context you discovered (e.g. "project uses TypeScript 5 strict mode", "auth lives in src/auth.ts"). Use action=search (query) to recall before re-deriving something you may have learned earlier. Use list to see everything, forget to remove by id or topic.',
3195
+ description: "Persist notes for this project across sessions. Actions: add (content, topic?), search (query), list, forget (id or topic).",
3181
3196
  risk: "safe",
3182
3197
  parameters: {
3183
3198
  type: "object",
3184
3199
  properties: {
3185
- action: { type: "string", enum: ["add", "search", "list", "forget"], description: "Operation to perform." },
3186
- content: { type: "string", description: "The note text (for action=add)." },
3187
- topic: {
3188
- type: "string",
3189
- description: "Optional short tag/category for the note (action=add) or, for action=forget, the topic to clear."
3190
- },
3191
- query: { type: "string", description: "Search terms (for action=search). Falls back to content if omitted." },
3192
- id: { type: "string", description: "Entry id to remove (for action=forget)." }
3200
+ action: { type: "string", enum: ["add", "search", "list", "forget"], description: "Operation." },
3201
+ content: { type: "string", description: "Note text (add)." },
3202
+ topic: { type: "string", description: "Tag (add) or topic to clear (forget)." },
3203
+ query: { type: "string", description: "Search terms (search)." },
3204
+ id: { type: "string", description: "Entry id (forget)." }
3193
3205
  },
3194
3206
  required: ["action"]
3195
3207
  },
@@ -3301,13 +3313,13 @@ function deleteCommands(cwd, target) {
3301
3313
  }
3302
3314
  var webSearch = {
3303
3315
  name: "web_search",
3304
- description: "Search the web for documentation, tutorials, or solutions to problems. Returns top results with snippets.",
3316
+ description: "Web search for docs/solutions. Returns top results with snippets.",
3305
3317
  risk: "safe",
3306
3318
  parameters: {
3307
3319
  type: "object",
3308
3320
  properties: {
3309
3321
  query: { type: "string", description: "Search query." },
3310
- maxResults: { type: "number", description: "Maximum results to return. Defaults to 10." }
3322
+ maxResults: { type: "number", description: "Max results (default 10)." }
3311
3323
  },
3312
3324
  required: ["query"]
3313
3325
  },
@@ -3323,7 +3335,7 @@ var webSearch = {
3323
3335
  };
3324
3336
  var httpFetch = {
3325
3337
  name: "http_fetch",
3326
- description: "Fetch the content of a URL. Useful for retrieving API responses, documentation pages, or raw files. Returns the raw body text (truncated if large).",
3338
+ description: "Fetch a URL and return the body text (truncated if large).",
3327
3339
  risk: "safe",
3328
3340
  parameters: {
3329
3341
  type: "object",
@@ -3349,7 +3361,7 @@ var httpFetch = {
3349
3361
  };
3350
3362
  var fileInfo = {
3351
3363
  name: "file_info",
3352
- description: "Get detailed information about a file or directory inside the workspace. Includes size, type, and a profile suitable for safe manual deletion.",
3364
+ description: "File/dir info: size, type, safe-deletion profile.",
3353
3365
  risk: "safe",
3354
3366
  parameters: {
3355
3367
  type: "object",
@@ -3381,7 +3393,7 @@ ${steps.join("\n")}`,
3381
3393
  };
3382
3394
  var safeDeleteSuggestion = {
3383
3395
  name: "safe_delete_suggestion",
3384
- description: "Get PowerShell and CMD commands for manual deletion of a file/directory, WITH double-checking steps and verification hints. Does NOT execute deletion; returns commands for the user to run.",
3396
+ description: "Return (not execute) PowerShell/CMD deletion commands with double-check steps for a path.",
3385
3397
  risk: "safe",
3386
3398
  parameters: {
3387
3399
  type: "object",
@@ -3415,12 +3427,12 @@ ${steps.join("\n")}
3415
3427
  };
3416
3428
  var processList = {
3417
3429
  name: "process_list",
3418
- description: "List currently running processes on the system. Useful for finding processes that may be locking files or consuming resources.",
3430
+ description: "List running processes (find what locks files or uses resources).",
3419
3431
  risk: "safe",
3420
3432
  parameters: {
3421
3433
  type: "object",
3422
3434
  properties: {
3423
- filter: { type: "string", description: "Optional filter substring to match process names." }
3435
+ filter: { type: "string", description: "Filter substring for process names." }
3424
3436
  }
3425
3437
  },
3426
3438
  async execute(args, ctx) {
@@ -3441,7 +3453,7 @@ ${trimmed}` };
3441
3453
  };
3442
3454
  var portCheck = {
3443
3455
  name: "port_check",
3444
- description: "Check if a port is in use on the local machine. useful for debugging server startup issues or verifying ports are free.",
3456
+ description: "Check whether a local port is in use.",
3445
3457
  risk: "safe",
3446
3458
  parameters: {
3447
3459
  type: "object",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@menteeai/menteeswe",
3
- "version": "0.1.15",
3
+ "version": "0.1.17",
4
4
  "description": "MenteE SWE — a model-agnostic autonomous software-engineering agent CLI. Bring your own intelligence: Kimi, GLM/Z.ai, and more.",
5
5
  "type": "module",
6
6
  "license": "MIT",