nexarch 0.5.0 → 0.5.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.
@@ -35,11 +35,6 @@ function loadIdentity() {
35
35
  return { agentKey: null, projectKeys: [] };
36
36
  }
37
37
  }
38
- const COMMAND_TYPE_HINTS = {
39
- policy_check: "Step 1: call nexarch_get_entity_policy_controls with entityExternalKey set to target_entity_key — this returns controls, each with a rules array (rule id, name, ruleText). Step 2: for each rule, examine the codebase and evaluate whether it passes, partially passes, or fails. Step 3: call nexarch_submit_policy_audit with applicationEntityKey, commandId, agentKey, and a findings array containing one entry per rule with policyControlId, policyRuleId, result (pass/partial/fail), rationale, and missingRequirements. Step 4: mark the command done with a brief summary. If no controls are returned, run command-fail with error 'No policy controls linked'.",
40
- data_model_review: "Goal: infer enterprise canonical logical data assets and map concrete physical implementations. 1) Identify logical business entities (canonical names, singular, enterprise meaning) and upsert as data_asset:data_logical. 2) Identify physical stores (tables/collections/files/indexes) and upsert as data_asset:data_physical with attributes (database, schema, table_name, store_type, source_system). 3) Link logical -> physical via implemented_by. 4) Link apps/services to physical via reads/writes. 5) Link logical assets to data domains via belongs_to_domain where evidence exists. 6) Avoid duplicate logical entities: reuse canonical logical entities if concept already exists. 7) Mark uncertain mappings with lower confidence in attributes.confidence.score and include rationale in command summary.",
41
- custom: "Execute the custom instructions provided.",
42
- };
43
38
  export async function checkIn(args) {
44
39
  const asJson = parseFlag(args, "--json");
45
40
  const agentKeyArg = parseOptionValue(args, "--agent-key");
@@ -66,8 +61,7 @@ export async function checkIn(args) {
66
61
  }, mcpOpts);
67
62
  const result = parseToolText(raw);
68
63
  if (asJson) {
69
- const hint = result.command ? (COMMAND_TYPE_HINTS[result.command.command_type] ?? null) : null;
70
- process.stdout.write(JSON.stringify({ ...result, hint }) + "\n");
64
+ process.stdout.write(JSON.stringify(result) + "\n");
71
65
  return;
72
66
  }
73
67
  if (!result.command) {
@@ -75,7 +69,6 @@ export async function checkIn(args) {
75
69
  return;
76
70
  }
77
71
  const cmd = result.command;
78
- const hint = COMMAND_TYPE_HINTS[cmd.command_type] ?? "No built-in playbook for this command type. Follow the command instructions and complete/fail it explicitly.";
79
72
  console.log(`\n╔══════════════════════════════════════════════════════════════════╗`);
80
73
  console.log(`║ COMMAND QUEUED — action required ║`);
81
74
  console.log(`╚══════════════════════════════════════════════════════════════════╝`);
@@ -83,11 +76,17 @@ export async function checkIn(args) {
83
76
  console.log(`Type : ${cmd.command_type}`);
84
77
  console.log(`Target : ${cmd.target_entity_key ?? "(any)"}`);
85
78
  console.log(`Priority : ${cmd.priority}`);
79
+ if (cmd.resolved_execution_mode)
80
+ console.log(`Mode : ${cmd.resolved_execution_mode}`);
81
+ if (cmd.resolved_runtime_handler)
82
+ console.log(`Runtime : ${cmd.resolved_runtime_handler}`);
83
+ if (cmd.command_type_version != null)
84
+ console.log(`Type ver : ${cmd.command_type_version}`);
86
85
  if (Object.keys(cmd.command_params).length > 0) {
87
86
  console.log(`Params : ${JSON.stringify(cmd.command_params)}`);
88
87
  }
89
- if (hint) {
90
- console.log(`\n${hint}`);
88
+ if (cmd.resolved_playbook_text?.trim()) {
89
+ console.log(`\nPlaybook:\n${cmd.resolved_playbook_text}`);
91
90
  }
92
91
  if (cmd.instructions) {
93
92
  console.log(`\nInstructions:\n${cmd.instructions}`);
@@ -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.0";
8
+ const CLI_VERSION = "0.5.2";
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
@@ -87,6 +87,7 @@ Usage:
87
87
  --description <text>
88
88
  --entity-type <code> (default: application)
89
89
  --subtype <code>
90
+ --icon <lucide-name> (curated set; for agent enrichment)
90
91
  --json
91
92
  nexarch add-relationship
92
93
  Add a relationship between two existing graph entities.
@@ -0,0 +1,303 @@
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
+ "beer",
49
+ "a-arrow-down",
50
+ "a-arrow-up",
51
+ "a-large-small",
52
+ "accessibility",
53
+ "activity-square",
54
+ "air-vent",
55
+ "airplay",
56
+ "alarm-check",
57
+ "alarm-clock",
58
+ "alarm-clock-check",
59
+ "alarm-clock-minus",
60
+ "alarm-clock-off",
61
+ "alarm-clock-plus",
62
+ "alarm-minus",
63
+ "alarm-plus",
64
+ "alarm-smoke",
65
+ "album",
66
+ "alert-circle",
67
+ "alert-octagon",
68
+ "alert-triangle",
69
+ "align-center",
70
+ "align-center-horizontal",
71
+ "align-center-vertical",
72
+ "align-end-horizontal",
73
+ "align-end-vertical",
74
+ "align-horizontal-distribute-center",
75
+ "align-horizontal-distribute-end",
76
+ "align-horizontal-distribute-start",
77
+ "align-horizontal-justify-center",
78
+ "align-horizontal-justify-end",
79
+ "align-horizontal-justify-start",
80
+ "align-horizontal-space-around",
81
+ "align-horizontal-space-between",
82
+ "align-justify",
83
+ "align-left",
84
+ "align-right",
85
+ "align-start-horizontal",
86
+ "align-start-vertical",
87
+ "align-vertical-distribute-center",
88
+ "align-vertical-distribute-end",
89
+ "align-vertical-distribute-start",
90
+ "align-vertical-justify-center",
91
+ "align-vertical-justify-end",
92
+ "align-vertical-justify-start",
93
+ "align-vertical-space-around",
94
+ "align-vertical-space-between",
95
+ "ambulance",
96
+ "ampersand",
97
+ "ampersands",
98
+ "amphora",
99
+ "anchor",
100
+ "angry",
101
+ "annoyed",
102
+ "antenna",
103
+ "anvil",
104
+ "aperture",
105
+ "app-window",
106
+ "app-window-mac",
107
+ "apple",
108
+ "archive",
109
+ "archive-restore",
110
+ "archive-x",
111
+ "area-chart",
112
+ "armchair",
113
+ "arrow-big-down",
114
+ "arrow-big-down-dash",
115
+ "arrow-big-left",
116
+ "arrow-big-left-dash",
117
+ "arrow-big-right",
118
+ "arrow-big-right-dash",
119
+ "arrow-big-up",
120
+ "arrow-big-up-dash",
121
+ "arrow-down",
122
+ "arrow-down-0-1",
123
+ "arrow-down-01",
124
+ "arrow-down-1-0",
125
+ "arrow-down-10",
126
+ "arrow-down-a-z",
127
+ "arrow-down-az",
128
+ "arrow-down-circle",
129
+ "arrow-down-from-line",
130
+ "arrow-down-left",
131
+ "arrow-down-left-from-circle",
132
+ "arrow-down-left-from-square",
133
+ "arrow-down-left-square",
134
+ "arrow-down-narrow-wide",
135
+ "arrow-down-right",
136
+ "arrow-down-right-from-circle",
137
+ "arrow-down-right-from-square",
138
+ "arrow-down-right-square",
139
+ "arrow-down-square",
140
+ "arrow-down-to-dot",
141
+ "arrow-down-to-line",
142
+ "arrow-down-up",
143
+ "arrow-down-wide-narrow",
144
+ "arrow-down-z-a",
145
+ "arrow-down-za",
146
+ "arrow-left",
147
+ "arrow-left-circle",
148
+ "arrow-left-from-line",
149
+ "arrow-left-right",
150
+ "arrow-left-square",
151
+ "arrow-left-to-line",
152
+ "arrow-right",
153
+ "arrow-right-circle",
154
+ "arrow-right-from-line",
155
+ "arrow-right-left",
156
+ "arrow-right-square",
157
+ "arrow-right-to-line",
158
+ "arrow-up",
159
+ "arrow-up-0-1",
160
+ "arrow-up-01",
161
+ "arrow-up-1-0",
162
+ "arrow-up-10",
163
+ "arrow-up-a-z",
164
+ "arrow-up-az",
165
+ "arrow-up-circle",
166
+ "arrow-up-down",
167
+ "arrow-up-from-dot",
168
+ "arrow-up-from-line",
169
+ "arrow-up-left",
170
+ "arrow-up-left-from-circle",
171
+ "arrow-up-left-from-square",
172
+ "arrow-up-left-square",
173
+ "arrow-up-narrow-wide",
174
+ "arrow-up-right",
175
+ "arrow-up-right-from-circle",
176
+ "arrow-up-right-from-square",
177
+ "arrow-up-right-square",
178
+ "arrow-up-square",
179
+ "arrow-up-to-line",
180
+ "arrow-up-wide-narrow",
181
+ "arrow-up-z-a",
182
+ "arrow-up-za",
183
+ "arrows-up-from-line",
184
+ "asterisk",
185
+ "asterisk-square",
186
+ "at-sign",
187
+ "atom",
188
+ "audio-lines",
189
+ "audio-waveform",
190
+ "award",
191
+ "axe",
192
+ "axis-3-d",
193
+ "axis-3d",
194
+ "baby",
195
+ "backpack",
196
+ "badge",
197
+ "badge-alert",
198
+ "badge-cent",
199
+ "badge-check",
200
+ "badge-dollar-sign",
201
+ "badge-euro",
202
+ "badge-help",
203
+ "badge-indian-rupee",
204
+ "badge-info",
205
+ "badge-japanese-yen",
206
+ "badge-minus",
207
+ "badge-percent",
208
+ "badge-plus",
209
+ "badge-pound-sterling",
210
+ "badge-question-mark",
211
+ "badge-russian-ruble",
212
+ "badge-swiss-franc",
213
+ "badge-turkish-lira",
214
+ "badge-x",
215
+ "baggage-claim",
216
+ "balloon",
217
+ "ban",
218
+ "banana",
219
+ "bandage",
220
+ "banknote",
221
+ "banknote-arrow-down",
222
+ "banknote-arrow-up",
223
+ "banknote-x",
224
+ "bar-chart",
225
+ "bar-chart-2",
226
+ "bar-chart-4",
227
+ "bar-chart-big",
228
+ "bar-chart-horizontal",
229
+ "bar-chart-horizontal-big",
230
+ "barcode",
231
+ "barrel",
232
+ "baseline",
233
+ "bath",
234
+ "battery",
235
+ "battery-charging",
236
+ "battery-full",
237
+ "battery-low",
238
+ "battery-medium",
239
+ "battery-plus",
240
+ "battery-warning",
241
+ "beaker",
242
+ "bean",
243
+ "bean-off",
244
+ "bed",
245
+ "bed-double",
246
+ "bed-single",
247
+ "beef",
248
+ "beef-off",
249
+ "beer-off",
250
+ "bell",
251
+ "bell-dot",
252
+ "bell-electric",
253
+ "bell-minus",
254
+ "bell-off",
255
+ "bell-plus",
256
+ "bell-ring",
257
+ "between-horizonal-end",
258
+ "between-horizonal-start",
259
+ "between-horizontal-end",
260
+ "between-horizontal-start",
261
+ "between-vertical-end",
262
+ "between-vertical-start",
263
+ "biceps-flexed",
264
+ "bike",
265
+ "binary",
266
+ "binoculars",
267
+ "biohazard",
268
+ "bird",
269
+ "birdhouse",
270
+ "bitcoin",
271
+ "blend",
272
+ "blinds",
273
+ "blocks",
274
+ "bluetooth",
275
+ "bluetooth-connected",
276
+ "bluetooth-off",
277
+ "bluetooth-searching",
278
+ "bold",
279
+ "bolt",
280
+ "bomb",
281
+ "bone",
282
+ "book",
283
+ "book-a",
284
+ "book-alert",
285
+ "book-audio",
286
+ "book-check",
287
+ "book-copy",
288
+ "book-dashed",
289
+ "book-down",
290
+ "book-headphones",
291
+ "book-heart",
292
+ "book-image",
293
+ "book-key",
294
+ "book-lock",
295
+ "book-marked",
296
+ "book-minus",
297
+ "book-open-check",
298
+ "book-open-text",
299
+ "book-plus",
300
+ "book-search",
301
+ "book-template",
302
+ ];
303
+ 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.0" },
71
+ clientInfo: { name: "nexarch-cli", version: "0.5.2" },
72
72
  }, options);
73
73
  }
74
74
  export async function mcpListTools(options = {}) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nexarch",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "description": "Your architecture workspace for AI delivery.",
5
5
  "keywords": [
6
6
  "nexarch",