nexarch 0.11.2 → 0.11.3
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/check-in.js +36 -19
- package/dist/index.js +2 -2
- package/package.json +1 -1
|
@@ -40,36 +40,29 @@ export async function checkIn(args) {
|
|
|
40
40
|
const agentKey = agentKeyArg ?? identity.agentKey;
|
|
41
41
|
if (!agentKey) {
|
|
42
42
|
if (asJson) {
|
|
43
|
-
process.stdout.write(JSON.stringify({ commands: [], draftApplications: [], reason: "no-agent-key" }) + "\n");
|
|
43
|
+
process.stdout.write(JSON.stringify({ commands: [], draftApplications: [], proposedApplications: [], reason: "no-agent-key" }) + "\n");
|
|
44
44
|
}
|
|
45
45
|
else {
|
|
46
46
|
console.log("No agent key found. Pass --agent-key or run nexarch init-agent first.");
|
|
47
47
|
}
|
|
48
48
|
return;
|
|
49
49
|
}
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}, { companyId: creds.companyId }),
|
|
56
|
-
callMcpTool("nexarch_list_entities", {
|
|
57
|
-
companyId: creds.companyId,
|
|
58
|
-
entityTypeCode: "application",
|
|
59
|
-
status: "draft",
|
|
60
|
-
}, { companyId: creds.companyId }),
|
|
61
|
-
]);
|
|
50
|
+
const raw = await callMcpTool("nexarch_check_in", {
|
|
51
|
+
agentRef: agentKey,
|
|
52
|
+
agentKey,
|
|
53
|
+
companyId: creds.companyId,
|
|
54
|
+
}, { companyId: creds.companyId });
|
|
62
55
|
const result = parseToolText(raw);
|
|
63
|
-
const
|
|
64
|
-
const
|
|
56
|
+
const draftApplications = result.draftApplications ?? [];
|
|
57
|
+
const proposedApplications = result.proposedApplications ?? [];
|
|
65
58
|
if (asJson) {
|
|
66
|
-
process.stdout.write(JSON.stringify(
|
|
59
|
+
process.stdout.write(JSON.stringify(result) + "\n");
|
|
67
60
|
return;
|
|
68
61
|
}
|
|
69
62
|
const commands = result.commands ?? [];
|
|
70
|
-
if (commands.length === 0 && draftApplications.length === 0) {
|
|
63
|
+
if (commands.length === 0 && draftApplications.length === 0 && proposedApplications.length === 0) {
|
|
71
64
|
console.log("No pending application-target commands found.");
|
|
72
|
-
console.log("No applications
|
|
65
|
+
console.log("No draft or proposed applications need attention.");
|
|
73
66
|
return;
|
|
74
67
|
}
|
|
75
68
|
if (commands.length > 0) {
|
|
@@ -107,7 +100,7 @@ export async function checkIn(args) {
|
|
|
107
100
|
" Ask the user if they would like to review and instantiate any of them.");
|
|
108
101
|
for (const app of draftApplications) {
|
|
109
102
|
const subtype = app.entitySubtypeCode ? ` [${app.entitySubtypeCode}]` : "";
|
|
110
|
-
const key = app.
|
|
103
|
+
const key = app.entityRef ? ` (${app.entityRef})` : "";
|
|
111
104
|
console.log(`\n Name : ${app.name}${subtype}${key}`);
|
|
112
105
|
if (app.description)
|
|
113
106
|
console.log(` Desc : ${app.description}`);
|
|
@@ -118,4 +111,28 @@ export async function checkIn(args) {
|
|
|
118
111
|
console.log(" npx nexarch proposals start --id <applicationId>");
|
|
119
112
|
console.log(" npx nexarch proposals start --id <applicationId> --dir <path> --non-interactive");
|
|
120
113
|
}
|
|
114
|
+
if (proposedApplications.length > 0) {
|
|
115
|
+
const count = proposedApplications.length;
|
|
116
|
+
console.log(`\n--- Proposed applications (${count}) ---`);
|
|
117
|
+
console.log(`${count === 1 ? "There is 1 application" : `There are ${count} applications`} in proposed state.` +
|
|
118
|
+
" Ask the user if they would like to review and realise any of them.");
|
|
119
|
+
for (const app of proposedApplications) {
|
|
120
|
+
const subtype = app.entitySubtypeCode ? ` [${app.entitySubtypeCode}]` : "";
|
|
121
|
+
const key = app.entityRef ? ` (${app.entityRef})` : "";
|
|
122
|
+
console.log(`\n Name : ${app.name}${subtype}${key}`);
|
|
123
|
+
if (app.description)
|
|
124
|
+
console.log(` Desc : ${app.description}`);
|
|
125
|
+
if (app.recommendationBasis)
|
|
126
|
+
console.log(` Basis : ${app.recommendationBasis}`);
|
|
127
|
+
if (typeof app.recommendedTechnologyCount === "number")
|
|
128
|
+
console.log(` Tech : ${app.recommendedTechnologyCount} recommended`);
|
|
129
|
+
if (typeof app.confirmedPolicyCount === "number")
|
|
130
|
+
console.log(` Policy : ${app.confirmedPolicyCount} confirmed`);
|
|
131
|
+
console.log(` ID : ${app.id}`);
|
|
132
|
+
console.log(` Realise : npx nexarch proposals start --id "${app.id}"`);
|
|
133
|
+
}
|
|
134
|
+
console.log("\nTo scaffold a proposed application into a local project:");
|
|
135
|
+
console.log(" npx nexarch proposals start --id <applicationId>");
|
|
136
|
+
console.log(" npx nexarch proposals start --id <applicationId> --dir <path> --non-interactive");
|
|
137
|
+
}
|
|
121
138
|
}
|
package/dist/index.js
CHANGED
|
@@ -181,12 +181,12 @@ Usage:
|
|
|
181
181
|
--limit <1-500>
|
|
182
182
|
--json
|
|
183
183
|
nexarch check-in Preview pending application-target commands (no auto-claim)
|
|
184
|
-
and report
|
|
184
|
+
and report draft/proposed applications needing review so the
|
|
185
185
|
agent can prompt the user to explore and instantiate them.
|
|
186
186
|
Use command-claim to explicitly claim a specific command.
|
|
187
187
|
Scope is resolved server-side from active company context.
|
|
188
188
|
Options: --agent-key <key> override stored agent key
|
|
189
|
-
--json JSON output includes draftApplications[]
|
|
189
|
+
--json JSON output includes draftApplications[] and proposedApplications[]
|
|
190
190
|
nexarch proposals start
|
|
191
191
|
Start a new application workspace from a proposed NexArch app.
|
|
192
192
|
Lists proposed apps, lets you choose one, writes a starter
|