Skip to content

Add WikiEntryProposal validator #2

Description

@keepsloading

Goal

Add a contract validator for app-proposed Wiki entries.

Apps should be able to propose readable context, but the proposal shape needs to be consistent before Wiki, Memory, SDK, and Access can rely on it.

Suggested fields

A Wiki entry proposal may include:

  • proposal id
  • source app id
  • category
  • title
  • body
  • confidence
  • evidence references
  • suggested visibility
  • suggested permissions
  • created timestamp

Work to do

  • Define the WikiEntryProposal shape
  • Add a validator following the existing Contracts style
  • Return { ok: true, value } for valid input
  • Return { ok: false, errors: [{ path, message }] } for invalid input
  • Add valid examples
  • Add invalid examples
  • Export the validator from the package

Important product rule

Apps propose context. Users decide whether it becomes accepted memory.

Acceptance criteria

  • Valid Wiki entry proposals pass
  • Missing required fields fail with useful errors
  • Invalid field types fail with useful errors
  • The validator is documented in the README or examples

SSoC26 Contributor Notice:

Since this repository (Memact/Contracts) is outside the main Context repository, and the registered project for tracking contributions is specifically Context (Memact/Context), please make sure to create a dummy PR in the Context repository linking to your actual PR or commits in this repository. This is required for your contribution to be correctly tracked and counted.

If you have already created a dummy PR in Memact/Context linking to your work here, please ignore this message!

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions