@imenam/mcp-feature-analyzer 1.0.2 → 1.0.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.
- package/README.md +336 -295
- package/dist/src/core/agent-repo.d.ts +4 -0
- package/dist/src/core/agent-repo.js +172 -0
- package/dist/src/core/gateway-exec.d.ts +27 -0
- package/dist/src/core/gateway-exec.js +115 -0
- package/dist/src/core/git.d.ts +27 -2
- package/dist/src/core/git.js +48 -34
- package/dist/src/core/role.d.ts +11 -0
- package/dist/src/core/role.js +9 -0
- package/dist/src/index.js +39 -10
- package/dist/src/tools/create-analysis.d.ts +3 -2
- package/dist/src/tools/create-analysis.js +4 -4
- package/dist/src/tools/refresh-analysis.d.ts +4 -3
- package/dist/src/tools/refresh-analysis.js +5 -10
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { computeSnapshot } from "../core/git.js";
|
|
1
|
+
import { computeSnapshot, localRepo } from "../core/git.js";
|
|
2
2
|
import { ANALYSIS_MODES } from "../../shared/schemas/analysis.schema.js";
|
|
3
3
|
import { fileLine, fileTotals, snapshotLabel } from "./format.js";
|
|
4
4
|
import { optionalString, rejectUnknownFields, requireEnum, requireString, textResult, } from "./types.js";
|
|
5
5
|
const FIELDS = ["repo_path", "project", "title", "mode", "base", "head", "request_text", "request_source"];
|
|
6
|
-
/** Calcule et fige le diff du dépôt, puis crée l'analyse. */
|
|
7
|
-
export async function createAnalysis(store, args) {
|
|
6
|
+
/** Calcule et fige le diff du dépôt, lu par `repoFor(repo_path)` (git local par défaut), puis crée l'analyse. */
|
|
7
|
+
export async function createAnalysis(store, args, repoFor = localRepo) {
|
|
8
8
|
rejectUnknownFields(args, FIELDS);
|
|
9
9
|
const repoPath = requireString(args, "repo_path");
|
|
10
10
|
const project = requireString(args, "project");
|
|
@@ -17,7 +17,7 @@ export async function createAnalysis(store, args) {
|
|
|
17
17
|
if (requestSource !== undefined && requestText === undefined) {
|
|
18
18
|
throw new Error(`"request_source" describes the initial request: give "request_text" too.`);
|
|
19
19
|
}
|
|
20
|
-
const computed = await computeSnapshot({ repoPath, mode, base, head });
|
|
20
|
+
const computed = await computeSnapshot({ repoPath, mode, base, head }, repoFor(repoPath));
|
|
21
21
|
const analysis = store.create({ project, title, request: requestText === undefined ? null : { text: requestText, source: requestSource ?? null } }, computed);
|
|
22
22
|
const lines = [
|
|
23
23
|
`Created analysis "${analysis.title}" (id: ${analysis.id}) in project "${analysis.project}".`,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { AnalysisStore } from "../core/analysis-store.js";
|
|
2
|
+
import { type RepoAccess } from "../core/git.js";
|
|
2
3
|
import { type Args, type MutationResult } from "./types.js";
|
|
3
4
|
/**
|
|
4
|
-
* Recalcule le snapshot avec le dépôt, le mode et les refs de l'analyse
|
|
5
|
-
* revue repart à l'état `pending` sans décision, sélection ni prompt.
|
|
5
|
+
* Recalcule le snapshot avec le dépôt, le mode et les refs de l'analyse, lus par
|
|
6
|
+
* `repoFor` (git local par défaut) ; la revue repart à l'état `pending` sans décision, sélection ni prompt.
|
|
6
7
|
*/
|
|
7
|
-
export declare function refreshAnalysis(store: AnalysisStore, args: Args): Promise<MutationResult>;
|
|
8
|
+
export declare function refreshAnalysis(store: AnalysisStore, args: Args, repoFor?: (repoPath: string) => RepoAccess): Promise<MutationResult>;
|
|
@@ -1,20 +1,15 @@
|
|
|
1
|
-
import { computeSnapshot } from "../core/git.js";
|
|
1
|
+
import { computeSnapshot, localRepo } from "../core/git.js";
|
|
2
2
|
import { snapshotLabel } from "./format.js";
|
|
3
3
|
import { rejectUnknownFields, requireString, textResult } from "./types.js";
|
|
4
4
|
/**
|
|
5
|
-
* Recalcule le snapshot avec le dépôt, le mode et les refs de l'analyse
|
|
6
|
-
* revue repart à l'état `pending` sans décision, sélection ni prompt.
|
|
5
|
+
* Recalcule le snapshot avec le dépôt, le mode et les refs de l'analyse, lus par
|
|
6
|
+
* `repoFor` (git local par défaut) ; la revue repart à l'état `pending` sans décision, sélection ni prompt.
|
|
7
7
|
*/
|
|
8
|
-
export async function refreshAnalysis(store, args) {
|
|
8
|
+
export async function refreshAnalysis(store, args, repoFor = localRepo) {
|
|
9
9
|
rejectUnknownFields(args, ["analysis_id"]);
|
|
10
10
|
const id = requireString(args, "analysis_id");
|
|
11
11
|
const current = store.get(id);
|
|
12
|
-
const computed = await computeSnapshot({
|
|
13
|
-
repoPath: current.repoPath,
|
|
14
|
-
mode: current.mode,
|
|
15
|
-
base: current.base,
|
|
16
|
-
head: current.head,
|
|
17
|
-
});
|
|
12
|
+
const computed = await computeSnapshot({ repoPath: current.repoPath, mode: current.mode, base: current.base, head: current.head }, repoFor(current.repoPath));
|
|
18
13
|
const { analysis, stats, previousReview } = store.replaceSnapshot(id, "agent", computed);
|
|
19
14
|
const outdated = analysis.findings.filter((finding) => finding.status === "outdated");
|
|
20
15
|
const lines = [
|
package/dist/src/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const APP_VERSION = "1.0.
|
|
1
|
+
export declare const APP_VERSION = "1.0.3";
|
package/dist/src/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Auto-generated version file - do not edit manually
|
|
2
|
-
export const APP_VERSION = '1.0.
|
|
2
|
+
export const APP_VERSION = '1.0.3';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@imenam/mcp-feature-analyzer",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "MCP server that helps a human review a feature developed by an AI agent: summary, changed files, frozen diff, findings ranked by severity, diagrams, and structured feedback the agent reads back.",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"scripts": {
|