import type { HttpTransport } from './device-flow.js'; import type { RouteTemplate } from './route-template.js'; import type { RunIntentDescriptor } from './run-intent-discovery.js'; export type { RunIntentDescriptor } from './run-intent-discovery.js'; export { TargetDiscoveryError } from './discovery-errors.js'; export { expandRoute, type RouteTemplate } from './route-template.js'; declare const DEVICE_GRANT = "urn:ietf:params:oauth:grant-type:device_code"; declare const CAPSULE_AUDIENCE = "capsule"; export interface TargetDiscoveryDescriptor { readonly origin: string; readonly adapter: { readonly name: 'fargate' | 'docker' | 'local'; readonly majorVersion: 1; }; readonly endpoint: string; readonly endpointCapabilities: readonly ['exec', 'log_stream']; readonly pagination: { readonly defaultPageSize: number; readonly maxPageSize: number; }; readonly sizes: { readonly catalog: readonly ('tiny' | 'small' | 'standard' | 'large')[]; readonly default: 'tiny' | 'small' | 'standard' | 'large'; }; readonly oauth: { readonly metadataUrl: string; readonly deviceAuthorizationEndpoint: string; readonly tokenEndpoint: string; readonly revocationEndpoint: string; readonly clientId: string; readonly deviceGrantType: typeof DEVICE_GRANT; readonly audience: typeof CAPSULE_AUDIENCE; }; readonly session: { readonly routeTemplate: RouteTemplate; readonly method: 'GET'; }; readonly capsule: { readonly baseUrl: string; readonly routes: { readonly allocate: RouteTemplate; readonly list: RouteTemplate; readonly inspect: RouteTemplate; readonly terminate: RouteTemplate; readonly limits: RouteTemplate; readonly access: RouteTemplate; }; }; readonly transport: { readonly websocketRouteTemplate: RouteTemplate; readonly unauthorizedStatus: 401; readonly closeCodes: { readonly expired: 4401; readonly revoked: 4403; }; }; readonly capabilityFlags: readonly string[]; readonly runIntent: RunIntentDescriptor | null; readonly additional: Readonly>; } /** Compatibility projection. New callers should retain the complete descriptor. */ export interface TargetSessionEndpoints { readonly deviceAuthorizationEndpoint: string; readonly tokenEndpoint: string; readonly revocationEndpoint: string; readonly clientId: string; readonly capsuleApiBaseUrl: string; readonly deviceGrantType: typeof DEVICE_GRANT; readonly audience: typeof CAPSULE_AUDIENCE; readonly sessionEndpoint: string; readonly descriptor: TargetDiscoveryDescriptor; } export declare function discoverTarget(targetUrl: string, http: HttpTransport): Promise; export declare function discoverTargetSessionEndpoints(targetUrl: string, http: HttpTransport): Promise;