Build a standalone JMESPath query engine in /workspace/program/main.py.
You may place additional standard-library Python source/data files under that
program directory. It will be delivered as a complete directory and run as
`python3 /program/main.py` in a fresh environment. Each invocation receives one
JSON object on stdin and must print exactly one JSON object on stdout. Other
diagnostics belong on stderr. The complete program may contain at most 128
ordinary files totaling 1 MiB, without symlinks or special files. Do not depend
on files outside the delivered
directory, network access, the reference client or the reference package.

An input has exactly two keys: expression, a JMESPath expression string, and data,
a finite JSON value. Return {"result": value} for successful evaluation, including
null results. For language errors return {"error": category}, where category is
syntax, invalid-type, invalid-value, unknown-function or invalid-arity. The target
is the supplied JMESPath Python 1.0.1 reference interface. The original official
specification is supplied at /workspace/SPECIFICATION.txt. The pinned interface
determines compatibility if a source description differs. JSON object member
order in a request is preserved by the reference. Output object key order does
not matter; array order and Boolean/number distinctions matter. Equivalent integer
and floating-point representations of the same number compare equally.

You can investigate requests through `from reference_client import query` in
Python, or by sending JSON lines to `python3 /workspace/reference_client.py`.
Each input there is one request of the form above; each output is the observed
interface result. Reference service failures raise an exception and do not
become language-error observations. The implementation and assessment files
are not available. Construct a reusable evaluator, not a lookup table of probes.

You retain native conversation, ordinary code, tests, saved versions and notes.
Choose useful inquiries and revise your construction or your interpretation as
needed. Your final answer ends this independent attempt; accurately describe
the delivered work and any remaining limitations. Assessment is not returned
during construction. All attempted inference, inquiry and other work count.

The complete attempt permits at most 100 actual model requests and 5400 seconds of construction, including automatic work. At most 64 reference calls are permitted.
