@promptbook/google
Version:
Promptbook: Create persistent AI agents that turn your company's scattered knowledge into action
31 lines (30 loc) • 1.03 kB
TypeScript
import type { ParsedCommitment } from '../../commitments/_base/ParsedCommitment';
import type { string_agent_name } from '../../types/string_agent_name';
import type { ParsedUnknownCommitment } from './ParsedUnknownCommitment';
/**
* Result of parsing agent source for commitments
*
* @private internal utility of `parseAgentSource` and `parseAgentSourceWithCommitments`
*/
export type AgentSourceParseResult = {
/**
* The agent name taken from the first non-empty line after leading whitespace-only lines.
*/
agentName: string_agent_name | null;
/**
* The line number where the agent name was found (1-based)
*/
agentNameLineNumber?: number;
/**
* All parsed commitments
*/
commitments: ParsedCommitment[];
/**
* Uppercase commitment blocks whose types are not registered by Promptbook.
*/
unknownCommitments: ParsedUnknownCommitment[];
/**
* Lines that are not commitments (for system message)
*/
nonCommitmentLines: string[];
};