nexarch 0.9.26 → 0.9.28
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 +28 -16
- package/dist/commands/setup.js +2 -7
- package/dist/lib/clients.js +4 -7
- package/package.json +1 -1
|
@@ -1129,28 +1129,40 @@ export async function initAgent(args) {
|
|
|
1129
1129
|
}
|
|
1130
1130
|
if (instructionsWriteAllowed) {
|
|
1131
1131
|
agentConfigResults = existingInstructionTargets;
|
|
1132
|
-
|
|
1133
|
-
|
|
1132
|
+
}
|
|
1133
|
+
else if (alreadyConfigured) {
|
|
1134
|
+
agentConfigResults = existingInstructionTargets;
|
|
1135
|
+
}
|
|
1136
|
+
// Inject trust attestation for any file actually written (injected/updated),
|
|
1137
|
+
// plus all targets when instructionsWriteAllowed forces a refresh.
|
|
1138
|
+
// Runs regardless of instructionsWriteAllowed so writes that happened before
|
|
1139
|
+
// the consent check always get a trust block.
|
|
1140
|
+
const attestationTargets = instructionsWriteAllowed
|
|
1141
|
+
? agentConfigResults
|
|
1142
|
+
: existingInstructionTargets.filter((r) => r.status === "injected" || r.status === "updated");
|
|
1143
|
+
if (attestationTargets.length > 0) {
|
|
1144
|
+
trustAttestationAttempted = true;
|
|
1145
|
+
try {
|
|
1134
1146
|
trustAttestation = await requestTrustAttestation(agentId);
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
injectInitProjectReportingContract(r.path);
|
|
1147
|
+
}
|
|
1148
|
+
catch {
|
|
1149
|
+
trustAttestation = { ok: false, reason: "request failed" };
|
|
1150
|
+
}
|
|
1151
|
+
for (const r of attestationTargets) {
|
|
1152
|
+
try {
|
|
1153
|
+
if (trustAttestation.ok) {
|
|
1154
|
+
injectTrustAttestationBlock(r.path, trustAttestation);
|
|
1144
1155
|
}
|
|
1145
|
-
|
|
1146
|
-
|
|
1156
|
+
else {
|
|
1157
|
+
injectTrustAttestationUnavailableBlock(r.path, trustAttestation.reason ?? "unknown");
|
|
1147
1158
|
}
|
|
1159
|
+
injectInitProjectReportingContract(r.path);
|
|
1160
|
+
}
|
|
1161
|
+
catch {
|
|
1162
|
+
// non-fatal
|
|
1148
1163
|
}
|
|
1149
1164
|
}
|
|
1150
1165
|
}
|
|
1151
|
-
else if (alreadyConfigured) {
|
|
1152
|
-
agentConfigResults = existingInstructionTargets;
|
|
1153
|
-
}
|
|
1154
1166
|
}
|
|
1155
1167
|
checks.push({
|
|
1156
1168
|
name: "agent.registration",
|
package/dist/commands/setup.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { requireCredentials
|
|
1
|
+
import { requireCredentials } from "../lib/credentials.js";
|
|
2
2
|
import { detectClientsFromRegistry, writeClientConfig, nexarchServerBlockFromRegistry } from "../lib/clients.js";
|
|
3
3
|
import { fetchAgentRegistryOrThrow } from "../lib/agent-registry.js";
|
|
4
4
|
import { initAgent } from "./init-agent.js";
|
|
5
5
|
import { login } from "./login.js";
|
|
6
|
-
const MCP_HTTP_URL = "https://mcp.nexarch.ai/mcp";
|
|
7
6
|
export async function setup(args) {
|
|
8
7
|
try {
|
|
9
8
|
requireCredentials();
|
|
@@ -44,12 +43,8 @@ export async function setup(args) {
|
|
|
44
43
|
console.log(" nexarch mcp-config --client http");
|
|
45
44
|
}
|
|
46
45
|
else {
|
|
47
|
-
const
|
|
48
|
-
const stdioBlock = nexarchServerBlockFromRegistry(registry);
|
|
46
|
+
const serverBlock = nexarchServerBlockFromRegistry(registry);
|
|
49
47
|
for (const client of clients) {
|
|
50
|
-
const serverBlock = process.platform === "win32" && client.code === "claude-code" && creds
|
|
51
|
-
? { type: "http", url: MCP_HTTP_URL, headers: { Authorization: `Bearer ${creds.token}` } }
|
|
52
|
-
: stdioBlock;
|
|
53
48
|
process.stdout.write(` ${client.name.padEnd(20)} ${client.configPath}\n`);
|
|
54
49
|
process.stdout.write(` ${"".padEnd(20)} `);
|
|
55
50
|
try {
|
package/dist/lib/clients.js
CHANGED
|
@@ -106,15 +106,12 @@ export function nexarchServerBlockFromRegistry(registry) {
|
|
|
106
106
|
if (!first) {
|
|
107
107
|
throw new Error("Nexarch integration registry is missing MCP client profiles.");
|
|
108
108
|
}
|
|
109
|
-
|
|
110
|
-
return {
|
|
111
|
-
command: `${first.serverCommand}.cmd`,
|
|
112
|
-
args: first.serverArgs,
|
|
113
|
-
};
|
|
114
|
-
}
|
|
109
|
+
const command = process.platform === "win32" ? `${first.serverCommand}.cmd` : first.serverCommand;
|
|
115
110
|
return {
|
|
116
|
-
|
|
111
|
+
type: "stdio",
|
|
112
|
+
command,
|
|
117
113
|
args: first.serverArgs,
|
|
114
|
+
env: {},
|
|
118
115
|
};
|
|
119
116
|
}
|
|
120
117
|
export function findClientProfile(registry, code) {
|