mirror of
https://github.com/morluto/rea.git
synced 2026-11-03 13:26:10 +00:00
2.9 KiB
2.9 KiB
Implementation plan
- Export the Evidence file authenticator from
environmentSource.tswith astaterole, and validate a HAR capture there with the owned borrowing parse so later views reuse it. AddenvironmentState.tsto check state Evidence against a loaded source, build the served catalog (the tools a state serves and the data plane its card declares), derive the state from the capture through the analysis view service with the capture as retained Evidence, and prepare it: unavailable when its catalog exceeds the discovery budget under the served name or it cannot be derived. - Add
environmentStateDocument.tsto validaterea-state/v1documents against the served types and views, andenvironmentStateStore.tsfor the live store with reset, atomic replace and thedata/getsnapshot. - Export
selectsRecordedLineand the body-takingreplayAnswerfromenvironmentReplay.ts, reusepathSegmentMatchesfrom the state rules, export one recorded-body predicatestateBodyJsonfrom the state accumulator andchangesStatefrom the state rules, and widencollectionPathOfto any value with a path, so state answers reuse selection, matching, body and write rules. - Add
environmentStateAnswer.tsfor item, list and document answers, the recorded fallback and the answer function serve and export share. - Declare the state data plane on the card in
environmentTools.ts, taking the data plane in an options object so the discovery budget reserves the card and descriptions actually served. - Add
stateIntake.tsfor parts, files on this host and downloads (injectable fetcher and timeout, cancellation, coarse failure categories) andenvironmentDataPlane.tsfor the three methods, run one at a time in arrival order and cancelled by the server's stop or the caller's departure; letserveEnvironment.tsserve the shared catalog and answer function, queue every message of a batch at arrival, bound the replies of one response and stop the data plane before closing the listener. - Make
environment-serveprepare the state under its served name after loading the source, add--replay-only, log an unavailable state as a warning before binding, and reportstatein the stopped document. - Let
environment-exportprepare the state the same way under the bundle name, only after the name checks, and plan the served tool count, the verifier check from the shared answer function, theserveverifier and the README's serving section from it; reportstatein the export output and expect the served count in the hosted-lane script. - Cover services, adapters, cli-boundary, mcp-boundary and process-boundary
behaviour; document default serving,
--replay-only, the fallback, the answers, the data plane, the card and the export.
No dependency, provider or REA tool contract changes. The only new network
activity is an https:// download that a data/add call names.