UNPKG

@promptbook/remote-server

Version:

Promptbook: Create persistent AI agents that turn your company's scattered knowledge into action

47 lines (46 loc) 1.91 kB
import type { Executables } from '../../../execution/Executables'; import type { string_promptbook_documentation_url } from '../../../types/string_markdown'; import type { string_mime_type } from '../../../types/string_mime_type'; import type { string_title } from '../../../types/string_title'; import type { Registered } from '../../../utils/misc/$Register'; /** * Metadata interface for scrapers and converters in the system. * Contains information about the capabilities and requirements of a scraper or converter. * * x) `Scraper` * x) `Converter` * x) `ScraperConstructor` * x) `Registered` * x) `ExecutionTools` * x) `ScraperAndConverterMetadata` * x) `PrepareAndScrapeOptions` * x) `ScraperConfiguration` * x) `ScraperOptions` */ export type ScraperAndConverterMetadata = Registered & { /** * Human-readable title of the scraper or converter. * Used for display purposes in logs and interfaces. */ readonly title: string_title; /** * Mime types that this scraper can handle */ readonly mimeTypes: ReadonlyArray<string_mime_type>; /** * Flag indicating whether this scraper or converter can run in a browser environment. * Some scrapers require Node.js capabilities and cannot run client-side. * * Note: [🌏] Only `MarkdownScraper` makes sense to be available in the browser, for scraping non-markdown sources in the browser use a remote server */ readonly isAvailableInBrowser: boolean; /** * List of executables required by this scraper or converter to function properly. * For example, PDF scrapers may require 'pandoc' to be installed on the system. */ readonly requiredExecutables: ReadonlyArray<Capitalize<keyof Executables extends `${infer N}Path` ? N : never>>; /** * Link to documentation */ readonly documentationUrl: string_promptbook_documentation_url; };