@arcbridge/mcp-server 0.4.2 → 0.6.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/index.js +25 -14
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -42,8 +42,8 @@ function registerInitProject(server, ctx) {
|
|
|
42
42
|
"Initialize ArcBridge in a project directory. Creates .arcbridge/ with arc42 documentation, phase plan, agent roles, SQLite database, and platform-specific configs.",
|
|
43
43
|
{
|
|
44
44
|
name: z.string().min(1).describe("Project name"),
|
|
45
|
-
template: z.enum(["nextjs-app-router", "react-vite", "api-service", "dotnet-webapi", "unity-game", "angular-app"]).default("nextjs-app-router").describe(
|
|
46
|
-
"Project template: nextjs-app-router (Next.js with App Router, SSR/SSG), react-vite (React SPA with Vite, client-only), angular-app (Angular with standalone components, TypeScript), api-service (Node.js API with Express/Fastify/Hono), dotnet-webapi (ASP.NET Core Web API, C#), unity-game (Unity game project, C#, code-heavy)"
|
|
45
|
+
template: z.enum(["nextjs-app-router", "react-vite", "api-service", "dotnet-webapi", "unity-game", "angular-app", "fullstack-nextjs-dotnet"]).default("nextjs-app-router").describe(
|
|
46
|
+
"Project template: nextjs-app-router (Next.js with App Router, SSR/SSG), react-vite (React SPA with Vite, client-only), angular-app (Angular with standalone components, TypeScript), api-service (Node.js API with Express/Fastify/Hono), dotnet-webapi (ASP.NET Core Web API, C#), unity-game (Unity game project, C#, code-heavy), fullstack-nextjs-dotnet (monorepo with Next.js frontend + .NET API backend)"
|
|
47
47
|
),
|
|
48
48
|
features: z.array(z.enum(["auth", "database", "api"])).default([]).describe("Features to scaffold"),
|
|
49
49
|
quality_priorities: z.array(QualityCategorySchema).default(["security", "performance", "accessibility", "maintainability"]).describe(QUALITY_PRIORITIES_DESCRIPTION),
|
|
@@ -139,15 +139,11 @@ Use \`arcbridge_get_project_status\` to see the current state.`
|
|
|
139
139
|
);
|
|
140
140
|
}
|
|
141
141
|
let indexResult = null;
|
|
142
|
+
let indexError;
|
|
142
143
|
try {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
dependenciesIndexed: result.dependenciesIndexed,
|
|
147
|
-
componentsAnalyzed: result.componentsAnalyzed,
|
|
148
|
-
routesAnalyzed: result.routesAnalyzed
|
|
149
|
-
};
|
|
150
|
-
} catch {
|
|
144
|
+
indexResult = await indexProject(db, { projectRoot: targetDir });
|
|
145
|
+
} catch (err) {
|
|
146
|
+
indexError = err instanceof Error ? err.message : String(err);
|
|
151
147
|
}
|
|
152
148
|
const blockCount = db.prepare("SELECT COUNT(*) as count FROM building_blocks").get();
|
|
153
149
|
const scenarioCount = db.prepare("SELECT COUNT(*) as count FROM quality_scenarios").get();
|
|
@@ -169,12 +165,27 @@ Use \`arcbridge_get_project_status\` to see the current state.`
|
|
|
169
165
|
`- **Phases:** ${phaseCount.count}`,
|
|
170
166
|
`- **Tasks:** ${taskCount.count}`,
|
|
171
167
|
`- **Agent roles:** ${roles.length}`,
|
|
172
|
-
...indexResult ? [
|
|
168
|
+
...indexResult && !indexResult.skippedReason ? [
|
|
173
169
|
`- **Symbols indexed:** ${indexResult.symbolsIndexed}`,
|
|
174
170
|
`- **Dependencies indexed:** ${indexResult.dependenciesIndexed}`,
|
|
175
171
|
`- **Components analyzed:** ${indexResult.componentsAnalyzed}`,
|
|
176
172
|
`- **Routes analyzed:** ${indexResult.routesAnalyzed}`
|
|
177
|
-
] : [
|
|
173
|
+
] : [(() => {
|
|
174
|
+
const oneLine = (msg) => {
|
|
175
|
+
const normalized = msg.replace(/\s*\r?\n\s*/g, " ").trim();
|
|
176
|
+
return normalized.length > 200 ? `${normalized.slice(0, 199)}\u2026` : normalized;
|
|
177
|
+
};
|
|
178
|
+
const skippedReason = indexResult?.skippedReason;
|
|
179
|
+
const isCSharp = input.template === "dotnet-webapi" || input.template === "unity-game";
|
|
180
|
+
const reindexHint = isCSharp ? "run `arcbridge_reindex` after project setup to index C# symbols" : "run `arcbridge_reindex` once your project is set up";
|
|
181
|
+
if (skippedReason) {
|
|
182
|
+
return `- **Code indexing:** skipped \u2014 ${oneLine(skippedReason)}. ${reindexHint}`;
|
|
183
|
+
}
|
|
184
|
+
if (indexError) {
|
|
185
|
+
return `- **Code indexing:** failed \u2014 ${oneLine(indexError)}. ${reindexHint}`;
|
|
186
|
+
}
|
|
187
|
+
return `- **Code indexing:** failed. ${reindexHint}`;
|
|
188
|
+
})()],
|
|
178
189
|
"",
|
|
179
190
|
"## Files",
|
|
180
191
|
"",
|
|
@@ -1401,12 +1412,12 @@ import { indexProject as indexProject2, refreshFromDocs as refreshFromDocs7 } fr
|
|
|
1401
1412
|
function registerReindex(server, ctx) {
|
|
1402
1413
|
server.tool(
|
|
1403
1414
|
"arcbridge_reindex",
|
|
1404
|
-
"Re-index the project: refreshes architecture docs from arc42/YAML files, then reindexes code symbols (TypeScript
|
|
1415
|
+
"Re-index the project: refreshes architecture docs from arc42/YAML files, then reindexes code symbols (TypeScript, C#/.NET; Python and Go are experimental). This is the first step of the sync pipeline \u2014 use it to pick up manual doc edits and code changes.",
|
|
1405
1416
|
{
|
|
1406
1417
|
target_dir: z14.string().describe("Absolute path to the project directory"),
|
|
1407
1418
|
tsconfig_path: z14.string().optional().describe("Override tsconfig.json path (default: auto-detect). Only used for TypeScript projects."),
|
|
1408
1419
|
service: z14.string().optional().describe("Service name for monorepo projects (default: 'main')"),
|
|
1409
|
-
language: z14.enum(["typescript", "csharp", "auto"]).optional().describe("Project language. 'auto' detects from project files (default: 'auto')")
|
|
1420
|
+
language: z14.enum(["typescript", "csharp", "python", "go", "auto"]).optional().describe("Project language. 'auto' detects from project files (default: 'auto')")
|
|
1410
1421
|
},
|
|
1411
1422
|
async (params) => {
|
|
1412
1423
|
const start = Date.now();
|