ReMe/reme
Ziyang Guo 29b83529ef
fix(stat): put mtime in the answer where the job description promises it (#566)
* fix(stat): put mtime in the answer where the job description promises it

The ``stat`` job is advertised to agents as "Stat path (size, mtime, exists,
is_dir, is_file)", but the answer only ever carried the path, type and size —
``mtime`` lived solely in metadata, and MCP returns only ``response.answer``.
So an agent asking how fresh a file is got no answer, even though the tool
description told it the field was there.

Render mtime in both branches of the answer:

    stat: topics/n.md (file, 20 bytes, mtime 2026-09-21T15:50:52.880316)
    stat: topics (dir, mtime 2026-09-21T15:50:52.880316)

The value is hoisted into a local so the answer and ``metadata["mtime"]`` are
guaranteed to come from the same ``stat()`` call rather than two reads. The
module docstring claimed the agent receives "size, mtime, mime type, and ...
frontmatter"; it now states that size and mtime are in the answer while mime
and frontmatter stay in metadata, matching reality.

Metadata is unchanged, so programmatic consumers see no difference. This is
the same answer-completeness class as #564, found while auditing which
advertised job fields actually reach the LLM.

* docs(stat): say which consumers actually see mime and frontmatter

Review feedback on #566: the module docstring told the agent it gets
"mime type and ... the parsed frontmatter alongside in metadata", which
reads as though an agent can use those fields to decide whether to
download or parse a file. It cannot: the MCP service returns only
`response.answer` (`mcp_tools.py` -> `return response.answer`), so
`metadata["mime"]` and `metadata["frontmatter"]` reach direct `Response`
consumers but never an MCP caller.

Spell the split out instead of implying one audience: the answer carries
path, type, size and mtime, and an agent that needs the frontmatter has
to read the file rather than stat it. The envelope description below is
unchanged, since it already lists the full metadata shape.
2026-10-15 20:49:44 +08:00
..
components perf(search): prepare search filters once per query (#591) 2026-10-14 18:14:21 +08:00
config feat(classifier): add optional Jev component and service demo (#619) 2026-10-14 17:49:49 +08:00
enumeration feat(classifier): add optional Jev component and service demo (#619) 2026-10-14 17:49:49 +08:00
schema feat(jobs): add a unified enabled switch for all job types (#580) 2026-09-30 18:30:36 +08:00
steps fix(stat): put mtime in the answer where the job description promises it (#566) 2026-10-15 20:49:44 +08:00
utils fix(agent): preserve Unicode separators in saved state (#594) 2026-10-05 11:25:37 +08:00
__init__.py chore: bump ReMe and OpenClaw versions (#549) 2026-09-15 18:29:25 +08:00
application.py feat(docker): add container deployment and multi-platform release workflow (#582) 2026-10-03 23:54:58 +08:00
constants.py feat(service): support explicit wildcard network binds (#547) 2026-09-15 14:26:33 +08:00
entry_point.py feat: simplify plugin setup and add management CLI (#485) 2026-08-23 17:58:20 +08:00
plugin.py feat: simplify plugin setup and add management CLI (#485) 2026-08-23 17:58:20 +08:00
plugin_cli.py feat: simplify plugin setup and add management CLI (#485) 2026-08-23 17:58:20 +08:00
plugin_manifest.py feat: simplify plugin setup and add management CLI (#485) 2026-08-23 17:58:20 +08:00
reme.py feat: simplify plugin setup and add management CLI (#485) 2026-08-23 17:58:20 +08:00