nexarch 0.5.0 → 0.5.1
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.
|
@@ -5,7 +5,7 @@ import process from "process";
|
|
|
5
5
|
import { requireCredentials } from "../lib/credentials.js";
|
|
6
6
|
import { fetchAgentRegistryOrThrow } from "../lib/agent-registry.js";
|
|
7
7
|
import { callMcpTool, mcpInitialize, mcpListTools } from "../lib/mcp.js";
|
|
8
|
-
const CLI_VERSION = "0.5.
|
|
8
|
+
const CLI_VERSION = "0.5.1";
|
|
9
9
|
const AGENT_ENTITY_TYPE = "agent";
|
|
10
10
|
const TECH_COMPONENT_ENTITY_TYPE = "technology_component";
|
|
11
11
|
function parseFlag(args, flag) {
|
|
@@ -5,6 +5,7 @@ import { basename, join, relative, resolve as resolvePath } from "node:path";
|
|
|
5
5
|
import { homedir } from "node:os";
|
|
6
6
|
import { requireCredentials } from "../lib/credentials.js";
|
|
7
7
|
import { callMcpTool } from "../lib/mcp.js";
|
|
8
|
+
import { CURATED_AGENT_ICON_NAMES } from "../lib/application-icons.js";
|
|
8
9
|
// ─── Helpers ─────────────────────────────────────────────────────────────────
|
|
9
10
|
function parseFlag(args, flag) {
|
|
10
11
|
return args.includes(flag);
|
|
@@ -987,6 +988,7 @@ export async function initProject(args) {
|
|
|
987
988
|
const ecosystemLabel = detectedEcosystems.length > 0
|
|
988
989
|
? detectedEcosystems.join(", ")
|
|
989
990
|
: "unknown";
|
|
991
|
+
const curatedIconList = CURATED_AGENT_ICON_NAMES.join(", ");
|
|
990
992
|
const manifestHint = detectedEcosystems.includes("nodejs")
|
|
991
993
|
? "package.json"
|
|
992
994
|
: detectedEcosystems.includes("python")
|
|
@@ -1019,6 +1021,11 @@ ${subPackages.map((sp) => ` • ${sp.name} (${sp.relativePath})`).join("\n")
|
|
|
1019
1021
|
Type definitions or utility package with no runtime
|
|
1020
1022
|
→ --entity-type technology_component --subtype tech_library
|
|
1021
1023
|
|
|
1024
|
+
ICON ASSIGNMENT (applications only):
|
|
1025
|
+
• Pick one icon from this curated set for each application/sub-app.
|
|
1026
|
+
• If confidence is low, skip --icon rather than guessing.
|
|
1027
|
+
• Allowed icons: ${curatedIconList}
|
|
1028
|
+
|
|
1022
1029
|
For each sub-package, run update-entity to register it:
|
|
1023
1030
|
|
|
1024
1031
|
npx nexarch update-entity \\
|
|
@@ -1026,7 +1033,8 @@ ${subPackages.map((sp) => ` • ${sp.name} (${sp.relativePath})`).join("\n")
|
|
|
1026
1033
|
--entity-type "<chosen entity type>" \\
|
|
1027
1034
|
--subtype "<chosen subtype>" \\
|
|
1028
1035
|
--name "<human readable name>" \\
|
|
1029
|
-
--description "<what this package does and its role in the project>"
|
|
1036
|
+
--description "<what this package does and its role in the project>" \\
|
|
1037
|
+
--icon "<curated icon>" # applications only
|
|
1030
1038
|
|
|
1031
1039
|
Then register it as a resolvable alias so future scans don't re-surface it as a candidate:
|
|
1032
1040
|
|
|
@@ -1141,13 +1149,18 @@ STEP 2 — Enrich the project entity. Run this command with the description you'
|
|
|
1141
1149
|
|
|
1142
1150
|
npx nexarch update-entity \\
|
|
1143
1151
|
--key "${projectExternalKey}" \\
|
|
1144
|
-
--entity-type "${entityTypeOverride}"${entityTypeOverride === "application" ? " \\\n --subtype \"app_custom_built\"" : ""} \\
|
|
1152
|
+
--entity-type "${entityTypeOverride}"${entityTypeOverride === "application" ? " \\\n --subtype \"app_custom_built\"\n --icon \"<curated icon>\"" : ""} \\
|
|
1145
1153
|
--name "<proper product name from README>" \\
|
|
1146
1154
|
--description "<2–4 sentence summary of what it does and why>"
|
|
1147
1155
|
${subPkgSection}${gapCheckSection}`;
|
|
1148
1156
|
}
|
|
1149
1157
|
const enrichmentTask = {
|
|
1150
1158
|
instructions: buildEnrichmentInstructions(),
|
|
1159
|
+
iconHints: {
|
|
1160
|
+
provider: "lucide",
|
|
1161
|
+
curated: CURATED_AGENT_ICON_NAMES,
|
|
1162
|
+
note: "Use curated list for agent-selected enrichment icons; omit icon when low confidence.",
|
|
1163
|
+
},
|
|
1151
1164
|
projectEntity: {
|
|
1152
1165
|
externalKey: projectExternalKey,
|
|
1153
1166
|
entityType: entityTypeOverride,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import process from "process";
|
|
2
2
|
import { requireCredentials } from "../lib/credentials.js";
|
|
3
3
|
import { callMcpTool } from "../lib/mcp.js";
|
|
4
|
+
import { CURATED_AGENT_ICON_SET } from "../lib/application-icons.js";
|
|
4
5
|
function parseFlag(args, flag) {
|
|
5
6
|
return args.includes(flag);
|
|
6
7
|
}
|
|
@@ -24,6 +25,7 @@ export async function updateEntity(args) {
|
|
|
24
25
|
const description = parseOptionValue(args, "--description");
|
|
25
26
|
const entityTypeCode = parseOptionValue(args, "--entity-type") ?? "application";
|
|
26
27
|
const entitySubtypeCode = parseOptionValue(args, "--subtype");
|
|
28
|
+
const iconName = parseOptionValue(args, "--icon");
|
|
27
29
|
if (!externalKey) {
|
|
28
30
|
console.error("error: --key <externalKey> is required");
|
|
29
31
|
process.exit(1);
|
|
@@ -50,6 +52,10 @@ export async function updateEntity(args) {
|
|
|
50
52
|
const policyContext = policyBundleHash
|
|
51
53
|
? { policyBundleHash, alignmentSummary: { score: 1, violations: [], waivers: [] } }
|
|
52
54
|
: undefined;
|
|
55
|
+
if (iconName && !CURATED_AGENT_ICON_SET.has(iconName)) {
|
|
56
|
+
console.error(`error: --icon must be one of the curated agent icons (got '${iconName}')`);
|
|
57
|
+
process.exit(1);
|
|
58
|
+
}
|
|
53
59
|
const entity = {
|
|
54
60
|
externalKey,
|
|
55
61
|
entityTypeCode,
|
|
@@ -61,6 +67,14 @@ export async function updateEntity(args) {
|
|
|
61
67
|
entity.description = description;
|
|
62
68
|
if (entitySubtypeCode)
|
|
63
69
|
entity.entitySubtypeCode = entitySubtypeCode;
|
|
70
|
+
if (iconName) {
|
|
71
|
+
entity.attributes = {
|
|
72
|
+
application_icon: {
|
|
73
|
+
provider: "lucide",
|
|
74
|
+
name: iconName,
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
}
|
|
64
78
|
const raw = await callMcpTool("nexarch_upsert_entities", { entities: [entity], agentContext, policyContext }, mcpOpts);
|
|
65
79
|
const result = parseToolText(raw);
|
|
66
80
|
if (asJson) {
|
package/dist/index.js
CHANGED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export const CURATED_AGENT_ICON_NAMES = [
|
|
2
|
+
"rocket",
|
|
3
|
+
"globe",
|
|
4
|
+
"monitor",
|
|
5
|
+
"smartphone",
|
|
6
|
+
"server",
|
|
7
|
+
"database",
|
|
8
|
+
"cloud",
|
|
9
|
+
"network",
|
|
10
|
+
"shield",
|
|
11
|
+
"lock",
|
|
12
|
+
"cpu",
|
|
13
|
+
"code",
|
|
14
|
+
"terminal",
|
|
15
|
+
"bug",
|
|
16
|
+
"flask-conical",
|
|
17
|
+
"bot",
|
|
18
|
+
"brain",
|
|
19
|
+
"sparkles",
|
|
20
|
+
"activity",
|
|
21
|
+
"gauge",
|
|
22
|
+
"clock-3",
|
|
23
|
+
"calendar",
|
|
24
|
+
"book-open",
|
|
25
|
+
"file-code",
|
|
26
|
+
"folder",
|
|
27
|
+
"search",
|
|
28
|
+
"filter",
|
|
29
|
+
"list-checks",
|
|
30
|
+
"kanban-square",
|
|
31
|
+
"layers",
|
|
32
|
+
"workflow",
|
|
33
|
+
"git-branch",
|
|
34
|
+
"package",
|
|
35
|
+
"wrench",
|
|
36
|
+
"settings",
|
|
37
|
+
"building-2",
|
|
38
|
+
"factory",
|
|
39
|
+
"store",
|
|
40
|
+
"map",
|
|
41
|
+
"users",
|
|
42
|
+
"briefcase",
|
|
43
|
+
"bar-chart-3",
|
|
44
|
+
"trending-up",
|
|
45
|
+
"target",
|
|
46
|
+
"leaf",
|
|
47
|
+
"heart-pulse",
|
|
48
|
+
];
|
|
49
|
+
export const CURATED_AGENT_ICON_SET = new Set(CURATED_AGENT_ICON_NAMES);
|
package/dist/lib/mcp.js
CHANGED
|
@@ -68,7 +68,7 @@ export async function mcpInitialize(options = {}) {
|
|
|
68
68
|
return callMcpRpc("initialize", {
|
|
69
69
|
protocolVersion: "2024-11-05",
|
|
70
70
|
capabilities: {},
|
|
71
|
-
clientInfo: { name: "nexarch-cli", version: "0.5.
|
|
71
|
+
clientInfo: { name: "nexarch-cli", version: "0.5.1" },
|
|
72
72
|
}, options);
|
|
73
73
|
}
|
|
74
74
|
export async function mcpListTools(options = {}) {
|