UNPKG

@promptbook/remote-server

Version:

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

42 lines (41 loc) 1.77 kB
import type { AgentModelRequirements } from '../../book-2.0/agent-source/AgentModelRequirements'; import type { ChatPrompt, Prompt } from '../../types/Prompt'; import type { string_title } from '../../types/string_title'; /** * Agent model requirements stripped of prompt-only bookkeeping before forwarding to runtime tools. */ type SanitizedAgentModelRequirements = Omit<AgentModelRequirements, '_metadata' | 'promptSuffix'>; /** * Resolves runtime prompts into the fully enriched prompt shape forwarded by `AgentLlmExecutionTools`. * * @private internal utility of `AgentLlmExecutionTools` */ export declare class AgentLlmExecutionToolsPromptPreparer { private readonly context; constructor(context: { readonly getModelRequirements: () => Promise<AgentModelRequirements>; readonly getTitle: () => string_title; readonly isVerbose?: boolean; readonly hasPrecomputedModelRequirements: () => boolean; }); /** * Resolves agent requirements, attachments, and runtime overrides into one forwarded chat prompt. */ prepareChatPrompt(prompt: Prompt): Promise<{ readonly forwardedPrompt: ChatPrompt; readonly sanitizedRequirements: SanitizedAgentModelRequirements; readonly mergedTools: Array<NonNullable<ChatPrompt['tools']>[number]>; readonly knowledgeSourcesForAgent?: Array<string>; readonly hasAttachmentSources: boolean; readonly hasRuntimePromptTools: boolean; }>; /** * Removes bookkeeping-only properties from compiled agent requirements before forwarding them. */ private getSanitizedAgentModelRequirements; /** * Ensures the agent wrapper only processes chat prompts. */ private requireChatPrompt; } export {};