@mandujs/mcp 0.24.0 → 0.27.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/package.json +4 -4
- package/src/tools/ate-boundary-probe.ts +109 -0
- package/src/tools/ate-context.ts +173 -96
- package/src/tools/ate-coverage.ts +71 -0
- package/src/tools/ate-mutate.ts +103 -0
- package/src/tools/ate-mutation-report.ts +64 -0
- package/src/tools/ate-oracle-pending.ts +49 -0
- package/src/tools/ate-oracle-replay.ts +44 -0
- package/src/tools/ate-oracle-verdict.ts +70 -0
- package/src/tools/ate-recall.ts +85 -0
- package/src/tools/ate-remember.ts +79 -0
- package/src/tools/ate-save.ts +160 -139
- package/src/tools/ate.ts +34 -7
- package/src/tools/index.ts +82 -0
package/src/tools/ate.ts
CHANGED
|
@@ -171,16 +171,27 @@ export const ateToolDefinitions: Tool[] = [
|
|
|
171
171
|
readOnlyHint: true,
|
|
172
172
|
},
|
|
173
173
|
description:
|
|
174
|
-
"ATE
|
|
175
|
-
"
|
|
176
|
-
"
|
|
177
|
-
"
|
|
174
|
+
"ATE Impact Analysis (Phase B.3 v2). Calculates the minimal set of " +
|
|
175
|
+
"routes / specs affected by changed files using git diff, classifies " +
|
|
176
|
+
"contract changes (additive / breaking / renaming), and returns " +
|
|
177
|
+
"`affected.specsToReRun`, `affected.specsLikelyBroken`, " +
|
|
178
|
+
"`affected.missingCoverage`, plus a `suggestions` list keyed to " +
|
|
179
|
+
"re_run / heal / regenerate / add_boundary_test. Stamped with " +
|
|
180
|
+
"graphVersion for agent caching. Keeps v1 fields (changedFiles, " +
|
|
181
|
+
"selectedRoutes, warnings) for backwards compatibility. " +
|
|
182
|
+
"Pass `since: 'working'` for uncommitted changes, `since: 'staged'` " +
|
|
183
|
+
"for staged changes, or a git rev (default: HEAD~1) for committed diffs.",
|
|
178
184
|
inputSchema: {
|
|
179
185
|
type: "object",
|
|
180
186
|
properties: {
|
|
181
187
|
repoRoot: { type: "string", description: "Absolute path to the Mandu project root" },
|
|
182
|
-
base: { type: "string", description: "Git base ref
|
|
183
|
-
head: { type: "string", description: "Git head ref
|
|
188
|
+
base: { type: "string", description: "Git base ref (legacy v1 — use `since` instead)" },
|
|
189
|
+
head: { type: "string", description: "Git head ref (legacy v1 — defaults to HEAD)" },
|
|
190
|
+
since: {
|
|
191
|
+
type: "string",
|
|
192
|
+
description:
|
|
193
|
+
"v2 diff source: 'HEAD~1' | 'staged' | 'working' | any git rev. Default 'HEAD~1'.",
|
|
194
|
+
},
|
|
184
195
|
},
|
|
185
196
|
required: ["repoRoot"],
|
|
186
197
|
},
|
|
@@ -333,11 +344,27 @@ export function ateTools(projectRoot: string) {
|
|
|
333
344
|
return ateHeal({ repoRoot, runId });
|
|
334
345
|
},
|
|
335
346
|
"mandu.ate.impact": async (args: Record<string, unknown>) => {
|
|
336
|
-
const { repoRoot, base, head } = args as {
|
|
347
|
+
const { repoRoot, base, head, since } = args as {
|
|
337
348
|
repoRoot: string;
|
|
338
349
|
base?: string;
|
|
339
350
|
head?: string;
|
|
351
|
+
since?: "HEAD~1" | "staged" | "working" | string;
|
|
340
352
|
};
|
|
353
|
+
|
|
354
|
+
// Phase B.3 — try the v2 impact pipeline first so callers get
|
|
355
|
+
// `affected`, `suggestions`, `contractDiffs`, `graphVersion` in
|
|
356
|
+
// addition to the v1 fields. Fall back to v1 on failure so the
|
|
357
|
+
// tool contract stays backwards compatible.
|
|
358
|
+
try {
|
|
359
|
+
const { computeImpactV2 } = await import("@mandujs/ate");
|
|
360
|
+
const v2 = await computeImpactV2({
|
|
361
|
+
repoRoot,
|
|
362
|
+
since: since ?? base,
|
|
363
|
+
});
|
|
364
|
+
return { ok: true, ...v2 };
|
|
365
|
+
} catch {
|
|
366
|
+
// Fall through to v1.
|
|
367
|
+
}
|
|
341
368
|
return ateImpact({ repoRoot, base, head });
|
|
342
369
|
},
|
|
343
370
|
"mandu.ate.auto_pipeline": async (args: Record<string, unknown>) => {
|
package/src/tools/index.ts
CHANGED
|
@@ -34,6 +34,28 @@ export { ateFlakesTools, ateFlakesToolDefinitions } from "./ate-flakes.js";
|
|
|
34
34
|
export { atePromptTools, atePromptToolDefinitions } from "./ate-prompt.js";
|
|
35
35
|
export { ateExemplarTools, ateExemplarToolDefinitions } from "./ate-exemplar.js";
|
|
36
36
|
export { ateSaveTools, ateSaveToolDefinitions } from "./ate-save.js";
|
|
37
|
+
export { ateBoundaryProbeTools, ateBoundaryProbeToolDefinitions } from "./ate-boundary-probe.js";
|
|
38
|
+
export { ateRecallTools, ateRecallToolDefinitions } from "./ate-recall.js";
|
|
39
|
+
export { ateRememberTools, ateRememberToolDefinitions } from "./ate-remember.js";
|
|
40
|
+
export { ateCoverageTools, ateCoverageToolDefinitions } from "./ate-coverage.js";
|
|
41
|
+
// Phase C tool suite
|
|
42
|
+
export { ateMutateTools, ateMutateToolDefinitions } from "./ate-mutate.js";
|
|
43
|
+
export {
|
|
44
|
+
ateMutationReportTools,
|
|
45
|
+
ateMutationReportToolDefinitions,
|
|
46
|
+
} from "./ate-mutation-report.js";
|
|
47
|
+
export {
|
|
48
|
+
ateOraclePendingTools,
|
|
49
|
+
ateOraclePendingToolDefinitions,
|
|
50
|
+
} from "./ate-oracle-pending.js";
|
|
51
|
+
export {
|
|
52
|
+
ateOracleVerdictTools,
|
|
53
|
+
ateOracleVerdictToolDefinitions,
|
|
54
|
+
} from "./ate-oracle-verdict.js";
|
|
55
|
+
export {
|
|
56
|
+
ateOracleReplayTools,
|
|
57
|
+
ateOracleReplayToolDefinitions,
|
|
58
|
+
} from "./ate-oracle-replay.js";
|
|
37
59
|
export { resourceTools, resourceToolDefinitions } from "./resource.js";
|
|
38
60
|
export { componentTools, componentToolDefinitions } from "./component.js";
|
|
39
61
|
export { kitchenTools, kitchenToolDefinitions } from "./kitchen.js";
|
|
@@ -80,6 +102,31 @@ import { ateFlakesTools, ateFlakesToolDefinitions } from "./ate-flakes.js";
|
|
|
80
102
|
import { atePromptTools, atePromptToolDefinitions } from "./ate-prompt.js";
|
|
81
103
|
import { ateExemplarTools, ateExemplarToolDefinitions } from "./ate-exemplar.js";
|
|
82
104
|
import { ateSaveTools, ateSaveToolDefinitions } from "./ate-save.js";
|
|
105
|
+
import {
|
|
106
|
+
ateBoundaryProbeTools,
|
|
107
|
+
ateBoundaryProbeToolDefinitions,
|
|
108
|
+
} from "./ate-boundary-probe.js";
|
|
109
|
+
import { ateRecallTools, ateRecallToolDefinitions } from "./ate-recall.js";
|
|
110
|
+
import { ateRememberTools, ateRememberToolDefinitions } from "./ate-remember.js";
|
|
111
|
+
import { ateCoverageTools, ateCoverageToolDefinitions } from "./ate-coverage.js";
|
|
112
|
+
// Phase C tool suite
|
|
113
|
+
import { ateMutateTools, ateMutateToolDefinitions } from "./ate-mutate.js";
|
|
114
|
+
import {
|
|
115
|
+
ateMutationReportTools,
|
|
116
|
+
ateMutationReportToolDefinitions,
|
|
117
|
+
} from "./ate-mutation-report.js";
|
|
118
|
+
import {
|
|
119
|
+
ateOraclePendingTools,
|
|
120
|
+
ateOraclePendingToolDefinitions,
|
|
121
|
+
} from "./ate-oracle-pending.js";
|
|
122
|
+
import {
|
|
123
|
+
ateOracleVerdictTools,
|
|
124
|
+
ateOracleVerdictToolDefinitions,
|
|
125
|
+
} from "./ate-oracle-verdict.js";
|
|
126
|
+
import {
|
|
127
|
+
ateOracleReplayTools,
|
|
128
|
+
ateOracleReplayToolDefinitions,
|
|
129
|
+
} from "./ate-oracle-replay.js";
|
|
83
130
|
import { resourceTools, resourceToolDefinitions } from "./resource.js";
|
|
84
131
|
import { componentTools, componentToolDefinitions } from "./component.js";
|
|
85
132
|
import { kitchenTools, kitchenToolDefinitions } from "./kitchen.js";
|
|
@@ -143,6 +190,41 @@ const TOOL_MODULES: ToolModule[] = [
|
|
|
143
190
|
{ category: "ate-prompt", definitions: atePromptToolDefinitions, handlers: atePromptTools },
|
|
144
191
|
{ category: "ate-exemplar", definitions: ateExemplarToolDefinitions, handlers: ateExemplarTools },
|
|
145
192
|
{ category: "ate-save", definitions: ateSaveToolDefinitions, handlers: ateSaveTools },
|
|
193
|
+
// Phase B tool suite
|
|
194
|
+
{
|
|
195
|
+
category: "ate-boundary-probe",
|
|
196
|
+
definitions: ateBoundaryProbeToolDefinitions,
|
|
197
|
+
handlers: ateBoundaryProbeTools,
|
|
198
|
+
},
|
|
199
|
+
{ category: "ate-recall", definitions: ateRecallToolDefinitions, handlers: ateRecallTools },
|
|
200
|
+
{ category: "ate-remember", definitions: ateRememberToolDefinitions, handlers: ateRememberTools },
|
|
201
|
+
{
|
|
202
|
+
category: "ate-coverage",
|
|
203
|
+
definitions: ateCoverageToolDefinitions,
|
|
204
|
+
handlers: ateCoverageTools,
|
|
205
|
+
},
|
|
206
|
+
// Phase C tool suite
|
|
207
|
+
{ category: "ate-mutate", definitions: ateMutateToolDefinitions, handlers: ateMutateTools },
|
|
208
|
+
{
|
|
209
|
+
category: "ate-mutation-report",
|
|
210
|
+
definitions: ateMutationReportToolDefinitions,
|
|
211
|
+
handlers: ateMutationReportTools,
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
category: "ate-oracle-pending",
|
|
215
|
+
definitions: ateOraclePendingToolDefinitions,
|
|
216
|
+
handlers: ateOraclePendingTools,
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
category: "ate-oracle-verdict",
|
|
220
|
+
definitions: ateOracleVerdictToolDefinitions,
|
|
221
|
+
handlers: ateOracleVerdictTools,
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
category: "ate-oracle-replay",
|
|
225
|
+
definitions: ateOracleReplayToolDefinitions,
|
|
226
|
+
handlers: ateOracleReplayTools,
|
|
227
|
+
},
|
|
146
228
|
{ category: "resource", definitions: resourceToolDefinitions, handlers: resourceTools },
|
|
147
229
|
{ category: "component", definitions: componentToolDefinitions, handlers: componentTools },
|
|
148
230
|
{ category: "kitchen", definitions: kitchenToolDefinitions, handlers: kitchenTools },
|