import { Command } from 'commander'; import { type Body_hint, type Retry_config } from '../utils/client'; import { type Poll_result } from '../utils/polling'; import type { Create_template_request, Refactor_request, Trigger_ai_request, Ai_progress_response, Scraper_create_opts, Create_envelope, Heal_envelope, Run_request, Scraper_run_opts, Scraper_heal_opts, Scraper_approve_opts } from '../types/scraper'; declare const SCRAPER_BODY_HINTS: Body_hint[]; declare const AI_TRIGGER_RETRY_BASE_MS = 30000; declare const AI_TRIGGER_RETRY_MAX_MS = 240000; declare const AI_TRIGGER_DEFAULT_RETRIES = 4; declare const parse_max_retries: (raw: string | undefined) => number; declare const validate_heal_prompt: (raw: string) => string; declare const build_refactor_request: (prompt: string) => Refactor_request; declare const build_next_step: (collector_id: string, url: string | undefined) => string; declare const build_diff_summary: (diff: unknown) => string; declare const build_approve_next_step: (collector_id: string, url: string | undefined) => string; declare const build_ai_trigger_retry: (opts: Pick) => Retry_config; declare const print_stub_recovery_note: (collector_id: string) => void; declare const print_heal_recovery_note: (collector_id: string) => void; declare const build_template_request: (opts: Scraper_create_opts) => Create_template_request; declare const build_ai_request: (url: string, description: string) => Trigger_ai_request; declare const extract_progress_status: (result: Ai_progress_response) => string | undefined; declare const format_create_summary: (collector_id: string, name: string, progress: Ai_progress_response) => string; declare const build_create_envelope: (params: { collector_id: string; name: string; status: string; progress?: Ai_progress_response; created_at?: string; error?: string; }) => Create_envelope; declare const build_heal_envelope: (params: { collector_id: string; status: string; prompt: string; progress?: Ai_progress_response; url?: string; error?: string; }) => Heal_envelope; declare const emit_create_output: (envelope: Create_envelope, progress: Ai_progress_response | null, opts: Scraper_create_opts) => boolean; declare const handle_create_scraper: (url: string, description: string, opts: Scraper_create_opts) => Promise; declare const format_heal_summary: (collector_id: string, prompt: string, next_step: string, progress: Ai_progress_response) => string; declare const resume_and_poll: (api_key: string, collector_id: string, approve: boolean, opts: { timing?: boolean; autoSave?: boolean; }, timeout: number) => Promise>; declare const handle_heal_scraper: (collector_id: string, raw_prompt: string, opts: Scraper_heal_opts) => Promise; declare const handle_approve_scraper: (collector_id: string, opts: Scraper_approve_opts) => Promise; declare const parse_sync_timeout: (raw: string | undefined) => number; declare const is_valid_url: (s: string) => boolean; declare const parse_urls_arg: (raw: string) => string[]; declare const read_input_file: (path: string) => string[]; declare const resolve_run_inputs: (positional: string | undefined, opts: Pick) => string[]; declare const build_run_request: (url: string) => Run_request; declare const build_run_query: (collector_id: string, opts: Pick, extra?: Record) => string; declare const classify_result: (status: number, body: string) => string; declare const parse_result_body: (body: string) => unknown; declare const is_realtime_page_limit_error: (data: unknown) => boolean; declare const classify_dataset: (status: number, body: string) => string; declare const handle_run_scraper: (collector_id: string, url: string | undefined, opts: Scraper_run_opts) => Promise; declare const scraper_command: Command; export { scraper_command, handle_create_scraper, build_template_request, build_ai_request, extract_progress_status, format_create_summary, build_create_envelope, emit_create_output, handle_run_scraper, build_run_request, build_run_query, classify_result, parse_result_body, parse_sync_timeout, is_realtime_page_limit_error, classify_dataset, SCRAPER_BODY_HINTS, parse_max_retries, build_ai_trigger_retry, print_stub_recovery_note, AI_TRIGGER_DEFAULT_RETRIES, AI_TRIGGER_RETRY_BASE_MS, AI_TRIGGER_RETRY_MAX_MS, parse_urls_arg, read_input_file, resolve_run_inputs, is_valid_url, validate_heal_prompt, build_refactor_request, build_next_step, build_diff_summary, build_approve_next_step, build_heal_envelope, print_heal_recovery_note, handle_heal_scraper, format_heal_summary, resume_and_poll, handle_approve_scraper, }; //# sourceMappingURL=scraper.d.ts.map