Header y footer v1

This commit is contained in:
Jordan Diaz
2026-04-21 09:09:14 +00:00
parent 50c2076ebd
commit 362666295f
4 changed files with 133 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
import { canEditCode } from "../helpers/roleCheck.js";
import { registerGetLayoutFieldTool } from "./get_layout_field.js";
import { registerSetLayoutFieldTool } from "./set_layout_field.js";
/**
* Tools to read/write global layout fields (style, javascript) of the project.
* The read tool is always exposed (read only); the mutating tool is gated by
* canEditCode() — same pattern used by libraries/ and hooks/.
*/
export function registerLayoutTools(server) {
registerGetLayoutFieldTool(server); // read-only, todos
if (canEditCode()) {
registerSetLayoutFieldTool(server);
}
}