npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

machineai-activation-capacitor

v0.2.0-beta.1

Published

Capacitor (Android) runtime adapter for machineai-activation. Bridges the LiteRT-LM native plugin to the activation runtime contract.

Downloads

152

Readme

machineai-activation-capacitor

Capacitor (Android) runtime adapter for machineai-activation.

Bridges the native LiteRT-LM Capacitor plugin to the activation runtime contract, so a Capacitor app can activate a local .litertlm model and run on-device inference through the same createMachine / generateText API as every other runtime — instead of hand-writing ~570 LOC of plugin + capability-resolution glue.

Install

npm install machineai-activation-capacitor machineai-activation

This package ships the JavaScript bridge only. The matching native Kotlin plugin (the actual LiteRT-LM execution) has to live in the host Android app — it can't be packaged as an npm dependency. See ACTIVATION_SDK_INTEGRATION_CHECKPOINT.md in the Ingredient Analyzer reference app for the host-app Gradle/Kotlin surface.

Android only. Every entry point throws (or reports unavailable) on web/iOS builds that don't include the native plugin. Guard with isMachineActivationPluginAvailable() before activating.

Usage

Option A — register a global runtime factory

For apps that resolve the runtime lazily from a global (the activation SDK's default lookup):

import { registerCapacitorMachineActivationRuntime } from 'machineai-activation-capacitor';

// In your app entry file, once:
registerCapacitorMachineActivationRuntime();

Option B — pass the runtime explicitly to createMachine

import { createMachine, generateText } from 'machineai-activation';
import {
  createCapacitorMachineActivationRuntime,
  isMachineActivationPluginAvailable,
  pickMachineActivationModel,
} from 'machineai-activation-capacitor';

if (!isMachineActivationPluginAvailable()) {
  throw new Error('Local mode requires an Android build with the native plugin.');
}

const machine = createMachine({
  runtimes: [createCapacitorMachineActivationRuntime()],
});

// Let the user pick a .litertlm package via the native file picker:
const picked = await pickMachineActivationModel();
if (picked) {
  const model = machine.model({ filePath: picked.filePath });
  const { text } = await generateText({ model, prompt: 'Hello on-device!' });
}

What it covers

  • Routes .litertlm models to the LiteRT-LM lane (canHandleModel / supportedModelFormats: ['litert-lm']).
  • Backend, device, and model-package probing through the native plugin.
  • Session creation, complete / completeChat, context-state reporting, vision-readiness probing, diagnostics, abort, and close.
  • A native file picker (pickMachineActivationModel) and a plugin-availability guard (isMachineActivationPluginAvailable).

Current limitations

  • Android only, .litertlm-first.
  • Non-streaming request execution (the native bridge reports supportsStreaming: false today).
  • Acceleration telemetry currently reports cpu; richer GPU/NPU reporting is a follow-up.

See CARTRIDGE_SDK_ROADMAP.md and LITERT_LM_ANDROID_NOTES.md in the SDK repo for the deeper LiteRT-LM status.