nomyo-js/doc
alpha nerd 987acf8816
Some checks failed
NYX Security Scan / nyx-scan (pull_request) Failing after 5m51s
feat!: make RSA keys ephemeral by default
BREAKING CHANGE: keyDir now defaults to null (ephemeral) instead of
'client_keys'. Clients that relied on keys persisting across restarts
must now pass keyDir explicitly.

The Python SDK defaults to key_dir=None: a key pair is generated in
memory for the session and never written to disk. The JS port defaulted
to 'client_keys' and always persisted, so merely constructing a client
wrote an RSA private key into the working directory. That is a weaker
default than the client it ports, and one users never asked for.

  - keyDir?: string | null, defaulting to undefined. null and undefined
    both mean ephemeral, matching Python's None.
  - Persistent mode is unchanged when keyDir is set: load the existing
    pair from that directory, otherwise generate and save one there.
  - Browsers are always ephemeral; they have no filesystem.

Key rotation follows the same rule. It previously hardcoded
'client_keys' as its fallback directory, so an ephemeral client would
have started writing private keys to disk on the first rotation tick.
Rotated keys are now persisted only where keyDir or keyRotationDir is
explicitly configured.

Tests assert the intent (that saveKeys is never called) rather than
probing the filesystem, since a leftover client_keys/ from the old
default would otherwise make them pass or fail for the wrong reason.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-19 11:19:03 +02:00
..
api-reference.md feat!: make RSA keys ephemeral by default 2026-07-19 11:19:03 +02:00
examples.md fix: base_url 2026-04-16 16:44:26 +02:00
getting-started.md fix: base_url 2026-04-16 16:44:26 +02:00
installation.md fix: base_url 2026-04-16 16:44:26 +02:00
models.md fix: base_url 2026-04-16 16:44:26 +02:00
rate-limits.md fix: base_url 2026-04-16 16:44:26 +02:00
README.md doc: correcting dead links 2026-04-17 18:31:28 +02:00
security-guide.md feat!: make RSA keys ephemeral by default 2026-07-19 11:19:03 +02:00
SECURITY.md doc: fixing SECURITY.md in correct folder 2026-04-17 18:29:14 +02:00
troubleshooting.md feat!: make RSA keys ephemeral by default 2026-07-19 11:19:03 +02:00

NOMYO.js Documentation

Comprehensive documentation for the NOMYO secure JavaScript/TypeScript chat client — a drop-in replacement for OpenAI's ChatCompletion API with end-to-end encryption.

To use this library you need an active subscription on NOMYO Inference.

Quick Start

import { SecureChatCompletion } from 'nomyo-js';

const client = new SecureChatCompletion({ apiKey: process.env.NOMYO_API_KEY });

const response = await client.create({
  model: 'Qwen/Qwen3-0.6B',
  messages: [{ role: 'user', content: 'Hello!' }],
  security_tier: 'standard',
});

console.log(response.choices[0].message.content);

Documentation

  1. Installation — npm, CDN, and native addon setup
  2. Getting Started — first request, auth, security tiers, error handling
  3. API Reference — complete constructor options, methods, and types
  4. Models — available models and selection guidance
  5. Security Guide — encryption architecture, best practices, and compliance
  6. Rate Limits — request limits, burst behaviour, and retry strategy
  7. Examples — real-world scenarios, browser usage, and advanced patterns
  8. Troubleshooting — common errors and their fixes

Key Features

  • End-to-end encryption — AES-256-GCM + RSA-OAEP-4096. No plaintext ever leaves your process.
  • OpenAI-compatible APIcreate() / acreate() accept the same parameters as the OpenAI SDK.
  • Browser + Node.js — single package, separate entry points for each runtime.
  • Automatic key management — keys are generated on first use and optionally persisted to disk (Node.js).
  • Automatic key rotation — RSA keys rotate on a configurable interval (default 24 h) to limit fingerprint lifetime.
  • Security tiers — per-request routing to standard, high, or maximum isolation hardware.
  • Retry with exponential backoff — automatic retries on 429 / 5xx / network errors (configurable).
  • Resource lifecycledispose() immediately zeros in-memory key material and stops the rotation timer.

Technical Security Docs

For cryptographic architecture, threat model, and implementation status see SECURITY.md.