In-memory increment — safe on the MCP tool-call hot path.
(kind: UsageKind, name: string, ok: boolean, client?: ClientInfo)
| 234 | |
| 235 | /** In-memory increment — safe on the MCP tool-call hot path. */ |
| 236 | recordUsage(kind: UsageKind, name: string, ok: boolean, client?: ClientInfo): void { |
| 237 | if (!this.isEnabled()) return; |
| 238 | const day = this.utcDay(); |
| 239 | const cn = client?.name?.slice(0, 64); |
| 240 | const cv = client?.version?.slice(0, 32); |
| 241 | const key = [day, kind, name, cn ?? '', cv ?? ''].join(' |