Skip to content

Memact/Contracts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Memact Contracts

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.

Owns

  • 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.

Does Not Own

  • API key verification.
  • Capture storage.
  • Inference logic.
  • Feature execution.
  • Memory retrieval.

Current Code

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.

Consent and Wiki Examples

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.

Development

npm install
npm run check

About

Shared data shapes and validators for Memact SDK, backend, and Studio features.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors