We're introducing new APIs in https://github.com/MarkEdit-app/MarkEdit-api for user scripts to access Foundation Models on macOS Tahoe.
Interfaces have been implemented: https://github.com/MarkEdit-app/MarkEdit-api/commit/fbfb08f1b34c53651a2566543f90e011a2d286d0
The recording is a demo extension (WIP).