nexarch 0.9.23 → 0.9.24
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/commands/init-agent.js +3 -4
- package/dist/lib/clients.js +12 -4
- package/package.json +1 -1
|
@@ -316,12 +316,11 @@ function replaceManagedSection(existing, key, body) {
|
|
|
316
316
|
const escapedStart = markers.start.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
317
317
|
const escapedEnd = markers.end.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
318
318
|
const managedRegex = new RegExp(`${escapedStart}[\\s\\S]*?${escapedEnd}\\s*`, "gm");
|
|
319
|
-
|
|
319
|
+
const stripped = existing.replace(managedRegex, "").trimEnd();
|
|
320
|
+
if (stripped === existing.trimEnd())
|
|
320
321
|
return existing;
|
|
321
322
|
const canonicalBlock = wrapManagedSection(key, body);
|
|
322
|
-
|
|
323
|
-
const rebuilt = `${stripped}${stripped ? "\n\n" : ""}${canonicalBlock}\n`;
|
|
324
|
-
return rebuilt;
|
|
323
|
+
return `${stripped}${stripped ? "\n\n" : ""}${canonicalBlock}\n`;
|
|
325
324
|
}
|
|
326
325
|
function replaceInjectedSection(existing, sectionHeading, sectionBody) {
|
|
327
326
|
const escapedHeading = sectionHeading.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
package/dist/lib/clients.js
CHANGED
|
@@ -106,6 +106,12 @@ export function nexarchServerBlockFromRegistry(registry) {
|
|
|
106
106
|
if (!first) {
|
|
107
107
|
throw new Error("Nexarch integration registry is missing MCP client profiles.");
|
|
108
108
|
}
|
|
109
|
+
if (process.platform === "win32") {
|
|
110
|
+
return {
|
|
111
|
+
command: "cmd",
|
|
112
|
+
args: ["/c", first.serverCommand, ...first.serverArgs],
|
|
113
|
+
};
|
|
114
|
+
}
|
|
109
115
|
return {
|
|
110
116
|
command: first.serverCommand,
|
|
111
117
|
args: first.serverArgs,
|
|
@@ -113,8 +119,10 @@ export function nexarchServerBlockFromRegistry(registry) {
|
|
|
113
119
|
}
|
|
114
120
|
export function findClientProfile(registry, code) {
|
|
115
121
|
const normalized = code.trim().toLowerCase();
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
122
|
+
const aliases = {
|
|
123
|
+
"continue": "continue-dev",
|
|
124
|
+
"claude": "claude-code",
|
|
125
|
+
};
|
|
126
|
+
const resolved = aliases[normalized] ?? normalized;
|
|
127
|
+
return registry.mcpClientProfiles.find((c) => c.code === resolved) ?? null;
|
|
120
128
|
}
|