UNPKG

@promptbook/vercel

Version:

Promptbook: Turn your company's scattered knowledge into AI ready books

51 lines (50 loc) 1.71 kB
import type { AgentModelRequirements } from '../../book-2.0/agent-source/AgentModelRequirements'; import { BaseCommitmentDefinition } from '../_base/BaseCommitmentDefinition'; /** * META LINK commitment definition * * The `META LINK` commitment represents the link to the person from whom the agent is created. * This commitment is special because it doesn't affect the system message, * but is handled separately in the parsing logic for profile display. * * Example usage in agent source: * * ``` * META LINK https://twitter.com/username * META LINK https://linkedin.com/in/profile * META LINK https://github.com/username * ``` * * Multiple `META LINK` commitments can be used when there are multiple sources: * * ```book * META LINK https://twitter.com/username * META LINK https://linkedin.com/in/profile * ``` * * @private [🪔] Maybe export the commitments through some package */ export declare class MetaLinkCommitmentDefinition extends BaseCommitmentDefinition<'META LINK'> { constructor(); /** * Short one-line description of META LINK. */ get description(): string; /** * Markdown documentation for META LINK commitment. */ get documentation(): string; applyToAgentModelRequirements(requirements: AgentModelRequirements, content: string): AgentModelRequirements; /** * Extracts the profile link URL from the content * This is used by the parsing logic */ extractProfileLinkUrl(content: string): string | null; /** * Validates if the provided content is a valid URL */ isValidUrl(content: string): boolean; } /** * Note: [💞] Ignore a discrepancy between file name and entity name */