import type { string_book } from '../../../book-2.0/agent-source/string_book'; import type { TeammateProfile } from '../../../book-2.0/agent-source/TeammateProfileResolver'; /** * A book's source and identity, retaining its location for nested relative references. * * @private internal type of CLI agent resolution */ export type LocalAgentBook = { readonly url: string; readonly filePath?: string; readonly source: string_book; readonly profile: TeammateProfile; }; /** * Reads repository books and indexes their first-line names for CLI reference resolution. * * @private internal utility of CLI agent resolution */ export declare class LocalAgentBookCollection { private readonly agentDirectoryPath; private readonly currentWorkingDirectory; private readonly isInitializationAllowed; private readonly signal?; private readonly booksByUrl; private readonly booksByName; /** Stable default ancestor selected from the initial repository scan. */ private adamAgentUrl; /** Files initialized by this collection, for the coder's normal commit handling. */ readonly createdAgentBookPaths: string[]; /** Creates a collection rooted at the primary book's directory. */ constructor(agentDirectoryPath: string, currentWorkingDirectory: string, isInitializationAllowed?: boolean, signal?: AbortSignal | undefined); /** Discovers nested books, including the hidden `.core` directory. */ initialize(): Promise; /** Identifies the default ancestor without creating an unused book for FROM null/void. */ getAdamAgentUrl(): string; /** Resolves a unique first-line name, refusing ambiguous matches. */ findByName(name: string): LocalAgentBook; /** Resolves a name, a path relative to its declaring book, or a path relative to the CLI cwd. */ resolveReference(reference: string, declaringBook: LocalAgentBook): Promise; /** Reads a local book once, canonicalizing symlinks so aliases cannot bypass cycle detection. */ readBook(filePath: string): Promise; /** Loads a referenced remote book, while keeping local identifiers entirely inside the collection. */ getBook(url: string, signal?: AbortSignal | undefined): Promise; /** Adds a book under its normalized first-line name and preserves the display name for TEAM. */ private registerBook; /** Walks real directories in deterministic order without following directory symlink loops. */ private readDirectory; }