import { type WatchOption, type WatchRegistry } from '@quenty/nevermore-deploy'; import { type LocalWatchEntry } from './local-watch-loop.js'; import { type StreamWatchEntry } from './stream-watch-loop.js'; export interface RegisterNotifyWatchesOptions { option: WatchOption; /** Lease key within the repository, as for a dispatching monitor. */ monitorName: string; entries: LocalWatchEntry[]; /** Open Cloud key to share, so the service can poll a private base place. */ robloxApiKey?: string; /** Let the GitHub CLI supply the token when no env var does. */ useGhAuth?: boolean; /** Injected in tests; defaults to the HTTP registry. */ createRegistry?: (registerUrl: string) => WatchRegistry; } export type RegisterNotifyWatchesResult = { success: true; monitorId: string; /** Bearer token for the stream; the same one registration used. */ credential: string; entries: StreamWatchEntry[]; } | { success: false; reason: 'no_github_context' | 'no_token' | 'unwatchable_version_type' | 'no_entries' | 'register_failed' | 'no_monitor_id'; detail?: string; }; /** * Register a monitor that notifies this process instead of dispatching CI. * * Best-effort on purpose. Every way this can fail — no GitHub identity to * register under, no token, a `"saved"` base place the service cannot poll, a * service that is unreachable — has a working answer already: poll Open Cloud * from here. So a failure downgrades the watch rather than the run, and the * caller falls back. */ export declare function tryRegisterNotifyWatchesAsync(options: RegisterNotifyWatchesOptions): Promise; /** Why the run is polling instead, in words a user can act on. */ export declare function describeNotifyWatchFallback(result: RegisterNotifyWatchesResult & { success: false; }): string; //# sourceMappingURL=register-notify-watches.d.ts.map