Files
mesh-catalog/modules/mesh-knowledge/cmd/mesh-knowledge/ledger.go
T
jschoubben c973b31820 CAT-K1: mesh-knowledge asks for its records as a ledger, its states and its reviews stream, and says the new events
The manifest keeps postgres-database until the drop and asks, in the typed form, the ledger records (a type for each
kind, the operations of the move), the states drafts, asked, findings and sent, and the stream reviews (kept for good,
refusing when full, granted by the trusted value readers). It consumes claude-code's judged and says the eleven new
events. The mesh-delivery indexer's judge accepts it (checked against main).

Issue 1966.

Claude-Session: https://claude.ai/code/session_01JG73KJNrH5EgFXMKKYSrig
2026-11-04 11:39:47 +01:00

33 lines
1.3 KiB
Go

package main
// The ledger the records are kept in (novox/hq ADR 0597 §11, to-be 55 §2.1): one instance per record, a type for each
// kind, every change an operation the module hands to the tool runner's apply.
// LedgerName is the local name the module asks its ledger for in `requires`.
const LedgerName = "records"
// The operations the ledger's types allow (ADR 0597 §11: reserve, propose, write-section, submit, take-over, review, ask,
// warrant, accept and withdraw; and those the module's other changes of a record are, so each leaves its own mark in
// the history).
const (
OpReserve = "reserve"
OpPropose = "propose"
OpWriteSection = "write-section"
OpSubmit = "submit"
OpTakeOver = "take-over"
OpReview = "review"
OpAsk = "ask"
OpWarrant = "warrant"
OpAccept = "accept"
OpWithdraw = "withdraw"
OpRetract = "retract"
OpDraft = "draft"
OpDrop = "drop"
OpImport = "import"
OpForm = "form"
)
// LedgerOperations are the operations, in the order the manifest's types allow them.
var LedgerOperations = []string{OpReserve, OpPropose, OpWriteSection, OpSubmit, OpDrop, OpImport, OpForm, OpTakeOver,
OpReview, OpAsk, OpWarrant, OpAccept, OpWithdraw, OpRetract, OpDraft}