import { type LangfuseKeys } from "./hosted.js"; /** The clients a project registration is written for; one file each. */ export type RegistrationClient = "claude" | "cursor" | "codex" | "gemini"; export interface Registration { label: string; file: string; client?: RegistrationClient; serverArgs?: string[]; env?: unknown; reason?: string; state: "present" | "absent" | "unreadable"; } export declare function table(value: unknown): Record | undefined; /** The `staves` server entry of an MCP configuration object, whatever shape the file actually has. */ export declare function stavesEntry(config: unknown): Record | undefined; export declare function entryArgs(entry: unknown): string[] | undefined; /** A spec npm resolves from a checkout rather than the registry: file:, link:, or a filesystem * path. It is a developer running their own build, not a misspelled package name. A bare name with * no separator is a registry name however it is spelled — `p5.js` is a package, not a file. */ export declare function isLocalSpec(spec: string): boolean; /** npx runs flags, then the package spec, then the package's own command. The published package is * `@staves/cli`; registrations written before the rename name `staves`, which npm does not serve. */ export declare function packageToken(serverArgs: string[]): { index: number; spec: string; name: string; version?: string; local: boolean; } | undefined; /** A registration npm cannot resolve, or one pinned to a version this CLI is not. A local checkout * is neither: the developer chose it. Returns the spec as written, so a report can name it. */ export declare function stalePackage(serverArgs: string[] | undefined): string | undefined; /** A file doctor cannot open is a line in the report, never the end of it: permissions, a directory * where a config should be, a half-written file. Only ENOENT is silence. */ export declare function readForReport(file: string): Promise<{ text: string; } | { reason: string; }>; export declare function jsonRegistration(file: string, label: string, pick: (config: unknown) => Record | undefined, client?: RegistrationClient): Promise; export declare function tomlRegistration(file: string, label: string, client?: RegistrationClient): Promise; /** The registration files whose staves entry carries Langfuse keys in the environment the MCP server * is launched with. Named, because which file holds them is the whole question: they are not in this * shell, and a client that reads a different file will not see them. */ export declare function langfuseRegistrations(registrations: Registration[]): string[]; /** The Langfuse keys the coding agent already has: this shell's LANGFUSE_* first, then the env block * of this project's registered staves server. `source` names where, never what. */ export declare function agentLangfuseKeys(env: NodeJS.ProcessEnv | Record, registrations: Registration[]): { source: string; keys: LangfuseKeys; } | undefined; /** The question staves connect asks in a terminal: which Staves, and which Langfuse the keys reach — never the keys. */ export declare function shareRunsQuestion(stavesUrl: string, keys: LangfuseKeys): string; /** The three files a project registration is written to, in the order a person meets them. One * reader for the report and the home screen, so the two can never disagree about what is set up. */ export declare function projectRegistrations(root: string): Promise; /** Registrations outside this project, which doctor reports and never edits. */ export declare function userRegistrations(root: string): Promise; /** Say what the entry would actually launch, and what about it is wrong. Reads only. `note` takes * the lines that are stale but working, so a caller can decide separately whether those are a * failure; by default they are printed like everything else. */ export declare function reportRegistration(item: Registration, scope: "project" | "user", say: (line: string) => void, note?: (line: string) => void): Promise;