New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@aippy/runtime

Package Overview
Dependencies
Maintainers
2
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aippy/runtime

Aippy Runtime SDK - Runtime SDK for Aippy projects

latest
npmnpm
Version
0.3.2
Version published
Maintainers
2
Created
Source

@aippy/runtime

Runtime SDK for Aippy projects providing device functionality, platform detection, and utility functions.

Installation

npm install @aippy/runtime

Usage

Core

import { AippyConfig, mergeConfig } from '@aippy/runtime/core';

const config = mergeConfig({
  debug: true,
  apiBaseUrl: 'https://api.example.com'
});

Device APIs

import { camera, geolocation, sensors, fileSystem } from '@aippy/runtime/device';

// Camera
const stream = await camera.getStream();
const photo = await camera.capturePhoto({ quality: 'high' });

// Geolocation
const position = await geolocation.getCurrentPosition();
const watchId = geolocation.watchPosition((pos) => {
  console.log('Position:', pos);
});

// Sensors
const orientation = await sensors.getOrientation();
const cleanup = sensors.watchOrientation((data) => {
  console.log('Orientation:', data);
});

// File System
const files = await fileSystem.openFile({ multiple: true });
await fileSystem.saveFile(blob, 'filename.txt');

Utils

import { platform, performanceMonitor, pwa } from '@aippy/runtime/utils';

// Platform detection
const info = platform.getPlatformInfo();
const capabilities = platform.getCapabilities();

// Performance monitoring
const metrics = await performanceMonitor.getCoreWebVitals();
const timing = performanceMonitor.getNavigationTiming();

// PWA utilities
const pwaInfo = pwa.getPWAInfo();
await pwa.registerServiceWorker('/sw.js');
await pwa.sendNotification('Hello!');

Audio (iOS Silent Mode Compatible)

import { patchAudioContext } from '@aippy/runtime/audio';

// Create and patch AudioContext to bypass iOS silent mode
const ctx = new AudioContext();
const patchedCtx = patchAudioContext(ctx);

// Unlock audio on user interaction (required on iOS)
button.onclick = async () => {
  await patchedCtx.unlock();
  
  // Use native Web Audio API as normal
  const osc = patchedCtx.createOscillator();
  osc.connect(patchedCtx.destination);
  osc.start();
  osc.stop(patchedCtx.currentTime + 1);
};

AI (Backend Proxy Adapter)

// Default base URL: https://api.aippy.dev/api/aisdk/v1

import { streamText, experimental_generateImage as generateImage } from 'ai';
import { aippyAIProvider } from '@aippy/runtime/ai';

// Create provider (reads from env vars automatically)
const provider = aippyAIProvider();

// Or override with config
// const provider = aippyAIProvider({ baseUrl: '...', userToken: '...' });

// Streaming text generation (uses Vercel AI SDK)
const result = await streamText({
  model: provider('gpt'),
  prompt: 'Write a haiku about TypeScript.',
});

for await (const chunk of result.textStream) {
  console.log(chunk);
}

// Image generation
const image = await generateImage({
  model: provider.image('dall-e-3'),
  prompt: 'A sunset over mountains',
});

console.log(image.image?.base64);

Packages

  • @aippy/runtime/core - Core types and configuration
  • @aippy/runtime/device - Device APIs (camera, geolocation, sensors, file system)
  • @aippy/runtime/utils - Platform detection, performance monitoring, PWA utilities
  • @aippy/runtime/audio - iOS-compatible Web Audio API wrapper
  • @aippy/runtime/ai - AI SDK adapter wrapping ai package, routes through backend proxy

Publishing

This package is published to the npm public registry. The build process ensures that only compiled JavaScript files and TypeScript declarations are included in the published package - no source code is exposed.

Build Process

  • Compiles TypeScript to JavaScript
  • Generates TypeScript declaration files
  • Removes source maps to protect source code
  • Only includes dist/ directory and README.md in the published package

Development

# Install dependencies
pnpm install

# Build
pnpm run build

# Type check
pnpm run type-check

# Lint
pnpm run lint

# Format
pnpm run format

# Publish (for maintainers)
pnpm run publish:patch  # 0.0.0 -> 0.0.1
pnpm run publish:minor  # 0.0.0 -> 0.1.0
pnpm run publish:major  # 0.0.0 -> 1.0.0

Support

  • Homepage: https://aippy.ai
  • Support: Discord Community

License

UNLICENSED - This is a proprietary SDK. All rights reserved.

Keywords

aippy

FAQs

Package last updated on 02 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts