@nexart/mcp-server 0.1.0 → 0.3.0

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.
Files changed (54) hide show
  1. package/CHANGELOG.md +114 -8
  2. package/CONTRIBUTING.md +7 -5
  3. package/README.md +69 -36
  4. package/SECURITY.md +11 -9
  5. package/THIRD_PARTY_NOTICES.md +4 -4
  6. package/dist/contracts.js +3 -2
  7. package/dist/json-schema.d.ts +9 -0
  8. package/dist/json-schema.js +20 -0
  9. package/dist/lookup/contracts.js +2 -1
  10. package/dist/network/contracts.d.ts +2 -2
  11. package/dist/owner/create.d.ts +2 -2
  12. package/dist/owner/custody.d.ts +7 -0
  13. package/dist/owner/custody.js +35 -16
  14. package/dist/protocol-safety.d.ts +3 -0
  15. package/dist/protocol-safety.js +16 -0
  16. package/dist/receipts/contracts.d.ts +2 -2
  17. package/dist/receipts/contracts.js +2 -1
  18. package/dist/receipts/verify.js +1 -1
  19. package/dist/record/contracts.d.ts +46 -4
  20. package/dist/record/contracts.js +5 -0
  21. package/dist/record/record.d.ts +3 -0
  22. package/dist/record/record.js +6 -2
  23. package/dist/record-tools.d.ts +4 -0
  24. package/dist/record-tools.js +21 -6
  25. package/dist/server.d.ts +11 -1
  26. package/dist/server.js +5 -5
  27. package/dist/stdio.js +3 -19
  28. package/dist/trust/policy.js +8 -2
  29. package/dist/write/attest.d.ts +3 -0
  30. package/dist/write/attest.js +2 -1
  31. package/dist/write/contracts.d.ts +6 -6
  32. package/dist/write/contracts.js +2 -1
  33. package/docs/consumer-guide.md +214 -0
  34. package/package.json +20 -6
  35. package/server.json +9 -3
  36. package/docs/age-version-compatibility.md +0 -46
  37. package/docs/architecture.md +0 -72
  38. package/docs/compatibility.md +0 -163
  39. package/docs/contracts.md +0 -127
  40. package/docs/licensing-review.md +0 -109
  41. package/docs/milestone-1-validation.md +0 -110
  42. package/docs/milestone-2.md +0 -291
  43. package/docs/milestone-3.2.md +0 -291
  44. package/docs/milestone-3.md +0 -274
  45. package/docs/milestone-4a.md +0 -221
  46. package/docs/milestone-4b1.md +0 -220
  47. package/docs/milestone-4b2.md +0 -260
  48. package/docs/public-default.md +0 -263
  49. package/docs/recording-schema-compatibility.md +0 -46
  50. package/docs/release.md +0 -311
  51. package/docs/security-fixes.md +0 -47
  52. package/docs/security.md +0 -195
  53. package/docs/standalone-acceptance.md +0 -81
  54. package/docs/validation.md +0 -85
package/docs/contracts.md DELETED
@@ -1,127 +0,0 @@
1
- # MCP contracts
2
-
3
- ## Discovery
4
-
5
- By default the server advertises seven tools. This page describes the four unchanged,
6
- offline verification tools, all read-only, non-destructive, idempotent and
7
- closed-world. The three new read-only tools have `openWorldHint:true`;
8
- their separate contracts and network/trust boundaries are documented in
9
- [Milestone 2](milestone-2.md). Annotations describe behaviour; they are not
10
- security permissions. Two optional write tools are documented separately in
11
- [Milestone 3](milestone-3.md). There are no file/URL resources or prompts.
12
-
13
- | Tool | Published verifier |
14
- | --- | --- |
15
- | `nexart_verify_ai_cer` | `@nexart/ai-execution@1.4.0`: `verifyCer` / `verifyCerV2` |
16
- | `nexart_verify_consequential_cer` | `@nexart/consequential-execution@0.1.0`: `verifyCer` |
17
- | `nexart_verify_governed_execution` | `@nexart/governed-execution@0.4.2`: `verifyGovernedExecution` / `verifyGovernedExecutionV2` |
18
- | `nexart_verify_project_bundle` | `@nexart/ai-execution@1.4.0`: `verifyProjectBundle` |
19
-
20
- ## Original four tools: input
21
-
22
- ```json
23
- {
24
- "type": "object",
25
- "properties": { "bundle": {} },
26
- "required": ["bundle"],
27
- "additionalProperties": false
28
- }
29
- ```
30
-
31
- `bundle` is inline JSON. It is intentionally not re-described with a second
32
- copy of NexArt's schema. The published verifier is the authority for artifact
33
- validation. This preserves SDK compatibility and avoids stripping fields
34
- before integrity verification.
35
-
36
- The envelope is strict. `privateKey`, `apiKey`, `openings`, `tenantId`, `path`,
37
- `url` and every other extra envelope argument are rejected. Embedded evidence
38
- may itself contain arbitrary producer-reported JSON. The server does not
39
- interpret evidence strings as paths, URLs, commands or credentials.
40
-
41
- ## Original four tools: output
42
-
43
- The executable Zod contract is `src/contracts.ts`, advertised as each tool's
44
- `outputSchema`. The legacy SDK wire encoding includes `structuredContent`
45
- and a JSON text block. The modern SDK may change its wire representation;
46
- the logical result is identical.
47
-
48
- ```json
49
- {
50
- "contractVersion": "1",
51
- "tool": "nexart_verify_ai_cer",
52
- "family": "cer.ai.execution.v1",
53
- "recordVersion": "0.1",
54
- "protocol": "1.3.0",
55
- "artifactIntegrity": "valid",
56
- "reasonCode": "OK",
57
- "sdk": {
58
- "ok": true,
59
- "code": "OK",
60
- "errors": [],
61
- "assurance": "strict",
62
- "verifiedUnder": {
63
- "protocolVersion": "1.3.0",
64
- "canonicalization": "jcs-v1"
65
- }
66
- },
67
- "checks": {
68
- "nodeSignature": "not_performed",
69
- "signerTrust": "not_established",
70
- "timestampCryptography": "not_performed",
71
- "confidentialOpenings": "not_performed",
72
- "completeness": "not_established"
73
- },
74
- "limitations": ["Fixed statements explaining the scope of verification."]
75
- }
76
- ```
77
-
78
- - `artifactIntegrity`: `valid`, `invalid`, or `not_performed`. A valid value
79
- does not establish authenticity, truth, authorization or completeness.
80
- - `reasonCode`: exact SDK code after verification, otherwise a named wrapper
81
- failure (`INVALID_ARGUMENTS`, `UNSUPPORTED_RECORD_FAMILY`,
82
- `UNSUPPORTED_RECORD_VERSION`, `SCHEMA_ERROR`, `INPUT_TOO_LARGE`,
83
- `JSON_TOO_DEEP`, `JSON_TOO_COMPLEX`, `PROJECT_STEP_LIMIT`,
84
- `NON_JSON_INPUT`, `CANCELLED`, `SDK_EXCEPTION`, `OUTPUT_LIMIT_EXCEEDED`,
85
- or `PROJECT_HASH_NOT_VERIFIED`).
86
- - `family`, `recordVersion`, `protocol`: allowlisted recognized values; `null`
87
- for absent/unrecognized values. Unknown user strings are never echoed.
88
- Governed protocol is reported as the SDK's bound `jcs-v1` canonical scheme;
89
- it is not an invented numerical `protocolVersion`.
90
- - `sdk`: `null` when verification did not run or raised an exception. Otherwise
91
- an explicit disclosure projection, not a raw serialization of SDK internals.
92
- Exact codes, boolean checks, step counts, verification provenance,
93
- relaxations, verdict, governed check states and producer-identity status
94
- are retained when present.
95
- - Error/detail/warning arrays retain their count, replacing each string with
96
- `REDACTED_DIAGNOSTIC`. Project step results preserve array order, `ok` and
97
- code, with `index` replacing evidence identifiers. Thus SDK outcome parity
98
- is exact while raw diagnostic text is intentionally not byte-identical.
99
- - Project integrity requires both SDK `ok` and `projectHashValid === true`.
100
- The SDK's structural, hash and per-step dimensions remain separate.
101
- - `isError` is not used for invalid evidence. Bad MCP argument envelopes are
102
- SDK-generated tool errors, sanitized at the stdio boundary; these may not
103
- have structured verification output. Malformed JSON is ignored by the
104
- official SDK parser, without echoing or logging its content.
105
-
106
- There are no cryptographic authenticity or trusted timestamp claims in this
107
- contract. An SDK confidentiality verdict is preserved as an SDK-scoped
108
- integrity/commitment result, never reinterpreted as a Node signature.
109
-
110
- ## Resource policy
111
-
112
- | Limit | Value |
113
- | --- | --- |
114
- | Serialized tool arguments | 1,048,576 UTF-8 bytes |
115
- | Stdio frame / SDK receive buffer | 1,081,344 bytes |
116
- | Tool argument JSON depth | 64 |
117
- | Pre-parse frame depth | 72, allowing for MCP envelope overhead |
118
- | JSON values/containers | 25,000 |
119
- | Keys per object / items per array | 4,096 |
120
- | Project step registry | 100 |
121
- | Logical structured output | 262,144 bytes |
122
-
123
- No evidence is truncated. Exceeding application limits returns a structured
124
- `not_performed` result. Exceeding the pre-parse frame/depth guard closes the
125
- connection with exit status 1. The SDK receive-buffer cap can also reject a
126
- single large batch of buffered messages. The output bound applies to each
127
- logical result; legacy text plus structured content duplicate it on the wire.
@@ -1,109 +0,0 @@
1
- # Release-candidate rights review
2
-
3
- ## Decision: npm rights reviewed; public configuration authorised
4
-
5
- Artnames Ltd expressly confirmed ownership of the **original standalone NexArt
6
- MCP Server code**, including applicable development contributions, and
7
- authorised Apache License 2.0. That owner confirmation clears the original-code
8
- gate. LICENSE contains the official Apache-2.0 text; NOTICE supplies the scoped
9
- Copyright 2026 Artnames Ltd notice. Package metadata is now Apache-2.0.
10
-
11
- This is not an extension of that confirmation to SDKs, Node, Verification
12
- Terminal, upstream fixtures or other NexArt products. Their rights/notices are
13
- unchanged. The owner authorised removal of private:true for final preparation
14
- and designated security@nexart.io. The owner will test mailbox delivery/monitoring
15
- and confirm npm authority before publication; the agent does not authenticate
16
- or claim those checks complete. Excluded fixtures and private Git history are not npm gates.
17
- The SDK notice issues below belong upstream, not to this unbundled tarball.
18
- This technical provenance
19
- review is not an independent legal opinion or a claim that all third-party
20
- questions have been resolved.
21
-
22
- ## Material and scope inventory
23
-
24
- | Material | Evidence and remaining action |
25
- | --- | --- |
26
- | Original adapter `src/**`, original tests, documentation and release scripts | Ownership, applicable development contributions and Apache-2.0 authorisation expressly confirmed by Artnames Ltd; third-party portions remain excluded from this grant |
27
- | AI `tests/fixtures/ai/compat-vectors-v1.json` / `compat-vectors-v2.json` | Published SDK-derived compatibility vectors; upstream manifest declares MIT, with no top-level licence file in inspected distribution. Preserve provenance; confirm redistribution permission/notices |
28
- | Governed `tests/fixtures/governed/**` | Upstream-derived examples from the source revision recorded in THIRD_PARTY_NOTICES; one file explicitly describes corrected deterministic v4 identifiers. Do not claim all current files are byte-identical upstream copies. Confirm redistribution/derivative rights and notices |
29
- | Generated synthetic integration inputs | Generated with official SDK constructors, not independent upstream vectors. Generation does not itself establish rights in incorporated upstream content |
30
- | Runtime dependencies | External npm distributions, not vendored/bundled in MCP. AI internally bundles Noble; Governed includes a Google Apache schema. Preserve their distinct rights; see THIRD_PARTY_NOTICES |
31
- | Retired preview scaffolding, attachments, validation archives | Excluded from npm. Do not infer permission to publish them or the entire workspace |
32
- | NexArt Node, SDKs, Verification Terminal | Not relicensed or modified. Adapter imports published SDKs. No separate Node/Terminal implementation was identified among the inspected adapter runtime sources; that inspection is not proof of the entire historical rights chain |
33
-
34
- Original code is authorised for Apache redistribution on the owner's confirmation.
35
- Copied/derived vectors and dependencies cannot simply be
36
- claimed as original Apache-only material; any applicable upstream grants,
37
- conditions and notices must be respected. Existing notices must not be removed.
38
- Npm excludes source/tests/fixtures/maps; its compiled original code is covered by
39
- the scoped Apache grant. Public repository distribution has separate exposure
40
- from the retained third-party fixtures and any other excluded workspace material.
41
-
42
- ## Installed dependency declarations inspected
43
-
44
- | Package(s) | Version(s) | Declared licence / installed evidence |
45
- | --- | --- | --- |
46
- | `@nexart/ai-execution`, `@nexart/consequential-execution`, `@nexart/governed-execution` | 1.4.0 / 0.1.0 / 0.4.2 | Exact public tarballs integrity-verified; MIT in registry and tarball manifests; no LICENSE/COPYING/NOTICE files. Noble MIT attributions in AI; Google Apache header in Governed |
47
- | `@modelcontextprotocol/server`, `core`, `client` | 2.4.0 | Apache-2.0; installed LICENSE present |
48
- | `zod` | 4.6.7 | MIT; installed LICENSE present |
49
- | `typescript` | 5.9.3 | Apache-2.0; installed LICENSE.txt present, development only |
50
- | `@types/node`, `undici-types` | 25.3.3 / 7.18.2 | MIT; installed LICENSE present, development only |
51
- | `cross-spawn`, `eventsource-parser`, `eventsource`, `jose` | 7.0.6 / 3.1.1 / 3.0.7 / 6.2.16 | MIT; installed licence files present |
52
- | `path-key`, `pkce-challenge`, `shebang-command`, `shebang-regex` | 3.1.1 / 5.0.1 / 2.0.0 / 3.0.0 | MIT; installed licence files present |
53
- | `isexe`, `which` | 2.0.0 / 2.0.2 | ISC; installed LICENSE present |
54
-
55
- This covers the installed locked development tree, not a promise that future npm
56
- consumer transitive resolution is identical. No obvious conflicting declared
57
- licence was identified, but metadata alone does not establish title or satisfy
58
- every redistribution obligation. Review the actual applicable notices and
59
- dependency graph for the final release. No dependency's legal text was removed
60
- or copied into a new adapter licence.
61
-
62
- ## Remaining evidence and owner actions
63
-
64
- 1. **Complete:** owner ownership/rights confirmation for original adapter code
65
- and applicable development contributions; scoped Apache licence and notice.
66
- 2. **npm third-party review complete for this archive:** no SDK code, upstream
67
- fixture files, source maps or Git history is physically shipped. Public MIT
68
- declarations support external SDK use; no conflicting restriction was found.
69
- Missing upstream notice files alone do not require extra MCP permission.
70
- 3. **SDK-maintainer action, not an MCP npm gate:** add proper original MIT grant/
71
- copyright notices and Noble/Google licence material to the affected SDK
72
- distributions. MIT requires its copyright and permission notice in copies;
73
- Apache requires its licence and applicable attribution/change/NOTICE handling.
74
- No SDK has been modified or declared fully notice-compliant.
75
- 4. **Public GitHub only:** confirm copied/derived fixture redistribution and
76
- review historical/excluded material before making the repository public.
77
- Keeping it private does not block Apache-licensed object-code npm distribution.
78
- 5. **npm owner actions:** test the designated security@nexart.io mailbox and authenticate
79
- an account authorised to create/publish @nexart/mcp-server, including 2FA.
80
- ENEEDAUTH does not establish lack of permission; it means no account could
81
- be checked. GitHub private reporting is optional if another real route exists.
82
- 6. **Registry only:** namespace authority and service-side validation/publication
83
- follow npm publication; consistent metadata is prepared, not registered.
84
- 7. **Final preparation expressly authorised:** remove private:true and validate
85
- a new archive while preserving the owner-side checks above. Do not reuse the
86
- prior 589-test archive after packed files change.
87
-
88
- ## Exact archive boundary
89
-
90
- The inspected 589-test archive has SHA-256
91
- `49969e90d40328238383a5899b48167d13217216492a77849c08ae183e87340b`.
92
- It has 114 files: 41 compiled JS modules, 41 type declarations, 23 documentation/
93
- setup-template files, and nine root files: package.json, server.json, README,
94
- CHANGELOG, CONTRIBUTING, SECURITY, THIRD_PARTY_NOTICES, LICENSE and NOTICE.
95
- The only standalone licence text is the original-code Apache-2.0 LICENSE.
96
- NOTICE supplies Artnames attribution; THIRD_PARTY_NOTICES inventories external
97
- dependencies/provenance. No third-party SDK implementation, fixture or third-party
98
- licence file is vendored in it; SDK imports are unresolved until npm installs
99
- those separate packages. Documentation examples are not upstream fixture files.
100
- This report corrects the scope of earlier gates; it does not rewrite that
101
- retained archive's documentation or claim it matches subsequent edits.
102
-
103
- Official references: [npm SPDX declarations](https://docs.npmjs.com/cli/v11/configuring-npm/package-json/#license),
104
- [MIT conditions](https://opensource.org/license/mit) and the included Apache
105
- LICENSE. This is a distribution-boundary assessment, not a legal title guarantee.
106
-
107
- The copyright year reflects this release preparation, not an invented earlier
108
- history. Do not blanket-relicense all repository content or apply this grant to
109
- any separate NexArt repository.
@@ -1,110 +0,0 @@
1
- # Stage 2 validation record
2
-
3
- Executed on **2026-11-10**, Node **v24.22.1**, pnpm **10.26.1**.
4
- This record describes actual checks, not expected future results.
5
-
6
- ## Build and tests
7
-
8
- | Command | Actual result |
9
- | --- | --- |
10
- | `pnpm --filter @workspace/nexart-mcp-server run build` | Passed; TypeScript emitted the stdio server |
11
- | `pnpm --filter @workspace/nexart-mcp-server test` | 45 tests, 45 passed, 0 failed, 0 skipped |
12
- | `pnpm --filter @workspace/nexart-mcp-server run check:clean-install` | Passed; fresh temporary dependency tree, frozen lock, 22 packages from the offline store, build and all 45 tests |
13
- | `pnpm --filter @workspace/nexart-mcp-server run benchmark` | All 8 measured workload types returned valid integrity |
14
- | `pnpm --filter @workspace/nexart-mcp-server run evidence` | Both real stdio sessions discovered all four tools and completed all six positive fixture invocations |
15
-
16
- The final unit/integration/conformance run took approximately 4.5 seconds.
17
- The clean-install rerun took approximately 4.4 seconds for the tests after
18
- dependency installation and compilation. Timing is environment-dependent.
19
-
20
- The clean-install check is a fresh installation from a populated offline
21
- package store, **not** an uncached public-registry download or an independent
22
- operating-system test. It respects the frozen repository lockfile and does
23
- not run dependency lifecycle scripts.
24
-
25
- ## Real MCP invocation evidence
26
-
27
- Client: **`@modelcontextprotocol/client@2.4.0`**.
28
- Transport: official stdio client spawning the compiled Node server.
29
-
30
- Both sessions discovered exactly:
31
-
32
- ```text
33
- nexart_verify_ai_cer
34
- nexart_verify_consequential_cer
35
- nexart_verify_governed_execution
36
- nexart_verify_project_bundle
37
- ```
38
-
39
- | Fixture | Tool | Legacy result | Modern result |
40
- | --- | --- | --- | --- |
41
- | AI V1 | `nexart_verify_ai_cer` | `valid / OK / sdk.ok=true` | `valid / OK / sdk.ok=true` |
42
- | AI V2 | `nexart_verify_ai_cer` | `valid / OK / sdk.ok=true` | `valid / OK / sdk.ok=true` |
43
- | Consequential | `nexart_verify_consequential_cer` | `valid / OK / sdk.ok=true` | `valid / OK / sdk.ok=true` |
44
- | Governed 0.1 | `nexart_verify_governed_execution` | `valid / OK / sdk.ok=true` | `valid / OK / sdk.ok=true` |
45
- | Governed 0.2 | `nexart_verify_governed_execution` | `valid / OK / sdk.ok=true` | `valid / OK / sdk.ok=true` |
46
- | Mixed AI Project | `nexart_verify_project_bundle` | `valid / OK / sdk.ok=true` | `valid / OK / sdk.ok=true` |
47
-
48
- Legacy negotiated `2025-11-25`; modern pinned `2026-07-28` without fallback.
49
- In every positive invocation, Node signature verification remained
50
- `not_performed` and signer trust remained `not_established`.
51
-
52
- The transport suite also submitted a tampered version of each of these
53
- fixtures in each session. All produced structured `invalid` outcomes rather
54
- than transport failures. Strict-envelope errors were sanitized and the
55
- connection remained usable. Oversized tool arguments returned
56
- `INPUT_TOO_LARGE`. Pre-parse hard size/depth violations exited safely.
57
-
58
- ## Test coverage
59
-
60
- - Positive AI V1/V2, consequential, governed 0.1/0.2, mixed AI Projects.
61
- - All 15 entries from the two published AI compatibility-vector files,
62
- including their three Project vectors, dispatched to the correct tools.
63
- - Exact scoped SDK outcome projection on supported positive and negative inputs.
64
- - Modified certificate hashes, modified project hash, altered embedded steps.
65
- - Unsupported families, AI protocols, governed envelope versions and profiles.
66
- - Invalid artifact schemas and strict argument-envelope validation.
67
- - Size, depth, breadth, total-node, cycle and Project-step limits.
68
- - Confidential AI/Governed fixtures, redacted SDK diagnostics and hostile
69
- metadata that must not become model-visible diagnostics.
70
- - Attestation metadata presence does not enable authenticity/trust claims.
71
- - Already-aborted request rejection and documented synchronous cancellation limits.
72
- - Tool discovery, advertised schemas, normal tool invocation in both eras.
73
- - Malformed JSON skipped by SDK with subsequent valid-message recovery.
74
- - stdout/stderr separation, stdin EOF, SIGTERM and hard input-limit shutdown.
75
- - Clean dependency installation, compilation and complete test rerun.
76
-
77
- ## Workload measurements
78
-
79
- Each workload was sampled **30 times**. Durations include application guards,
80
- SDK verification and safe output projection, excluding process startup and
81
- MCP round-trip overhead.
82
-
83
- | Workload | Serialized bundle bytes | Median ms | p95 ms | Max ms |
84
- | --- | ---: | ---: | ---: | ---: |
85
- | AI V1 | 778 | 0.035 | 0.259 | 1.903 |
86
- | AI V2 | 1,144 | 0.066 | 1.184 | 1.238 |
87
- | Consequential | 1,077 | 0.227 | 2.269 | 7.713 |
88
- | Governed 0.1 | 2,370 | 0.559 | 2.241 | 2.714 |
89
- | Governed 0.2 | 2,637 | 0.430 | 2.053 | 2.322 |
90
- | Mixed AI Project | 2,991 | 0.167 | 0.476 | 0.771 |
91
- | 100-step Project | 402,171 | 4.094 | 7.028 | 7.568 |
92
- | Near-limit metadata | 850,797 | 2.318 | 3.747 | 4.035 |
93
-
94
- These samples did not demonstrate a need for workers. They are not a
95
- worst-case resource proof or a hard cancellation/deadline guarantee.
96
-
97
- ## Explicit remaining limitations
98
-
99
- No final acceptance test is failing. Initial integration defects encountered
100
- during development were corrected before the passing runs above; they are
101
- not being hidden as skipped tests.
102
-
103
- Desktop MCP hosts were not manually tested. Other legacy protocol revisions
104
- were not individually tested. There is no security certification, production
105
- deployment, formal worst-case runtime bound, independently frozen consequential
106
- compatibility fixture, receipt/signature/trust verification, RFC 3161
107
- cryptographic verification or remote multi-tenant access.
108
-
109
- The test client and server use the same official SDK release; broader
110
- cross-implementation conformance remains a later release check.
@@ -1,291 +0,0 @@
1
- # Milestone 2 — contracts, implementation and acceptance
2
-
3
- Scope: three additive read-only MCP tools. The existing four verifier schemas,
4
- SDK adapters, limits, outputs and execution semantics are unchanged.
5
- The executable remains private, `UNLICENSED`, version `0.1.0`. No SDK version
6
- changes, external-repository edits, Git operations, publishing, database,
7
- OAuth, remote multitenancy or later-milestone features are part of this work.
8
-
9
- ## New MCP contracts
10
-
11
- All inputs are strict objects. Hashes must match `^sha256:[0-9a-f]{64}$`.
12
- No caller-selected URL, origin, manifest, key, pin, lifecycle exception, path,
13
- credential or alternate Node is accepted.
14
-
15
- ### `nexart_lookup_cer`
16
-
17
- Input: `{ "certificateHash": "sha256:<64 lowercase hex>" }`.
18
-
19
- GET `/v1/resolve/cer/:certificateHash`, validating `ok`, `schemaVersion:"1.0"`,
20
- `artifactType:"cer"`, top-level identity, proof, verification, bundle and links.
21
- Unknown upstream extensions are discarded by the disclosure projection;
22
- they are not tool output. Identity/proof/bundle/receipt hashes must all equal
23
- the requested hash. Any additional declared certificate hash in an envelope,
24
- its bundle/attestation or canonical-certificate metadata must agree too.
25
- The declared identity bundle type must match the returned bundle.
26
-
27
- Recognized complete bundles are checked by the same published SDK dispatch
28
- as the offline tools. Original/canonical content is never fetched separately,
29
- used to repair a redacted projection, reconstructed or resealed.
30
-
31
- ### `nexart_lookup_project_bundle`
32
-
33
- Input: `{ "projectHash": "sha256:<64 lowercase hex>" }`.
34
-
35
- GET `/v1/resolve/project/:projectHash`, validating the published resolver
36
- contract and matching top-level, proof, bundle-integrity and optional
37
- Project-receipt hashes. A null historical bundle/receipt is handled explicitly.
38
- Local integrity requires published `verifyProjectBundle` success **and
39
- `projectHashValid === true`**. No Node aggregate verdict is authoritative.
40
- The Project receipt's presence does not authenticate it.
41
-
42
- ### Lookup output, both tools
43
-
44
- ```text
45
- contractVersion: "1"
46
- lookup: found | not_found_or_not_public | unavailable | rejected
47
- reasonCode: fixed wrapper code or safely projected published SDK code
48
- family: recognized family or null
49
- integrity: valid | invalid | indeterminate | not_performed
50
- integrityScope: "returned_bundle"
51
- sdk: existing allowlisted SDK result projection or null
52
- receiptPresent: boolean
53
- nodeSignature: "not_performed"
54
- signerTrust: "not_established"
55
- limitations: fixed scope statements
56
- ```
57
-
58
- `found` is lookup success, not verification success. Redacted material that
59
- prevents checking the original produces `indeterminate`/`not_performed`,
60
- never an assertion that the original failed integrity. A supported complete
61
- bundle with a locally detected hash failure produces `invalid`. Unknown
62
- families are not verified. No bundle, content, prompt, I/O, openings, salts,
63
- canonical strings, account metadata, internal identifiers, full receipt,
64
- envelope, key material or raw SDK/Node diagnostics is returned.
65
-
66
- HTTP 404 maps to `NOT_FOUND_OR_NOT_PUBLIC`: private, hidden, deleted,
67
- nonexistent and backend-masked absence cannot be distinguished. It never
68
- asserts that a private artifact exists. HTTP 409 permits only allowlisted
69
- `INCOMPLETE_PROOF`/`INTEGRITY_MISMATCH` body codes and reports
70
- `UPSTREAM_INCOMPLETE_PROOF`/`UPSTREAM_INTEGRITY_MISMATCH`; these are upstream
71
- claims, not locally verified integrity failures. Other conflicts are
72
- `UPSTREAM_PROOF_CONFLICT`; 429 is `RATE_LIMITED`; 5xx is
73
- `UPSTREAM_UNAVAILABLE`. Raw diagnostic messages are always discarded.
74
-
75
- ### `nexart_verify_node_receipt`
76
-
77
- Two input modes:
78
-
79
- ```json
80
- {"source":"public_lookup","certificateHash":"sha256:<64 lowercase hex>"}
81
- ```
82
-
83
- ```text
84
- {
85
- source: "inline",
86
- certificateHash: "sha256:<64 lowercase hex>",
87
- receipt: complete signed CER receipt object,
88
- signatureB64Url: detached signature string
89
- }
90
- ```
91
-
92
- The public mode rejects inline receipt/signature fields. Inline mode requires
93
- both. Both modes require an external expected certificate hash; the wrapper
94
- never takes the expected identity from the receipt itself.
95
-
96
- Supported signed fields:
97
-
98
- * `receiptVersion:"attestation.receipt.v1"`, `attestationId`, `certificateHash`,
99
- `nodeRuntimeHash`, `protocolVersion`, `nodeId`, `attestorKeyId`.
100
- * Optional signed `attestedAt`, `timestampType`, `timestampStatus`,
101
- `timestampProvider`. Missing/invalid time prevents lifecycle acceptance.
102
-
103
- Current protocol versions are `1.2.0`, `1.3.0`, `1.3.1`. Extra receipt fields
104
- are rejected, never silently stripped before verification. The complete
105
- original accepted object is passed unchanged to the published AI SDK
106
- `verifyNodeReceiptSignature`. No handwritten Ed25519/canonicalization exists
107
- in runtime. Project receipt versions are `UNSUPPORTED_RECEIPT_VERSION`; no
108
- renaming `projectHash`/`registeredAt` into CER fields or structural casts to
109
- invent compatibility occur.
110
-
111
- Output is a strict safe summary:
112
-
113
- ```text
114
- contractVersion: "1"
115
- reasonCode
116
- signature: valid | invalid | not_performed
117
- hashBinding: match | mismatch | not_performed
118
- nodeIdentity: match | mismatch | not_established
119
- keyStatus: active | deprecated | revoked | unknown | unavailable
120
- keyLifecycle: valid | invalid | unknown
121
- lifecycleCode
122
- signerTrust: trusted_under_policy | rejected | not_established
123
- artifactIntegrity: "not_performed"
124
- sdk: {ok, code} | null
125
- limitations: fixed scope statements
126
- ```
127
-
128
- `signature:valid` is mathematical verification under the selected discovery
129
- key, **not approval of that key**. Signed hash/Node-identity mismatch or
130
- revocation may coexist with a valid signature but cannot gain trust.
131
- Timestamp fields are signed metadata, not cryptographic RFC 3161 verification.
132
- Neither receipt mode claims artifact integrity, execution truth, producer
133
- authorization, confidential-opening verification or completeness.
134
-
135
- ## Network controls
136
-
137
- * Only `https://node.nexart.io`, two encoded exact-hash resolver paths and
138
- `/.well-known/nexart-node.json`. No resolver-provided link is followed.
139
- * GET only; no credentials, retries, conditional-cache reuse or redirects.
140
- Redirect responses are rejected; 304 is not accepted as a successful lookup.
141
- * Shared maximum two active operations and eight queued operations.
142
- Receipt lookup plus manifest uses one slot and one operation deadline.
143
- * Five-second total deadline includes queue, headers, body and post-work abort
144
- checks. Caller cancellation is linked through requests and body reads.
145
- * At most two requests per public-receipt operation; all others at most one.
146
- * Decoded resolver body at most 1,048,576 bytes; manifest 65,536 bytes; conflict
147
- diagnostic body 8,192 bytes. Declared oversized responses are rejected early.
148
- Decoded streaming bytes are counted even with absent/smaller content length.
149
- * JSON content type and valid UTF-8 required; lexical depth capped before
150
- parsing. Existing depth/value/container limits apply to parsed responses.
151
- Manifest maximum 32 keys; receipt argument maximum 16,384 bytes.
152
- * Lookup logical output remains at most 262,144 bytes; receipt output is
153
- inherently bounded by its fixed fields, enums and short SDK codes.
154
- * Timers, listeners, readers and semaphore slots are released on completion,
155
- failure, deadline and cancellation. No cache, persistence or evidence logs.
156
-
157
- The synchronous published verifier cannot be forcibly preempted mid-call.
158
- Pre-call input bounds and post-call cancellation/deadline checks apply; this
159
- does not claim worker-process isolation or a hard CPU interruption guarantee.
160
-
161
- ## Trust bootstrap and lifecycle
162
-
163
- The server expects exactly `nexart-node-prod-1`. Production key pins start
164
- empty and **no live-discovered key has been approved**. The manifest alone
165
- cannot establish signer trust, including its active key or a rotated key.
166
- The caller cannot supply policy.
167
-
168
- Mandatory signed `attestorKeyId` selects an exact manifest entry using the
169
- published selector. The manifest is rejected on duplicate key IDs; unknown
170
- IDs never fall back to `activeKid`. Unknown/unsupported key material cannot
171
- produce acceptance. The published SDK performs the cryptographic check.
172
-
173
- Server-controlled pins can independently approve a specific kid and exact
174
- raw public-key material. Only a matching pin can enable scoped
175
- `trusted_under_policy`, with matching hash/Node identity, valid signature and
176
- known-valid lifecycle. Duplicate pins, changed material or rotation do not
177
- silently gain trust. These configuration types are not MCP request fields.
178
-
179
- Revoked keys never gain trust, even if their signatures verify. Deprecated
180
- keys require an explicit usable upper bound for historical acceptance.
181
- Missing, malformed or contradictory lifecycle metadata/time is unknown.
182
- The SDK's lifecycle checker is called without globally dropping `notBefore`.
183
-
184
- An audited Node behavior publishes the primary key's process boot as
185
- `notBefore`, even though upstream internally may not enforce it as inception.
186
- A receipt predating that advertised bound retains its signature result but
187
- has **unknown historical lifecycle**, not trusted acceptance. No blanket
188
- restart exception exists. Only a separately approved exact-key pin may supply
189
- an explicit historical lower bound and documented provenance. None is
190
- configured in production.
191
-
192
- Discovery is not an authenticated historical/revocation archive, and
193
- node-issued `attestedAt` is not independent trusted time. These limitations
194
- remain even after a future pin is approved.
195
-
196
- ## Verification and reproducibility
197
-
198
- ### Observed acceptance result
199
-
200
- **PASS — local implementation, safety tests, protocol compatibility and
201
- installed-package acceptance. UNVERIFIED — positive deployed resolver
202
- compatibility.** No required local check failed.
203
-
204
- The completed isolated run on Node 24.22.1 / pnpm 10.26.1 recorded:
205
-
206
- | Command/check | Observed result |
207
- | --- | --- |
208
- | `pnpm run build` (root) | PASS |
209
- | `pnpm --version` (isolated checkout) | 10.26.1 |
210
- | `pnpm install --frozen-lockfile --ignore-scripts` | PASS, independent checkout with shared registry cache allowed |
211
- | `pnpm run build` (isolated checkout) | PASS |
212
- | `pnpm exec node --test --test-concurrency=1 tests/transport.test.mjs tests/unit.test.mjs` | PASS: 45/45 original tests |
213
- | `pnpm test` | PASS: 114/114; 0 failures, cancelled or skipped |
214
- | `pnpm run evidence` | PASS: real stdio, both protocol revisions, all seven tools |
215
- | `pnpm run benchmark` | PASS: existing eight workload checks |
216
- | `pnpm pack --pack-destination <evidence-directory>` | PASS |
217
- | `pnpm add --save-exact --ignore-scripts <packed-tarball>` (fresh consumer) | PASS |
218
- | Consumer's installed `.bin/nexart-mcp-server` | PASS: both revisions, all seven tools; positive/tampered/unavailable/redacted calls |
219
- | Installed executable stdin EOF | PASS: exit 0, no signal, JSON-RPC-only stdout |
220
-
221
- Each protocol revision has an offline-fixture session and a synthetic-network
222
- session, both in development and installed evidence. The network sessions
223
- record successful CER/Project local verification, rejected tampered bundles,
224
- valid receipt signatures with `signerTrust:not_established`, invalid modified
225
- receipt signatures, unavailable hashes and sanitized strict-envelope errors.
226
-
227
- The original `adapters`, `contracts`, `limits`, `results`, `stdio` and `verify`
228
- source files were also compared byte-for-byte to the previously validated
229
- standalone tarball: all six are unchanged. Only registration was added in
230
- the original `server.ts`.
231
-
232
- ```sh
233
- pnpm run build
234
- pnpm run validate:release
235
- ```
236
-
237
- The validator performs independent frozen installation/build, the original
238
- 45 tests, the expanded suite, actual development MCP stdio, package packing,
239
- fresh consumer installation and the installed executable in both protocol
240
- eras (`2025-11-25`, `2026-07-28`). All seven tools are discovered. The original
241
- six good/tampered families and each new tool's positive, tampered, unavailable
242
- and argument-redaction cases are exercised. EOF is separately observed with
243
- exit zero and JSON-RPC-only stdout.
244
-
245
- Synthetic transport uses a test-only preload replacing fetch at the fixed
246
- origin. Test signing uses ephemeral in-memory test keys, never production
247
- private keys. The preload is not imported by runtime and production accepts
248
- no environment-based origin override. Fixtures are not an approved deployed
249
- positive resolver fixture.
250
-
251
- Read `generated-artifacts/milestone-2/release-summary.json`,
252
- `baseline-tests.log`, `regression-tests.log`, `development-invocations.log`
253
- and `installed-invocations.json` for observed outcomes. Prior milestone
254
- evidence is retained in its original directory.
255
-
256
- **Positive deployed resolver acceptance: UNVERIFIED.** No approved synthetic
257
- public positive fixture was supplied. No private/customer artifact was used
258
- to fill that gap and no upstream repository/service was changed.
259
-
260
- Observed upstream issues remain: potentially sensitive resolver canonical/
261
- context/proof sections; public redaction incompatible with full original
262
- hash checking in some families; current-discovery lifecycle provenance
263
- insufficient for historical key inception; distinct unsupported Project
264
- receipts; indistinguishable 404s that can include backend-masked absence.
265
-
266
- ## Exact implementation file inventory
267
-
268
- Added:
269
-
270
- * `src/network-tools.ts`
271
- * `src/network/client.ts`, `src/network/contracts.ts`
272
- * `src/lookup/contracts.ts`, `src/lookup/verify.ts`
273
- * `src/receipts/contracts.ts`, `src/receipts/verify.ts`
274
- * `src/trust/policy.ts`, `src/trust/lifecycle.ts`
275
- * `tests/network-fixtures.mjs`, `tests/network-preload.mjs`
276
- * `tests/network-tools.test.mjs`
277
- * `tests/network-transport.mjs`, `tests/network-transport.test.mjs`
278
- * `docs/milestone-2.md`
279
-
280
- Modified:
281
-
282
- * `src/server.ts` — additive registrations only.
283
- * `tests/client.mjs`, `tests/transport.test.mjs`
284
- * `tests/transport-evidence.mjs`, `tests/installed-package.mjs`
285
- * `tests/clean-install.mjs`
286
- * `package.json` — description only; versions/privacy/license unchanged.
287
- * `README.md`, `docs/contracts.md`, `docs/architecture.md`, `docs/compatibility.md`,
288
- `docs/security.md`, `docs/validation.md`
289
- * `.agents/memory/node-receipt-audit.md` — durable approved boundary, not runtime.
290
-
291
- Generated ignored release evidence is not source or a publication.