feat(okf): OKF v0.2 document model — parse, write, provenance, validation with profiles, index files #74
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
qa:preview
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
quatrain/core!74
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/73-okf-v02-document"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #73
What
A document module in
@quatrain/okffor OKF v0.2, independent ofOKFBackendAdapter:parseOkfDocument/serializeOkfDocument: unknown keys kept in their order, spec keys first, a bareverifiedmapping read as a one-element list, body written as given (reads back unchanged),undefined/nullleft out.parseOkfActor,okfTrustTier,isOkfStale,okfLastChange(legacytimestampfallback),withOkfGenerated,withOkfVerification(one entry per actor).validateOkfDocument(document, profile?): producer-side rules of the spec (non-emptytype,statusvocabulary,tagslist, actors, datetimes with offset,sources[].resource, unique source ids;timestamp/# Citationsas warnings) and a profile for applications: required keys,forbidEmpty,forbidLegacy, own rules.upgradeOkfDocument(document, { by }): v0.1 → v0.2.renderOkfIndex(sections, { okfVersion, preamble }):index.mdper §8.Attested computations (§10) are out of scope.
Tests
npx jest packages/okf: 74 passed (16 new);tsc --noEmitclean.nullvalues, which are left out by design.🤖 Generated with Claude Code