@promptbook/google
Version:
Promptbook: Create persistent AI agents that turn your company's scattered knowledge into action
29 lines (28 loc) • 1.2 kB
TypeScript
import type { string_book } from '../../book-2.0/agent-source/string_book';
/**
* Monaco diagnostic shown when a Book source declares its parent agent more than once.
*
* @private internal type of `BookEditorMonaco`
*/
type DuplicateFromCommitmentDiagnostic = {
readonly startLineNumber: number;
readonly startColumn: number;
readonly endLineNumber: number;
readonly endColumn: number;
readonly message: string;
readonly source: string;
readonly severity: 'warning';
};
/**
* Creates Book editor diagnostics for a parent agent declared by more than one `FROM` commitment.
*
* Repeating `FROM` stays valid — the last one wins and overrides every earlier one — but an author who writes it
* twice usually means only one of them, so every `FROM` keyword is marked to show which one actually applies.
*
* @param agentSource - Current editor content.
* @returns Warning markers for every `FROM` keyword, empty when the book declares at most one parent.
*
* @private internal utility of `BookEditorMonaco`
*/
export declare function createDuplicateFromCommitmentDiagnostics(agentSource?: string_book): ReadonlyArray<DuplicateFromCommitmentDiagnostic>;
export {};