nexarch 0.8.9 → 0.8.11
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.
|
@@ -118,8 +118,30 @@ export async function addRelationship(args) {
|
|
|
118
118
|
const failed = result.summary?.failed ?? 0;
|
|
119
119
|
if (failed > 0) {
|
|
120
120
|
console.error(`Failed to add relationship: ${fromKey} -[${relType}]-> ${toKey}`);
|
|
121
|
+
const missingFrom = new Set();
|
|
122
|
+
const missingTo = new Set();
|
|
121
123
|
for (const err of result.errors ?? []) {
|
|
122
|
-
|
|
124
|
+
const fromEndpoint = err.fromEntityExternalKey ?? fromKey;
|
|
125
|
+
const toEndpoint = err.toEntityExternalKey ?? toKey;
|
|
126
|
+
const message = err.message ?? "(no details returned)";
|
|
127
|
+
if (err.error === "RELATIONSHIP_ENDPOINT_NOT_FOUND") {
|
|
128
|
+
if (err.fromEntityExternalKey)
|
|
129
|
+
missingFrom.add(err.fromEntityExternalKey);
|
|
130
|
+
if (err.toEntityExternalKey)
|
|
131
|
+
missingTo.add(err.toEntityExternalKey);
|
|
132
|
+
console.error(` RELATIONSHIP_ENDPOINT_NOT_FOUND — from=${fromEndpoint} to=${toEndpoint}`);
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
console.error(` ${err.error ?? "UNKNOWN_ERROR"} — from=${fromEndpoint} to=${toEndpoint} — ${message}`);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
if (missingFrom.size > 0 || missingTo.size > 0) {
|
|
139
|
+
console.error("\nMissing endpoints detected:");
|
|
140
|
+
if (missingFrom.size > 0)
|
|
141
|
+
console.error(` missing from: ${Array.from(missingFrom).join(", ")}`);
|
|
142
|
+
if (missingTo.size > 0)
|
|
143
|
+
console.error(` missing to : ${Array.from(missingTo).join(", ")}`);
|
|
144
|
+
console.error(" Hint: create missing company-scoped entities first with `npx nexarch update-entity ...`, then retry add-relationship.");
|
|
123
145
|
}
|
|
124
146
|
process.exitCode = 1;
|
|
125
147
|
return;
|
|
@@ -897,13 +897,15 @@ export async function initAgent(args) {
|
|
|
897
897
|
submitCommandTemplate: `nexarch agent identify --agent-id \"${agentId}\" --provider \"<provider>\" --model \"<model>\" --client \"<client>\" --framework \"<openclaw|n8n|m365-agent-framework|other>\" --session-id \"<session-id>\" --tool-version \"<tool-version>\" --capabilities \"<capability1,capability2>\" --notes \"<optional notes>\" --json`,
|
|
898
898
|
initProjectSuggestion: appDetection.detected
|
|
899
899
|
? {
|
|
900
|
-
|
|
900
|
+
detected: true,
|
|
901
901
|
reason: `Detected likely project manifests in cwd: ${appDetection.evidence.join(", ")}`,
|
|
902
|
-
|
|
903
|
-
|
|
902
|
+
consentRequired: true,
|
|
903
|
+
consentPrompt: "I detected a likely project in this directory. Do you want me to run init-project now?",
|
|
904
|
+
actionIfApproved: "run_init_project",
|
|
905
|
+
command: "npx nexarch@latest init-project --dir . --json",
|
|
904
906
|
}
|
|
905
907
|
: {
|
|
906
|
-
|
|
908
|
+
detected: false,
|
|
907
909
|
reason: "No common application manifest files detected in current directory.",
|
|
908
910
|
},
|
|
909
911
|
},
|
|
@@ -947,8 +949,9 @@ export async function initAgent(args) {
|
|
|
947
949
|
if (!fromSetup && appDetection.detected) {
|
|
948
950
|
console.log("\n➡ Optional next step: likely application detected in current directory.");
|
|
949
951
|
console.log(` Detected manifests: ${appDetection.evidence.join(", ")}`);
|
|
950
|
-
console.log(" Ask
|
|
951
|
-
console.log("
|
|
952
|
+
console.log(" Ask for user consent before running init-project.");
|
|
953
|
+
console.log(" Consent prompt: 'I detected a likely project in this directory. Do you want me to run init-project now?'");
|
|
954
|
+
console.log(" If approved, run: npx nexarch@latest init-project --dir . --json");
|
|
952
955
|
}
|
|
953
956
|
}
|
|
954
957
|
else {
|