import type { CliEvent, PersonalServerState } from "../core/cli-types.js"; import type { SourceExportReceipt } from "../core/source-export.js"; export { createPersonalServerClient } from "./client.js"; export type { PersonalServerClient, IngestScopeResult, ScopeSummary, } from "./client.js"; export interface PersonalServerHealth { status: string; version: string; uptime: number; owner: string | null; /** The server's own address, which its registration is keyed by. */ identity?: string | null; /** The gateway it serves, which says its network. */ gatewayUrl?: string | null; /** * Where the server answers right now: its tunnel URL once that is up, * otherwise its configured (local) origin. */ apiOrigin?: string | null; } export interface PersonalServerTarget { state: PersonalServerState; url: string | null; source: "config" | "auth" | "env" | "scan" | null; health: PersonalServerHealth | null; } export type PersonalServerAuthConfig = { type: "bearerToken"; token: string; } | { type: "none"; } | undefined; export interface IngestResultOptions { scopes?: string[]; export: { kind: "retry"; receipt: unknown; } | { kind: "fresh"; receipt: SourceExportReceipt; /** A person's destination consent applies to this collection only. */ allowForeignServer: boolean; }; } /** * The owner/account pair to warn about, or null when the server is ours. * * A Personal Server owned by another identity still accepts a device login * and still reports a successful ingest, so a mismatch has to surface before * data is written rather than after. */ export declare function personalServerOwnerMismatch(owner: string | null | undefined, accountAddress: string | null | undefined): { owner: string; account: string; } | null; export declare function detectPersonalServerTarget(): Promise; export declare function ingestResult(source: string, resultPath: string, target: PersonalServerTarget, options: IngestResultOptions): Promise; export declare function resolvePersonalServerAuthConfig(serverUrl: string): PersonalServerAuthConfig; export declare function urlsMatch(left: string, right: string): boolean; //# sourceMappingURL=index.d.ts.map