nexarch 0.12.5 → 0.12.6
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.
- package/dist/commands/init-project.js +34 -84
- package/dist/index.js +192 -189
- package/package.json +1 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import process from "process";
|
|
2
|
-
import * as readline from "node:readline/promises";
|
|
3
2
|
import { execFileSync } from "node:child_process";
|
|
4
3
|
import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
|
|
5
4
|
import { basename, join, relative, resolve as resolvePath } from "node:path";
|
|
@@ -1069,43 +1068,6 @@ export function scoreApplicationCandidate(app, projectName, repoUrl) {
|
|
|
1069
1068
|
return null;
|
|
1070
1069
|
return { entityRef, name: app.name, score: Math.min(1, score), reasons };
|
|
1071
1070
|
}
|
|
1072
|
-
async function promptApplicationChoice(matches, allApps, suggested) {
|
|
1073
|
-
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
1074
|
-
try {
|
|
1075
|
-
console.log("\nExisting application entities found.");
|
|
1076
|
-
if (suggested) {
|
|
1077
|
-
console.log(`Suggested match: ${suggested.name} (${suggested.entityRef}) score=${suggested.score.toFixed(2)} [${suggested.reasons.join(", ")}]`);
|
|
1078
|
-
}
|
|
1079
|
-
console.log("\nChoose target application:");
|
|
1080
|
-
const options = [];
|
|
1081
|
-
let index = 1;
|
|
1082
|
-
for (const m of matches.slice(0, 5)) {
|
|
1083
|
-
options.push({
|
|
1084
|
-
key: String(index++),
|
|
1085
|
-
label: `${m.name} (${m.entityRef}) score=${m.score.toFixed(2)}`,
|
|
1086
|
-
value: m.entityRef,
|
|
1087
|
-
});
|
|
1088
|
-
}
|
|
1089
|
-
options.push({ key: String(index++), label: "Show all applications", value: "__show_all__" });
|
|
1090
|
-
options.push({ key: String(index), label: "Create a new application", value: "__create__" });
|
|
1091
|
-
for (const o of options)
|
|
1092
|
-
console.log(` ${o.key}) ${o.label}`);
|
|
1093
|
-
const answer = (await rl.question("Select option: ")).trim();
|
|
1094
|
-
const chosen = options.find((o) => o.key === answer)?.value;
|
|
1095
|
-
if (chosen === "__show_all__") {
|
|
1096
|
-
console.log("\nAll applications:");
|
|
1097
|
-
allApps.forEach((a, i) => console.log(` ${i + 1}) ${a.name} (${a.entityRef ?? a.externalKey ?? "n/a"})`));
|
|
1098
|
-
const pick = Number((await rl.question("Pick application number or 0 to create new: ")).trim());
|
|
1099
|
-
if (!Number.isFinite(pick) || pick <= 0 || pick > allApps.length)
|
|
1100
|
-
return "__create__";
|
|
1101
|
-
return allApps[pick - 1].entityRef ?? allApps[pick - 1].externalKey ?? "__create__";
|
|
1102
|
-
}
|
|
1103
|
-
return chosen && chosen !== "__show_all__" ? chosen : "__create__";
|
|
1104
|
-
}
|
|
1105
|
-
finally {
|
|
1106
|
-
rl.close();
|
|
1107
|
-
}
|
|
1108
|
-
}
|
|
1109
1071
|
// ─── Main command ─────────────────────────────────────────────────────────────
|
|
1110
1072
|
export async function initProject(args) {
|
|
1111
1073
|
const asJson = parseFlag(args, "--json");
|
|
@@ -1293,6 +1255,27 @@ export async function initProject(args) {
|
|
|
1293
1255
|
console.log(`\nUsing --application-ref target: ${projectExternalKey}`);
|
|
1294
1256
|
}
|
|
1295
1257
|
else {
|
|
1258
|
+
// Seed S2 auto-map: when a reviewer previously declined a proposal with
|
|
1259
|
+
// this name as a duplicate, a company alias maps it to the surviving
|
|
1260
|
+
// application. Resolving the name first means the human's "no" is
|
|
1261
|
+
// honoured automatically — the scan maps instead of re-proposing.
|
|
1262
|
+
try {
|
|
1263
|
+
const aliasRaw = await callMcpProfiled("nexarch_resolve_reference", { names: [displayName], companyId: creds.companyId }, { batchSize: 1 });
|
|
1264
|
+
const aliasData = parseToolText(aliasRaw);
|
|
1265
|
+
const aliasHit = (aliasData.results ?? []).find((r) => r.resolved && r.entityTypeCode === "application" && r.canonicalExternalRef?.startsWith("application:"));
|
|
1266
|
+
if (aliasHit?.canonicalExternalRef) {
|
|
1267
|
+
projectExternalKey = aliasHit.canonicalExternalRef;
|
|
1268
|
+
if (!asJson) {
|
|
1269
|
+
console.log(`\nAuto-mapped via workspace alias: "${displayName}" → ${projectExternalKey} (${aliasHit.canonicalName ?? "existing application"})`);
|
|
1270
|
+
console.log(" A reviewer previously mapped this name to an existing application. To create a separate application anyway, re-run with --create-application.");
|
|
1271
|
+
}
|
|
1272
|
+
}
|
|
1273
|
+
}
|
|
1274
|
+
catch {
|
|
1275
|
+
// Alias resolution is best-effort; fall through to candidate scoring.
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
if (!applicationRefOverride && projectExternalKey === `${entityTypeOverride}:${projectSlug}`) {
|
|
1296
1279
|
const appsRaw = await callMcpProfiled("nexarch_list_entities", { entityTypeCode: "application", status: "active", limit: 500, companyId: creds.companyId }, { entityTypeCode: "application", limit: 500 });
|
|
1297
1280
|
const appsData = parseToolText(appsRaw);
|
|
1298
1281
|
const apps = (appsData.entities ?? []).filter((e) => (e.entityRef ?? e.externalKey));
|
|
@@ -1303,58 +1286,25 @@ export async function initProject(args) {
|
|
|
1303
1286
|
.sort((a, b) => b.score - a.score);
|
|
1304
1287
|
const suggested = matches.length > 0 ? matches[0] : null;
|
|
1305
1288
|
const highConfidence = suggested && suggested.score >= 0.85;
|
|
1306
|
-
|
|
1289
|
+
// ADR 8d: the interactive "Choose target application" prompt is gone.
|
|
1290
|
+
// It demanded an architectural judgement from whoever happened to run
|
|
1291
|
+
// the command, in a terminal, sixty seconds into using the product —
|
|
1292
|
+
// and blocked non-interactive runs entirely. The default is now to
|
|
1293
|
+
// create a new application, which arrives as PROPOSED (8b): the
|
|
1294
|
+
// mapping judgement moves to the activation card, where similarity
|
|
1295
|
+
// evidence renders for the human reviewing it (8c). Explicit mapping
|
|
1296
|
+
// remains available via --application-ref and --auto-map-application.
|
|
1307
1297
|
if (autoMapApplication && highConfidence) {
|
|
1308
1298
|
projectExternalKey = suggested.entityRef;
|
|
1309
1299
|
if (!asJson)
|
|
1310
1300
|
console.log(`\nAuto-mapped to existing application: ${suggested.name} (${projectExternalKey})`);
|
|
1311
1301
|
}
|
|
1312
|
-
else if (!
|
|
1313
|
-
|
|
1314
|
-
const
|
|
1315
|
-
|
|
1316
|
-
name: a.name,
|
|
1317
|
-
entityTypeCode: a.entityTypeCode,
|
|
1318
|
-
}));
|
|
1319
|
-
if (asJson) {
|
|
1320
|
-
process.stdout.write(`${JSON.stringify({
|
|
1321
|
-
ok: true,
|
|
1322
|
-
status: "input_required",
|
|
1323
|
-
code: "APPLICATION_MAPPING_REQUIRED",
|
|
1324
|
-
message,
|
|
1325
|
-
suggested: suggested ?? null,
|
|
1326
|
-
candidates: matches.slice(0, 10),
|
|
1327
|
-
existingApplications,
|
|
1328
|
-
requiredInput: {
|
|
1329
|
-
applicationRefOption: "--application-ref <entityRef>",
|
|
1330
|
-
createOption: "--create-application",
|
|
1331
|
-
},
|
|
1332
|
-
}, null, 2)}\n`);
|
|
1333
|
-
return;
|
|
1334
|
-
}
|
|
1335
|
-
console.log("\nInput required before continuing:");
|
|
1336
|
-
console.log(` ${message}`);
|
|
1337
|
-
if (suggested) {
|
|
1338
|
-
console.log(` Suggested: ${suggested.name} (${suggested.entityRef}) score=${suggested.score.toFixed(2)}`);
|
|
1339
|
-
}
|
|
1340
|
-
if (existingApplications.length > 0) {
|
|
1341
|
-
console.log(" Existing applications:");
|
|
1342
|
-
for (const app of existingApplications) {
|
|
1343
|
-
console.log(` - ${app.name} (${app.entityRef})`);
|
|
1344
|
-
}
|
|
1345
|
-
}
|
|
1346
|
-
return;
|
|
1347
|
-
}
|
|
1348
|
-
else {
|
|
1349
|
-
const chosen = await promptApplicationChoice(matches, apps, highConfidence ? suggested : null);
|
|
1350
|
-
if (chosen !== "__create__") {
|
|
1351
|
-
projectExternalKey = chosen;
|
|
1352
|
-
if (!asJson)
|
|
1353
|
-
console.log(`Mapped to existing application: ${projectExternalKey}`);
|
|
1354
|
-
}
|
|
1355
|
-
else if (!asJson) {
|
|
1356
|
-
console.log("Creating a new application entity for this project.");
|
|
1302
|
+
else if (matches.length > 0 && !asJson) {
|
|
1303
|
+
console.log("\nSimilar existing applications found (registering a new proposed application anyway — the reviewer sees these again at activation):");
|
|
1304
|
+
for (const m of matches.slice(0, 5)) {
|
|
1305
|
+
console.log(` - ${m.name} (${m.entityRef}) score=${m.score.toFixed(2)} [${m.reasons.join(", ")}]`);
|
|
1357
1306
|
}
|
|
1307
|
+
console.log(" To map to one instead, re-run with: --application-ref <entityRef>");
|
|
1358
1308
|
}
|
|
1359
1309
|
}
|
|
1360
1310
|
}
|
package/dist/index.js
CHANGED
|
@@ -73,195 +73,198 @@ async function main() {
|
|
|
73
73
|
}
|
|
74
74
|
const handler = commands[command ?? ""];
|
|
75
75
|
if (!handler) {
|
|
76
|
-
console.log(`
|
|
77
|
-
nexarch — Your architecture workspace for AI delivery.
|
|
78
|
-
|
|
79
|
-
Usage:
|
|
80
|
-
nexarch login Authenticate in browser and store company-scoped credentials
|
|
81
|
-
Option: --company <id>
|
|
82
|
-
nexarch logout Remove stored credentials
|
|
83
|
-
nexarch status Check connection and show architecture summary
|
|
84
|
-
nexarch setup One-step onboarding: login (if needed) + MCP config + register agent
|
|
85
|
-
nexarch mcp-config Print MCP server config block for manual setup
|
|
86
|
-
Client list is registry-managed (see 'nexarch mcp-config --client <code>')
|
|
87
|
-
nexarch mcp-proxy Run as stdio MCP proxy (used by MCP clients)
|
|
88
|
-
nexarch init-agent Run handshake + mandatory agent registration in graph (advanced/manual)
|
|
89
|
-
Options: --agent-id <id> --bind-to-external-key <key>
|
|
90
|
-
--bind-relationship-type <code> --redact-hostname
|
|
91
|
-
--json --strict
|
|
92
|
-
nexarch agent identify
|
|
93
|
-
Capture richer coding-agent identity metadata
|
|
94
|
-
Options: --agent-id <id> --provider <provider> --model <model>
|
|
95
|
-
--client <name> [--framework <name>] [--session-id <id>]
|
|
96
|
-
[--tool-version <v>] [--capabilities <csv>]
|
|
97
|
-
[--notes <text>] [--json]
|
|
98
|
-
nexarch agent-identify
|
|
99
|
-
Alias of 'nexarch agent identify'
|
|
100
|
-
nexarch init-project
|
|
101
|
-
Scan a project directory, resolve detected packages/env vars/
|
|
102
|
-
config files against the reference library, write entities and
|
|
103
|
-
relationships to the architecture graph, and log unresolved
|
|
104
|
-
names as reference candidates.
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
--
|
|
112
|
-
--
|
|
113
|
-
--
|
|
114
|
-
--
|
|
115
|
-
--
|
|
116
|
-
--
|
|
117
|
-
--
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
--
|
|
140
|
-
--
|
|
141
|
-
--
|
|
142
|
-
--
|
|
143
|
-
--
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
--
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
--
|
|
161
|
-
--
|
|
162
|
-
--
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
--
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
--
|
|
184
|
-
--
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
--
|
|
210
|
-
--
|
|
211
|
-
--
|
|
212
|
-
--
|
|
213
|
-
--
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
--
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
--
|
|
249
|
-
--
|
|
250
|
-
--
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
76
|
+
console.log(`
|
|
77
|
+
nexarch — Your architecture workspace for AI delivery.
|
|
78
|
+
|
|
79
|
+
Usage:
|
|
80
|
+
nexarch login Authenticate in browser and store company-scoped credentials
|
|
81
|
+
Option: --company <id>
|
|
82
|
+
nexarch logout Remove stored credentials
|
|
83
|
+
nexarch status Check connection and show architecture summary
|
|
84
|
+
nexarch setup One-step onboarding: login (if needed) + MCP config + register agent
|
|
85
|
+
nexarch mcp-config Print MCP server config block for manual setup
|
|
86
|
+
Client list is registry-managed (see 'nexarch mcp-config --client <code>')
|
|
87
|
+
nexarch mcp-proxy Run as stdio MCP proxy (used by MCP clients)
|
|
88
|
+
nexarch init-agent Run handshake + mandatory agent registration in graph (advanced/manual)
|
|
89
|
+
Options: --agent-id <id> --bind-to-external-key <key>
|
|
90
|
+
--bind-relationship-type <code> --redact-hostname
|
|
91
|
+
--json --strict
|
|
92
|
+
nexarch agent identify
|
|
93
|
+
Capture richer coding-agent identity metadata
|
|
94
|
+
Options: --agent-id <id> --provider <provider> --model <model>
|
|
95
|
+
--client <name> [--framework <name>] [--session-id <id>]
|
|
96
|
+
[--tool-version <v>] [--capabilities <csv>]
|
|
97
|
+
[--notes <text>] [--json]
|
|
98
|
+
nexarch agent-identify
|
|
99
|
+
Alias of 'nexarch agent identify'
|
|
100
|
+
nexarch init-project
|
|
101
|
+
Scan a project directory, resolve detected packages/env vars/
|
|
102
|
+
config files against the reference library, write entities and
|
|
103
|
+
relationships to the architecture graph, and log unresolved
|
|
104
|
+
names as reference candidates.
|
|
105
|
+
Monorepos register a project entity plus one proposed
|
|
106
|
+
application per deployable package (sourced_from the project).
|
|
107
|
+
Single-package repos register the repo's one application; when
|
|
108
|
+
similar applications exist they are listed, and the new
|
|
109
|
+
application is created as proposed for review at activation.
|
|
110
|
+
Options: --dir <path> (default: cwd)
|
|
111
|
+
--name <name> override project name
|
|
112
|
+
--entity-type <code> (default: application)
|
|
113
|
+
--application-ref <entityRef> force mapping target
|
|
114
|
+
--create-application force new application entity
|
|
115
|
+
--auto-map-application auto-map only when high confidence
|
|
116
|
+
--non-interactive deprecated (mapping no longer prompts)
|
|
117
|
+
--batch-size <n> upsert batch size (default: 10)
|
|
118
|
+
--profile include timing/profile data in JSON output
|
|
119
|
+
--dry-run preview without writing
|
|
120
|
+
--json
|
|
121
|
+
nexarch update-project
|
|
122
|
+
Re-scan a previously registered project directory, refresh
|
|
123
|
+
entities and relationships in the graph, and diff the new scan
|
|
124
|
+
against the current graph state to surface stale relationships
|
|
125
|
+
and removed sub-packages for the calling agent to review.
|
|
126
|
+
Accepts all the same options as init-project plus:
|
|
127
|
+
--application-ref <entityRef> target project key (recommended)
|
|
128
|
+
--auto-map-application auto-select best-match application
|
|
129
|
+
Output includes enrichmentRequired.diff with:
|
|
130
|
+
newRelationships — detected but not yet in graph
|
|
131
|
+
staleRelationships — in graph but absent from manifests
|
|
132
|
+
removedSubPackages — previously registered, no longer on disk
|
|
133
|
+
--json
|
|
134
|
+
nexarch update-entity
|
|
135
|
+
Update the name and/or description of an existing graph entity.
|
|
136
|
+
Use this after init-project to enrich the entity with meaningful
|
|
137
|
+
content from the project README or docs.
|
|
138
|
+
Options: --key <externalKey> (required)
|
|
139
|
+
--name <name>
|
|
140
|
+
--description <text>
|
|
141
|
+
--entity-type <code> (default: application)
|
|
142
|
+
--subtype <code>
|
|
143
|
+
--icon <lucide-name> (convenience; sets attributes.application_icon)
|
|
144
|
+
--attributes-json '<json object>'
|
|
145
|
+
--attributes-file <path.json>
|
|
146
|
+
--json
|
|
147
|
+
nexarch add-relationship
|
|
148
|
+
Add relationships between existing graph entities (single or batch).
|
|
149
|
+
Single options: --from <externalKey>
|
|
150
|
+
--to <externalKey>
|
|
151
|
+
--type <code> (e.g. part_of, depends_on)
|
|
152
|
+
Batch options: --relationships-json '<json array>'
|
|
153
|
+
--relationships-file <path.json>
|
|
154
|
+
--json
|
|
155
|
+
nexarch register-alias
|
|
156
|
+
Register a company-scoped alias for an entity so future
|
|
157
|
+
scans resolve it instead of logging it as a candidate.
|
|
158
|
+
Use after enriching internal monorepo packages.
|
|
159
|
+
Options: --alias <value> (required, e.g. @scope/name)
|
|
160
|
+
--key <externalKey> (required)
|
|
161
|
+
--name <name> (required)
|
|
162
|
+
--entity-type <code> (required)
|
|
163
|
+
--subtype <code>
|
|
164
|
+
--description <text>
|
|
165
|
+
--json
|
|
166
|
+
nexarch resolve-names
|
|
167
|
+
Look up one or more raw names (package names, platform
|
|
168
|
+
names) against the global reference library and return
|
|
169
|
+
their canonical external keys. Useful for gap-check
|
|
170
|
+
results before calling add-relationship.
|
|
171
|
+
Options: --names <csv> (required, e.g. "vercel,neon")
|
|
172
|
+
--json
|
|
173
|
+
nexarch list-entities
|
|
174
|
+
List entities from the workspace graph.
|
|
175
|
+
Options: --type <entityTypeCode>
|
|
176
|
+
--status <status>
|
|
177
|
+
--query <text>
|
|
178
|
+
--limit <1-500>
|
|
179
|
+
--json
|
|
180
|
+
nexarch list-relationships
|
|
181
|
+
List relationships from the workspace graph.
|
|
182
|
+
Options: --type <relationshipTypeCode>
|
|
183
|
+
--status <status>
|
|
184
|
+
--from <fromExternalKey>
|
|
185
|
+
--to <toExternalKey>
|
|
186
|
+
--limit <1-500>
|
|
187
|
+
--json
|
|
188
|
+
nexarch register-runtime
|
|
189
|
+
Register or refresh runtime + optional application context
|
|
190
|
+
without performing check-in.
|
|
191
|
+
Options: --application-ref <entityRef>
|
|
192
|
+
--client <name>
|
|
193
|
+
--version <semver>
|
|
194
|
+
--json
|
|
195
|
+
nexarch check-in Preview pending application-target commands (no auto-claim)
|
|
196
|
+
and report draft/proposed applications needing review so the
|
|
197
|
+
agent can prompt the user to explore and instantiate them.
|
|
198
|
+
Use command-claim to explicitly claim a specific command.
|
|
199
|
+
Scope is resolved server-side from active company context.
|
|
200
|
+
Options: --agent-key <key> override stored agent key
|
|
201
|
+
--application-ref <entityRef> narrow preview scope
|
|
202
|
+
--json JSON output includes draftApplications[] and proposedApplications[]
|
|
203
|
+
nexarch proposals start
|
|
204
|
+
Start a new application workspace from a proposed NexArch app.
|
|
205
|
+
Lists proposed apps, shows policy review gates, writes a starter
|
|
206
|
+
project scaffold, and activates the proposal to active once
|
|
207
|
+
required policy controls are acknowledged.
|
|
208
|
+
Options: --id <applicationId>
|
|
209
|
+
--dir <path>
|
|
210
|
+
--reason <text>
|
|
211
|
+
--repo <url>
|
|
212
|
+
--skip-activate
|
|
213
|
+
--activate
|
|
214
|
+
--force
|
|
215
|
+
--non-interactive
|
|
216
|
+
--json
|
|
217
|
+
nexarch command-claim
|
|
218
|
+
Explicitly claim a pending command by ID.
|
|
219
|
+
Options: --id <commandId> (required)
|
|
220
|
+
--agent-key <key> override stored agent key
|
|
221
|
+
--application-ref <entityRef> required for application-target commands
|
|
222
|
+
--json
|
|
223
|
+
nexarch command-done
|
|
224
|
+
Mark a claimed command as completed.
|
|
225
|
+
Options: --id <commandId> (required)
|
|
226
|
+
--summary <text> short summary of what was done
|
|
227
|
+
--summary-file <path.md|txt>
|
|
228
|
+
--json
|
|
229
|
+
nexarch command-fail
|
|
230
|
+
Mark a claimed command as failed.
|
|
231
|
+
Options: --id <commandId> (required)
|
|
232
|
+
--error <message> (required)
|
|
233
|
+
--json
|
|
234
|
+
nexarch policy-controls
|
|
235
|
+
Fetch policy controls/rules assigned to an entity (for policy audits).
|
|
236
|
+
Options: --entity <externalKey> (required, e.g. application:bad-driving)
|
|
237
|
+
--json
|
|
238
|
+
nexarch policy-audit-template
|
|
239
|
+
Generate a findings JSON template from policy controls/rules for an entity.
|
|
240
|
+
Options: --entity <externalKey> (required)
|
|
241
|
+
--control-id <uuid> (repeatable; optional filter)
|
|
242
|
+
--default-result <pass|partial|fail> (default: fail)
|
|
243
|
+
--output <path.json>
|
|
244
|
+
--json
|
|
245
|
+
nexarch policy-audit-submit
|
|
246
|
+
Submit structured policy findings (writes policy_audit_finding rows).
|
|
247
|
+
Options: --command-id <id> (required)
|
|
248
|
+
--application-key <key> (required)
|
|
249
|
+
--agent-key <key> (optional; defaults from identity)
|
|
250
|
+
--finding <controlId|ruleId|result|rationale|missing1;missing2> (repeatable)
|
|
251
|
+
--findings-json <json-array>
|
|
252
|
+
--findings-file <path.json>
|
|
253
|
+
--json
|
|
254
|
+
nexarch policy-audit-results
|
|
255
|
+
Retrieve stored results of previous policy audits for an application.
|
|
256
|
+
Options: --entity <applicationEntityRef> (required)
|
|
257
|
+
--limit <1-10> (default 1)
|
|
258
|
+
--json
|
|
259
|
+
nexarch applied-policies
|
|
260
|
+
List policy documents applied to this company account.
|
|
261
|
+
Options: --pack <packCode> filter to a specific pack
|
|
262
|
+
--markdown include full document markdown
|
|
263
|
+
--json
|
|
264
|
+
nexarch governance-summary
|
|
265
|
+
Print review queue, graph stats, and per-application policy
|
|
266
|
+
audit rollup (latest run status, pass/partial/fail counts).
|
|
267
|
+
Options: --json
|
|
265
268
|
`);
|
|
266
269
|
process.exit(command ? 1 : 0);
|
|
267
270
|
}
|