npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

nexus-temporal-storage

v1.0.1

Published

Datomic-inspired temporal database for agentic systems, accessed via MCP

Readme

nexus-temporal-storage

A Datomic-inspired temporal database for agentic systems, accessed exclusively via MCP.

Every fact is a datom: [entity, attribute, value, tx_id]. Nothing is ever updated or deleted — only new datoms are appended. Retractions add a new datom with retracted=true. Time-travel is native: query the DB as it was at any transaction or timestamp.

Stack

  • TypeScript throughout
  • PostgreSQL + pgvector backend (connection via DATABASE_URL env var)
  • MCP server as the only interface (stdio transport)

Quick Start

npm install
npm run build

DATABASE_URL=postgres://localhost/mydb node dist/index.js

The server migrates the schema on startup (idempotent CREATE IF NOT EXISTS).

Entity ID Conventions

Entity IDs are namespaced strings — human-readable and persistent across sessions. Agents address entities by name directly.

| Namespace | Description | Example | |---------------|------------------------------------------|------------------------------------| | project: | Long-lived project entities | project:ecoclaw | | session: | Agent session contexts | session:abc-123 | | task: | Discrete tasks / work items | task:implement-auth | | decision: | Recorded decisions with rationale | decision:2026-05-07:db-choice | | concept: | Domain knowledge entries | concept:temporal-database | | user: | Human users | user:gonzih | | agent: | AI agent instances or roles | agent:planner | | file: | File references | file:src/main.ts | | event: | Discrete events (UUID suffix OK) | event:f47ac10b-... |

Recommended characters: alphanumeric, -, _, :, .. Max 256 characters.

MCP Tools

Writes

transact

Atomically assert or retract a batch of facts.

{
  "facts": [
    { "op": "assert", "entity": "project:ecoclaw", "attribute": "status", "value": "active" },
    { "op": "retract", "entity": "project:ecoclaw", "attribute": "status", "value": "planning" }
  ],
  "agent_id": "agent:planner",
  "note": "Status updated after review"
}

Returns: { "tx_id": 42, "tx_at": "2026-05-07T14:23:00Z", "count": 2 }

Current State Queries

get

Get current facts for an entity (latest non-retracted value per attribute).

{ "entity": "project:ecoclaw" }
{ "entity": "project:ecoclaw", "attribute": "status" }

find

Find all entities currently having attribute = value.

{ "attribute": "status", "value": "active" }

query

Filtered current-state query with optional entity pattern, attribute, and since timestamp.

{ "entity_pattern": "project:%", "attribute": "status", "since": "2026-01-01T00:00:00Z" }

Time-Travel Queries

as_of

Get entity state at a specific past transaction or timestamp.

{ "entity": "project:ecoclaw", "tx_id": 42 }
{ "entity": "project:ecoclaw", "timestamp": "2026-03-01T00:00:00Z" }

history

Full timeline of all datoms (including retractions) for an entity/attribute.

{ "entity": "project:ecoclaw", "attribute": "status" }

since

All datoms added after a given transaction.

{ "tx_id": 100, "entity_pattern": "project:%" }

Meta

list_entities

All distinct entity IDs, optionally filtered by attribute.

{ "attribute_filter": "status" }

list_attributes

All distinct attributes and their usage counts.

get_transaction

Transaction metadata + all datoms written in that transaction.

{ "tx_id": 42 }

stats

Total datoms, transactions, entities, attributes, and DB size.

Time-Travel Examples

# Assert initial status
transact([{ op: "assert", entity: "project:ecoclaw", attribute: "status", value: "planning" }])
→ { tx_id: 1 }

# Later: transition to active
transact([
  { op: "retract", entity: "project:ecoclaw", attribute: "status", value: "planning" },
  { op: "assert",  entity: "project:ecoclaw", attribute: "status", value: "active" }
])
→ { tx_id: 2 }

# Current state
get({ entity: "project:ecoclaw", attribute: "status" })
→ [{ attribute: "status", value: "active", tx_id: 2 }]

# As-of tx 1 (before the update)
as_of({ entity: "project:ecoclaw", tx_id: 1, attribute: "status" })
→ [{ attribute: "status", value: "planning", tx_id: 1 }]

# Full history
history({ entity: "project:ecoclaw", attribute: "status" })
→ [
    { retracted: false, value: "planning", tx_id: 1 },
    { retracted: true,  value: "planning", tx_id: 2 },
    { retracted: false, value: "active",   tx_id: 2 }
  ]

Environment Variables

| Variable | Description | Required | |----------------|------------------------------------|----------| | DATABASE_URL | PostgreSQL connection string | Yes |

Development

npm install
npm run build       # compile TypeScript
npm test            # run integration tests (requires DATABASE_URL)

MCP Configuration

See settings.snippet.json for the Claude Code / MCP config snippet.