import { type ProjectSpend, type SpendWindow } from "./spendTypes.js"; export type SourceFile = { name: string; contents: string; }; export type TraceSummary = { id: string; createdAt: string; }; /** One deployed file as the host describes it: name, exported node names, and * timestamps. Never the source (that is `pullSource`). */ export type HostedFile = { name: string; nodeNames: string[]; createdAt: string; updatedAt: string; }; /** What is currently deployed to a project: `GET /api/projects/:slug/agent`. */ export type HostedAgentInfo = { entryPoint: string | null; lastUploadAt: string | null; files: HostedFile[]; }; /** A statelog log row, narrowed to what the viewer bridge needs. `data` stays * opaque past its `type` — the viewer parses it. */ export type TraceLog = { traceId: string; spanId: string | null; parentSpanId: string | null; data: { type: string; } & Record; }; /** Any project request that did not produce a usable result. */ export declare class ProjectRequestError extends Error { } export type ProjectClient = { pullSource(): Promise; fetchAgentInfo(): Promise; listTraces(): Promise; traceLogs(traceId: string): Promise; getSpend(window: SpendWindow): Promise; }; export declare function createProjectClient(origin: string, projectSlug: string, apiKey: string): ProjectClient;