Skip to content

Packages

AI lifecycle helpers

Private maintained runtime copied into generated desktop and Node apps.

Verified 16 October 2026

packages/runtime-ai is maintained source, not a public AI dependency. Generators copy it into .unstoppable/runtime-ai/. Apps own prompts, schemas, UI, history and domain logic; runtime-specific adapters own native inference.

  • createAISession({ adapter, byteBudget }) owns model loading, bounded history, one active request, cancellation, error codes and unloading.
  • load(options) prepares the model; stream(history, { requestId, signal, onTrim }) yields output; cancel(requestId) stops a request; close() releases resources.
  • Cancellation keeps the session busy until native work settles. Consume or return the stream before waiting on cleanup; do not replay partially emitted output automatically.
  • Bare and Node adapters load native modules lazily. Mock output is visibly labelled. Expo uses a separate experimental implementation.
  • Existing apps retain their vendored runtime until explicitly migrated. Compatibility checks report differences; regeneration with --force is not an upgrade workflow.

Personal Node's delegated completion adapter is a separate host composition. P2P transports granted calls; it does not own models. Contract tests do not prove real inference, native cancellation/reuse or cached offline startup.

Need help? Report an issue with your CLI version, platform, command and first relevant error.