export declare const WELCOME_EFFECT_ACTION: "welcome_effect_readback"; export declare const WELCOME_REQUEST_SCHEMA_VERSION: "onboard-client-welcome-request-v1"; export declare const WELCOME_EFFECT_SCHEMA_VERSION: "onboard-client-welcome-effect-v1"; export declare const WELCOME_APPROVAL_SCHEMA_VERSION: "onboard-client-welcome-send-approval-v1"; export declare const WELCOME_CANCELLATION_SCHEMA_VERSION: "onboard-client-welcome-cancellation-v1"; declare const SLACK_WRAPPER = "/Users/christianreyes/.local/bin/slack-pp-cli"; export type OnboardClientWelcomeProvider = "slack" | "gmail"; export type OnboardClientWelcomeDecision = "not_needed" | "skip" | "draft_required"; export type OnboardClientWelcomeMode = "approve" | "send" | "cancel" | "reconcile" | "readback"; export interface OnboardClientWelcomeCommandInput { action: typeof WELCOME_EFFECT_ACTION; runId?: string; fixtureId?: string; } export interface OnboardClientWelcomeDecisionInput { decision: OnboardClientWelcomeDecision; reason: string; provider?: OnboardClientWelcomeProvider; } export interface SlackWelcomeRequest { schemaVersion: typeof WELCOME_REQUEST_SCHEMA_VERSION; runId: string; packetHash: string; provider: "slack"; messageRevision: number; rendererConfigRevision: string; providerRevision: string; target: { workspaceId: string; teamId: string; channelId: string; expectedBotId: string; }; payload: { text: string; blocks: unknown[]; }; payloadHash: string; transport: { wrapperPath: typeof SLACK_WRAPPER; agent: true; json: true; dataSource: "live"; }; } export interface GmailWelcomeRequest { schemaVersion: typeof WELCOME_REQUEST_SCHEMA_VERSION; runId: string; packetHash: string; provider: "gmail"; messageRevision: number; rendererConfigRevision: string; providerRevision: string; target: { sender: string; recipients: string[]; }; payload: { subject: string; body: string; }; payloadHash: string; } export type OnboardClientWelcomeRequest = SlackWelcomeRequest | GmailWelcomeRequest; export interface OnboardClientWelcomeDraftInput { provider: OnboardClientWelcomeProvider; reason: string; mode?: "draft"; request?: OnboardClientWelcomeRequest; fixtureId?: string; } export interface OnboardClientWelcomeEffectInput { provider: OnboardClientWelcomeProvider; mode?: OnboardClientWelcomeMode; request?: OnboardClientWelcomeRequest; expectedRevision?: number; approvalEvent?: Record; cancellationEvent?: Record; fixtureId?: string; } export interface WelcomeProviderCallbackInput { effectIdentity: string; idempotencyKey: string; approvalRevision: number; payloadHash: string; messageRevision: number; providerRevision: string; targetHash: string; wrapperPath?: typeof SLACK_WRAPPER; argvPrefix?: ["--agent", "--json", "--data-source", "live"]; workspaceId?: string; teamId?: string; channelId?: string; expectedBotId?: string; text?: string; blocks?: unknown[]; sender?: string; recipients?: string[]; subject?: string; fullBody?: string; } export interface WelcomeProviderReadback { matches: Record[]; } export interface OnboardClientWelcomeOptions { adminHome?: string; adminStatePath?: string; now?: () => string; renderer?: (input: OnboardClientWelcomeDraftInput) => Promise | unknown; slackSend?: (input: WelcomeProviderCallbackInput) => Promise | unknown; gmailSend?: (input: WelcomeProviderCallbackInput) => Promise | unknown; slackReadback?: (input: WelcomeProviderCallbackInput) => Promise | WelcomeProviderReadback; gmailReadback?: (input: WelcomeProviderCallbackInput) => Promise | WelcomeProviderReadback; } export interface OnboardClientWelcomeNotNeededResult { ok: true; kind: "onboard_client_welcome_decision"; action: typeof WELCOME_EFFECT_ACTION; status: "welcome_not_needed"; reason: string; provider: null; rendererCalls: 0; sendCalls: 0; writeAttempted: false; } export interface OnboardClientWelcomeDraftRequiredResult { ok: true; kind: "onboard_client_welcome_draft"; action: typeof WELCOME_EFFECT_ACTION; status: "draft_required"; reason: string; provider: OnboardClientWelcomeProvider; rendererCalls: number; sendCalls: 0; writeAttempted: boolean; effectIdentity?: string; draftHash?: string; presentationHash?: string; targetHash?: string; payloadHash?: string; messageRevision?: number; effectRevision?: number; expectedBotId?: string; channelId?: string; transport?: SlackWelcomeRequest["transport"]; sender?: string; recipients?: string[]; subject?: string; fullBody?: string; replayed?: boolean; } export interface OnboardClientWelcomeProviderUnavailableResult { ok: false; kind: "onboard_client_welcome_effect"; action: typeof WELCOME_EFFECT_ACTION; status: "provider_unavailable"; code: "welcome_provider_unavailable"; provider: OnboardClientWelcomeProvider | null; fixtureId: string | null; rendererCalls: 0; sendCalls: 0; readbackCalls: 0; writeAttempted: false; replayed: false; verified: false; } export type WelcomeEffectStatus = "approved" | "in_progress" | "uncertain" | "verified" | "cancelled" | "needs_attention"; export interface OnboardClientWelcomeEffectResult { ok: boolean; kind: "onboard_client_welcome_effect"; action: typeof WELCOME_EFFECT_ACTION; status: WelcomeEffectStatus; code?: string; provider: OnboardClientWelcomeProvider; fixtureId: string | null; effectIdentity: string; draftHash: string; presentationHash: string; targetHash: string; payloadHash: string; messageRevision: number; effectRevision: number; approvalRevision: number | null; approvalReceiptHash: string | null; rendererCalls: number; sendCalls: number; readbackCalls: number; writeAttempted: boolean; replayed: boolean; verified: boolean; actorBotId?: string; channelId?: string; messageTs?: string; permalink?: string; sender?: string; recipients?: string[]; subject?: string; bodyHash?: string; messageId?: string; } export type OnboardClientWelcomeCommandResult = OnboardClientWelcomeNotNeededResult | OnboardClientWelcomeDraftRequiredResult | OnboardClientWelcomeProviderUnavailableResult | OnboardClientWelcomeEffectResult; export declare function decideOnboardClientWelcome(input: OnboardClientWelcomeDecisionInput, _options?: OnboardClientWelcomeOptions): OnboardClientWelcomeNotNeededResult | OnboardClientWelcomeDraftRequiredResult; export declare function draftOnboardClientWelcome(input: OnboardClientWelcomeDraftInput, options?: OnboardClientWelcomeOptions): OnboardClientWelcomeDraftRequiredResult | OnboardClientWelcomeProviderUnavailableResult | OnboardClientWelcomeEffectResult; export declare function applyOnboardClientWelcomeEffect(input: OnboardClientWelcomeEffectInput, options?: OnboardClientWelcomeOptions): OnboardClientWelcomeProviderUnavailableResult | Promise; export declare function adminOnboardClientWelcome(input: OnboardClientWelcomeCommandInput, options?: OnboardClientWelcomeOptions): OnboardClientWelcomeCommandResult; export {};