@promptbook/utils
Version:
Promptbook: Run AI apps in plain human language across multiple models and platforms
27 lines (26 loc) • 751 B
TypeScript
/**
* Branded type for books
*/
export type string_book = string & {
readonly __type: 'book';
};
/**
* Type guard to check if a string is a valid agent source
*
* @public exported from `@promptbook/core`
*/
export declare function isValidBook(value: string): value is string_book;
/**
* Validates and converts a string to agent source branded type
* This function should be used when you have a string that you know represents agent source
* but need to convert it to the branded type for type safety
*
* @public exported from `@promptbook/core`
*/
export declare function validateBook(source: string): string_book;
/**
* Default book
*
* @public exported from `@promptbook/core`
*/
export declare const DEFAULT_BOOK: string_book;