UNPKG

@meridius-labs/apple-on-device-ai

Version:

TypeScript library for accessing Apple's on-device foundation models (Apple Intelligence) with full Vercel AI SDK compatibility

124 lines (123 loc) 3.71 kB
{ "name": "@meridius-labs/apple-on-device-ai", "version": "1.6.2", "description": "TypeScript library for accessing Apple's on-device foundation models (Apple Intelligence) with full Vercel AI SDK compatibility", "main": "dist/index.js", "module": "dist/index.mjs", "types": "dist/index.d.ts", "exports": { ".": { "types": "./dist/index.d.ts", "import": "./dist/index.mjs", "require": "./dist/index.js" } }, "files": [ "dist", "build/*.node", "build/*.dylib", "build/*.json", "build/*.swiftmodule", "build/*.swiftdoc", "build/*.swiftsourceinfo", "README.md", "LICENSE" ], "scripts": { "tsc": "tsc --noEmit --skipLibCheck", "lint": "biome lint", "build": "bun run build:ts", "build:local": "bun run build:native && bun run build:ts", "build:native": "./build.sh", "build:ts": "tsdown --format esm,cjs --dts --outdir dist --entry src/index.ts --external apple_ai_napi --external fs --external path --external module --external url --external crypto --platform node --target node18", "build:watch": "tsdown --watch --format esm,cjs --dts --outdir dist --entry src/index.ts --external apple_ai_napi --external fs --external path --external module --external url --external crypto --platform node --target node18", "clean": "rm -rf dist", "clean:all": "rm -rf dist build", "validate-binaries": "node -e \"const fs=require('fs'); const path='build/apple_ai_napi.node'; if(!fs.existsSync(path)) throw new Error('Missing native binary: '+path); console.log('✅ Native binaries found');\"", "example:native": "bun run index.ts", "example:ai-sdk": "bun run example-ai-sdk.ts", "examples": "bun run examples/index.ts", "examples:basic": "bun run examples/index.ts basic", "examples:streaming": "bun run examples/index.ts streaming", "examples:object": "bun run examples/index.ts object", "examples:comprehensive": "bun run examples/index.ts comprehensive", "test": "echo \"No tests yet\"", "prepublishOnly": "bun run validate-binaries && bun run build:ts", "prepack": "bun run validate-binaries" }, "keywords": [ "apple", "apple-intelligence", "on-device", "ai", "language-model", "machine-learning", "vercel-ai-sdk", "typescript", "streaming", "openai-compatible", "ffi", "native" ], "author": "Meridius Labs", "license": "MIT", "repository": { "type": "git", "url": "https://github.com/Meridius-Labs/apple-on-device-ai.git" }, "homepage": "https://github.com/Meridius-Labs/apple-on-device-ai#readme", "bugs": { "url": "https://github.com/Meridius-Labs/apple-on-device-ai/issues" }, "engines": { "node": ">=18.0.0" }, "os": [ "darwin" ], "cpu": [ "arm64" ], "dependencies": { "@ai-sdk/provider": "^2.0.0-beta.1", "@ai-sdk/provider-utils": "^3.0.0-beta.5", "@types/json-schema": "^7.0.15", "ai": "^5.0.0-beta.25", "h3": "^1.15.3", "json-schema": "^0.4.0", "zod-to-json-schema": "^3.24.5" }, "peerDependencies": { "ai": "", "zod": "^3.25.67" }, "peerDependenciesMeta": { "ai": { "optional": true }, "zod": { "optional": true } }, "devDependencies": { "@biomejs/biome": "2.0.5", "@types/bun": "latest", "@types/marked": "^6.0.0", "@types/marked-terminal": "^6.1.1", "boxen": "^8.0.1", "devcert": "^1.2.2", "marked": "^15.0.12", "marked-terminal": "^7.3.0", "openai": "^5.6.0", "ora": "^8.2.0", "tsdown": "^0.12.9", "typescript": "^5.8.3", "zod": "^3.25.67" }, "binary": { "napi_versions": [ 8, 9 ] } }