Record calling agent, session, and timing in receipts
For human review. This came from a usage review of knolo-box. A human maintainer will review and implement this manually. No code or PRs come with this issue. No version bump or npm publish is requested.
Summary
Query receipts (qr_) from knolo-box / @knolo/mcp all carry the same generic caller (for example the box or host name). There is no field for which agent or session made the query, and no latency or hit-count timing. Usage review cannot tell which agent benefited, which chats drove load, or whether searches were slow or empty.
Steps to reproduce
- Configure knolo-box MCP so more than one agent or session can call
knolo_searchthrough the same stdio server or shared mount. - Run several searches from different agents or chats.
- Inspect the written receipts. Every receipt shows the same caller identity.
- Confirm receipts have no latency, duration, or hit-count fields suitable for usage review.
Expected behavior
- Pass the calling agent and session (or chat) identity through from the host config into each receipt. Identity must come from host configuration, never from untrusted tool arguments (same rule as
@knolo/tools). - Record query latency (or start/end timestamps) and hit count on each receipt.
- Keep receipts replayable and fail-closed; do not log secret query content beyond what receipts already store.
Why it matters
Without per-agent and per-session attribution, operators cannot audit who searched what, debug empty-result patterns, or decide whether knolo-box is helping. Timing and hit counts are the minimum needed for a useful usage review.
Acceptance criteria
- Two agents sharing one box produce receipts with distinct caller/agent (and session when available) fields.
- Each receipt includes latency (or equivalent timing) and hit count.
- Docs for receipts and knolo-box MCP describe the new fields.
- Tool-argument spoofing of caller identity is rejected or ignored in favor of host config.
Related
- #110 (closed): Knolo Box Memory (per-scope
agentslists) - #79 / #87:
@knolo/mcpand receipts
A human maintainer will review and implement this manually.