@arcbridge/mcp-server 0.6.1 → 0.6.2
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 +12 -3
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1585,6 +1585,7 @@ function registerSearchSymbols(server, ctx) {
|
|
|
1585
1585
|
import { z as z16 } from "zod";
|
|
1586
1586
|
import { readFileSync, existsSync as existsSync3 } from "fs";
|
|
1587
1587
|
import { join as join3 } from "path";
|
|
1588
|
+
import { logWarn } from "@arcbridge/core";
|
|
1588
1589
|
function registerGetSymbol(server, ctx) {
|
|
1589
1590
|
server.tool(
|
|
1590
1591
|
"arcbridge_get_symbol",
|
|
@@ -1643,7 +1644,14 @@ Use \`arcbridge_search_symbols\` to find symbols by name.`
|
|
|
1643
1644
|
return `${marker} ${String(lineNum).padStart(4)} | ${line}`;
|
|
1644
1645
|
}).join("\n");
|
|
1645
1646
|
lines.push("## Source", "", "```typescript", snippet, "```", "");
|
|
1646
|
-
} catch {
|
|
1647
|
+
} catch (err) {
|
|
1648
|
+
logWarn(`Could not read source for symbol ${symbol.id} (${symbol.file_path})`, err);
|
|
1649
|
+
lines.push(
|
|
1650
|
+
"## Source",
|
|
1651
|
+
"",
|
|
1652
|
+
`_Source unavailable: could not read \`${symbol.file_path}\` (${err instanceof Error ? err.message : String(err)})._`,
|
|
1653
|
+
""
|
|
1654
|
+
);
|
|
1647
1655
|
}
|
|
1648
1656
|
}
|
|
1649
1657
|
}
|
|
@@ -4484,7 +4492,8 @@ You can commit this file to preserve the activity record in git.`
|
|
|
4484
4492
|
// src/tools/update-arc42-section.ts
|
|
4485
4493
|
import { z as z34 } from "zod";
|
|
4486
4494
|
import { join as join4 } from "path";
|
|
4487
|
-
import { existsSync as existsSync4, readFileSync as readFileSync2
|
|
4495
|
+
import { existsSync as existsSync4, readFileSync as readFileSync2 } from "fs";
|
|
4496
|
+
import { atomicWriteFileSync } from "@arcbridge/core";
|
|
4488
4497
|
function splitFrontmatter(raw) {
|
|
4489
4498
|
if (!raw.startsWith("---")) {
|
|
4490
4499
|
return { frontmatterBlock: "", body: raw };
|
|
@@ -4569,7 +4578,7 @@ function registerUpdateArc42Section(server, ctx) {
|
|
|
4569
4578
|
${params.content}
|
|
4570
4579
|
` : `${params.content}
|
|
4571
4580
|
`;
|
|
4572
|
-
|
|
4581
|
+
atomicWriteFileSync(filePath, updated);
|
|
4573
4582
|
const label = SECTION_LABELS[params.section];
|
|
4574
4583
|
return textResult(
|
|
4575
4584
|
`Updated **${label}** (\`${params.section}.md\`). Frontmatter preserved.`
|