nexarch 0.8.17 → 0.8.19
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.
|
@@ -8,7 +8,7 @@ import { fetchAgentRegistryOrThrow } from "../lib/agent-registry.js";
|
|
|
8
8
|
import { callMcpTool, mcpInitialize, mcpListTools } from "../lib/mcp.js";
|
|
9
9
|
import { buildVersionAttributes } from "../lib/version-normalization.js";
|
|
10
10
|
import { requestTrustAttestation } from "../lib/trust.js";
|
|
11
|
-
const CLI_VERSION = "0.8.
|
|
11
|
+
const CLI_VERSION = "0.8.19";
|
|
12
12
|
const AGENT_ENTITY_TYPE = "agent";
|
|
13
13
|
const TECH_COMPONENT_ENTITY_TYPE = "technology_component";
|
|
14
14
|
function parseFlag(args, flag) {
|
|
@@ -301,14 +301,13 @@ function replaceManagedSection(existing, key, body) {
|
|
|
301
301
|
const markers = managedMarkers(key);
|
|
302
302
|
const escapedStart = markers.start.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
303
303
|
const escapedEnd = markers.end.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
304
|
-
const managedRegex = new RegExp(`${escapedStart}[\\s\\S]*?${escapedEnd}
|
|
304
|
+
const managedRegex = new RegExp(`${escapedStart}[\\s\\S]*?${escapedEnd}\\s*`, "gm");
|
|
305
305
|
if (!managedRegex.test(existing))
|
|
306
306
|
return existing;
|
|
307
307
|
const canonicalBlock = wrapManagedSection(key, body);
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
return replaced.endsWith("\n") ? replaced : `${replaced}\n`;
|
|
308
|
+
const stripped = existing.replace(managedRegex, "").trimEnd();
|
|
309
|
+
const rebuilt = `${stripped}${stripped ? "\n\n" : ""}${canonicalBlock}\n`;
|
|
310
|
+
return rebuilt;
|
|
312
311
|
}
|
|
313
312
|
function replaceInjectedSection(existing, sectionHeading, sectionBody) {
|
|
314
313
|
const escapedHeading = sectionHeading.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|