feat: add offline retained-field companion consumer

SI
2d ago
+1485-0

Add the offline App consumer prerequisite for #2207 retained fields. Parse the strict catalog-retained-field-projection/1 companion and exact current_streams request, enforce full method/query/selection/source-version agreement, and reconstruct one descriptor per unchanged ContextObjectRef. Preserve known zero versus unknown, both half-open periods and historical retrieval semantics.

Use a separate negotiated data-retained-field-snapshot / retained-field-companion/1 envelope around unchanged strict schema-v1. Default unavailable; no chat/history registration. Local fixture disclosure is not authority. Actual producer and server-held authorization across delivery/replay/persistence/history/export/model reads remain activation gates.

Refuse conflicting displays, stale scope, invalid coverage/time relationships and oversized output. Coverage follows the pinned evaluator; retrieval and completed periods must precede asOf. Preserve inner 32 KiB, part 256 KiB and text 24 KiB limits; the complete App result including descriptor index also must fit 32 KiB. No truncation or value/text fallback. Compare parsed projections structurally: object key order is irrelevant, array order and actual values must match.

Pinned synthetic API output remains byte-identical to API 4ca23de6a6cea3226c2f0392a454eb57861aedf8, SHA-256 ed979fc2ea72c3a3e51deb2ba259980f171a550b88fb488afb783a70e02ec322. Tests qualify payload compatibility, not receipt provenance/current authority.

Frozen successor c07bc71d5fd9a3ed0f84d6e6eda4e2b20268dc77, tree adef8c71ff95b4deb35224448c54eeb3ee3c91ab. New key-order regression fails on parent and passes after fix; true value changes and row/column reordering still refuse. All 64 retained-field tests/6 files pass, including prior budget/coverage/time/zero/unknown/API-fixture cases. Unchanged broader descriptor tests were not rerun. Lint/format/diff checks pass. Local type errors match baseline dependency/image diagnostics. Fixture ID helper now has its own file; the under-50-line guidance in .coderabbit.yaml is acknowledged as warning-level review guidance; retaining the cohesive atomic consumer/projection and fixture is a reasoned exception, not absence of a rule. Exact successor independent review/current CI pending; prior-head qualification is not successor approval.

Source-only release candidate, not durable mutable save, live/native/account acceptance or #2207 completion. Existing recovery/native/credential/storage holds remain.

Disposition correction: .coderabbit.yaml applies under-50-line guidance to lib/**/*.ts; its custom pre-merge check is warning-level. AGENTS.md has no numeric threshold but does require SRP and one function per file. The current atomic validation/refusal boundary, deterministic projection and single-purpose fixture remain intact pending root review rather than being split solely for line count. Earlier audit claims that no repository guideline existed were too broad. This test-consumed offline preparation has no application/chat/history integration; it is not a complete live feature or blanket merge-eligible under YAGNI. No source changes in this correction.