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

@atmo-dev/contrail

Latest version: v0.32.0

Overview

Last scanned
23 Nov 2026
Published
23 Nov 2026
npm package Publisher: flo-bit128
57 Stars
5 Forks
21 Versions
2.2K Downloads
TypeScript Repo language

Scan summary

@atmo-dev/contrail was last scanned on 23 Nov 2026 at version 0.32.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 21 versions; the latest 4 were published within 4 days (20–23 Nov 2026).
  • Findings: No rules fired in version 0.32.0.
  • Downloads: 2,217 downloads.

Versions

21 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.32.0 LATEST 23 Nov 2026 No rules fired
0.31.0 23 Nov 2026 No rules fired
0.30.1 23 Nov 2026 No rules fired
0.30.0 20 Nov 2026 Not shown
0.29.1 10 Nov 2026 Not shown

No rules fired in 0.32.0

Findings

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

README

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

@atmo-dev/contrail

Pre-alpha. Expect breaking changes.

One package for indexing and querying public AT Protocol records.

Basic use

import { Contrail } from "@atmo-dev/contrail";

const contrail = new Contrail({
  namespace: "com.example",
  db,
  collections: {
    event: {
      collection: "community.lexicon.calendar.event",
      queryable: {
        mode: {},
        startsAt: { type: "range" },
      },
      searchable: ["name", "description"],
      relations: {
        rsvps: {
          collection: "rsvp",
          field: "subject.uri",
          groupBy: "status",
          groups: {
            going: "community.lexicon.calendar.rsvp#going",
          },
        },
      },
    },
    rsvp: {
      collection: "community.lexicon.calendar.rsvp",
      references: {
        event: { collection: "event", field: "subject.uri" },
      },
    },
  },
});

await contrail.init();
await contrail.backfillAll({ concurrency: 100 });

Repository-scoped collections

Set repos on a collection to backfill and index only explicit publishing DIDs:

listItem: {
  collection: "app.bsky.graph.listitem",
  repos: ["did:plc:yourbot"],
  queryable: { list: {}, subject: {} },
}

Unlike discover: false (dependent records from known repositories), this is an exclusive publisher allowlist with its own exact backfill pairs. It requires unique DIDs, cannot be combined with discover, and applies across ingestion, backfill and notify. Changing a registered allowlist requires a projection rebuild. See repository scope configuration for lifecycle, transport and freshness guarantees.

Record filters

recordFilter drops creates and updates whose body fails a predicate. A rejection normally leaves a tombstone, so an older version that passes cannot be admitted later and an indexed record that stops matching is removed. On a high-volume collection where the filter rejects most records on fields that do not change, set recordFilterTombstones: false: a rejected record with no stored version then writes nothing at all. A rejected update to an indexed record is still removed.

Query

const result = await contrail.query("event", {
  filters: { mode: "in-person" },
  sort: { countType: "rsvp", direction: "desc" },
  limit: 20,
});

HTTP routes expose the same pipeline, including relationship/reference hydration, counts, profiles, search, and custom queries.

Keep records current

await contrail.ingest(); // bounded Jetstream cycle

// Optional per-cycle overrides (defaults: 25s, 250 candidates,
// 250 distinct identity updates, and 4 MiB). `maxActorLookups` (default 20)
// caps the known-account queries made for profile/follow-type collections.
await contrail.ingest({
  maxDrainMs: 20_000,
  maxCandidates: 200,
  maxIdentityUpdates: 200,
  maxSerializedBytes: 3 * 1024 * 1024,
});

await contrail.runPersistent({
  signal: abortController.signal,
  batchSize: 50,
  flushIntervalMs: 5_000,
});

After a write to a user's PDS, contrail.notify(uri) can fetch the authoritative record immediately. Only an authoritative not-found response deletes local state; rate limits, server errors, timeouts, malformed responses, and network failures leave it unchanged. Authentication and abuse controls for the public HTTP operation remain under design.

Contrail stores source event time, repository revision, source cursor, CID, and local index time separately from record/application time. Live ingestion speaks Jetstream v2 and checkpoints its unique monotonic seq; the RFC 3339 event time remains display/source metadata and is never used as the resume coordinate. Scheduled collection drops exact observations before admission, counts UTF-8 record bodies plus a fixed 512-byte metadata allowance, and retains the threshold-crossing candidate before stopping. Identity updates have an independent retained-count limit, coalesce by DID, and commit in database batches; excess global identity traffic is accounted but omitted so it cannot starve record progress. Source-filtered observations consume neither candidate nor byte limits, but their yielded seqs remain accounted. Durable actor scope comes from identities, relay discovery, and visible discoverable records. Existing v1 timestamp cursors cross a bounded overlap bridge and atomically transition once to the v2 seq domain. If either a timestamp or seq cursor has already fallen outside the hosted live-retention window, ingestion fails rather than accepting the server's timestamp clamp and silently skipping a gap; rebuild/backfill from a fresh boundary until archive replay is added. Durable tombstones reject stale resurrection, and live projection commits its exact accounted seq in the same transaction. Both scheduled and persistent modes require one pinned Jetstream v2 service because seqs are instance-local. Persistent ingestion retains its streaming batch lifecycle and does not inherit the scheduled count/byte defaults. Historical acquisition still uses the existing PDS or optional Alluvium paths; Jetstream v2 archive replay is not used yet. A successful PDS listRecords page is a current authoritative observation, so it supersedes older durable state without a redundant version read; its version writes and page cursor still commit atomically. Tombstones are retained indefinitely; authoritative rebuild/retention tooling is planned separately.

When upgrading an existing database, point jetstreams at one v2 service and change orderedSource.epoch to identify the new continuity history. The normalized service origin is durably bound before the timestamp-to-seq transition because seqs are instance-local; changing it later is a hard error. Initialization permits the ordered-source epoch change only while the durable cursor is still in the legacy timestamp domain; the first fully handled v2 event then installs the seq domain one-way. Once a database is in the seq domain, an epoch mismatch remains a hard error. An already-seq-domain database with no durable service binding is also rejected because its originating instance cannot be inferred safely.

Projection winner selection is guarded again inside the write transaction. Overlapping cron, persistent, notify, or backfill writers cannot commit a stale canonical row, derived projection, tombstone, or source checkpoint; a changed predecessor rolls the complete attempt back and retries from fresh durable state.

Transactional change log (experimental)

Fresh empty generations may opt into a compact transactional projection change log:

const config = {
  // ...
  changes: {
    consumers: {
      search: {
        collections: ["community.lexicon.calendar.event"],
        phases: ["historical", "live"],
        initial: "current",
        requiredForActivation: true,
      },
    },
  },
} satisfies ContrailConfig;

Static definitions contain no handlers, URLs, clients, credentials, or secrets. Contrail registers them with a random database-generation ID and collection/phase coverage ledger. A winning logical put/delete appends one compact URI/version reference in the same transaction as canonical and derived state plus the source checkpoint. Duplicate, stale, same-CID, absent-delete, rejected, and rolled-back mutations append nothing. Record bodies are hydrated from current state by the later delivery layer rather than copied into the log.

Cloudflare Workers bind handlers and runtime-only secrets separately from static policy:

export default createWorker(config, {
  deliveries: {
    search: async (batch, { env, signal }) => {
      await updateSearch(env.SEARCH_KEY, batch, signal);
    },
  },
  changeBootstraps: {
    search: {
      snapshot: async (page, { env, signal }) => {
        await writeCandidateIndex(env.SEARCH_KEY, page, signal);
      },
      activate: async (activation, { env, signal }) => {
        await activateCandidateIdempotently(
          env.SEARCH_KEY,
          activation.bootstrapToken,
          signal,
        );
      },
    },
  },
});

Scheduled execution runs ingestion, due historical retries, then bounded fair delivery rounds. One consumer failure is persisted with backoff and does not stop ingestion or another consumer. A successful notify request schedules a best-effort one-round wake through ExecutionContext; projection success never depends on it. Persistent deployments run contrail.runPersistentDeliveries() alongside runPersistent().

Low-level delivery uses bounded leases and compare-and-swap acknowledgement:

const claim = await contrail.changes.claim("webhooks", {
  maxBatches: 20,
  maxChanges: 500,
  maxBytes: 512_000,
  leaseMs: 30_000,
});
if (claim) {
  try {
    const batch = await contrail.changes.hydrate(claim);
    await deliverIdempotently(batch);
    await contrail.changes.ack(claim);
  } catch {
    await contrail.changes.fail(claim, {
      code: "destination_unavailable",
      nextAttemptAt: Date.now() + 30_000,
    });
  }
}

Claims coalesce repeated URIs, hydrate in set-oriented collection queries, and resolve delete/recreate races from newest canonical state. Consumers lease and progress independently; irrelevant position ranges advance without invoking a handler. Delivery is intentionally at least once—a destination success followed by an acknowledgement crash causes duplicate delivery. Handlers must be idempotent by stable record/document key.

initial: "current" uses a durable snapshot-plus-tail coordinator and must observe both historical and live phases so every mutation racing the keyset scan is retained for reconciliation. Repeatedly claim and idempotently acknowledge contrail.changes.claimSnapshotPage(), then drain claimBootstrapChanges() through its fixed target using ordinary hydrate/ack. Snapshot and bootstrap-tail deliveries carry the candidate destination token; ordinary deliveries after activation do not. Finally claim the stable generation-scoped activation token with claimActivation(), perform an idempotent destination swap, and call completeActivation(). A crash replays the same URI page, tail range, or activation token. Records updated or deleted while the keyset scan races are corrected by the anchored tail.

A consumer can be added to a populated log when all of its collection/phase pairs were already covered; its current/future anchor is the atomic current head, while history starts at the retained floor. Expanding coverage still fails closed without a fresh generation or explicit old-writer quiet boundary. contrail changes status, retry, prune, and explicitly confirmed skip expose private operations for SQLite or Wrangler D1 deployments. Status includes a conservative projection/head/batch/ack write plan. Pruning is bounded by the slowest durable consumer/bootstrap anchor. Skip records a bounded private audit reason and never occurs implicitly. Disabling or removing an existing log remains fail-closed. With no configured consumers, no change-log tables or append writes exist.

Backups retain the database's change-log generation ID, positions, leases, bootstrap token, and consumer progress. Restoring that backup as the same generation is resumable and may redeliver an in-flight lease after expiry. Do not clone it as a new deployment generation while reusing destination cursors: build a fresh projection database and run current-state bootstrap. Restoring projection tables without the matching change tables is an unrecoverable delivery gap and must enter reset/bootstrap rather than silently continuing numeric positions.

Local development

Seed a project from proof-verified record Lexicons, then start a complete local service:

contrail init my-appview \
  --prefix community.lexicon.calendar. \
  --namespace com.example.calendar
cd my-appview
contrail dev

The prefix is matched literally against source Lexicon NSIDs. Include a trailing . to select a namespace boundary. --namespace is independent: it controls the generated AppView XRPC method IDs and defaults to com.example.

Init option Purpose
--prefix <prefix> Import verified record Lexicons matching an NSID prefix
--namespace <namespace> Set the generated AppView XRPC namespace
--lexicon-api <url> Select a registry (default: https://lex.atmo.tools)
--timeout <seconds> Set the readiness/dependency budget (default: 60)
--allow-partial Explicitly accept incomplete prefix discovery
--no-interactive Leave ambiguous references unconfigured

Prefix initialization requires a stable, fully verified and indexed catalog snapshot, pins each root and transitive dependency by CID under lexicons/pinned/, writes provenance to lexicons/pinned.lock, and generates equality/range fields which are safe on all supported databases. Missing required dependencies always fail, including with --allow-partial.

In an interactive terminal, reference-shaped fields can be connected to an imported target collection and optionally exposed as inverse relations. These choices are never guessed from descriptions. --no-interactive leaves all ambiguous references unconfigured. strongRef hydration resolves the current indexed record by URI; it does not retrieve the historical version named by the embedded CID.

Run contrail init my-appview without --prefix to create the original offline example config without a network request. Run either form without a directory to write into the current directory. The command refuses to replace a config or pinned import in any standard owned location.

Without a Wrangler config this creates or resumes .contrail/dev.sqlite, resolves missing configured record/ref Lexicons from the AT Protocol network without overwriting project-owned schemas, runs PDS backfill, serves the complete public Contrail discovery/XRPC/Lexicon surface at http://127.0.0.1:8787, and runs bounded Jetstream ingestion every minute. It never creates or changes a deployment provider lock. Add .contrail/ to the project ignore file. Existing Wrangler projects retain the prior D1 development behavior automatically.

When a configured Lexicon does not exist yet or cannot be resolved, interactive contrail dev and config-backed contrail connect warn and ask whether to continue with an incomplete local bundle. Unresolved documents and schemas that depend on them are omitted, and directly affected record values are generated as unknown; collections using validate: true still require their complete Lexicon closure. The prompt defaults to no, and non-interactive use fails closed unless --yes is passed.

Useful SQLite options include:

contrail dev --fresh                          # reset local SQLite first
contrail dev --temporary                      # delete SQLite when stopped
contrail dev --sqlite ./tmp/dev.sqlite        # explicit durable path
contrail dev --alluvium                       # fast bootstrap from an Alluvium export
contrail dev --no-backfill                    # serve existing state only

Generate the typed consumer API directly from an owned config or its containing directory:

contrail connect ./contrail.config.ts
contrail connect ../api

A config source generates Lexicons, Atcute types, contrailApi, createContrailClient(), and createLocalContrailClient() without creating or changing contrail.lock.json. If a production lock already exists, the generated default client keeps that deployment target while the local factory uses the current source API. contrail dev --config ../api/src/contrail.config.ts can then run the same config locally.

SQLite dev mode exposes configured protected methods only on loopback without inheriting a production service-auth audience. When notify is omitted, it also enables open loopback-only notifyOfUpdate. createLocalContrailClient() has no OAuth scope and permits plain HTTP only for a validated loopback endpoint.

Alluvium export bootstrap

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 @atmo-dev/contrail

References

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

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Vulnerability Insights

Compromised Claude Code extensions (versions 2.1.312 & 2.1.313) in Cursor try to install a backdoor

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?

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

Frame 2085668439 (1)
Group 1261154229