nexarch 0.1.30 → 0.1.31
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.
|
@@ -4,7 +4,7 @@ import { join } from "path";
|
|
|
4
4
|
import process from "process";
|
|
5
5
|
import { requireCredentials } from "../lib/credentials.js";
|
|
6
6
|
import { callMcpTool, mcpInitialize, mcpListTools } from "../lib/mcp.js";
|
|
7
|
-
const CLI_VERSION = "0.1.
|
|
7
|
+
const CLI_VERSION = "0.1.31";
|
|
8
8
|
const AGENT_ENTITY_TYPE = "agent";
|
|
9
9
|
const TECH_COMPONENT_ENTITY_TYPE = "technology_component";
|
|
10
10
|
function parseFlag(args, flag) {
|
|
@@ -281,18 +281,17 @@ function scanProject(dir) {
|
|
|
281
281
|
return { projectName, packageJsonCount: pkgPaths.length, detectedNames: Array.from(names), rootDepNames, subPackages };
|
|
282
282
|
}
|
|
283
283
|
// ─── Relationship type selection ──────────────────────────────────────────────
|
|
284
|
-
function pickRelationshipType(toEntityTypeCode,
|
|
284
|
+
function pickRelationshipType(toEntityTypeCode, _fromEntityTypeCode = "application") {
|
|
285
285
|
switch (toEntityTypeCode) {
|
|
286
286
|
case "model":
|
|
287
287
|
return "uses_model";
|
|
288
288
|
case "platform":
|
|
289
289
|
case "platform_component":
|
|
290
|
+
// runs_on is the valid ontology relationship from application/tech to platform
|
|
291
|
+
return "runs_on";
|
|
290
292
|
case "skill":
|
|
291
293
|
return "uses";
|
|
292
294
|
case "technology_component":
|
|
293
|
-
// tech→tech depends_on is not allowed by ontology; use "uses" instead
|
|
294
|
-
if (fromEntityTypeCode === "technology_component")
|
|
295
|
-
return "uses";
|
|
296
295
|
return "depends_on";
|
|
297
296
|
default:
|
|
298
297
|
return "depends_on";
|
|
@@ -544,8 +543,8 @@ ${subPackages.map((sp) => ` • ${sp.name} (${sp.relativePath})`).join("\n")
|
|
|
544
543
|
|
|
545
544
|
RELATIONSHIP TYPE RULES:
|
|
546
545
|
application → technology_component : --type "depends_on"
|
|
547
|
-
technology_component → technology_component : --type "
|
|
548
|
-
any → platform / platform_component : --type "uses
|
|
546
|
+
technology_component → technology_component : --type "depends_on"
|
|
547
|
+
any → platform / platform_component : --type "runs_on" (NOT uses or depends_on)
|
|
549
548
|
any → model : --type "uses_model"
|
|
550
549
|
|
|
551
550
|
Pre-resolved dependencies per sub-package (wire these after registering each entity):
|
|
@@ -592,7 +591,8 @@ ${finalStep} — Identify architecturally significant components not auto-detect
|
|
|
592
591
|
npx nexarch add-relationship \\
|
|
593
592
|
--from "${projectExternalKey}" \\
|
|
594
593
|
--to "<resolved-ref>" \\
|
|
595
|
-
--type "
|
|
594
|
+
--type "runs_on" # for platforms (Vercel, Neon, etc.)
|
|
595
|
+
# use --type "depends_on" for external APIs/SaaS (Stripe, Resend, etc.)
|
|
596
596
|
|
|
597
597
|
3. If unresolved (not in the reference library), skip it for now — it will appear
|
|
598
598
|
as a reference candidate on the next scan once you register an alias for it.
|
|
@@ -40,7 +40,7 @@ export async function resolveNames(args) {
|
|
|
40
40
|
process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
|
|
41
41
|
return;
|
|
42
42
|
}
|
|
43
|
-
for (const entry of result.
|
|
43
|
+
for (const entry of result.results ?? []) {
|
|
44
44
|
if (entry.resolved) {
|
|
45
45
|
console.log(`✓ ${entry.input} → ${entry.canonicalExternalRef} (${entry.entityTypeCode}${entry.entitySubtypeCode ? `/${entry.entitySubtypeCode}` : ""}) "${entry.canonicalName}"`);
|
|
46
46
|
}
|
|
@@ -48,5 +48,5 @@ export async function resolveNames(args) {
|
|
|
48
48
|
console.log(`✗ ${entry.input} — not found in reference library`);
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
console.log(`\n${result.
|
|
51
|
+
console.log(`\n${result.summary?.resolved ?? 0}/${result.summary?.requested ?? 0} resolved`);
|
|
52
52
|
}
|