1#!/usr/bin/env node2// Static check of editor code before it reaches the editor (compliance guard 1b).3// Every `A.<namespace>.<method>(` / `editorLLMApis.<namespace>.<method>(` call in the given4// files must exist in the live editor's API list, as recorded by snapshot-capabilities.mjs5// (`api`). In a snippet, anything else (fetch, require, import(),6// eval, window/document access) is an error too. Exit 1 on any unknown call.7//8// node scripts/copy/lint-api.mjs --capabilities capabilities.json [--snippet] <file.js|file.mjs> [...]9// --snippet: the file is editor code itself (not a Node script): also reject fetch/require/window/…10//11// Also used by editor-run.mjs (every snippet) and check-description.mjs (deploy-description.mjs12// is linted with its generated snippets, since they are template strings in that file).13import