//#region src/json.d.ts type RPCJSONObject = { [key: string]: unknown; }; //#endregion //#region src/tool/scope.d.ts /** * What MCP clients can reach: the whole document, or only the layers the user selected. In * selection scope the server exposes these read tools, stamps every call it sends to the app with * the scope, and the app rejects node IDs outside the selected layers and their descendants. */ declare const MCP_TOOL_SCOPES: readonly ["document", "selection"]; type MCPToolScope = (typeof MCP_TOOL_SCOPES)[number]; /** The tools selection scope keeps, each with the arguments that name the nodes it reads. */ declare const SELECTION_SCOPE_TOOLS: Readonly>; declare function isSelectionScopeTool(name: string): boolean; declare function parseToolScope(value: string | undefined): MCPToolScope; /** The narrower of the scopes, so a client never offers more than the server it talks to. */ declare function narrowestScope(...scopes: MCPToolScope[]): MCPToolScope; /** Why a selection-scoped call cannot write files, such as an export with a `path`. */ declare const SELECTION_SCOPE_FILE_OUTPUT_ERROR = "Writing files is unavailable while OpenPencil shares only the selection; omit path"; type RPCSend = (msg: RPCJSONObject) => Promise; /** * Sends to the app within the scope: in selection scope, only the selection tools and session * notices go through, each tool call carrying the scope however the client called it, so neither * `/rpc` nor a stale client can reach the rest of the document or the settings. */ declare function scopeRPC(send: RPCSend, scope: MCPToolScope): RPCSend; //#endregion export { isSelectionScopeTool as a, SELECTION_SCOPE_TOOLS as i, MCP_TOOL_SCOPES as n, narrowestScope as o, SELECTION_SCOPE_FILE_OUTPUT_ERROR as r, parseToolScope as s, MCPToolScope as t }; //# sourceMappingURL=scope-DAMZk6NH.d.mts.map