agentcrumbs
Version:
Debug mode for any agent.
31 lines • 1.08 kB
TypeScript
import type { AgentCrumbsConfig } from "./types.js";
type ParsedConfig = {
enabled: false;
} | {
enabled: true;
app?: string;
includes: RegExp[];
excludes: RegExp[];
port: number;
format: "pretty" | "json";
};
export declare function parseConfig(): ParsedConfig;
export declare function isNamespaceEnabled(namespace: string): boolean;
export declare function getCollectorUrl(): string;
export declare function getFormat(): "pretty" | "json";
/**
* Resolve the app name. Priority:
* 1. `app` field from AGENTCRUMBS JSON config
* 2. AGENTCRUMBS_APP env var
* 3. Nearest package.json `name` field (walk up from cwd)
* 4. Fallback: "unknown"
*/
export declare function getApp(): string;
/** Reset cached config — useful for tests */
export declare function resetConfig(): void;
/** Reset cached app — useful for tests */
export declare function resetApp(): void;
/** No-op in Node.js — use AGENTCRUMBS env var instead. */
export declare function configure(_config: AgentCrumbsConfig | string): void;
export {};
//# sourceMappingURL=env.d.ts.map