import type { ServerConfig } from "../config/type.js"; import type { DrizzleExecutor } from "../drizzle.js"; import { type PubSub } from "../realtime/index.js"; import type { TokenService } from "../auth/tokens.js"; import { portShareCreate } from "./portShareCreate.js"; import { portShareDisable } from "./portShareDisable.js"; import { type PortShareAudience, type PortShareContainerPort, type PortShareSummary } from "./types.js"; export interface PortShareTargetResolver { resolvePortShareTarget(input: { agentUserId: string; chatId: string; containerName: string; containerPort: PortShareContainerPort; }): Promise<{ host: "127.0.0.1"; port: number; }>; } export interface PublicPortShare extends Omit { url: string; } export interface PortShareAccessToken { token: string; expiresAt: string; refreshAfter: string; portShare: PublicPortShare; } /** Coordinates the durable port-share actions, non-authoritative hostname cache, scoped JWTs, realtime hints, and local sandbox target resolution. */ export declare class PortShareService { private readonly executor; private readonly pubsub; private readonly tokens; private readonly targets; private readonly onError; private readonly bySubdomain; private readonly publicDomain; private readonly publicUrl; constructor(executor: DrizzleExecutor, pubsub: PubSub, tokens: TokenService, config: Required, targets: PortShareTargetResolver, onError?: (error: unknown) => void); start(): Promise; create(input: { actorUserId: string; agentUserId: string; chatId: string; containerPort: PortShareContainerPort; name: string; audience: PortShareAudience; }): Promise<{ portShare: PublicPortShare; sync: Awaited>["hint"]; }>; disable(input: { actorUserId: string; chatId: string; portShareId: string; }): Promise<{ portShare: PublicPortShare; sync: Awaited>["hint"]; }>; list(actorUserId: string, chatId: string): Promise; issueAccessToken(input: { actorUserId: string; portShareId: string; chatId?: string; }): Promise; issueAccessRedemption(input: { actorUserId: string; portShareId: string; returnTo: string; }): Promise; redeemAccess(host: string | undefined, token: string | undefined): Promise; activeShareIdForHost(host: string | undefined): Promise; subdomainForHost(host: string | undefined): string | undefined; authenticateAccess(host: string | undefined, token: string | undefined): Promise<{ portShare: PublicPortShare; userId: string; }>; authorize(host: string | undefined, token: string | undefined): Promise<{ portShare: PublicPortShare; upstream: string; userId?: string; }>; private verifiedAccess; private cachedShare; private publicShare; private authorizedShare; private hostShare; private authorizedHostShare; private publish; } //# sourceMappingURL=service.d.ts.map