vexp-mcp 2.2.3 → 2.3.0
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.
- package/dist/tools/index-status.js +21 -0
- package/dist/tools/run-pipeline.js +20 -10
- package/package.json +1 -1
|
@@ -82,10 +82,31 @@ function formatStatusAsText(status, targeting) {
|
|
|
82
82
|
lines.push(`| Cross-repo edges | ${status.cross_repo_edges.toLocaleString()} |`);
|
|
83
83
|
lines.push(`| Index DB size | ${formatBytes(status.db_size_bytes)} |`);
|
|
84
84
|
lines.push(`| Daemon memory | ${formatBytes(status.memory_rss_bytes)} |`);
|
|
85
|
+
if (status.compressor) {
|
|
86
|
+
const compressorLabel = status.compressor === "llm"
|
|
87
|
+
? `llm (${status.llm_model ?? "?"}, ${status.llm_inference ?? "?"})`
|
|
88
|
+
: "rule";
|
|
89
|
+
lines.push(`| Compressor | ${compressorLabel} |`);
|
|
90
|
+
}
|
|
85
91
|
if (status.last_query_time_ms !== undefined) {
|
|
86
92
|
lines.push(`| Last query time | ${status.last_query_time_ms}ms |`);
|
|
87
93
|
}
|
|
88
94
|
lines.push("");
|
|
95
|
+
if (status.llm_configured_but_inactive) {
|
|
96
|
+
lines.push("⚠️ A local LLM model is installed and enabled in config, but this daemon is running the rule compressor. " +
|
|
97
|
+
"Restart the daemon (`vexp daemon-cmd restart`) or re-run `vexp setup-llm` — until then, results are NOT LLM-compressed.");
|
|
98
|
+
lines.push("");
|
|
99
|
+
}
|
|
100
|
+
// Live session usage (2.3 C1) — which agent sessions actually called vexp.
|
|
101
|
+
if (status.sessions && status.sessions.length > 0) {
|
|
102
|
+
lines.push("## Active sessions (last 4h)");
|
|
103
|
+
lines.push("");
|
|
104
|
+
for (const s of status.sessions) {
|
|
105
|
+
const idle = s.idle_s < 60 ? `${s.idle_s}s` : `${Math.floor(s.idle_s / 60)}m`;
|
|
106
|
+
lines.push(`- \`${s.session}…\` — ${s.pipeline_calls} pipeline, ${s.skeleton_calls} skeleton, ${s.other_calls} other (idle ${idle})`);
|
|
107
|
+
}
|
|
108
|
+
lines.push("");
|
|
109
|
+
}
|
|
89
110
|
// Per-repo status
|
|
90
111
|
if (status.repos.length > 0) {
|
|
91
112
|
lines.push("## Repos");
|
|
@@ -27,16 +27,19 @@ export const RunPipelineSchema = z.object({
|
|
|
27
27
|
.optional()
|
|
28
28
|
.default(10000))
|
|
29
29
|
.describe("Total token budget for the entire pipeline output"),
|
|
30
|
+
// NOTE: no zod .default() on include_tests / include_file_content — the
|
|
31
|
+
// daemon has intent-aware defaults for both (tests auto-enable for debug;
|
|
32
|
+
// modify/refactor omit pivot bodies). A static default here would reach the
|
|
33
|
+
// daemon as an EXPLICIT value and permanently disable that logic (T-bench
|
|
34
|
+
// 2026-07: every Node-MCP debug call arrived with include_tests=false).
|
|
30
35
|
include_tests: z.preprocess(coerceBool, z
|
|
31
36
|
.boolean()
|
|
32
|
-
.optional()
|
|
33
|
-
.default
|
|
34
|
-
.describe("Include test files"),
|
|
37
|
+
.optional())
|
|
38
|
+
.describe("Include test files (default: auto — enabled for debug intent)"),
|
|
35
39
|
include_file_content: z.preprocess(coerceBool, z
|
|
36
40
|
.boolean()
|
|
37
|
-
.optional()
|
|
38
|
-
.default
|
|
39
|
-
.describe("Include full file content for pivot files from index"),
|
|
41
|
+
.optional())
|
|
42
|
+
.describe("Include full file content for pivot files (default: auto — read/debug inline bodies; modify/refactor return skeletons + V-REF)"),
|
|
40
43
|
repos: z.preprocess(coerceArray, z
|
|
41
44
|
.array(z.string())
|
|
42
45
|
.optional())
|
|
@@ -68,7 +71,8 @@ export const RUN_PIPELINE_DEFINITION = {
|
|
|
68
71
|
"ALWAYS prefer this over Read, Grep, Glob, or get_context_capsule — " +
|
|
69
72
|
"it provides the same results plus impact analysis in a single call with ~60% fewer tokens. " +
|
|
70
73
|
"Auto-detects intent (debug/modify/refactor/explore) from your task description. " +
|
|
71
|
-
"
|
|
74
|
+
"Read/debug tasks inline pivot file content; modify/refactor tasks return skeletons + V-REF hashes (expand with expand_vexp_ref, or Read the file you are about to edit). " +
|
|
75
|
+
"If you need more detail on a specific file, use get_skeleton (detail: minimal/standard/detailed) instead of Read — it saves 70-90% tokens.",
|
|
72
76
|
inputSchema: {
|
|
73
77
|
type: "object",
|
|
74
78
|
properties: {
|
|
@@ -106,11 +110,11 @@ export const RUN_PIPELINE_DEFINITION = {
|
|
|
106
110
|
},
|
|
107
111
|
include_tests: {
|
|
108
112
|
type: "boolean",
|
|
109
|
-
description: "Include test files (default:
|
|
113
|
+
description: "Include test files (default: auto — enabled for debug intent)",
|
|
110
114
|
},
|
|
111
115
|
include_file_content: {
|
|
112
116
|
type: "boolean",
|
|
113
|
-
description: "Include full file content for pivot files
|
|
117
|
+
description: "Include full file content for pivot files (default: auto — read/debug inline bodies; modify/refactor return skeletons + V-REF)",
|
|
114
118
|
},
|
|
115
119
|
repos: {
|
|
116
120
|
type: "array",
|
|
@@ -141,6 +145,12 @@ export async function handleRunPipeline(params, daemon) {
|
|
|
141
145
|
const result = (await daemon.call("run_pipeline", validated));
|
|
142
146
|
const scoped = validated.repos?.length ? `, repos: ${validated.repos.join(", ")}` : "";
|
|
143
147
|
const banner = `> vexp target: ${targeting.workspaceRoot} (via ${targeting.source}${scoped})`;
|
|
148
|
+
// Safety net for daemons whose output predates the in-band coverage header:
|
|
149
|
+
// never let a degraded status reach the agent invisibly. Newer daemons embed
|
|
150
|
+
// an INDEX DEGRADED/EMPTY marker in `output` themselves — don't duplicate it.
|
|
151
|
+
const degradedNote = result.status === "degraded" && !/INDEX (DEGRADED|EMPTY)/.test(result.output)
|
|
152
|
+
? "\n> vexp status: degraded — index coverage too small to answer reliably; use Grep/Glob/Read directly and run `vexp index`."
|
|
153
|
+
: "";
|
|
144
154
|
// The Rust engine already produces formatted text output; we only prepend the banner.
|
|
145
|
-
return `${banner}\n${result.output}`;
|
|
155
|
+
return `${banner}${degradedNote}\n${result.output}`;
|
|
146
156
|
}
|