nexarch 0.9.30 → 0.9.34
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.
|
@@ -1333,7 +1333,7 @@ export async function initAgent(args) {
|
|
|
1333
1333
|
console.log(` Trust attestation unavailable (${trustAttestation?.reason ?? "unknown"}).`);
|
|
1334
1334
|
}
|
|
1335
1335
|
}
|
|
1336
|
-
if (needsIdentityInput) {
|
|
1336
|
+
if (needsIdentityInput && !fromSetup) {
|
|
1337
1337
|
console.log("\nℹ Additional identity details are still needed to complete agent profile enrichment.");
|
|
1338
1338
|
console.log(` Missing: ${identityCapture.missingRequired.join(", ")}`);
|
|
1339
1339
|
console.log(" In an interactive terminal, rerun 'npx nexarch@latest init-agent' and answer prompts.");
|
|
@@ -6,6 +6,10 @@ function renderConfigForProfile(profile) {
|
|
|
6
6
|
if (profile.mergeStrategy === "continue_style") {
|
|
7
7
|
return { mcpServers: [{ name: "nexarch", ...serverBlock }] };
|
|
8
8
|
}
|
|
9
|
+
if (profile.mergeStrategy === "codex_style") {
|
|
10
|
+
const args = profile.serverArgs.map((a) => JSON.stringify(a)).join(", ");
|
|
11
|
+
return `[mcp_servers.nexarch]\ncommand = ${JSON.stringify(profile.serverCommand)}\nargs = [${args}]`;
|
|
12
|
+
}
|
|
9
13
|
return { mcpServers: { nexarch: serverBlock } };
|
|
10
14
|
}
|
|
11
15
|
export async function mcpConfig(args) {
|
|
@@ -43,7 +47,7 @@ If your client requires an MCP server URL instead of command/args, use:
|
|
|
43
47
|
const config = renderConfigForProfile(profile);
|
|
44
48
|
console.log(`\nUsing integration registry release v${registry.release.version}.`);
|
|
45
49
|
console.log(`\nMCP server config for ${profile.code} (${profile.name}):\n`);
|
|
46
|
-
console.log(JSON.stringify(config, null, 2));
|
|
50
|
+
console.log(typeof config === "string" ? config : JSON.stringify(config, null, 2));
|
|
47
51
|
const platformKey = process.platform === "darwin" ? "darwin" : process.platform === "win32" ? "win32" : "linux";
|
|
48
52
|
const locations = profile.osPaths?.[platformKey] ?? [];
|
|
49
53
|
if (locations.length > 0) {
|
package/dist/commands/setup.js
CHANGED
|
@@ -56,13 +56,20 @@ export async function setup(args) {
|
|
|
56
56
|
console.log(`✗ failed — ${message}`);
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
console.log("\nDone. Restart your MCP client for the changes to take effect.");
|
|
60
59
|
}
|
|
61
|
-
console.log("\
|
|
60
|
+
console.log("\nWriting Nexarch agent instructions…\n");
|
|
62
61
|
const initAgentArgs = args.includes("--strict") ? [...args] : [...args, "--strict"];
|
|
63
62
|
if (!initAgentArgs.includes("--from-setup"))
|
|
64
63
|
initAgentArgs.push("--from-setup");
|
|
64
|
+
if (!initAgentArgs.includes("--allow-instruction-write"))
|
|
65
|
+
initAgentArgs.push("--allow-instruction-write");
|
|
65
66
|
await initAgent(initAgentArgs);
|
|
66
|
-
|
|
67
|
-
|
|
67
|
+
if (clients.length > 0) {
|
|
68
|
+
const names = clients.map((c) => c.name);
|
|
69
|
+
const listed = names.length === 1 ? names[0] : `${names.slice(0, -1).join(", ")} and ${names[names.length - 1]}`;
|
|
70
|
+
console.log(`\nSetup complete. Open a new ${listed} session and ask your agent to "register with Nexarch".`);
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
console.log('\nSetup complete. Once you have configured an MCP client (see above), open a new session and ask your agent to "register with Nexarch".');
|
|
74
|
+
}
|
|
68
75
|
}
|
package/dist/lib/clients.js
CHANGED
|
@@ -60,12 +60,25 @@ function mergeFlatStyle(existing, serverBlock) {
|
|
|
60
60
|
config.mcpServers = servers;
|
|
61
61
|
return JSON.stringify(config, null, 2);
|
|
62
62
|
}
|
|
63
|
+
function mergeCodexStyle(existing, serverBlock) {
|
|
64
|
+
const sb = serverBlock;
|
|
65
|
+
const command = sb.command ?? "npx";
|
|
66
|
+
const args = (sb.args ?? []).map((a) => JSON.stringify(a)).join(", ");
|
|
67
|
+
const section = `[mcp_servers.nexarch]\ncommand = ${JSON.stringify(command)}\nargs = [${args}]\n`;
|
|
68
|
+
const sectionPattern = /\[mcp_servers\.nexarch\][\s\S]*?(?=\n\[|\n*$)/;
|
|
69
|
+
if (sectionPattern.test(existing)) {
|
|
70
|
+
return existing.replace(sectionPattern, section.trimEnd());
|
|
71
|
+
}
|
|
72
|
+
return existing + (existing.length > 0 && !existing.endsWith("\n") ? "\n" : "") + "\n" + section;
|
|
73
|
+
}
|
|
63
74
|
function mergeForStrategy(strategy) {
|
|
64
75
|
switch (strategy) {
|
|
65
76
|
case "claude_style":
|
|
66
77
|
return mergeClaudeStyle;
|
|
67
78
|
case "continue_style":
|
|
68
79
|
return mergeContinueStyle;
|
|
80
|
+
case "codex_style":
|
|
81
|
+
return mergeCodexStyle;
|
|
69
82
|
case "flat_style":
|
|
70
83
|
default:
|
|
71
84
|
return mergeFlatStyle;
|