@nexart/mcp-server 0.1.0 → 0.2.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 (50) hide show
  1. package/CHANGELOG.md +63 -8
  2. package/CONTRIBUTING.md +7 -5
  3. package/README.md +47 -31
  4. package/SECURITY.md +8 -7
  5. package/THIRD_PARTY_NOTICES.md +2 -2
  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/custody.d.ts +3 -0
  12. package/dist/owner/custody.js +26 -16
  13. package/dist/protocol-safety.d.ts +3 -0
  14. package/dist/protocol-safety.js +16 -0
  15. package/dist/receipts/contracts.d.ts +2 -2
  16. package/dist/receipts/contracts.js +2 -1
  17. package/dist/record/contracts.d.ts +42 -0
  18. package/dist/record/contracts.js +5 -0
  19. package/dist/record/record.d.ts +3 -0
  20. package/dist/record/record.js +6 -2
  21. package/dist/record-tools.d.ts +3 -0
  22. package/dist/record-tools.js +15 -5
  23. package/dist/server.d.ts +11 -1
  24. package/dist/server.js +5 -5
  25. package/dist/stdio.js +3 -19
  26. package/dist/write/attest.d.ts +3 -0
  27. package/dist/write/attest.js +2 -1
  28. package/dist/write/contracts.d.ts +2 -2
  29. package/docs/consumer-guide.md +133 -0
  30. package/package.json +11 -4
  31. package/server.json +2 -2
  32. package/docs/age-version-compatibility.md +0 -46
  33. package/docs/architecture.md +0 -72
  34. package/docs/compatibility.md +0 -163
  35. package/docs/contracts.md +0 -127
  36. package/docs/licensing-review.md +0 -109
  37. package/docs/milestone-1-validation.md +0 -110
  38. package/docs/milestone-2.md +0 -291
  39. package/docs/milestone-3.2.md +0 -291
  40. package/docs/milestone-3.md +0 -274
  41. package/docs/milestone-4a.md +0 -221
  42. package/docs/milestone-4b1.md +0 -220
  43. package/docs/milestone-4b2.md +0 -260
  44. package/docs/public-default.md +0 -263
  45. package/docs/recording-schema-compatibility.md +0 -46
  46. package/docs/release.md +0 -311
  47. package/docs/security-fixes.md +0 -47
  48. package/docs/security.md +0 -195
  49. package/docs/standalone-acceptance.md +0 -81
  50. package/docs/validation.md +0 -85
package/docs/security.md DELETED
@@ -1,195 +0,0 @@
1
- # Security and trust boundaries
2
-
3
- For vulnerability handling, use [the private reporting policy](../SECURITY.md).
4
- A working reporting route must be confirmed before public release; no address,
5
- response SLA or production probing permission is implied. Contributor and
6
- redistribution boundaries are in [CONTRIBUTING.md](../CONTRIBUTING.md) and
7
- [the rights review](licensing-review.md).
8
-
9
- ## Milestone 4B.2 customer delegation
10
-
11
- Explicit `NEXART_RECORD_CERTIFICATION_CONFIG` plus customer consent and policy
12
- connects the recording tool to the existing attestation pipeline using only
13
- `NEXART_NODE_API_KEY`. A key alone never enables this new path. The consent is
14
- rechecked before actual submission; no per-CER human prompt is claimed.
15
- Customer delegation intentionally allows an agent-accessible process to use the
16
- configured key. Same-user shell/filesystem access may obtain and use it directly;
17
- local policy and counters cannot constrain such use or create Node-enforced
18
- scopes/quotas. No remote publisher, credential broker or guard bypass is added.
19
- The isolated-owner factory and legacy manual workflows remain separate and
20
- unchanged in authority. See [4B.2 setup and limitations](milestone-4b2.md).
21
-
22
- ## Current recording custody boundary
23
-
24
- The opt-in recording tool creates age-encrypted recovery custody. Without the
25
- explicit customer-delegation configuration above it connects no publisher. Node/public is intent,
26
- not permission; unavailable authorization returns setup-required with zero
27
- POSTs. Provider instrumentation and owner-only recovery are library/CLI paths,
28
- not MCP plaintext/opening surfaces. At-rest encryption does not isolate
29
- plaintext from an agent already handling it. Same-UID owner-approval assertions
30
- and worker threads are not security boundaries. Existing Mac publication
31
- guards, owner policy, single-use grants and empty trust pins remain intact.
32
- See [4B.1 contracts and limitations](milestone-4b1.md).
33
-
34
- ## Historical Milestone 4A isolated-owner automation
35
-
36
- The original isolated orchestration library is not an MCP authority surface.
37
- Customer delegation and the recording tool were added separately afterward.
38
- A trusted application may evaluate an
39
- owner-preauthorized disclosure/budget policy and issue an internal exact-body
40
- grant; ordinary MCP requests still require their existing manual approval.
41
- The packaged owner publisher checks the retained isolated-Mac boundary before
42
- accessing credentials. It remains unavailable on this host.
43
-
44
- Policy paths, custody, credentials, capture-source assertions and authorization
45
- ports are trusted application configuration, never model inputs. Direct
46
- library embedding in isolated mode requires independently enforced agent exclusion. Same-UID
47
- shell/terminal access defeats local isolation. Local budget counters are not
48
- account-wide Node quotas. The original library custody path needed an external
49
- encryption boundary; current recording uses age-encrypted custody. See [the historical contract and
50
- remaining deployment blockers](milestone-4a.md).
51
-
52
- ## Public-default and owner custody
53
-
54
- Omitted attestation visibility selects public, not permission to publish.
55
- Public capability still defaults off. Independent exact-body approval, strict
56
- protectedSet descriptors, authenticated expiry, single-use claiming, fixed
57
- destination/credential/account/profile binding and no automatic POST retry are
58
- unchanged. Explicit private does not need a public grant; there is no downgrade.
59
-
60
- The legacy owner confidential creation CLI commits input/output using SDK
61
- CSPRNG salts. It is not an MCP tool. It retains original plaintext and openings
62
- only after explicit owner approval of unencrypted local file custody on an
63
- owner-encrypted volume. No recovery material is returned through MCP. Owner-only
64
- modes do not protect against same-UID agents, administrators, malware, cloud
65
- backup, or device compromise. Never operate it in an agent-accessible account.
66
- Lost recovery material prevents later disclosure verification; partial files are
67
- preserved on failure. Review readable metadata before exporting only `cer.json`.
68
-
69
- The C runner refuses live execution without a root-provisioned isolated Mac policy,
70
- matching owner UID, root-controlled Node, package and dependency tree. An
71
- administrator must actually deny agent access to the device/account, credentials,
72
- terminal and approval state. A root policy attests that external condition; it
73
- cannot discover hidden agents or make a false assertion true. Do not provision it
74
- on a same-UID agent host. See [setup and limitations](public-default.md).
75
-
76
- ## Opt-in write operations
77
-
78
- The default seven tools retain the read-only boundaries below. Milestone 3 adds
79
- separately opt-in sealing and Node attestation. Attestation can persist evidence,
80
- consume quota and, with public authorization, publish evidence that cannot be
81
- recalled from caches. It is not an offline/read-only operation.
82
-
83
- See [Milestone 3](milestone-3.md) for the bounded disclosure profile, complete
84
- source-backed resolver exposure assessment, single-use controlling-terminal
85
- owner approvals, fixed-target POST limits, outcome ambiguity and identity
86
- semantics. A model with arbitrary same-UID shell/filesystem access can defeat
87
- the local-owner boundary; keep isolated-owner public enablement off in that
88
- configuration. Customer delegation separately accepts this limitation under
89
- explicit consent and never claims same-user isolation.
90
- No production key pins are approved and no identity provider is authenticated.
91
-
92
- ## Threat model and scope
93
-
94
- This local child process accepts untrusted inline evidence from an MCP host.
95
- The host/OS account controls its process lifetime, executable and filesystem.
96
- There is no remote caller or tenant boundary in this milestone. Adding
97
- network access or sharing this process across tenants requires a new security
98
- design; the current stdio process is not an authenticated service.
99
-
100
- The runtime imports only the MCP server SDK, Zod, NexArt SDKs and
101
- Node built-ins. The original four tools never contact the Canonical Node. No tool follows evidence URLs,
102
- reads model-selected files, executes evidence content, signs records or opens
103
- an HTTP port. Owner-configured recording/custody reads its protected configuration
104
- and writes encrypted recovery. Opt-in runtime creation uses published SDK
105
- constructors; it is not limited to test fixture generation.
106
-
107
- The three Milestone 2 tools read only exact-hash resolver paths and the public
108
- key manifest at `https://node.nexart.io`. They use no Node API credentials,
109
- redirects, arbitrary origins, filesystem paths or automatic retries. See
110
- [the implemented network/trust policy](milestone-2.md) for exact controls.
111
- Test-only ephemeral Ed25519 signing is confined to test fixtures/preloads.
112
-
113
- ## Cryptographic authority
114
-
115
- Only published SDK verifiers canonicalize, hash and verify CERs. The adapter
116
- dispatches explicitly by family and, for governed evidence, envelope version.
117
- There is no family inference, fallback verification or normalization of
118
- integrity-bearing data. The Canonical Node's Project Bundle aggregate response
119
- is not called or trusted. A Project Bundle must have verified hash integrity.
120
-
121
- SDK `ok` is operation-scoped, not proof that the evidence describes reality.
122
- Consequential producer identity is a claim. Governed verification does not
123
- authenticate producers or recompute reported state hashes; those SDK fields
124
- remain visible. Ordinary CER integrity checks do not establish completeness.
125
- Attestation metadata presence never enables signature/trust flags. The
126
- separate receipt tool computes signature mathematics with the published SDK,
127
- but no production pin is approved. It cannot establish production signer
128
- trust from manifest discovery alone.
129
-
130
- ## Confidentiality and diagnostics
131
-
132
- - Read-only inline evidence is processed in memory, not persisted or logged.
133
- Opt-in recording persists encrypted recovery and CER custody; authorised Node
134
- certification submits the approved CER for persistence and possibly public access.
135
- - Credential/private-key/opening parameters do not exist. The argument
136
- envelope rejects unknown members. Do not supply such material.
137
- - Evidence itself can be sensitive. A local MCP host can still store prompts,
138
- arguments and returned results; host-side data handling is outside this
139
- process's control.
140
- - SDK error messages can contain producer-controlled values or field names.
141
- Output therefore uses a disclosure allowlist and redacted diagnostic arrays.
142
- Step IDs, execution IDs, hashes and raw evidence are not returned.
143
- - Protocol/tool validation errors are replaced with constant messages while
144
- preserving the SDK's wire-era metadata (including modern `resultType`).
145
- - stderr contains constant readiness/error tokens only; stdout is protocol
146
- only. Uncaught SDK verification exceptions become `SDK_EXCEPTION`, without
147
- a stack or original message. Third-party process-start failures are not
148
- a tool contract and remain a local installation concern.
149
-
150
- There is no general memory-zeroization promise; recording's age encryption is
151
- an at-rest boundary, not same-user isolation. Crash dumps, a hostile
152
- OS account, a compromised dependency, and MCP-host retention are outside the
153
- implemented boundary. Package lock integrity and supply-chain review remain
154
- important.
155
-
156
- ## Resource handling and cancellation
157
-
158
- Byte/depth guards run before the SDK parses incoming frames. Iterative
159
- application guards then check JSON depth, breadth, total complexity and
160
- serialized argument size before evidence verification. The Project Bundle
161
- step cap is independent of schema validity. Logical output is bounded, and
162
- errors never echo submitted material.
163
-
164
- The synchronous verifiers run on the main event loop. Measurements cover
165
- individual families, 100-step Projects, and near-limit metadata; they do not
166
- constitute a worst-case execution-time proof. Those measurements did not
167
- justify adding worker infrastructure.
168
-
169
- An already-delivered abort signal prevents the SDK invocation. A check after
170
- the SDK returns can observe an already-aborted signal, but cancellation
171
- notifications cannot interrupt synchronous code while it blocks the event
172
- loop. There is **no hard deadline or guaranteed mid-call cancellation**.
173
- The host may terminate the child process as a last resort. If future workloads
174
- need deterministic preemption or measurements expose excessive blocking,
175
- introduce measured worker isolation under a separate change.
176
-
177
- Stdin EOF and SIGINT/SIGTERM close the SDK and release the original stdin
178
- source as well as the guarded stream. Hard input-limit failures close with
179
- exit status 1. Malformed JSON lines are deliberately skipped by the pinned
180
- official SDK parser, and a subsequent valid message remains usable.
181
-
182
- ## Further gates — not implemented
183
-
184
- The initial public lookup and CER receipt controls are implemented separately
185
- from the original verifier contracts. Production key pins, historical
186
- exceptions, authenticated historical manifests and Project-receipt verification
187
- are not approved. Independently authorized pin material and lifecycle
188
- provenance are required before expanding trusted acceptance.
189
-
190
- Creation/attestation use separately configured custody, authorisation and upstream
191
- credentials. Automatic POST retry is deliberately absent; ambiguous outcomes
192
- need reconciliation, not blind resubmission. Remote multi-tenant access needs
193
- OAuth, audience/issuer validation, per-tool permissions, tenant-bound sessions,
194
- quotas, origin/host controls and explicit credential mapping. None of these
195
- can be inferred from the local read-only implementation.
@@ -1,81 +0,0 @@
1
- # Milestone 1.1 acceptance result
2
-
3
- Executed on 2026-11-10 with Node v24.22.1 and pnpm 10.26.1.
4
- This report was written after packing and testing; the tested tarball contains
5
- the validation methodology, while this repository report records its outcome.
6
-
7
- ## Observed results
8
-
9
- | Check | Outcome |
10
- | --- | --- |
11
- | Standalone frozen install in fresh temporary checkout | PASS |
12
- | Build in that checkout | PASS |
13
- | Complete existing regression suite | 45 passed; 0 failed; 0 skipped |
14
- | Development stdio invocation evidence | PASS |
15
- | Package build and local tarball creation | PASS |
16
- | Tarball installation in separate fresh consumer | PASS |
17
- | Consumer-installed executable, not development entry point | PASS |
18
- | Legacy negotiation | 2025-11-25 |
19
- | Modern negotiation, pinned | 2026-07-28 |
20
- | Tool discovery | All four tools in both sessions |
21
- | Installed positive verification | 6 per session, 12 total |
22
- | Installed tampered verification | 6 rejected per session, 12 total |
23
- | Installed argument-error redaction | PASS in both sessions |
24
- | Installed client close | PASS in both sessions |
25
- | Installed process stdout / EOF | Protocol-only JSON-RPC; exit code 0 |
26
- | Fixture preservation | All 5 files byte-identical |
27
- | Runtime preservation | All 7 emitted modules identical after removing comments |
28
-
29
- The regression runner reported 4,830 ms. Installation/build command wall times
30
- and all raw output are preserved in `generated-artifacts/milestone-1.1/`.
31
-
32
- ## Current benchmark observations
33
-
34
- 30 samples per workload; application guards, SDK work and safe projection are
35
- included, while process startup and MCP transport overhead are excluded.
36
-
37
- | Workload | Median ms | p95 ms | Max ms |
38
- | --- | ---: | ---: | ---: |
39
- | AI V1 | 0.033 | 0.342 | 1.900 |
40
- | AI V2 | 0.064 | 0.566 | 1.171 |
41
- | Consequential | 0.214 | 0.647 | 8.015 |
42
- | Governed 0.1 | 0.770 | 3.778 | 3.901 |
43
- | Governed 0.2 | 0.562 | 2.206 | 2.366 |
44
- | Mixed AI Project | 0.145 | 0.765 | 0.882 |
45
- | 100-step Project | 4.434 | 8.305 | 10.331 |
46
- | Near-limit metadata | 2.173 | 3.710 | 4.239 |
47
-
48
- Every measured workload returned valid integrity. No hard deadline, worst-case
49
- runtime bound, worker isolation or mid-call cancellation is claimed.
50
-
51
- ## Package and delivery
52
-
53
- The root package is `@nexart/mcp-server@0.1.0`, `private:true`.
54
- The dedicated lock is 5,645 bytes with one root importer; it no longer
55
- references the retired application workspace. Exact SDK versions are unchanged.
56
-
57
- The archive is `generated-artifacts/milestone-1.1/nexart-mcp-server-0.1.0.tgz`.
58
- It includes build output, source, tests/fixtures, documentation, build config
59
- and lock/config files. No npm publication, GitHub creation or Git operation
60
- was performed.
61
-
62
- The user authorized archiving and stopping the API/Canvas previews. Their
63
- sources, old manifests/configuration and dependencies remain recoverable in
64
- `.local/retired-preview-workspace/`, not the standalone distribution.
65
-
66
- ## Remaining gates
67
-
68
- - Original code remains `UNLICENSED`; the user explicitly chose not to add MIT.
69
- - Upstream manifests declare MIT, but complete fixture permissions/notices
70
- remain to be confirmed before public redistribution.
71
- - Desktop hosts and other operating systems were not tested.
72
- - A shared pnpm cache was used; no empty-cache claim is made.
73
- - The actual GitHub repository is not created or cloned: a clean copy of the
74
- standalone repository inputs was tested, without the old workspace.
75
-
76
- These licensing gates block public redistribution, not the demonstrated
77
- technical independence or local private use.
78
-
79
- **Can this repository now be cloned independently, installed from a frozen
80
- lockfile, built and used as a functioning MCP server without the original
81
- Replit workspace? YES.**
@@ -1,85 +0,0 @@
1
- # Current release validation
2
-
3
- ```bash
4
- pnpm install --frozen-lockfile --ignore-scripts
5
- pnpm run validate:release
6
- ```
7
-
8
- `tests/release-validation.mjs` is the current repeatable entry point, also used
9
- by `check:clean-install`. `pnpm test` runs all `*.test.mjs` in both `tests/`
10
- and `tests/validation/`, not only the top-level directory.
11
-
12
- Each run creates an exclusive `generated-artifacts/npm-release/run-*` directory.
13
- Old milestone and age-version evidence is neither overwritten nor deleted.
14
- The old milestone runners are historical; do not use them as current release
15
- commands or point them at existing frozen evidence directories.
16
-
17
- ## Checks
18
-
19
- 1. Copy explicit standalone inputs into a protected temporary checkout outside
20
- the repository workspace; inherit PATH/HOME only, plus CI=true.
21
- 2. Frozen pnpm install with scripts disabled, build and typecheck.
22
- 3. Complete test discovery in both directories, with structured result ledger:
23
- at least the accepted 578 tests, no failures or skips.
24
- 4. Benchmark and `npm pack --ignore-scripts`; inspect archive allowlist and
25
- packed manifest, including both executable names and Registry identity.
26
- Changelog/current release version, security/contribution documents and
27
- README recording examples are covered by release regression checks.
28
- 5. Compare all production sources to retained 578-test hashes when that local
29
- historical evidence is available. No runtime changes are authorised here.
30
- 6. Fresh npm production-only installation from the archive into an independent
31
- consumer. No workspace link, copied runtime dependencies or development
32
- repository is required by the installed package.
33
- 7. External test harness: synthetic fixtures and test-only mocks stay outside
34
- the archive. Its runtime imports resolve to the consumer's installed `dist`.
35
- The harness uses development client dependencies; the package itself does not.
36
- 8. Fourteen installed MCP sessions covering both `2025-11-25` and `2026-07-28`,
37
- original verification, network mocks, optional write/recording paths, schema
38
- compatibility, v-prefixed age handling, redaction and clean shutdown.
39
- 9. Existing approval/create/recover commands, synthetic encrypted recovery and
40
- customer library checks, plus actual offline `npm exec` implicit executable
41
- selection on both MCP revisions through the new `mcp-server` alias.
42
- 10. Remove temporary checkouts/consumers, retaining evidence and archive.
43
-
44
- Application network traffic is synthetic/loopback only. Dependency installation
45
- uses registries and may use existing caches; this is not an empty-cache,
46
- bit-identical-build or independent-machine claim. No real provider call,
47
- production signing key, production Node POST or npm/Registry publication occurs.
48
-
49
- ## Evidence
50
-
51
- Read the run's `release-summary.json` for its actual outcome, command statuses,
52
- test counts, archive SHA-256/SHA-512 integrity, archive paths, source comparison
53
- and installed-protocol/discovery results. Command logs and the `.tgz` are stored
54
- beside it. Failure evidence is retained in its own exclusive directory.
55
-
56
- The npm package includes the owner-authorised Apache LICENSE and scoped NOTICE,
57
- CHANGELOG.md, SECURITY.md and CONTRIBUTING.md alongside the README, compiled
58
- runtime/types, Registry metadata and docs.
59
- It deliberately excludes source, tests/fixtures, source maps,
60
- lock/workspace configuration, credentials, private recovery files and validation
61
- outputs. Repository-only test vectors still have unresolved redistribution
62
- permissions; excluding them from npm does not authorise publishing the repository.
63
-
64
- The earlier 578-test archive is a frozen private baseline. A changed manifest
65
- or documentation creates a different candidate even when runtime sources match.
66
- The owner authorised public configuration without `private:true`; rerun validation to
67
- produce the actual publication archive; do not publish a pre-approval archive.
68
-
69
- ## Host acceptance
70
-
71
- The owner reported successful Claude Desktop/macOS live acceptance with Node 24,
72
- age 1.3.2, confidential creation/recovery, delegated certification and public
73
- verification. The earlier read-only audit independently confirmed anonymous
74
- public lookup and valid receipt mathematics, with production signer trust still
75
- unapproved. These facts are separate from synthetic automated validation; no
76
- additional live submission is part of this runner.
77
-
78
- Original-code Apache licensing is authorised. No third-party permission blocker
79
- was identified in the unbundled MCP archive. SDK notice corrections belong
80
- upstream; excluded fixture/history permissions concern public GitHub only.
81
- The designated private contact is security@nexart.io. Owner mailbox delivery/
82
- monitoring tests and npm scope authority checks remain pre-publication actions,
83
- not claims made by validation. The agent does not authenticate or publish.
84
- Registry namespace authority is a separate later registration step. Public
85
- GitHub visibility and Registry registration are not prerequisites for npm.