nexarch 0.8.12 → 0.8.14
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-agent.js +37 -4
- package/package.json +1 -1
|
@@ -884,7 +884,7 @@ export async function initAgent(args) {
|
|
|
884
884
|
identityCapture = {
|
|
885
885
|
attempted: false,
|
|
886
886
|
ok: false,
|
|
887
|
-
detail: `
|
|
887
|
+
detail: `identity input needed: ${missingRequired.join(", ")}`,
|
|
888
888
|
missingRequired,
|
|
889
889
|
};
|
|
890
890
|
}
|
|
@@ -978,10 +978,15 @@ export async function initAgent(args) {
|
|
|
978
978
|
ok: registration.ok,
|
|
979
979
|
detail: registration.detail,
|
|
980
980
|
});
|
|
981
|
+
const needsIdentityInput = registration.ok && identityCapture.missingRequired.length > 0;
|
|
981
982
|
checks.push({
|
|
982
983
|
name: "agent.identity.capture",
|
|
983
|
-
ok: !registration.ok || identityCapture.ok,
|
|
984
|
-
detail: !registration.ok
|
|
984
|
+
ok: !registration.ok || identityCapture.ok || needsIdentityInput,
|
|
985
|
+
detail: !registration.ok
|
|
986
|
+
? "skipped (registration failed)"
|
|
987
|
+
: needsIdentityInput
|
|
988
|
+
? `awaiting identity input (${identityCapture.missingRequired.join(", ")})`
|
|
989
|
+
: identityCapture.detail,
|
|
985
990
|
});
|
|
986
991
|
checks.push({
|
|
987
992
|
name: "agent.instructions.injection",
|
|
@@ -1018,7 +1023,7 @@ export async function initAgent(args) {
|
|
|
1018
1023
|
ok: strict ? allPassed : true,
|
|
1019
1024
|
passed: allPassed,
|
|
1020
1025
|
strict,
|
|
1021
|
-
status: allPassed ? "completed" : "completed_with_issues",
|
|
1026
|
+
status: needsIdentityInput ? "needs_identity_input" : (allPassed ? "completed" : "completed_with_issues"),
|
|
1022
1027
|
checks,
|
|
1023
1028
|
summary: {
|
|
1024
1029
|
total: checks.length,
|
|
@@ -1053,6 +1058,21 @@ export async function initAgent(args) {
|
|
|
1053
1058
|
reason: "No common application manifest files detected in current directory.",
|
|
1054
1059
|
},
|
|
1055
1060
|
},
|
|
1061
|
+
identityInputGuidance: needsIdentityInput
|
|
1062
|
+
? {
|
|
1063
|
+
missingRequired: identityCapture.missingRequired,
|
|
1064
|
+
guidance: "Collect provider, model, and client, then rerun init-agent with those flags.",
|
|
1065
|
+
preferredCommandTemplate: "npx nexarch@latest init-agent --provider \"<provider>\" --model \"<model>\" --client \"<client>\" --framework \"<optional>\" --tool-version \"<optional>\" --capabilities \"<optional,comma,separated>\" --notes \"<optional>\" --json",
|
|
1066
|
+
}
|
|
1067
|
+
: null,
|
|
1068
|
+
instructionWriteGuidance: registration.ok && !instructionsWriteAllowed
|
|
1069
|
+
? {
|
|
1070
|
+
consentRequired: true,
|
|
1071
|
+
consentPrompt: "Nexarch can add setup instructions to AGENTS.md/CLAUDE.md so future AI sessions in this repo can self-register. Would you like me to do that?",
|
|
1072
|
+
ifApprovedCommand: "npx nexarch@latest init-agent --allow-instruction-write --json",
|
|
1073
|
+
activeFlag: "--allow-instruction-write",
|
|
1074
|
+
}
|
|
1075
|
+
: null,
|
|
1056
1076
|
companyId: creds.companyId,
|
|
1057
1077
|
registry: { version: registry.release.version, registryVersion: registry.registryVersion, publishedAt: registry.release.publishedAt },
|
|
1058
1078
|
agentConfigs: agentConfigResults,
|
|
@@ -1087,6 +1107,19 @@ export async function initAgent(args) {
|
|
|
1087
1107
|
if (hasInjectedAgentInstructions) {
|
|
1088
1108
|
console.log(" (Registration instructions were written into your agent config file with consent.)");
|
|
1089
1109
|
}
|
|
1110
|
+
if (needsIdentityInput) {
|
|
1111
|
+
console.log("\nℹ Additional identity details are still needed to complete agent profile enrichment.");
|
|
1112
|
+
console.log(` Missing: ${identityCapture.missingRequired.join(", ")}`);
|
|
1113
|
+
console.log(" In an interactive terminal, rerun 'npx nexarch@latest init-agent' and answer prompts.");
|
|
1114
|
+
console.log(" In non-interactive mode, rerun with: --provider --model --client");
|
|
1115
|
+
console.log(" Example: npx nexarch@latest init-agent --provider \"<provider>\" --model \"<model>\" --client \"<client>\"");
|
|
1116
|
+
}
|
|
1117
|
+
if (registration.ok && !instructionsWriteAllowed) {
|
|
1118
|
+
console.log("\n➡ Optional trusted-boundary step: AGENTS/CLAUDE instruction write requires user consent.");
|
|
1119
|
+
console.log(" Consent prompt: 'Nexarch can add setup instructions to AGENTS.md/CLAUDE.md so future AI sessions in this repo can self-register. Would you like me to do that?'");
|
|
1120
|
+
console.log(" If approved, rerun with: --allow-instruction-write");
|
|
1121
|
+
console.log(" Example: npx nexarch@latest init-agent --allow-instruction-write");
|
|
1122
|
+
}
|
|
1090
1123
|
if (!fromSetup && appDetection.detected) {
|
|
1091
1124
|
console.log("\n➡ Optional next step: likely application detected in current directory.");
|
|
1092
1125
|
console.log(` Detected manifests: ${appDetection.evidence.join(", ")}`);
|