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.
@@ -1129,28 +1129,40 @@ export async function initAgent(args) {
1129
1129
  }
1130
1130
  if (instructionsWriteAllowed) {
1131
1131
  agentConfigResults = existingInstructionTargets;
1132
- if (agentConfigResults.length > 0) {
1133
- trustAttestationAttempted = true;
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
- for (const r of agentConfigResults) {
1136
- try {
1137
- if (trustAttestation.ok) {
1138
- injectTrustAttestationBlock(r.path, trustAttestation);
1139
- }
1140
- else {
1141
- injectTrustAttestationUnavailableBlock(r.path, trustAttestation.reason ?? "unknown");
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
- catch {
1146
- // non-fatal
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",
@@ -1,9 +1,8 @@
1
- import { requireCredentials, loadCredentials } from "../lib/credentials.js";
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 creds = loadCredentials();
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 {
@@ -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
- if (process.platform === "win32") {
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
- command: first.serverCommand,
111
+ type: "stdio",
112
+ command,
117
113
  args: first.serverArgs,
114
+ env: {},
118
115
  };
119
116
  }
120
117
  export function findClientProfile(registry, code) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nexarch",
3
- "version": "0.9.26",
3
+ "version": "0.9.28",
4
4
  "description": "Your architecture workspace for AI delivery.",
5
5
  "keywords": [
6
6
  "nexarch",