Apple Foundation Models Integration
RhoeJSON includes one optional Apple system integration: JSONSchemaAIGenerator, a macOS-only wrapper around Apple's FoundationModels framework for generating schema-conforming local JSON examples.
This API is intentionally narrow:
- It is compiled only when
os(macOS) && canImport(FoundationModels)is true. - It is not part of the Linux, WASM, or Homebrew Linux bottle surface.
- It is not a cloud AI connector, MCP connector, OpenAPI connector, or
- It depends on Apple Intelligence availability on the user's local Mac.
- It falls outside deterministic CLI behavior and should not be used in release
RhoePlatform orchestration surface.
validation that expects identical output across machines.
Public Boundary
The API belongs in the public package only as an Apple system API convenience for macOS developers. It does not change the first-wave public scope: RhoeJSON is still an engine-first JSON package with CLI, preview, WASM, and format tooling.
Linux CI must verify that the file remains platform gated and that the primary CLI product builds without compiling or exposing FoundationModels symbols.
Maintainer Rules
- Keep the top-level compile guard as:
#if os(macOS) && canImport(FoundationModels)
- Do not add fallback Linux stubs for
JSONSchemaAIGenerator; absence on Linux - Do not add network AI providers or connector abstractions to this repo under
- Document any macOS API change in
README.md,CHANGELOG.md, and release
is the intended public contract.
the Foundation Models umbrella.
notes.