/**
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
*/
/**
* @module ai/aicore/utils/getrootinfo
*/
import { type Editor } from "@ckeditor/ckeditor5-core";
import { type AIRootInfo } from "../aieditorconfig.js";
/**
* Builds a snapshot of a single editor root for the AI agent.
*
* The snapshot tells the agent what the root can hold and what surrounds it, so it can keep its edits within the
* shape of that root: an inline root cannot take block content at all, and a root hosted by a semantic element
* (a `
` title, a `` label) implies a different tone and length than a full-page ``.
*
* Unlike the {@link module:ai/aicore/aieditorconfig~AIEditorConfig#get feature configuration snapshot}, this one
* must not be cached for the editor's lifetime: it is per root, and roots come and go at runtime (for example through
* `MultiRootEditor#addRoot()` / `#detachRoot()`).
*
* A root name that matches no root in the editor is described as a regular block root hosted by the default element,
* mirroring how {@link module:ai/aicore/utils/inlineroot~isInlineRoot `isInlineRoot()`} falls back for such a name.
*
* @param editor The editor owning the root.
* @param rootName The name of the root to describe.
* @returns The root snapshot.
*/
export declare function getRootInfo(editor: Editor, rootName: string): AIRootInfo;