Pass the real caller identity into knolo-box audit receipts
For human review. This is a follow-up to #134 (implemented in PR #139). 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
After #134, knolo-box audit receipts include hitCount and durationMs. The caller is still recorded as a generic default agent and session identity for every query, so an operator cannot tell which client or session made a search.
Steps to reproduce
- Configure knolo-box MCP so more than one client or session can call
knolo_searchthrough the same server or shared mount. - Run several searches from different clients or sessions.
- Inspect the written receipts. Each receipt includes
hitCountanddurationMs. - Confirm the caller field is the same generic default identity on every receipt.
Expected behavior
- Pass through the real calling agent and session identity, for example from MCP client info in the initialize handshake, or from host environment or config.
- Fall back to the current generic default only when no identity is given.
- Document how a host should supply the calling agent and session identity.
- Identity must come from the host (config, environment, or the MCP initialize handshake), never from untrusted tool arguments (same rule as
@knolo/tools).
Why it matters
Timing and hit counts are now recorded, but without a distinct caller they cannot be attributed to a client or session. Operators still cannot audit who searched, debug empty-result patterns by client, or review usage per session.
Acceptance criteria
- Two clients or sessions sharing one box produce receipts with distinct caller or session fields when the host supplies identity.
- When the host supplies no identity, receipts still use the documented default and remain valid.
- Docs for receipts and knolo-box MCP describe how a host supplies caller identity and what the fallback is.
- Tool-argument spoofing of caller identity is rejected or ignored in favor of host-supplied identity.
Related
- #134 (closed): Record calling agent, session, and timing in receipts (PR #139)
A human maintainer will review and implement this manually.