export declare const COCKPIT_EVENT_TYPES: readonly ["nudge", "session_start", "status", "blocker", "question", "answer", "approval_request", "completion_report", "evidence_receipt", "pr_link", "release_link", "cancellation"]; export declare const COCKPIT_PLATFORMS: readonly ["discord", "slack"]; export type CockpitEventType = (typeof COCKPIT_EVENT_TYPES)[number]; export type CockpitPlatform = (typeof COCKPIT_PLATFORMS)[number]; export interface CockpitTarget { name?: string; platform: CockpitPlatform; webhookUrl: string; events: CockpitEventType[]; } export interface CockpitConfig { exists: boolean; path: string; root: string; targets: CockpitTarget[]; } export interface CockpitPostOptions { event: CockpitEventType; message?: string; title?: string; taskId?: string; runId?: string; planSlug?: string; pr?: string; evidencePath?: string; dryRun?: boolean; testMode?: boolean; now?: Date; } export interface CockpitTargetSummary { name?: string; platform: CockpitPlatform; events: CockpitEventType[]; } export interface CockpitDispatchResult { target: CockpitTargetSummary; status: 'sent' | 'dry_run' | 'skipped' | 'failed'; maskedUrl: string; reason?: string; httpStatus?: number; responseSnippet?: string; payload?: unknown; } export interface CockpitDispatchSummary { configured: boolean; configPath: string; root: string; results: CockpitDispatchResult[]; } interface EventEnvelope { schema: 'open-scaffold.cockpit_event.v1'; event_id: string; created_at: string; event_type: CockpitEventType; visibility: 'private' | 'internal' | 'public' | 'stakeholder'; source: { kind: 'manual'; name: 'osc cockpit'; }; refs: Record; title: string; body: string; requires_response: boolean; redaction: 'public_safe' | 'internal_only' | 'private_sensitive'; next_action: string; } export declare class CockpitUsageError extends Error { } export declare class CockpitConfigError extends Error { } export declare const NO_COCKPIT_TARGETS_MESSAGE = "No cockpit targets configured. See .osc/cockpit.example.json"; export declare function cockpitConfigPath(root: string): string; export declare function maskWebhookUrl(url: string): string; export declare function loadCockpitConfig(start?: string): CockpitConfig; export declare function formatCockpitConfig(config: CockpitConfig): string; export declare function buildCockpitEnvelope(options: CockpitPostOptions, root?: string): EventEnvelope; export declare function buildDiscordPayload(options: CockpitPostOptions, root?: string): Record; export declare function buildSlackPayload(options: CockpitPostOptions, root?: string): Record; export declare function buildCockpitPayload(platform: CockpitPlatform, options: CockpitPostOptions, root?: string): Record; export declare function postCockpitEvent(options: CockpitPostOptions, start?: string): Promise; export declare function formatCockpitDispatchSummary(summary: CockpitDispatchSummary): string; export declare function hasCockpitDispatchFailures(summary: CockpitDispatchSummary): boolean; export {};