mirror of
https://github.com/morluto/rea.git
synced 2026-10-30 19:35:56 +00:00
The environment-state view now holds every non-entity GET read with one
initial request line as a read-only document, infers identity from an
`...Id`/`..._id` field every listed item carries distinctly when no fixed
identity name does, and locates single entities wrapped in a one-element
array (`{"posts":[{...}]}`). Served tool descriptions say what each tool
returns, from its own recorded exchanges, and tools carry MCP annotations
(read-only, destructive, idempotent, closed world). On 44 recorded captures
the state renders 1,016 of 1,258 read tools, up from 710.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2.1 KiB
2.1 KiB
Implementation plan
- In
environmentStateRules.ts, parse pointers into tokens and letatandreplaceAtread and replace element 0 of a one-element array at the root or in one member; extendlocateItemwith those forms after the object forms, requiring an identity name there; addidentityCandidates, the identity names then suffix-named fields, and letlocateListprefer arrays identified by name, then arrays of two or more items identified by suffix. - In
EnvironmentStateExtraction.ts, plan lists with the shared candidates, treat an empty recording as unconstraining, accept a suffix-named field only once a recording shows it distinct across two or more items, leave reads without a list or identity to documents, drop the written-path requirement and thenot-entityfallback, recordpath-variesapart fromquery-varies, and keep each entity's earliest sighting;environmentStateMerge.tscites records in timeline order. Removenot-entityfrom the reason type and result schema, addpath-varies, and describe the new pointer forms andfield-namebasis. - Move the classification of retained bodies (none, base64, cut, JSON, text)
into
replayedBodyinenvironmentSource.ts, which owns recorded exchanges; replay renders from it and tool descriptions read its JSON case. - Make
environmentToolDefinitionstake theEnvironmentSource; describe the first2xxJSON record, else the first JSON record labelled with its status, one level deep with the state's list rule and the existing sample budget; list the manifest tool's statuses; and charge the whole description and the tool's MCP annotations to the catalog reservation. Update the serve and bundle callers. - Let the tool definitions own the MCP annotations derived from the method and
the query-
POSTrule;serveEnvironment.tsregisters them and the card leaves them out. - Cover domain, services, adapters and the compiled MCP boundary; document the rules in the capture guide, descriptions and hints in the agent environments guide, and the contract text.