Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,14 @@ jobs:
bun-version: 1.3.12
- run: bun install --frozen-lockfile
- run: bun run typecheck

build:
name: Build Package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.12
- run: bun install --frozen-lockfile
- run: bun run build
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added

- `LanguageModelSession` for interacting with Apple's on-device Foundation Models.
- `useLanguageModel` and `useStreamingResponse` React hooks.
- Tool calling support via Zod schemas (`createTool`).
- `checkFoundationModelsAvailability` and `getFoundationModelsModelFamily` helpers.
- `getFoundationModelsContextSize` to read the model's context window size in
tokens (requires iOS 26.4+); also surfaced via `checkFoundationModelsAvailability`.
- `SystemLanguageModel` configuration (`useCase`, `guardrails`).
- Native `tokenCount` method on `LanguageModelSession`.

### Changed

- Renamed package from `react-native-apple-intelligence` to `react-native-foundation-models`.
- `streamResponse` callback now emits chunks instead of the full response.

## [0.1.0] - 2025-09-18

### Added

- Response streaming.
- Tool calling.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 Henry Paulino

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
33 changes: 1 addition & 32 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions package/RNFoundationModels.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ Pod::Spec.new do |s|
"ios/**/*.{swift}",
# Autolinking/Registration (Objective-C++)
"ios/**/*.{m,mm}",
# Implementation (C++ objects)
"cpp/**/*.{hpp,cpp}",
]

s.pod_target_xcconfig = {
Expand Down
21 changes: 5 additions & 16 deletions package/package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
{
"name": "react-native-foundation-models",
"version": "0.1.0",
"description": "A React Native Nitro module",
"description": "React Native Nitro module for Apple's Foundation Models (Apple Intelligence). Enables on-device AI with tool calling and streaming responses on iOS 26.0+.",
"main": "./lib/module/index.js",
"module": "./lib/module/index.js",
"types": "./lib/typescript/index.d.ts",
"react-native": "src/index.ts",
"source": "./src/index.ts",
"author": "Developer",
"author": "Henry Paulino <me@henrypl.com>",
"scripts": {
"typecheck": "tsc --noEmit",
"clean": "rm -rf android/build node_modules/**/android/build lib",
"clean": "rm -rf lib",
"build": "rm -rf lib && bun typecheck && bob build",
"specs": "bunx nitrogen --logLevel=\"debug\"",
"generate": "node lib/commonjs/cli.js",
"generate:dev": "ts-node src/cli.ts",
"prepublishOnly": "bun run build",
"release": "release-it"
},
"keywords": [
Expand All @@ -35,21 +34,12 @@
"src",
"lib",
"nitrogen",
"cpp",
"ios",
"plugin",
"!**/__tests__",
"!**/__fixtures__",
"!**/__mocks__",
"react-native.config.js",
"android/build.gradle",
"android/gradle.properties",
"android/CMakeLists.txt",
"android/src",
"app.plugin.js",
"*.podspec",
"generable.config.example.ts",
"bin",
"README.md"
],
"dependencies": {
Expand All @@ -61,8 +51,7 @@
"@release-it/conventional-changelog": "^10.0.1",
"nitrogen": "0.35.4",
"react-native-builder-bob": "^0.40.13",
"release-it": "^19.0.4",
"ts-node": "^10.9.2"
"release-it": "^19.0.4"
},
"peerDependencies": {
"react": "*",
Expand Down
Loading