/** Enabled by an explicit `LOTICS_TELEMETRY=1`. Anything else, including unset, is off. */ export declare function telemetryEnabled(env?: NodeJS.ProcessEnv): boolean; /** * The verb path of an invocation — `app.workflow.set`, `run.query_records` — * from the raw argv positionals. * * Positionals stop at the first token that is a flag, a JSON blob, an `@file`, * or an identifier: the point of the header is to name the COMMAND, and a table * id or a record payload past that point is customer data that has no business * in a request header. `run` keeps one extra token because the tool name IS the * verb there — `run` alone would collapse ~90 distinct operations into one label. */ export declare function commandPath(argv: readonly string[]): string; /** `lotics-cli/0.117.0 node/v22.1.0 linux` — enough to correlate a failure with a stale CLI. */ export declare function userAgent(version: string): string; /** * The command + session of the running CLI process, set once by `cli.ts` before * dispatch and read by `LoticsClient.buildHeaders`. * * Process-scoped ambient state, which is a cost — but the alternative is * threading two strings through the ~20 places a client is constructed, and the * facts are genuinely process-wide (there is one command per invocation). It is * write-once at startup and read-only after, so nothing downstream has to track * when it changes. * * Unset is the LIBRARY case: `@lotics/cli` also exports `LoticsClient`, where * `process.argv` belongs to someone else's program and would name a command that * was never run. Absent beats wrong, so the header is simply omitted. */ type Invocation = { command: string; session: string | null; userAgent: string; }; /** * `version` is passed in rather than imported: `version.ts` resolves * `package.json` relative to its own module URL, which only holds from `dist/`, * so importing it into `client.ts` would make the library entry unloadable from * source. The bin already reads it correctly; the client just relays it. */ export declare function setInvocation(command: string, session: string | null, version: string): void; export declare function getInvocation(): Invocation | null; /** Back to the library state (no CLI process). Exists for tests. */ export declare function resetInvocation(): void; export declare function sessionStorePath(): string; /** * The current session id, or null when telemetry is off. `now` is injected so the * idle-gap boundary is testable without a clock. */ export declare function sessionId(now?: number, env?: NodeJS.ProcessEnv): string | null; export {};