Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 48 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,57 @@ contract and a connection primitive.
- **Content blocks** — `ContentBlock` (`text` / `image` / `audio`) plus helpers
like `textContent(...)`.
- **Capabilities & feature sets** — negotiation types (`InitializeCapabilities`,
`McplCapabilities`, `FeatureSetDeclaration`, context/inference hook caps).
`McplCapabilities`, `FeatureSetDeclaration`, context/inference hook caps), the
closed `CAPABILITY_PATHS` vocabulary (SPEC §6.2), the recursive advertisement
walk (`advertisedCapabilities`, §5.1), grant matching (`capabilityGranted`,
§5.4) and fail-closed `uses` validation (`validateUses`, §6.4).
- **Manifest changes (§17 / RFC-003)** — `manifestDigest` (the canonical content
digest), `changedDomains`, and `ManifestTracker`: call `setManifest(next)` and
the digest, the diff, the per-connection `mcpl/manifestChanged` announcement
and the `mcpl/manifest` snapshot all follow. Servers never hand-author an
announcement.
- **Errors** — `ConnectionClosedError`, `ConnectionTimeoutError`, and `ERR_*`
protocol error codes.

## Capability advertisement is a tree, and absence is denial

`channels`, `contextHooks.beforeInference` and `inferenceRequest` are **objects**
whose members are the leaves of the §6.2 vocabulary. A boolean `true` at any
level is shorthand for every leaf beneath it; `false` or absence means none.

```ts
const mcpl: McplCapabilities = {
version: '0.5',
channels: { register: true, publish: true, incoming: true, streaming: true },
contextHooks: {
beforeInference: { observe: false, inject: { beforeUser: true, afterUser: true } },
},
};

advertisedCapabilities(mcpl);
// Set { 'channels.register', 'channels.publish', 'channels.incoming',
// 'channels.streaming',
// 'contextHooks.beforeInference.inject.beforeUser',
// 'contextHooks.beforeInference.inject.afterUser' }
```

That is an **input to** the host's grant computation, never an authorization.
`effectiveCapabilities` (§5.4) is the sole normative allowlist: every path not
present is denied. `deniedCapabilities` is diagnostics and MUST NOT reach an
authorization decision.

## Conformance vectors

`test/vectors/manifest-digest-vectors.json` is a verbatim copy of the frozen
interop vectors from
[`anima-research/mcpl`](https://github.com/anima-research/mcpl)
`conformance/manifest-digest-vectors.json`. It is not edited here — a vector
believed wrong is an issue against that repo. Run a newer checkout with:

```bash
MCPL_DIGEST_VECTORS=/path/to/mcpl/conformance/manifest-digest-vectors.json npm test
```

## Install

```bash
Expand Down
Loading
Loading