Contracts define the data shapes used by the Memact SDK, backend, and feature runtime.
They are small validators, not storage or network code.
If a contributor is unsure how a feature or SDK call should shape its data, this repo is the first place to check.
- Capture event shape.
- App context signal shape.
- Context proposal shape.
- Inference record shape.
- Context proposal and legacy schema packet shapes.
- Memory record shape.
- Feature manifest, request, and result shapes.
- Access policy and API error shapes.
- API key verification.
- Capture storage.
- Inference logic.
- Feature execution.
- Memory retrieval.
Validators return:
{ ok: true, value }or:
{ ok: false, errors: [{ path, message }] }The package exports validators for capture events, app context signals, context proposals, inference records, context/schema packets, memory records, feature manifests, feature run requests/results, access policies, and API errors.
The examples/ folder includes small request examples for:
- Connect/consent links before app access.
- Wiki links after app access.
- Adaptive Article Overview feature runs.
- Discord Channel Personalizer feature runs.
These examples are intentionally simple. Access owns permission checks; Website owns the user-facing pages.
npm install
npm run check