Expand description
The closed registry of feature codes for telemetry (3.11.1+).
A code names what LeanCTX did, never with what: cli.pack.export,
index.graph. CLI arguments are matched against the fixed lists below and
only the matching literal is counted, so a path, file name, query or any
other user input can never become a code. Commands on the hot path of
every shell command or editor event are not counted at all; the daily
usage record already covers that work.
Enums§
- Feature
- Background features with a fixed code.
Constants§
- APP_
CODE_ DETECTED - A
lean-ctx doctorrun that found LeanCTX Code’s presence marker (docs/contracts/app-presence-v1.md). Only that the marker was there is counted, never its content. - APP_
CODE_ HINT_ SHOWN - The one hint about LeanCTX Code was shown after
lean-ctx doctor.
Functions§
- cli_
code - The feature code for a CLI invocation, or
Nonewhen it is not counted. A--dry-runpromises to write nothing, the usage counter included. - record
- Counts one run of a background feature and whether it succeeded.
- record_
app_ detected - Counts a run that found LeanCTX Code managing this machine.
- record_
app_ hint_ shown - Counts one shown LeanCTX Code hint.
- record_
cli - Counts a CLI invocation. Never fails the command.
- record_
hook_ call - Counts one tool call a host hook handled in the host session
session_id(the hook payload’ssession_id). Called by the governor’s PostToolUse hook; never fails the hook, and writes nothing while telemetry is off. - record_
mcp_ session_ end - Counts how an MCP session ended. Every exit path (transport closed, parent gone, idle exit) calls this before its final send; only the first call of a process counts.
- record_
mcp_ session_ start - Counts an MCP server start after the handshake.