
Research
/Security News
OpenAPI React Query Codegen Compromised in Mini Shai-Hulud npm Supply Chain Attack
Ten malicious OpenAPI React Query Codegen versions were published to npm in the Mini Shai-Hulud attack, all with valid provenance.
@lore-context/sdk-middleware
Advanced tools
SDK middleware for Lore Context — auto-inject memory pre-LLM-call and auto-retain post-LLM-call across OpenAI/Anthropic/OpenRouter SDKs.
SDK middleware for Lore Context — wraps OpenAI / Anthropic / OpenRouter SDK clients to auto-inject memory pre-LLM-call and auto-retain post-LLM-call without requiring the AI to call an MCP tool.
pnpm add @lore-context/sdk-middleware @lore-context/sdk openai
import OpenAI from "openai";
import { LoreContextApiClient } from "@lore-context/sdk";
import { withMemoryHooks } from "@lore-context/sdk-middleware";
const lore = new LoreContextApiClient({ token: process.env.LORE_API_KEY! });
const openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });
const client = withMemoryHooks(openai, lore, { mode: "hybrid" });
const response = await client.chat.completions.create({
model: "gpt-4o",
messages: [{ role: "user", content: "What was that Postgres dump command?" }],
});
| Mode | inject | retain | tools exposed |
|---|---|---|---|
hybrid (default) | ✅ | ✅ | ✅ |
context | ✅ | ✅ | ❌ |
tools | ❌ | ❌ | ✅ |
See docs/sdk/middleware-modes.md in the lore-cloud repo for full mode semantics.
MIT — see LICENSE.
FAQs
SDK middleware for Lore Context — auto-inject memory pre-LLM-call and auto-retain post-LLM-call across OpenAI/Anthropic/OpenRouter SDKs.
We found that @lore-context/sdk-middleware demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Research
/Security News
Ten malicious OpenAPI React Query Codegen versions were published to npm in the Mini Shai-Hulud attack, all with valid provenance.

Security News
Socket joins more than 100 technology, cybersecurity, and financial organizations calling for a global surge in cyber defense.

Product
Enterprise security teams can now detect malware, credential theft, suspicious network activity, and risky updates across Microsoft Edge extensions.