weopqrst/tally/budget does not have a README file
pub suberror DigestError {
BadHeader(String)
MalformedLine(Int, String)
ReportHashMismatch(String, String)
PlanHashMismatch(String, String)
SegmentCountMismatch(Int, Int)
SegmentActionMismatch(Int, String, String)
UsedMismatch(Int64, Int64)
LimitMismatch(Int64, Int64)
}pub suberror FitError {
ReserveExceedsWindow(Int64, Int64)
}pub suberror SealError {
BadSealHeader(String)
SealMalformedLine(Int, String)
SealUnexpectedField(Int, String, String)
SealSchemeUnsupported(String)
SealEmptyKey
SealBadKeyId(String)
SealDigestMismatch(String, String)
SealMacMismatch(String, String)
}pub(all) struct Counter {
name : String
exact : Bool
count_bytes : (Bytes) -> Int64
}pub(all) struct FitConfig {
counter : Counter
window : Int64
reserve_output : Int64
strategy : TruncateStrategy
pools : Array[PoolQuota]
}pub(all) struct Plan {
counter : String
exact : Bool
window : Int64
reserve : Int64
limit : Int64
tokens_used : Int64
pinned_tokens : Int64
overflow : Bool
excess : Int64
pools : Array[PoolUsage]
kept : Array[KeptSegment]
truncated : Array[TruncatedSegment]
dropped : Array[DroppedSegment]
} derive(Debug)pub(all) struct PlanDigest {
report_sha : String
plan_sha : String
entries : Array[DigestEntry]
} derive(Debug)pub(all) struct PoolQuota {
name : String
limit : Int64
}pub(all) struct PoolUsage {
name : String
quota : Int64
demand : Int64
used : Int64
borrowed : Int64
lent : Int64
} derive(Debug)pub(all) struct Seal {
scheme : String
key_id : String
digest_sha : String
seal : String
} derive(Debug)pub(all) struct Segment {
role : String
priority : Priority
pool : String
score : Int64
bytes : Bytes
}pub(all) struct TruncatedSegment {
index : Int
role : String
priority : Priority
original_tokens : Int64
tokens : Int64
strategy : TruncateStrategy
omitted : Int64
bytes : Bytes
} derive(Debug)fn hmac_sha256_hex(key : Bytes, message : Bytes) -> Stringfn normalize_newlines(text : String) -> Stringfn seal_digest_result(digest_text : String, key : String, key_id : String) -> Result[String, String]fn sha256_bytes(bytes : Bytes) -> Bytesfn verify_report(report : String, digest_text : String) -> Result[Unit, String]fn verify_seal(digest_text : String, seal_text : String, key : String) -> Result[Unit, String]Install
Download zipVerifiable context-assembly contract for MoonBit LLM apps: frozen report formats (tally-plan v3, tally-digest v1, tally-seal v1), pluggable counters, window/reserve model, priority + score assembly with per-pool quotas and placeholder compression, and reports a third party can re-assemble and compare byte for byte.