@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
@@ -1,291 +0,0 @@
1
- # Controlled private live acceptance: preparation only
2
-
3
- No live submission is authorized by preparation. No live Node request, credential
4
- setup, production key approval, SDK/Node change, Git operation or publication is
5
- part of this work. Public certification remains separately gated and out of scope.
6
-
7
- ## Prepared executable
8
-
9
- `tests/acceptance/private-run.mjs` is an owner-operated local Node client for the
10
- EXISTING `nexart_attest_cer` MCP tool. It is not an MCP tool, model host, new Node
11
- endpoint, or second attestation implementation. Default mode is OFFLINE preflight.
12
-
13
- ```sh
14
- node tests/acceptance/private-run.mjs --preflight A
15
- ```
16
-
17
- This reproducibly creates only:
18
-
19
- - `generated-artifacts/milestone-3.2/private-A/request.json`
20
- - `generated-artifacts/milestone-3.2/private-A/preflight.json`
21
-
22
- The directory is owner-only 0700, files 0600. The generated request contains the
23
- CER and explicit private visibility, never original plaintext, salts/openings,
24
- API credentials or model-selected transport configuration. Existing differing
25
- files are rejected, not overwritten.
26
-
27
- The deterministic SDK fixture specification is in
28
- `tests/acceptance/private-fixture.mjs`. It uses published SDK 1.4.0, fixed synthetic
29
- salts and artificial input/output. These salts are TEST CONSTANTS, not suitable for
30
- any real customer/employee/personal evidence.
31
-
32
- ### Exact A preflight
33
-
34
- ```text
35
- certificateHash:
36
- sha256:ae3f28523d50f990c12d2712e8b9e3d90ea7d686c5514b99b618e2e2e4fc598c
37
- verifyCerV2: OK
38
- verifyConfidentialV2: AUTHENTIC (no openings supplied)
39
- MCP confidential-submission profile: eligible
40
- SDK sealing tool round-trip: exact matching CER
41
- identity: absent
42
- visibility: private
43
- public enablement: false
44
- plaintext/openings in request: absent
45
- automatic retries: zero
46
- ```
47
-
48
- AUTHENTIC is opening-free record authenticity, not proof of the original values.
49
- The original IO hashes remain readable and can permit guessing/correlation;
50
- the synthetic fixtures are deliberately non-sensitive.
51
-
52
- ## Source-confirmed private retrieval and credential controls
53
-
54
- Reviewed `artnames/nexart-node` main:
55
- `0adbad75bcf24580395713680571fab036f3d01f`. This is source evidence, NOT deployed
56
- behaviour verification. No Node request was used to inspect these features.
57
-
58
- ### Existing owner route
59
-
60
- `src/server.js:5070-5102`:
61
-
62
- ```http
63
- GET /api/proofs/<URL-encoded-exact-certificateHash>
64
- Authorization: Bearer <owner-controlled key>
65
- ```
66
-
67
- It returns the proof object DIRECTLY, not `{ proof: ... }`. It calls
68
- `getOwnedProofByCertificateHash` and checks exact hash equality. Source:
69
- `src/db.js:1250-1268`; proof shape: `src/db.js:423-454`.
70
-
71
- Required values:
72
-
73
- | Value | Existing response location |
74
- | --- | --- |
75
- | Original CER | `proofJson` |
76
- | Original identity | `proofJson.snapshot.identity`, when present |
77
- | Certificate hash | `certificateHash` and `proofJson.certificateHash` |
78
- | Private state | `visibilityState` |
79
- | Signed receipt | `meta.receipt` |
80
- | Receipt signature | `meta.receiptSignature` |
81
- | Verification envelope | `meta.verificationEnvelope` |
82
- | Envelope signature | `meta.verificationEnvelopeSignature` |
83
-
84
- Account-owned proofs are available to the same authenticated account, including
85
- sibling keys. Standalone-key ownership requires the same key. A foreign key does
86
- not gain access merely by knowing the hash. A 404 can also mask lookup/database
87
- problems, so it is not conclusive evidence that no commit occurred.
88
-
89
- This GET is the existing authorized evidence-retrieval/export surface needed by
90
- the test. No list-all request, visibility change, export-tracking POST, new
91
- endpoint, or recovery attestation POST is needed. Full retrieved proof responses
92
- are not dumped: the runner retains only the exact known synthetic CER and selected
93
- signed evidence. Credentials/account metadata/unknown proof metadata are excluded.
94
- If the deployed route lacks required fields, STOP; approve a separate trusted
95
- response-collection method only after review. Never POST again to recover them.
96
-
97
- ### Actual key controls reviewed
98
-
99
- `src/auth.js:createAuthMiddleware` and `src/db.js:136-173` validate the hash of a
100
- Bearer credential, require an active key, and establish the key/account context.
101
- The inspected attestation/owner-proof paths do not enforce endpoint scopes,
102
- private-only permissions or credential expiry. Do not describe a dedicated test
103
- key as having those restrictions without additional operator evidence.
104
-
105
- Although key validation reads `api_keys.monthly_limit`, certification quota
106
- preflight uses `accounts.monthly_limit` and account-wide usage:
107
- `src/db.js:223-268`. The default fallback is 100; the Node operator can disable
108
- quota enforcement, and quota-query errors have fallback behaviour. Therefore a
109
- per-key limit field or label is NOT proof of an enforced one-request budget.
110
-
111
- Request an owner-provisioned dedicated key for an otherwise isolated account,
112
- with an operator-confirmed account budget and no competing usage. Do not mimic
113
- Node's internal `test-` label/user-ID fixture namespace: the inspected source has
114
- special usage-log suppression for those internal fixtures. Use normal key
115
- management and deactivate/revoke the dedicated key after the window using an
116
- existing owner-controlled mechanism.
117
-
118
- Default auth is fail-closed on DB failure, but `METERING_REQUIRED=false` can alter
119
- that; deployment settings remain unverified. No operator settings are changed here.
120
-
121
- ## Local Mac procedure: STOP before live execution
122
-
123
- Preparation and offline checks may be performed without an API key. Execution
124
- requires a NEW explicit owner authorization covering A, destination, account,
125
- request count, quota budget and evidence retrieval.
126
-
127
- 1. Use an owner-controlled Mac/terminal outside this Replit/agent environment.
128
- No model, agent shell, terminal automation, remote workspace inspector or
129
- untrusted extension may access the credential, process environment, executable,
130
- output directory or terminal. If this isolation cannot be established, STOP.
131
- 2. Use Node 24.x and pnpm 10.26.1. In a reviewed standalone checkout or extracted
132
- private package, install declared development dependencies with:
133
-
134
- ```sh
135
- pnpm install --frozen-lockfile --ignore-scripts
136
- pnpm run build
137
- node tests/acceptance/private-run.mjs --preflight A
138
- ```
139
-
140
- The acceptance client uses the already-pinned MCP client dev dependency.
141
- A consumer installation lacking dev dependencies is not enough for this runner.
142
- No registry publication is involved.
143
- 3. Inspect the generated request and preflight report. Require the expected hash,
144
- `visibility:"private"`, no identity and no plaintext/openings.
145
- 4. Before authorization, verify the account's remaining budget and ownership via
146
- existing owner controls. Determine whether this deterministic hash is already
147
- present: a replay is not proof of a new quota-consuming commit.
148
- 5. Review these hardcoded controls:
149
- - Actual MCP tool: `nexart_attest_cer`.
150
- - Only attestation enabled: eight tools including the seven read-only tools.
151
- - Sealing/disclosure/public capabilities false.
152
- - POST target fixed by existing implementation:
153
- `https://node.nexart.io/api/attest`.
154
- - Exact prepared request; explicit private visibility.
155
- - Header generated by existing adapter: `X-NexArt-Visibility: private`.
156
- - No CLI/MCP destination, header, credential or public-visibility override.
157
- - No `NODE_OPTIONS`/test preload inherited by the launched server.
158
- - A public request, if separately attempted, fails closed rather than silently
159
- becoming private.
160
- 6. STOP HERE. Do not run the next command until the owner separately authorizes it:
161
-
162
- ```sh
163
- node tests/acceptance/private-run.mjs --execute-authorized A
164
- ```
165
-
166
- 7. Only AFTER authorization, the owner manually types:
167
-
168
- ```text
169
- PRIVATE sha256:ae3f28523d50f990c12d2712e8b9e3d90ea7d686c5514b99b618e2e2e4fc598c
170
- ```
171
-
172
- The command then prompts for the dedicated key with terminal echo disabled.
173
- Do not paste it into chat, a source file, a command argument, a shell assignment,
174
- a recorded terminal session or a retained environment file.
175
-
176
- The runner intentionally refuses live mode when Replit runtime markers are
177
- present. This is an accidental-use guard, NOT a security boundary against an
178
- agent controlling environment/code. Do not bypass it to complete this test.
179
-
180
- The key exists transiently in the trusted local client and MCP child environment;
181
- the actual MCP server requires server-controlled credentials. No agent should be
182
- running with access to those local processes. It is never passed in tool arguments,
183
- written to files, printed, or retained in evidence. No claim of physical memory
184
- zeroization or protection from the local OS owner is made.
185
-
186
- ## What the one-shot run does
187
-
188
- 1. Connects to the actual MCP stdio implementation and checks the eight-tool
189
- configuration.
190
- 2. Exclusively creates `attempt.json` BEFORE the tool invocation. It is a
191
- permanent potentially-sent marker, even if a crash occurs before transmission.
192
- 3. Invokes `nexart_attest_cer` ONCE with the exact request.
193
- 4. Makes ONE owner-authenticated exact-hash GET to retrieve/reconcile the result.
194
- 5. Checks ATTESTED/private state, exact original CER values, SDK integrity and
195
- opening-free confidentiality. It tolerates JSON object-key order changes, not
196
- evidence-value changes or replacement hashes.
197
- 6. Independently verifies the retrieved original receipt using the published
198
- SDK and a bounded public manifest GET.
199
- 7. Makes ONE anonymous exact-hash public resolver GET. It discards diagnostic/
200
- evidence bodies and requires 404 for acceptance.
201
- 8. Saves selected signed evidence and a bounded acceptance report in mode 0600,
202
- excluding the credential and unrelated proof metadata.
203
- 9. Closes the MCP client. There is NO retry loop and NO A-to-B automatic chain.
204
-
205
- Receipt key identity, Node identity, key lifecycle and signer trust remain separate.
206
- Pins are required to remain empty for this acceptance; signer trust must remain
207
- unestablished. A mathematically valid receipt is not a trusted production signer.
208
- Historical lifecycle uncertainty remains explicitly reported. Envelope signature
209
- verification remains not_performed; the envelope/signature are recovered for
210
- owner inspection.
211
-
212
- `PRIVATE_ACCEPTANCE_PASS` requires:
213
-
214
- - MCP reports accepted, with requested/confirmed private visibility.
215
- - Original CER/hash and optional identity match exactly.
216
- - Retrieved receipt has a valid Ed25519 signature and matching hash/Node identity.
217
- - Key lifecycle is not known invalid; any uncertainty stays visible in the report.
218
- - Signer trust remains not_established.
219
- - Anonymous resolver returns 404.
220
-
221
- A public 404 is only an observation of that route at that time, not proof no other
222
- system has a copy. No execution capture or completeness claim is established.
223
-
224
- If the POST outcome is ambiguous, the same owner GET is used for reconciliation;
225
- the report does not convert unknown MCP completion into a pass. If anything fails,
226
- the attempt marker remains and the runner refuses another invocation. DO NOT
227
- delete the marker/retry simply to obtain a receipt. Additional reconciliation is
228
- a separately authorized read-only action. A known pre-send failure may consume
229
- the local marker without consuming Node quota; that safe denial is intentional.
230
- The marker protects this owner-controlled acceptance directory, not a global Node
231
- budget. Do not switch output directories, edit/delete markers or copy a passed
232
- report to bypass sequencing. A same-user agent able to do those things is outside
233
- the required isolation boundary.
234
-
235
- ## Budget proposal — not authorization
236
-
237
- For A only:
238
-
239
- - At most ONE authenticated `/api/attest` POST.
240
- - At most ONE successful certification quota unit expected for a fresh proof.
241
- - ZERO automatic POST retries, ZERO C/D submissions, ZERO public approvals.
242
- - One authenticated exact-hash proof GET.
243
- - Up to two unauthenticated manifest GETs (existing MCP check + independent check).
244
- - One anonymous public resolver GET.
245
- - Maximum five HTTP requests in the normal path, of which two are authenticated.
246
-
247
- Internal TSA/ingest activity and operator quota accounting are Node-controlled;
248
- the local count is not a financial guarantee. An account limit and one-shot
249
- runner complement each other but do not manufacture a per-key hard cap.
250
- Do not run if even one accepted synthetic unit is outside the owner's budget.
251
-
252
- After A truly passes, B needs a new explicit authorization and its own one-request
253
- budget. B's expected hash remains:
254
-
255
- ```text
256
- sha256:21dea7b7dfffcc7bc496a0eff64338cb22d490df21802137c40c36738202369a
257
- ```
258
-
259
- Only then:
260
-
261
- ```sh
262
- node tests/acceptance/private-run.mjs --preflight B
263
- # Review its synthetic identity, then STOP for B's separate authorization.
264
- ```
265
-
266
- The runner requires A's passed owner acceptance record before preparing B. This
267
- is a sequencing check, not tamper resistance against an owner/agent able to edit
268
- the evidence directory. No B files are prepared in this workspace now.
269
-
270
- ## Focused test-gap closure and validation
271
-
272
- `tests/approval-boundaries.test.mjs` covers eight actual child processes racing
273
- one approval, bidirectional invalidation under in-memory destination/profile/
274
- visibility mutations, and a valid-artifact/correct-piped-confirmation invocation
275
- in a session with no controlling terminal. Production approval source is unchanged.
276
-
277
- `tests/private-acceptance.test.mjs` covers exact A preflight, B gating, both real
278
- MCP protocol revisions with SYNTHETIC Node preload, and a fully mocked owner
279
- workflow including acceptance, ambiguity, missing owner evidence, public exposure,
280
- bad receipt signature, secret-free retained evidence and permanent no-retry state.
281
- All network-capable test dependencies are mocked; no production key or quota is
282
- used. The mocked owner workflow is not a real macOS/Node acceptance result.
283
-
284
- To retain a separate release record without overwriting Milestone 3 evidence:
285
-
286
- ```sh
287
- pnpm run build
288
- node tests/clean-install.mjs milestone-3.2
289
- ```
290
-
291
- The package stays private/UNLICENSED. Source/protocol/crypto semantics are unchanged.
@@ -1,274 +0,0 @@
1
- # Milestone 3: opt-in AI V2 creation and attestation
2
-
3
- ## Scope and defaults
4
-
5
- Current visibility selection defaults public, while public capability remains
6
- off. See [the public-default update](public-default.md) for recommended owner-only
7
- confidential creation and custody. The MCP sealing contracts below are unchanged:
8
- `from_execution` is ordinary; `from_snapshot` can preserve existing commitments.
9
-
10
- The existing seven read-only tools remain advertised by default. There are no
11
- changes to SDK pins, cryptographic implementations, upstream repositories,
12
- production trust pins, npm privacy or UNLICENSED status. No running web service
13
- or preview is needed.
14
-
15
- Owner settings (exact string `true` enables boolean settings):
16
-
17
- | Variable | Default | Effect |
18
- | --- | --- | --- |
19
- | `NEXART_ENABLE_SEAL` | false | Register local sealing tool |
20
- | `NEXART_ENABLE_ATTEST` | false | Register attestation tool |
21
- | `NEXART_DISCLOSE_CER` | false | Permit full CER output from sealing |
22
- | `NEXART_ENABLE_PUBLIC_ATTEST` | false | Permit public requests to reach owner approval |
23
- | `NEXART_NODE_API_KEY` | absent | Server-owned Node credential; needed only for attestation/approval |
24
- | `NEXART_NODE_ACCOUNT_CONTEXT` | absent | Owner-defined account label bound into public approvals |
25
- | `NEXART_PUBLIC_APPROVAL_DIRECTORY` | absent | Absolute, real, owner-only approval directory |
26
-
27
- Do not put real secrets in checked-in host configuration, tool arguments, test
28
- fixtures, or chat. This milestone does not configure any live credential.
29
- The default tools still need no API key.
30
-
31
- ## Sealing contract
32
-
33
- `nexart_seal_ai_v2` accepts exactly one of:
34
-
35
- ```ts
36
- { mode: "from_execution", execution: CreateSnapshotV2Params, createdAt: string }
37
- { mode: "from_snapshot", snapshot: AiExecutionSnapshotV2, createdAt: string }
38
- ```
39
-
40
- The first mode requires an explicit executionId, timestamp, executionRole and
41
- the SDK parameters object. It calls `createSnapshotV2`, then `sealCerV2`.
42
- The second accepts an SDK-ready ordinary or commitment-bearing V2 snapshot and
43
- calls `sealCerV2` without replacing fields. Both use `verifyCerV2` afterwards.
44
- No commitment generation, salts, openings, random identifiers, execution capture,
45
- identity provider, meta/signals/policy sealing options or file fallback is added.
46
-
47
- All published optional execution parameters are accepted; unknown producer
48
- fields are rejected, never silently discarded by the MCP wrapper. An empty
49
- toolCalls array is rejected (the SDK constructor would otherwise omit it).
50
- SDK schema validation remains authoritative for snapshot/nested values.
51
-
52
- The result reports integrity/hash, confidential presence and declared identity.
53
- `bundle` is null unless the owner enables full CER disclosure. No truncation.
54
- The write input cap is 64 KiB, existing complexity bounds also apply, and the
55
- output cap remains 256 KiB. Failed validation returns bounded constant codes,
56
- not SDK diagnostics containing evidence.
57
-
58
- ## Exact optional identity semantics
59
-
60
- SDK 1.4.0 `AiExecutionIdentity`:
61
-
62
- ```ts
63
- {
64
- provider: string;
65
- sub: string;
66
- assertionHash: string; // SDK requires non-empty sha256: prefix
67
- emailHash?: string; // same SDK prefix check
68
- verified: boolean;
69
- }
70
- ```
71
-
72
- Only these keys are supported. Identity remains optional in both modes.
73
- Both boolean values are preserved: the SDK's interface documentation describes
74
- external app verification, but the actual V2 validator accepts a boolean.
75
- MCP never sets `verified:true`, checks an IdP or upgrades the producer assertion.
76
- The SDK seals identity within snapshot integrity/protected-set coverage.
77
- Sealing/attestation outputs report `producer_declared_not_authenticated`, even
78
- when the producer supplied verified:true. Node API-key auth is not execution
79
- producer authentication.
80
-
81
- Private eligible CERs preserve the SDK-valid identity unchanged. Public identity
82
- is a deliberate readable disclosure, including provider, stable subject,
83
- assertionHash, emailHash and verified. The public profile adds string bounds and
84
- full SHA-256 formatting policy without changing local SDK identity semantics.
85
- Owner approval covers every identity value. Neither a hash nor an opaque
86
- subject is a guarantee against reidentification/correlation.
87
-
88
- ## Attestation contract
89
-
90
- ```ts
91
- {
92
- certificateHash: `sha256:${string}`;
93
- bundle: CerAiExecutionBundleV2;
94
- visibility?: "private" | "public"; // default public, NOT publication permission
95
- }
96
- ```
97
-
98
- The expected hash is independently supplied. Local V2 SDK integrity and the
99
- confidential profile must pass before any Node request. The complete original
100
- CER is JSON-serialized unchanged; visibility is only an explicit
101
- `X-NexArt-Visibility` header. No model-selected URL, headers, negotiation flag,
102
- key, opening, pin or model confirmation is accepted.
103
-
104
- The fixed POST target is `https://node.nexart.io/api/attest`. Redirects are not
105
- followed; cookies are omitted; no POST retries occur. The operation is bounded
106
- by deadline, cancellation, 2 active / 8 queued operations per configured server
107
- write client, and a 64 KiB decoded response limit. Error diagnostic bodies are
108
- discarded. A separate manifest GET verifies the accepted receipt with the
109
- published SDK, after the POST slot has been released.
110
-
111
- The response requires the current AI V2 receipt and envelope shapes, with
112
- cross-checks for certificate hash, protocol, Node runtime, attestation ID, key ID,
113
- attestation time and requested visibility. No Node-supplied URL is followed.
114
- The ordinary top-level attestation object and the signed envelope attestation
115
- have DIFFERENT schemas: the former has certificateHash/bundleType and no kid.
116
- Both current fresh and replay response shapes use these checks.
117
-
118
- The result separates:
119
-
120
- - Submission: not_sent, rejected, node_reported_accepted, outcome_unknown.
121
- - SDK CER integrity and confidential eligibility.
122
- - Opening-free commitment authenticity (not opened plaintext verification).
123
- - Requested and Node-confirmed operational visibility.
124
- - Per-artifact public authorization.
125
- - Receipt signature, hash binding, Node identity, lifecycle and signer trust.
126
- - Producer identity declaration, not independently authenticated identity.
127
- - Independent verification availability, never inferred from signature validity.
128
-
129
- Envelope signature verification is explicitly `not_performed`; the signed CER
130
- receipt is checked. No production key is automatically trusted. Manifest failure
131
- or a bad signature after reported acceptance does not erase persistence.
132
- Neither the visibility response nor public visibility is cryptographic proof.
133
- Public resolver availability is `not_checked` by attestation; existing read-only
134
- lookup tools can check it separately. Private visibility is reported as not
135
- public under the Node's reported policy, not as observed global inaccessibility.
136
-
137
- ## Confidential eligibility and bounded public disclosure
138
-
139
- Both modes require SDK-valid input/output commitment envelopes and the exact
140
- confidential declaration. Optional instruction and decision refs must also be
141
- committed; decision ref categories are excluded. Optional identity and SDK version
142
- are accepted. Other optional snapshot fields, CER metadata, context, summaries,
143
- policy evaluations, model evidence, tool events, arbitrary extensions and
144
- application/workflow/correlation IDs are excluded by a closed allowlist.
145
- Valid richer CERs still work with local verification/sealing; they are rejected
146
- for this initial submission profile, not stripped/resealed.
147
-
148
- Public profile `nexart.mcp.ai-v2.public-disclosure.v1` additionally bounds readable
149
- descriptors, timestamps, identity and hashes, and limits decision refs to 16.
150
- Required descriptors, execution ID/role, parameters, timestamps, hashes,
151
- commitment fields/declarations, protected-set paths and optional identity remain
152
- readable. Human review is mandatory: bounded strings can still be sensitive.
153
-
154
- ### Source evidence for the COMPLETE public surface
155
-
156
- Audited `artnames/nexart-node` source:
157
- `0adbad75bcf24580395713680571fab036f3d01f`.
158
-
159
- | Surface | Source and disclosure |
160
- | --- | --- |
161
- | Bundle projection | `src/server.js:1547-1576`: V2 IO commitments kept; only raw IO removed |
162
- | Public sections | `src/server.js:1663-1918`: identity, proof, verification, context, bundle, canonical, optional timestamp/trust |
163
- | Resolver | `src/server.js:1960-2010`: visibility gate, schema/type/hash, sections, links |
164
- | Canonical certificate | `src/attest.js:146-159`, `src/public-canonical.js`: original CER minus certificateHash/meta/declaration |
165
- | Canonical envelope | `src/signing.js:685-698,749-754,832-882`: snapshot plus present approved bundle fields and five attestation fields |
166
- | Node submission | `src/server.js:2682-2845,2940-3403`: private/public and original AI V2 body |
167
- | Atomic visibility/usage | `src/db.js:798-1103` |
168
-
169
- Canonical payload strings expose the ORIGINAL hash/signature perimeter, not the
170
- cosmetically redacted bundle. Instructions, refs, identity, tools, extensions,
171
- model evidence and context can therefore leak unless rejected or deliberately
172
- approved. CER meta is excluded from its hash but can be returned in the bundle.
173
- Database proof meta is not dumped wholesale: receipt/envelope/signatures and
174
- timestamp information are selected. Node-generated attestation identifiers,
175
- runtime hashes, signing keys, signature data, times, available transparency
176
- anchors and raw RFC3161 tokens are also public. No protected plaintext or
177
- opening is needed for supported opening-free independent verification.
178
-
179
- `tests/node-public-projection.mjs` is a source-backed, synthetic AI V2 projection
180
- harness covering all successful resolver sections and both canonical payloads.
181
- It is NOT an upstream server execution or deployed Node test. Tests explicitly
182
- demonstrate metadata leaks in otherwise valid CERs, then prove policy rejection,
183
- and exercise optional readable identity. Test receipt signatures use ephemeral
184
- synthetic keys; synthetic envelope signature fields make no validity claim.
185
-
186
- ## Owner approval: local command, never an MCP tool
187
-
188
- Public submission requires all of:
189
-
190
- 1. Owner enables attestation AND public certification.
191
- 2. CER passes the bounded confidential/public profile.
192
- 3. Exact one-use approval exists outside model-controlled tool arguments.
193
-
194
- Use a dedicated owner-controlled Linux directory, absolute with no symlink
195
- components, mode 0700 and owned by the server UID. Approval files must be
196
- regular, single-link, mode 0600 and owned by that UID. Do not share the directory
197
- with a model, expose it as an MCP resource or put it in a repository.
198
-
199
- Prepare an eligible public request JSON on the owner's machine, then run:
200
-
201
- ```sh
202
- node /absolute/path/to/dist/approve-public.js /absolute/path/to/request.json
203
- # Or the locally installed node_modules/.bin/nexart-mcp-approve-public command.
204
- ```
205
-
206
- Supply host settings/credentials through the trusted local environment, not
207
- command-line arguments. The command opens `/dev/tty` directly, displays the full
208
- CER and public disclosure warning, and requires typing `PUBLISH <certificateHash>`.
209
- It records an approval only, never submits evidence. stdin, a tool flag, an API
210
- key alone and annotations are NOT approval channels. Without a controlling
211
- terminal or safe directory it fails closed.
212
-
213
- The grant is bound through a local HMAC to the complete serialized payload,
214
- profile version, public visibility, fixed Node destination, owner account label
215
- and API credential (rotation invalidates grants). This HMAC authenticates local
216
- approval records only; it is not NexArt hashing, commitment generation or CER
217
- cryptography. No raw payload or credential is persisted in the grant.
218
- Changes to unhashed meta also invalidate binding.
219
-
220
- Approvals last at most five minutes and are claimed atomically by rename before
221
- POST; concurrency cannot consume one twice. Claimed files are removed even when
222
- invalid or submission fails. No automatic retry can reuse an approval.
223
- After an ambiguous outcome the owner must reconcile before separately approving
224
- another attempt. Object-key serialization order is included; reordering JSON can
225
- invalidate approval without changing the CER hash. This is a safe denial, not a
226
- reason to canonicalize/rewrite evidence.
227
-
228
- ### Trust boundary
229
-
230
- The local OS account, executable, environment, approval directory and controlling
231
- terminal are trusted owner infrastructure. An MCP model can request a public
232
- operation but cannot write configuration/grants or operate that terminal.
233
- If a host also gives the model arbitrary same-UID shell/filesystem access to
234
- these controls, this boundary DOES NOT HOLD: keep public enablement off or use
235
- an independently isolated broker. This mechanism is not OS-user isolation.
236
- Runtime `/dev/tty`/UID/file-mode approval support targets local Linux; unsupported
237
- platforms fail closed while private attestation/local sealing remain available.
238
-
239
- ## Node compatibility and outcome limitations
240
-
241
- Source supports private and public confidential AI V2 with identical CER hashes.
242
- MCP always supplies the header because fresh AI attestations otherwise default
243
- public. Private rows are private within their initial transaction, excluded from
244
- public resolution and external ingest. Public eligible rows can resolve and be
245
- externally ingested. Node visibility is operational, not part of CER hashing.
246
-
247
- Existing conflicting visibility is a 409; this tool does not convert a private
248
- proof to public or bypass ownership through another route. Node quota preflight
249
- can reject an exact replay. Existing-hash replay and transactional quota behavior
250
- belong to Node; no extra retry, alternate route or mutation is attempted here.
251
- Known 4xx rejections are reported without reading their bodies; 5xx, redirects,
252
- disconnects, malformed/mismatched success and interruption after send are
253
- outcome_unknown. A rejected request does not establish that no prior proof
254
- already exists. Node-side TSA/ingest effects are not a distributed transaction.
255
-
256
- Successful public resolver responses may be cached for a year; later hiding
257
- cannot recall copies. Commitments do not conceal readable metadata or remove
258
- dictionary/correlation risk in original hashes. Private is access control, not
259
- zero-knowledge storage. Neither property proves execution truth/completeness.
260
-
261
- ## Validation/readiness
262
-
263
- Use `pnpm run validate:release`. Evidence is retained in ignored
264
- `generated-artifacts/milestone-3/`. All original 114 tests remain; expanded tests
265
- cover SDK identity, both sealing modes, confidential eligibility, source-backed
266
- complete public projections, real owner-command PTYs, one-use approval attacks,
267
- bounded mocked POST/receipt/error outcomes, both MCP protocol revisions and
268
- tarball-installed executables. Python 3 is used ONLY by the test PTY driver;
269
- runtime commands need Node 24 and the declared npm dependencies.
270
-
271
- Private and public implementation readiness are established locally against
272
- synthetic evidence/mocks. Real production attestation, deployed visibility/
273
- resolver behaviour, production key trust and specific desktop-host integration
274
- remain UNVERIFIED. No production evidence or quota is used by these tests.