Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@eltjs/embedding

Latest version: v0.13.18

Overview

Last scanned
25 Nov 2026
Published
25 Nov 2026
npm package Publisher: ezzabuzaid
1 Stars
0 Forks
63 Versions
7.8K Downloads
TypeScript Repo language

Scan summary

@eltjs/embedding was last scanned on 25 Nov 2026 at version 0.13.18. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 63 versions; the latest 5 were published on 25 Nov 2026.
  • Findings: No rules fired in version 0.13.18.
  • Downloads: 7,812 downloads.

Versions

63 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.13.18 LATEST 25 Nov 2026 No rules fired
0.13.17 25 Nov 2026 No rules fired
0.13.16 25 Nov 2026 No rules fired
0.13.15 25 Nov 2026 Not shown
0.13.14 25 Nov 2026 Not shown

No rules fired in 0.13.18

Findings

Findings for v0.13.18. 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.13.18; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

Embedding

Embedding is a rule of a computed dataset. It gives each loaded row a vector of its text, made by an AI SDK embedding model, so that a vector search can find rows by meaning.

import { createOpenAICompatible } from '@ai-sdk/openai-compatible';

import { ComputedDataset } from '@eltjs/elt-sqlite';
import { Embedding } from '@eltjs/embedding';

const model = createOpenAICompatible({
  name: 'llama.cpp',
  baseURL: 'http://127.0.0.1:8080/v1',
}).embeddingModel('embeddinggemma-2');

new ComputedDataset({
  into: destination,
  name: 'listing_vectors',
  description: 'The vector of each listing.',
  from: [listings],
  compute: new Embedding({
    model,
    dimensions: 768,
    clock: globalThis,
    key: 'id',
    fields: ['title', 'description'],
  }),
});
  • dimensions is the number of values in each vector of the model, for example 768 for EmbeddingGemma and 1,536 for text-embedding-3-small. The output column vector is a vector column of these dimensions.
  • clock waits out the limit of each model call. An app gives globalThis, and a test gives a fake clock.
  • key is the column that identifies a row. It is the key of the output row.
  • fields are the columns whose text makes the vector. The rule joins their text with line breaks. A row with no text in these columns has no vector.
  • The output column vector holds a UnitVector of @zukhruf/vectors: float32 values with a length of 1, so the cosine similarity of two vectors is their dot product. Each destination keeps it in its own form. SQLite and Postgres keep the bytes of toSql of @zukhruf/vectors/sqlite, which VectorSearch of @zukhruf/embeddings reads.
  • The identity of each row is the provider, the id of the model and the dimensions, for example openai/text-embedding-3-small (1536 dimensions). One model can give vectors of different dimensions, as the dimensions option of OpenAI's text-embedding-3 models does. When you change the model or the dimensions, the next refresh makes every vector again.

Failures

A model failure stays on the output row, and the next pass asks again (ADR 0007 of elt-sqlite).

  • When the model answers a call with HTTP 400, the rule splits the call in halves until it finds each text that the model refuses. Only the row of that text fails. An example is a text over the limit of the model.
  • Any other failure fails each row of the call. A split would only send more calls to a model that is down.
  • One call has 120 seconds, with its retries. At that limit, each row of the call fails, and the next batch runs.
  • A stopped refresh fails no row. The next refresh makes those rows.
  • The rule sends 64 rows to embedMany at a time. When the model refuses a call, each row of that call is stored as failed with the error, and the next refresh asks again. The load does not fail.
  • A vector with no usable length, because it is all zeros or holds a value that is not finite, has no unit vector. Its row is stored as failed with the error, the other rows of the call stay computed, and the next refresh asks again.
  • A vector of other dimensions than dimensions does not fit its column. Its row is stored as failed with an error that names both counts, and the next refresh asks again.
  • To search, declare a view that gives id and vector, and give its name to VectorSearch. A search by publish date, such as nearest, also needs published_at. A query without a date range does not.

Give the model its prompts

Some models want a prompt before each text, and a different prompt for a document and for a search text. EmbeddingGemma wants title: none | text: … before a document and task: search result | query: … before a search text. The rule does not know the model, so it adds no prompt. Wrap the model with wrapEmbeddingModel of the AI SDK, one time for documents and one time for search texts:

import { embed, wrapEmbeddingModel } from 'ai';

const gemma = local.embeddingModel('embeddinggemma-2');
const prompted = (modelId: string, prompt: string) =>
  wrapEmbeddingModel({
    model: gemma,
    modelId,
    middleware: {
      transformParams: async ({ params }) => ({
        ...params,
        values: params.values.map((text) => `${prompt}${text}`),
      }),
    },
  });

const documents = prompted('embeddinggemma-2/document', 'title: none | text: ');
const searches = prompted(
  'embeddinggemma-2/query',
  'task: search result | query: ',
);

new Embedding({
  model: documents,
  dimensions: 768,
  clock: globalThis,
  key: 'id',
  fields: ['title', 'description'],
});

const { embedding } = await embed({ model: searches, value: 'family sedan' });
new VectorSearch({ database, table: 'listing_vectors' }).query(embedding);

Give each wrapped model its own modelId. The identity of a row names the provider and the id of the model, so a new prompt with a new modelId makes every vector again.

On 2026-10-27, 42 OpenSooq listings that source-opensooq-web crawled got their vectors from EmbeddingGemma 2 in one run. nearest of a bicycle listing gave other bicycle listings first. A second run made no vector again.

The package does not start a model or a server. Give it a model that is ready. See when the pipeline refreshes for how a pipeline refreshes the rows.

OX Radar and Response Center

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.

Where it’s listed

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).

  • npm @eltjs/embedding

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Copy of Template Design OX Blog (1)
Research

Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret Stealing Malware Via GitHub Actions & npm

Cry2Wolf: How to Tell a Real Bug from a Nothingburger
AI & VibeSec

Cry2Wolf: Not Every Branded Bug Deserves a Fire Drill

Copy of Template Design OX Blog (3)
Research

Ruby2Shell: Ruby Memory Corruption Flaws Expose Applications to Remote Code Execution, But is it an Actual Risk?

Frame 2085668439 (1)
Group 1261154229