nexarch 0.9.1 → 0.9.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.
|
@@ -8,7 +8,15 @@ 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 =
|
|
11
|
+
const CLI_VERSION = (() => {
|
|
12
|
+
try {
|
|
13
|
+
const pkg = JSON.parse(readFileSync(new URL("../../package.json", import.meta.url), "utf8"));
|
|
14
|
+
return typeof pkg.version === "string" && pkg.version.trim() ? pkg.version.trim() : "unknown";
|
|
15
|
+
}
|
|
16
|
+
catch {
|
|
17
|
+
return "unknown";
|
|
18
|
+
}
|
|
19
|
+
})();
|
|
12
20
|
const AGENT_ENTITY_TYPE = "agent";
|
|
13
21
|
const TECH_COMPONENT_ENTITY_TYPE = "technology_component";
|
|
14
22
|
function parseFlag(args, flag) {
|
|
@@ -978,11 +978,11 @@ export async function initProject(args) {
|
|
|
978
978
|
for (const sp of subPackages) {
|
|
979
979
|
const nameSlug = slugify(sp.name);
|
|
980
980
|
const needsPrefix = !sp.name.includes("/") && !nameSlug.startsWith(projectSlug);
|
|
981
|
-
let keySlug = needsPrefix ? `${projectSlug}
|
|
981
|
+
let keySlug = needsPrefix ? `${projectSlug}_${nameSlug}` : nameSlug;
|
|
982
982
|
// Avoid key collision with the top-level project (e.g. sub-package named "nexarch").
|
|
983
983
|
if (`${sp.entityType}:${keySlug}` === projectExternalKey) {
|
|
984
|
-
const relSlug = slugify(sp.relativePath.replace(/\//g, "
|
|
985
|
-
keySlug = relSlug ? `${projectSlug}
|
|
984
|
+
const relSlug = slugify(sp.relativePath.replace(/\//g, "_"));
|
|
985
|
+
keySlug = relSlug ? `${projectSlug}_${relSlug}` : `${projectSlug}_${nameSlug}_sub`;
|
|
986
986
|
}
|
|
987
987
|
sp.externalKey = `${sp.entityType}:${keySlug}`;
|
|
988
988
|
}
|
|
@@ -1091,7 +1091,7 @@ export async function initProject(args) {
|
|
|
1091
1091
|
.sort((a, b) => b.score - a.score);
|
|
1092
1092
|
const suggested = matches.length > 0 ? matches[0] : null;
|
|
1093
1093
|
const highConfidence = suggested && suggested.score >= 0.85;
|
|
1094
|
-
const interactiveAllowed = !
|
|
1094
|
+
const interactiveAllowed = !nonInteractive && process.stdin.isTTY;
|
|
1095
1095
|
if (autoMapApplication && highConfidence) {
|
|
1096
1096
|
projectExternalKey = suggested.entityRef;
|
|
1097
1097
|
if (!asJson)
|