@nexart/mcp-server 0.3.0 → 0.3.1

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/CHANGELOG.md CHANGED
@@ -4,6 +4,29 @@ Notable changes are recorded following [Keep a Changelog](https://keepachangelog
4
4
  Version selection follows [Semantic Versioning](https://semver.org/) and the
5
5
  [0.x release policy](docs/consumer-guide.md#release-policy).
6
6
 
7
+ ## [0.3.1]
8
+
9
+ ### Fixed
10
+
11
+ - Replace blanket failed-tool text with safe, actionable classifications for
12
+ recognised recording validation, authorisation, dependency and execution
13
+ conflicts, visible to MCP clients over HTTP JSON/SSE and local stdio.
14
+ - Prioritise uncertain submissions and retained operations requiring
15
+ reconciliation. Never imply that a previous operation was not submitted or
16
+ encourage automatic resubmission or a replacement execution ID.
17
+ - Keep unknown errors sanitised and avoid exposing raw exceptions, credentials,
18
+ confidential evidence, database details, account existence or policy contents.
19
+
20
+ ### Compatibility
21
+
22
+ - Preserve structured results, existing reason codes, successful responses and
23
+ tool schemas. The tested hosted configuration remains nine tools; local stdio
24
+ defaults to seven with recording independently opt-in and configured.
25
+ - No changes to authorisation, policy, quotas, custody, Node integration, SDK
26
+ versions or certification behaviour. This patch improves error visibility; it
27
+ does not establish the cause of earlier failed recording attempts.
28
+ - Publication and deployment remain separate owner-managed actions.
29
+
7
30
  ## [0.3.0]
8
31
 
9
32
  ### Compatibility
package/README.md CHANGED
@@ -3,14 +3,14 @@
3
3
  NexArt evidence verification, bounded public lookup and opt-in confidential AI
4
4
  recording and customer-authorised Node certification over MCP stdio.
5
5
 
6
- **Published:** `@nexart/mcp-server@0.2.0`, also listed in the official MCP
6
+ **Published:** `@nexart/mcp-server@0.3.0`, also listed in the official MCP
7
7
  Registry as `io.github.artnames/nexart-mcp-server`. Original MCP Server code is
8
8
  licensed under **Apache-2.0** on Artnames Ltd's express ownership confirmation
9
9
  and authorisation; see [LICENSE](LICENSE), [NOTICE](NOTICE) and
10
10
  [third-party exclusions](THIRD_PARTY_NOTICES.md).
11
11
 
12
- **Prepared release:** `@nexart/mcp-server@0.3.0`. It has not been published.
13
- Installation examples below target 0.3.0 once published; use 0.2.0 until then.
12
+ **Prepared patch release:** `@nexart/mcp-server@0.3.1`. It has not been published.
13
+ Installation examples below target 0.3.1 once published; use 0.3.0 until then.
14
14
  Release preparation does not activate the hosted service or publish a package.
15
15
 
16
16
  **Hosted service:** `https://mcp.nexart.io/` provides Streamable HTTP, with health
@@ -30,6 +30,16 @@ consent, policy and encrypted custody; hosted settings do not configure it.
30
30
  The hosted deployment is separate from this npm archive and is not modified by
31
31
  release preparation. See the [consumer guide](docs/consumer-guide.md).
32
32
 
33
+ **0.3.1 error reporting:** Failed recording responses now display safe, actionable
34
+ text for recognised validation, authorisation, dependency and execution-conflict
35
+ errors. Uncertain outcomes and retained operations requiring reconciliation take
36
+ priority: certification may already have occurred, so do not automatically
37
+ resubmit or use a replacement execution ID. Unknown failures remain sanitised.
38
+ Existing structured results, reason codes, successful responses and tool schemas
39
+ are unchanged. The shared correction applies to hosted HTTP and local stdio;
40
+ preparing this release does not update the live endpoint or establish the cause
41
+ of any earlier recording failure.
42
+
33
43
  ## Relationship to NexArt
34
44
 
35
45
  [NexArt's AI Evidence Layer](https://docs.nexart.io/docs/getting-started)
@@ -95,7 +105,7 @@ customer-authorised delegation; ordinary delegated setup needs no Mac root polic
95
105
  ### Public npm installation
96
106
 
97
107
  ```bash
98
- npm install @nexart/mcp-server@0.3.0
108
+ npm install @nexart/mcp-server@0.3.1
99
109
  ```
100
110
 
101
111
  Launch the installed `node_modules/.bin/nexart-mcp-server` (or its `mcp-server`
@@ -106,7 +116,7 @@ alias), with Node 24 on PATH. For clients that use an `mcpServers` configuration
106
116
  "mcpServers": {
107
117
  "nexart": {
108
118
  "command": "npx",
109
- "args": ["--yes", "--package=@nexart/mcp-server@0.3.0", "nexart-mcp-server"]
119
+ "args": ["--yes", "--package=@nexart/mcp-server@0.3.1", "nexart-mcp-server"]
110
120
  }
111
121
  }
112
122
  }
@@ -129,7 +139,7 @@ The explicit executable avoids client ambiguity. The `mcp-server` alias also
129
139
  supports npm's default executable selection:
130
140
 
131
141
  ```bash
132
- npx --yes @nexart/mcp-server@0.3.0
142
+ npx --yes @nexart/mcp-server@0.3.1
133
143
  ```
134
144
 
135
145
  An idle server waits for MCP messages; it is not an interactive terminal UI.
@@ -148,7 +158,7 @@ client-visible evidence and source control.
148
158
  pnpm install --frozen-lockfile --ignore-scripts
149
159
  pnpm run validate:release
150
160
  # Use the archive path printed by validation, in a separate consumer:
151
- npm install /absolute/path/to/nexart-mcp-server-0.3.0.tgz
161
+ npm install /absolute/path/to/nexart-mcp-server-0.3.1.tgz
152
162
  ```
153
163
 
154
164
  The archive contains compiled runtime/types, documentation, Registry metadata
@@ -320,12 +330,11 @@ recovery and npm's implicit binary discovery. No production Node submissions
320
330
  or credentials are used. Every run writes a new directory under
321
331
  `generated-artifacts/npm-release/`; historical evidence is never overwritten.
322
332
 
323
- The latest full v0.2.0 candidate validation passed **602 package tests** and a
324
- separate **145 hosted regression tests**, with no failures or skipped tests.
325
- Official MCP Inspector portability lint against the candidate's emitted schemas
326
- reported **0 errors and 0 warnings** for both supported protocol revisions.
327
- These candidate checks do not imply a new production deployment or additional
328
- production certification.
333
+ Use the version-specific `release-summary.json` and companion logs retained by
334
+ the release validator for the candidate's full test totals, archive digest,
335
+ packaging audit and independently installed compatibility results. Hosted
336
+ regressions are run separately with `pnpm run test:hosted`. Candidate checks do
337
+ not imply a production deployment or additional production certification.
329
338
 
330
339
  See [release policy](docs/consumer-guide.md#release-policy),
331
340
  [compatibility](docs/consumer-guide.md#installation-and-compatibility), [contracts](docs/consumer-guide.md#tools-and-schemas)
@@ -1,3 +1,61 @@
1
+ import { recordOutput } from './record/contracts.js';
2
+ const GENERIC_ERROR = 'MCP tool request failed. If certification was requested, inspect the operation before retrying; do not resubmit automatically.';
3
+ const UNCERTAIN_ERROR = 'Certification outcome requires reconciliation; certification may already have occurred. Inspect the retained operation. Do not resubmit automatically or use a replacement execution ID.';
4
+ const VALIDATION_ERRORS = new Set([
5
+ 'INVALID_RECORDING_ARGUMENTS', 'INVALID_ARGUMENTS', 'RECORDING_INPUT_LIMIT',
6
+ 'HOSTED_VISIBILITY_REQUIRED', 'INSTRUCTION_KIND_REQUIRED', 'HOSTED_METADATA_NOT_SUPPORTED',
7
+ 'HOSTED_EXISTING_CER_RECOVERY_UNAVAILABLE', 'HOSTED_LOCAL_MODE_NOT_SUPPORTED',
8
+ ]);
9
+ const AUTHORIZATION_ERRORS = new Set([
10
+ 'CREDENTIAL_INVALID', 'CREDENTIAL_REVOKED', 'CREDENTIAL_SCOPE', 'CREDENTIAL_SCOPE_LEGACY',
11
+ 'ACCOUNT_INELIGIBLE', 'POLICY_NOT_FOUND', 'POLICY_DISABLED', 'POLICY_REVOKED',
12
+ 'POLICY_EXPIRED', 'POLICY_REVISION_REQUIRED', 'POLICY_REVISION_STALE',
13
+ 'EVIDENCE_TYPE_NOT_PERMITTED', 'VISIBILITY_MISMATCH', 'METADATA_NOT_PERMITTED',
14
+ 'RECOVERY_RECIPIENT_MISSING', 'POLICY_AUTHORIZATION_DENIED',
15
+ ]);
16
+ const DEPENDENCY_ERRORS = new Set([
17
+ 'UPSTREAM_UNAVAILABLE', 'AUTHORIZATION_UNAVAILABLE', 'AUTHORIZATION_RESPONSE_INVALID',
18
+ 'ACCOUNT_STATUS_UNAVAILABLE', 'SERVICE_NOT_CONFIGURED', 'HOSTED_CERTIFICATION_UNAVAILABLE',
19
+ 'RECOVERY_CUSTODY_UNAVAILABLE',
20
+ ]);
21
+ const RECONCILIATION_ERRORS = new Set([
22
+ 'OPERATION_REQUIRES_RECONCILIATION', 'RESULT_RETENTION_FAILED_RECONCILE',
23
+ 'OWNER_PUBLISHER_OUTCOME_UNKNOWN', 'ATTEMPT_REQUIRES_OWNER_RECONCILIATION',
24
+ 'ATTEMPT_RESERVATION_BUSY', 'DURABLE_OPERATION_UNAVAILABLE', 'OPERATION_STATE_CONFLICT',
25
+ ]);
26
+ const CONFLICT_ERRORS = new Set(['EXECUTION_ID_CONFLICT', 'OPERATION_POLICY_CHANGED']);
27
+ /** Only fixed classifications reach visible text. Never copy arbitrary error
28
+ * content, exception text or an unrecognised reason code into the response. */
29
+ function toolErrorText(result) {
30
+ const parsed = recordOutput.safeParse('structuredContent' in result ? result.structuredContent : undefined);
31
+ if (parsed.success) {
32
+ const { reasonCode, submission } = parsed.data;
33
+ // A current invocation's not_sent is not proof that an earlier one never
34
+ // submitted. Reconciliation and conflicts must precede ordinary errors.
35
+ if (submission === 'outcome_unknown' || RECONCILIATION_ERRORS.has(reasonCode))
36
+ return UNCERTAIN_ERROR;
37
+ if (CONFLICT_ERRORS.has(reasonCode))
38
+ return 'Execution conflict with a retained operation. Inspect that operation before any further submission; do not retry automatically or use a replacement execution ID.';
39
+ if (submission !== 'not_sent')
40
+ return GENERIC_ERROR;
41
+ if (VALIDATION_ERRORS.has(reasonCode))
42
+ return `${reasonCode}: Recording arguments are invalid or unsupported. This request was not submitted to Node. Correct the request only after checking any existing operation.`;
43
+ // Do not reveal account existence, policy contents or finer credential state.
44
+ if (AUTHORIZATION_ERRORS.has(reasonCode))
45
+ return 'Certification authorisation was not granted. This request was not submitted to Node. Review the customer key and approved configuration privately; do not retry automatically.';
46
+ if (DEPENDENCY_ERRORS.has(reasonCode))
47
+ return `${reasonCode}: A required certification dependency is unavailable or not ready. This request was not submitted to Node. Check service readiness and any existing operation; do not retry automatically.`;
48
+ return GENERIC_ERROR;
49
+ }
50
+ // The recording handler's exact, constant validation marker has no structured
51
+ // output. Never preserve SDK validation text, which can echo input fragments.
52
+ if (!('structuredContent' in result) && 'content' in result && Array.isArray(result.content) &&
53
+ result.content.length === 1 && result.content[0]?.type === 'text' &&
54
+ result.content[0]?.text === 'INVALID_RECORDING_ARGUMENTS') {
55
+ return 'INVALID_RECORDING_ARGUMENTS: Recording arguments are invalid. This request was not submitted to Node. Correct the request only after checking any existing operation.';
56
+ }
57
+ return GENERIC_ERROR;
58
+ }
1
59
  /** Redact diagnostics without replacing the SDK's protocol-era wire envelope. */
2
60
  export function redactProtocolMessage(message) {
3
61
  if ('error' in message)
@@ -8,7 +66,7 @@ export function redactProtocolMessage(message) {
8
66
  message.result !== null && 'isError' in message.result && message.result.isError === true) {
9
67
  return { ...message, result: {
10
68
  ...message.result, isError: true,
11
- content: [{ type: 'text', text: 'Invalid MCP tool request' }],
69
+ content: [{ type: 'text', text: toolErrorText(message.result) }],
12
70
  } };
13
71
  }
14
72
  return message;
@@ -260,8 +260,8 @@ export declare const recordOutput: z.ZodObject<{
260
260
  }>;
261
261
  custody: z.ZodEnum<{
262
262
  not_performed: "not_performed";
263
- encrypted_owner_recipient: "encrypted_owner_recipient";
264
263
  unencrypted_owner_approved: "unencrypted_owner_approved";
264
+ encrypted_owner_recipient: "encrypted_owner_recipient";
265
265
  external_existing_cer: "external_existing_cer";
266
266
  }>;
267
267
  localIntegrity: z.ZodEnum<{
package/dist/server.js CHANGED
@@ -11,7 +11,7 @@ const DESCRIPTIONS = [
11
11
  'Verify an inline Project Bundle and embedded AI CERs using the SDK; require project hash integrity.',
12
12
  ];
13
13
  export function createServer(runtime = {}) {
14
- const server = new McpServer({ name: 'nexart-mcp-server', version: '0.3.0' });
14
+ const server = new McpServer({ name: 'nexart-mcp-server', version: '0.3.1' });
15
15
  TOOL_NAMES.forEach((name, index) => {
16
16
  server.registerTool(name, {
17
17
  description: DESCRIPTIONS[index],
@@ -12,7 +12,7 @@ with the SDK's explicit `VERIFIED` result.
12
12
  Hosted certification remains a **controlled production rollout, not unrestricted
13
13
  GA**. A customer API key does not override server-side activation, customer
14
14
  eligibility, saved policy or custody requirements. The candidate npm release is
15
- `@nexart/mcp-server@0.3.0`; the current npm release remains **0.2.0** until the
15
+ `@nexart/mcp-server@0.3.1`; the current npm release remains **0.3.0** until the
16
16
  owner publishes the candidate.
17
17
 
18
18
  The local npm stdio default remains **seven tools**. Its optional recording tool
@@ -80,7 +80,7 @@ certificate binding, confidential openings and approved signer trust separately.
80
80
 
81
81
  ## Installation and compatibility
82
82
 
83
- Use Node.js 24 (`>=24.0.0 <25`) and install `@nexart/mcp-server@0.3.0`
83
+ Use Node.js 24 (`>=24.0.0 <25`) and install `@nexart/mcp-server@0.3.1`
84
84
  after the owner publishes that version. This repository currently prepares an
85
85
  unpublished release candidate; npm/Registry publication is a separate action.
86
86
  The npm package runs over stdio. Use an absolute Node/executable path when a
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nexart/mcp-server",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "mcpName": "io.github.artnames/nexart-mcp-server",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/",
package/server.json CHANGED
@@ -7,13 +7,13 @@
7
7
  "url": "https://github.com/artnames/nexart-mcp-server",
8
8
  "source": "github"
9
9
  },
10
- "version": "0.3.0",
10
+ "version": "0.3.1",
11
11
  "packages": [
12
12
  {
13
13
  "registryType": "npm",
14
14
  "registryBaseUrl": "https://registry.npmjs.org",
15
15
  "identifier": "@nexart/mcp-server",
16
- "version": "0.3.0",
16
+ "version": "0.3.1",
17
17
  "transport": { "type": "stdio" }
18
18
  }
19
19
  ],