matcha tokens listed req as '— (nothing provides it)'. An agent reading
that would write a provider for req. A needed token with no producing
node must come from the request (req, params, body, …): app.ready() has
already validated the graph, so a truly missing token would have failed
it. Mark those source: "request" in the JSON and 'the request (built
in)' in the text.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
Agents that inspect a green-tea app should read its graph instead of
guessing it.
- Add `matcha routes`: every route with its transport and chain.
- Add `matcha tokens`: every token, who provides it and who needs it,
handlers included.
- explain, routes and tokens take --json. It prints one JSON document
on stdout; a refused query prints a structured error on stderr and
exits 1.
All introspection now goes through src/introspect.rs. Each Query
variant runs one script that prints a single JSON envelope, and the
CLI renders the data as text unless --json is given. Text output is
unchanged. A future `matcha mcp` serves the same queries as tools
without a second implementation, which is why the formatting moved
from the generated script into Rust.
Adds serde_json (dtolnay, 1.0.154).
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>