Learn / Write your own language, store or protocol
Check a custom store adapter
Import checkStore from @doeixd/metakit/store/check (test-only; never imported by server mains) to probe a custom store against its declared StoreCapabilities:
ts
import { checkStore } from '@doeixd/metakit/store/check'
const report = await checkStore(myStoreCapabilities, {
connect: async () => openConnection(),
seed: async ({ parent, children }) => seedRows(parent, children),
})If an adapter claims isolation: 'serializable' over transactions but two concurrent writers both read 10 and write 5, checkStore fails with a counterexample naming the broken capability.
Declare typed protocol obligations
Use Temporal.protocol(['undo-before-expire', ...]) from @doeixd/metakit/temporal to create typed obligation(name, ...) and discharge(name, ...) helpers. Misspelling an obligation name fails to compile, and an undischarged obligation fails your conformance test suite.
Next
- Define the operations that go inside a
Language: Define an operation and check its laws. - Working example:
examples/metakit/test/permissionsLanguage.test.ts.