@arcbridge/mcp-server 0.4.1 → 0.5.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 +30 -14
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -47,7 +47,9 @@ function registerInitProject(server, ctx) {
|
|
|
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),
|
|
50
|
-
platforms: z.array(z.enum(["claude", "copilot", "codex", "gemini"])).default(["claude"]).describe(
|
|
50
|
+
platforms: z.array(z.enum(["claude", "copilot", "codex", "gemini", "opencode"])).default(["claude"]).describe(
|
|
51
|
+
"Target platforms. Generates platform-specific instruction files and agent configs for Claude, Copilot, Codex, Gemini, and OpenCode."
|
|
52
|
+
),
|
|
51
53
|
target_dir: z.string().describe("Absolute path to the target project directory"),
|
|
52
54
|
spec: z.string().optional().describe(
|
|
53
55
|
"Project specification or requirements text. Saved to .arcbridge/spec.md and referenced by agents for context. Can be a description, user stories, or any text that defines what the project should do."
|
|
@@ -137,15 +139,11 @@ Use \`arcbridge_get_project_status\` to see the current state.`
|
|
|
137
139
|
);
|
|
138
140
|
}
|
|
139
141
|
let indexResult = null;
|
|
142
|
+
let indexError;
|
|
140
143
|
try {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
dependenciesIndexed: result.dependenciesIndexed,
|
|
145
|
-
componentsAnalyzed: result.componentsAnalyzed,
|
|
146
|
-
routesAnalyzed: result.routesAnalyzed
|
|
147
|
-
};
|
|
148
|
-
} catch {
|
|
144
|
+
indexResult = await indexProject(db, { projectRoot: targetDir });
|
|
145
|
+
} catch (err) {
|
|
146
|
+
indexError = err instanceof Error ? err.message : String(err);
|
|
149
147
|
}
|
|
150
148
|
const blockCount = db.prepare("SELECT COUNT(*) as count FROM building_blocks").get();
|
|
151
149
|
const scenarioCount = db.prepare("SELECT COUNT(*) as count FROM quality_scenarios").get();
|
|
@@ -167,12 +165,27 @@ Use \`arcbridge_get_project_status\` to see the current state.`
|
|
|
167
165
|
`- **Phases:** ${phaseCount.count}`,
|
|
168
166
|
`- **Tasks:** ${taskCount.count}`,
|
|
169
167
|
`- **Agent roles:** ${roles.length}`,
|
|
170
|
-
...indexResult ? [
|
|
168
|
+
...indexResult && !indexResult.skippedReason ? [
|
|
171
169
|
`- **Symbols indexed:** ${indexResult.symbolsIndexed}`,
|
|
172
170
|
`- **Dependencies indexed:** ${indexResult.dependenciesIndexed}`,
|
|
173
171
|
`- **Components analyzed:** ${indexResult.componentsAnalyzed}`,
|
|
174
172
|
`- **Routes analyzed:** ${indexResult.routesAnalyzed}`
|
|
175
|
-
] : [
|
|
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
|
+
})()],
|
|
176
189
|
"",
|
|
177
190
|
"## Files",
|
|
178
191
|
"",
|
|
@@ -181,8 +194,11 @@ Use \`arcbridge_get_project_status\` to see the current state.`
|
|
|
181
194
|
"- `.arcbridge/plan/` \u2014 Phase plan and tasks",
|
|
182
195
|
"- `.arcbridge/agents/` \u2014 Canonical agent role definitions",
|
|
183
196
|
"- `.arcbridge/index.db` \u2014 SQLite database",
|
|
184
|
-
...params.platforms.includes("claude") ? ["- `CLAUDE.md` \u2014 Claude Code project instructions", "- `.claude/agents/` \u2014 Claude agent configs"] : [],
|
|
197
|
+
...params.platforms.includes("claude") ? ["- `CLAUDE.md` \u2014 Claude Code project instructions", "- `.claude/agents/` \u2014 Claude agent configs", "- `.mcp.json` \u2014 MCP server config"] : [],
|
|
185
198
|
...params.platforms.includes("copilot") ? ["- `.github/copilot-instructions.md` \u2014 Copilot instructions", "- `.github/agents/` \u2014 Copilot agent configs"] : [],
|
|
199
|
+
...params.platforms.includes("codex") ? ["- `AGENTS.md` \u2014 Codex project instructions", "- `.agents/skills/` \u2014 Codex skills"] : [],
|
|
200
|
+
...params.platforms.includes("gemini") ? ["- `.gemini/settings.json` \u2014 Gemini MCP config", "- `.gemini/styleguide.md` \u2014 Gemini project instructions", "- `.gemini/agents/` \u2014 Gemini agent configs", "- `GEMINI.md` \u2014 Gemini CLI instructions"] : [],
|
|
201
|
+
...params.platforms.includes("opencode") ? ["- `opencode.json` \u2014 OpenCode MCP config", "- `OPENCODE.md` \u2014 OpenCode project instructions", "- `.opencode/agents/` \u2014 OpenCode agent configs", "- `.opencode/skills/` \u2014 OpenCode skills"] : [],
|
|
186
202
|
...syncFiles.map((f) => `- \`${f}\` \u2014 Sync loop trigger`),
|
|
187
203
|
...allWarnings.length > 0 ? [
|
|
188
204
|
"",
|
|
@@ -1396,12 +1412,12 @@ import { indexProject as indexProject2, refreshFromDocs as refreshFromDocs7 } fr
|
|
|
1396
1412
|
function registerReindex(server, ctx) {
|
|
1397
1413
|
server.tool(
|
|
1398
1414
|
"arcbridge_reindex",
|
|
1399
|
-
"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.",
|
|
1400
1416
|
{
|
|
1401
1417
|
target_dir: z14.string().describe("Absolute path to the project directory"),
|
|
1402
1418
|
tsconfig_path: z14.string().optional().describe("Override tsconfig.json path (default: auto-detect). Only used for TypeScript projects."),
|
|
1403
1419
|
service: z14.string().optional().describe("Service name for monorepo projects (default: 'main')"),
|
|
1404
|
-
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')")
|
|
1405
1421
|
},
|
|
1406
1422
|
async (params) => {
|
|
1407
1423
|
const start = Date.now();
|