
Security News
Agent Baseline Publishes Security Reference Architecture for Software Factories
Agent Baseline’s new reference architecture shows how to secure software factories with four boundaries enforced outside the AI agent.
@codragraph/compress
Advanced tools
Lossless semantic compression for LLM contexts — strip grammar, keep facts, save tokens.
Lossless semantic compression for LLM context, including CodraGraph FeatureCluster context packs.
Use this package when the agent already has the right context pack but the
pack is too large for a prompt budget. @codragraph/compress keeps the facts
that matter for editing code: files, line ranges, symbols, routes, tools,
processes, dependencies, tests, docs, and safe-edit warnings.
npm install @codragraph/compress
import { LlmCompressor, compressContextPack } from "@codragraph/compress";
import { harness, graph } from "@codragraph/sdk";
const inference = await harness.makeInferenceProvider("openai");
const graphClient = await graph.createLocalGraphClient();
const settingsPack = await graphClient.contextPack({ name: "Settings" });
const compressor = new LlmCompressor();
const compressed = await compressContextPack(compressor, settingsPack, {
inference,
level: "balanced",
format: "outline",
});
console.log(compressed.clusterName);
console.log(compressed.reduction);
console.log(compressed.compressed);
flowchart LR
Pack["FeatureCluster context pack"] --> Outline["Stable outline or JSON"]
Outline --> LLM["LlmCompressor"]
LLM --> Prompt["Smaller agent prompt"]
compressContextPack accepts a ClusterContextPack from
@codragraph/shared or any compatible object. The helper first serializes the
pack deterministically, then passes it to a Compressor.
| Export | Purpose |
|---|---|
LlmCompressor | LLM-backed compressor/decompressor. |
compressContextPack | Compress a FeatureCluster context pack as outline or JSON. |
estimateTokens | Lightweight character-based token estimate. |
Compressor | Interface for custom compressors. |
CompressOptions | Inference provider, model, level, strategy, similarity options. |
CompressContextPackOptions | CompressOptions plus `format: "outline" |
| Pair with | Why |
|---|---|
@codragraph/cli | Produces the indexed graph and FeatureCluster packs. |
@codragraph/sdk | Loads context packs programmatically. |
@codragraph/harness | Supplies inference providers and can use compressed packs in tuned recipes. |
codragraph analyze --compress brotli|zstd.Apache-2.0. You can use, modify, redistribute, bundle, and host this package commercially, subject to the Apache-2.0 notice and attribution requirements.
FAQs
Lossless semantic compression for LLM contexts — strip grammar, keep facts, save tokens.
The npm package @codragraph/compress receives a total of 3 weekly downloads. As such, @codragraph/compress popularity was classified as not popular.
We found that @codragraph/compress 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.

Security News
Agent Baseline’s new reference architecture shows how to secure software factories with four boundaries enforced outside the AI agent.

Security News
arXiv now limits authors to two submissions a month as AI slop overwhelms moderators, delays good papers, and sparks debate over applying the limit to everyone.

Research
/Security News
A new GhostAction wave hits hundreds of GitHub repos, expanding CI/CD secret theft to cloud and AI credentials in source code and git history.