Scan your whole stack
Are you using @johnhenry/aimatey-backend-browser?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.2.3
@johnhenry/aimatey-backend-browser was last scanned on 25 Nov 2026 at version 0.2.3. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.2.3 LATEST | 25 Nov 2026 | No rules fired |
| 0.2.2 | 31 Oct 2026 | No rules fired |
| 0.2.1 | 23 Oct 2026 | No rules fired |
| 0.1.7 | 23 Oct 2026 | Not shown |
| 0.1.6 | 7 Oct 2026 | Not shown |
Findings for v0.2.3. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.2.3; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
Note: Previously published as
aimatey-backend.browser@0.5.1.
Browser-compatible backend adapters for Aimatey - Universal AI Adapter System.
Part of the aimatey monorepo.
npm install @johnhenry/aimatey-backend-browser
This package contains backend adapters that can run natively in browser environments without Node.js dependencies:
LanguageModel)For server-side provider adapters (OpenAI, Anthropic, etc.), see @johnhenry/aimatey-backend.
Runs entirely on-device via Chrome's built-in model — no API key, no network calls, no cost.
Requires Chrome 138+ (the LanguageModel global; chrome://flags/#prompt-api-for-gemini-nano
may be needed on some channels).
import { ChromeAIBackendAdapter } from '@johnhenry/aimatey-backend-browser';
const chromeAI = new ChromeAIBackendAdapter({ temperature: 0.7, topK: 40 });
// Tri-state availability - gate UI on 'downloadable' to show a download prompt
const availability = await chromeAI.checkAvailability(); // 'unavailable' | 'downloadable' | 'downloading' | 'available'
const response = await chromeAI.execute({
messages: [{ role: 'user', content: 'Hello!' }],
metadata: { requestId: 'req_1', timestamp: Date.now(), provenance: {} },
});
Structured output maps directly onto the Prompt API's responseConstraint:
const response = await chromeAI.execute({
messages: [{ role: 'user', content: 'Extract the name and age from: John is 30.' }],
responseFormat: {
type: 'json_schema',
schema: {
type: 'object',
properties: { name: { type: 'string' }, age: { type: 'number' } },
required: ['name', 'age'],
},
},
metadata: { requestId: 'req_2', timestamp: Date.now(), provenance: {} },
});
// response.metadata.custom.responseFormatEnforced === true
Notes:
tools is not supported (surfaced as an IR warning
if requested).session.inputUsage/inputQuota (cumulative context-window tokens) are surfaced under
response.metadata.custom, not response.usage - the Prompt API doesn't report a
prompt/completion token split.onDownloadProgress in the config to receive download progress events while
availability is 'downloadable'/'downloading'.import { FunctionBackendAdapter, createFunctionBackend } from '@johnhenry/aimatey-backend-browser';
// Create a custom backend from a function
const customBackend = createFunctionBackend(async (request) => ({
message: { role: 'assistant', content: 'Hello from custom backend!' },
finishReason: 'stop',
metadata: { requestId: request.metadata.requestId, provenance: {} },
}));
import { MockBackendAdapter, createEchoBackend } from '@johnhenry/aimatey-backend-browser';
// Create a mock backend for testing
const mockBackend = new MockBackendAdapter({
defaultResponse: 'This is a test response',
});
// Or use the echo helper
const echoBackend = createEchoBackend();
import { ChromeAIBackendAdapter } from '@johnhenry/aimatey-backend-browser/chrome-ai';
import { FunctionBackendAdapter } from '@johnhenry/aimatey-backend-browser/function';
import { MockBackendAdapter } from '@johnhenry/aimatey-backend-browser/mock';
See the TypeScript definitions for detailed API documentation.
MIT - see LICENSE for details.
Run Google's Gemma models entirely in the browser via LiteRT-LM — no API key, no server, no cost.
npm install @johnhenry/aimatey-backend-browser @litert-lm/core
import { Bridge } from '@johnhenry/aimatey-core';
import { OpenAIFrontendAdapter } from '@johnhenry/aimatey-frontend';
import { LiteRtLmBackendAdapter } from '@johnhenry/aimatey-backend-browser';
const backend = new LiteRtLmBackendAdapter({
model:
'https://huggingface.co/litert-community/gemma-4-E2B-it-litert-lm/resolve/main/gemma-4-E2B-it-web.litertlm',
maxNumTokens: 8192,
});
const bridge = new Bridge(new OpenAIFrontendAdapter(), backend);
for await (const chunk of bridge.chatStream({
model: 'gemma-4-E2B-it-litert-lm',
messages: [{ role: 'user', content: 'Write a haiku about tide pools.' }],
stream: true,
})) {
render(chunk.choices?.[0]?.delta?.content ?? '');
}
// Free GPU/WASM memory when done with the model
await backend.dispose();
const backend = new LiteRtLmBackendAdapter({
model: MODEL_URL,
fetchModel: true, // adapter downloads the bundle: byte progress + cancellable download
onProgress: ({ stage, loaded, total }) => showProgress(stage, loaded, total),
});
await backend.preload({ signal }); // optional: load ahead of the first request
stage is download (bytes fetched, total from Content-Length or Blob size), compile,
loading (download + compile as one step, when fetchModel is off), then ready.signal stops execute/executeStream immediately with a
STREAM_CANCELLED error and calls conversation.cancel() even if the model has not yielded a token.fetchModel the download is cancelled when the last
waiter leaves; the runtime cannot interrupt compilation, so a compile in progress finishes in the
background and the engine stays cached for the next call. Without fetchModel the runtime owns the
download, so abort takes effect after the runtime finishes loading (the engine stays cached).Cross-Origin-Opener-Policy: same-origin and Cross-Origin-Embedder-Policy: require-corp.temperature/topK/seed are dropped with an IR warning). Prior conversation turns are
flattened into a transcript prefix (each request opens a fresh conversation).@litertjs/core ("LiteRT.js") is Google's tensor-level runtime and cannot run chat
models — this adapter wraps LiteRT-LM (@litert-lm/core), the conversation runtime.Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.