Query receipts

Plan and result roots make a query inspectable against one committed state. Replaying the receipt answers whether the same image and the same statement produce the same plan and the same hits. It does not answer whether the hits are sufficient for an answer.

V4 pack queries write a receipt with knolo query --receipt. V5 queries write a roots-bound result. knolo explain reads that file back against the pack or image you name.

Terminalsh
knolo query "billing policy" --receipt receipt.json --json
knolo explain receipt.json --pack dist/knowledge.knolo

@knolo/tools writes an openclaw-knolo-query-v1 receipt before search results return. Receipt ids use the qr_ prefix. An unwritable audit directory fails with AUDIT_UNAVAILABLE and the host returns no hits. See Tools.

Code-image structure and expand receipts carry packDigest and the block source digest. A pin mismatch returns CODE_PIN_MISMATCH and no chunk text. See Code image.

Log the query, options, block ids, scores, and receipt roots. Do not log chain-of-thought. Retrieved text stays untrusted evidence. See Production guidance.