Skip to content

Commit 7038128

Browse files
committed
docs: update changelogs for sheaves and kernel-utils
1 parent dcc0d62 commit 7038128

2 files changed

Lines changed: 38 additions & 11 deletions

File tree

packages/kernel-utils/CHANGELOG.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10-
### Added
11-
12-
- Add `@metamask/kernel-utils/sheaf` subpath export ([#870](https://github.com/MetaMask/ocap-kernel/pull/870))
13-
- `sheafify()` for building a `Sheaf` capability authority from a collection of `PresheafSection`s, each an exo with optional invocation-dependent metadata
14-
- `constant()`, `source()`, `callable()` for constructing metadata specs (static value, compartment-evaluated code string, and per-call function respectively)
15-
- `noopLift()`, `proxyLift()`, `withFilter()`, `withRanking()`, `fallthrough()` for composing lifts to route and rank sections at dispatch time
16-
- `makeSection()` for constructing a typed exo section from a guard and handler map
17-
- `makeRemoteSection()` for wrapping a remote CapTP reference as a `PresheafSection`, fetching its interface guard once at construction and forwarding method calls via `E()`
18-
- Types: `Sheaf<M>`, `Section`, `PresheafSection<M>`, `EvaluatedSection<M>`, `MetadataSpec<M>`, `Lift<M>`, `LiftContext<M>`
19-
2010
## [0.5.0]
2111

2212
### Added

packages/sheaves/CHANGELOG.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,41 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
### Added
1313

14-
- Initial release, extracted from `@metamask/kernel-utils`
14+
- Initial release, extracted from `@metamask/kernel-utils`.
15+
- `sheafify({ name, providers })` — constructs a sheaf authority manager over a
16+
set of capability providers.
17+
- `Provider<M>` type — an input to `sheafify`: a `{ handler, metadata? }` pair
18+
where `handler` is an exo and `metadata` is an optional `MetadataSpec<M>`.
19+
- `Candidate<M>` type — a post-evaluation entry in the stalk: `{ handler,
20+
metadata }` with metadata already resolved from its spec.
21+
- `Handler` type — an exo capability covering a region of the interface
22+
topology.
23+
- `Policy<M>` type — an `async function*` coroutine that receives candidates
24+
and yields them in preference order; drives the sheaf dispatch loop.
25+
- `PolicyContext<M>` type — context passed to the policy: `{ method, args,
26+
constraints }`.
27+
- `MetadataSpec<M>` discriminated union with three variants: `constant`,
28+
`source`, and `callable`.
29+
- `constant(value)` — static metadata spec; value is fixed at construction.
30+
- `source(src)` — source-string metadata spec; compiled via the optional
31+
compartment at `sheafify` construction time.
32+
- `callable(fn)` — callable metadata spec; evaluated per-dispatch with the
33+
invocation arguments.
34+
- `makeHandler(name, guard, methods)` — creates a named, guarded exo handler.
35+
- `makeRemoteSection(tag, remoteRef, metadata?)` — builds a provider that
36+
wraps a remote capability, fetching its interface guard via `E`.
37+
- `noopPolicy` — a policy that yields candidates in the order received.
38+
- `proxyPolicy(gen)` — wraps an existing generator to satisfy the `Policy`
39+
call signature.
40+
- `withFilter(predicate)` — higher-order policy combinator that pre-filters
41+
the candidate list before passing it to the inner policy.
42+
- `withRanking(comparator)` — higher-order policy combinator that pre-sorts
43+
the candidate list before passing it to the inner policy.
44+
- `fallthrough(policyA, policyB)` — composes two policies so that `policyB`
45+
is tried only after `policyA` is exhausted.
46+
- `Sheaf<M>` type — the authority manager returned by `sheafify`; exposes
47+
`getSection`, `getDiscoverableSection`, `getGlobalSection`, and
48+
`getDiscoverableGlobalSection`.
49+
- `documents/POLICY.md` — documents the policy coroutine protocol,
50+
`PolicyContext`, and the semantic equivalence assumption.
51+
- `documents/USAGE.md` — annotated usage examples.

0 commit comments

Comments
 (0)