import { z } from "zod"; import type { ExecutionEvidence, LangfuseConnection } from "./model.js"; declare const identifier: z.ZodString; declare const timestamp: z.ZodString; declare function validatedBaseUrl(value: string): string; export declare function validateLangfuseConnection(input: unknown): LangfuseConnection; export declare function validateExecutionEvidence(input: unknown): ExecutionEvidence; export declare function langfuseTraceUrl(connectionInput: LangfuseConnection, evidenceInput: ExecutionEvidence): string; export interface LangfuseEvidenceRequest { traceId: string; observationId: string; boardId: string; jobId: string; designRevision?: string; /** Untagged historical evidence is proposed for review, never automatically reviewed. */ associationRationale?: string; fetchedBy?: string; implementationRef?: string; fromStartTime?: string; toStartTime?: string; } interface LangfuseDependencies { fetch?: typeof fetch; env?: Record; now?: () => Date; } declare function record(value: unknown): Record; declare function langfuseReader(baseUrl: string, deps: LangfuseDependencies): (path: string) => Promise>; /** One bounded, credential-checked reader over the public API, for other modules that must not * build a second fetch path: same trusted origin, Basic auth, redirect refusal, timeout and size cap. */ export { langfuseReader, record as langfuseRecord, identifier as langfuseIdentifier, timestamp as langfuseTimestamp, validatedBaseUrl as validateLangfuseBaseUrl }; /** Read one explicitly mapped observation using project-scoped credentials held by the agent. * Uses v2 field selection to omit inputs/outputs. No response bodies enter errors or storage. */ export declare function fetchLangfuseEvidence(connectionInput: LangfuseConnection, request: LangfuseEvidenceRequest, deps?: LangfuseDependencies): Promise; /** Identifies a capture, including fetch time; never changes when it is retracted. */ export declare function executionEvidenceKey(evidence: ExecutionEvidence): string; /** A refresh is another bounded read of the exact source. It preserves the earlier capture. */ export declare function refreshLangfuseEvidence(connection: LangfuseConnection, prior: ExecutionEvidence, request: LangfuseEvidenceRequest, deps?: LangfuseDependencies): Promise; /** Verify project-scoped credentials and v2 read access without retrieving trace contents. */ export declare function probeLangfuseAccess(connectionInput?: LangfuseConnection, deps?: LangfuseDependencies): Promise<{ connection: { baseUrl: string; projectId: string; }; access: "verified"; verifiedAt: string; observationsReadable: true; }>; export interface LangfuseDiscoveryRequest { fromStartTime?: string; toStartTime?: string; traceId?: string; name?: string; environment?: string; cursor?: string; limit?: number; } /** One bounded page. Returns only allowlisted metadata; finding a candidate never attaches it. */ export declare function discoverLangfuseObservations(connectionInput: LangfuseConnection, request?: LangfuseDiscoveryRequest, deps?: LangfuseDependencies): Promise<{ connection: LangfuseConnection; fromStartTime: string; toStartTime: string; observations: { status: string; mapping: Record; traceUrl: string; environment?: string | undefined; name?: string | undefined; observationId: string; traceId: string; observedAt: string; }[]; nextCursor: string | null; meaning: string; }>;