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

@elyxndra/agent

v0.1.0

Published

Elyxndra's coding-agent brain: OpenAI-compatible streaming client (thinking + tool calls), tools (files, grep/glob, edit, patch, terminal, todo, ask, delegate, memory, web), MCP, modes, approvals, context budget, compaction, sessions, checkpoints. Host-ag

Readme

@elyxndra/agent

The coding-agent half of Elyxndra's shared brain, as a host-agnostic library: an OpenAI-compatible streaming client (thinking + tool calls), the tool set (files, search, exact-match edits, multi-file patches, terminal, task list, ask-user, sub-agents, project memory, web, MCP), the agent loop with Agent / Plan / Ask modes, approvals, a context budget with auto-compaction, sessions and per-message checkpoints. Node 20+, ESM, no native addons. It powers the Elyxndra Code VS Code / Cursor extension and the desktop chat app.

npm install @elyxndra/agent

Usage

import { Agent, NodeHost, defaultConfig } from "@elyxndra/agent";

const host = new NodeHost({ root: "/path/to/project", memoryFile: "/path/to/memory.md" });

const agent = new Agent(
  host,
  { ...defaultConfig(), endpoint: { baseUrl: "http://127.0.0.1:8080/v1" }, model: "qwen3-coder" },
  {
    onChange: () => render(agent.messages, agent.pendingInteraction),
    onDelta: (id, content, reasoning) => appendToMessage(id, content, reasoning),
    onPersist: (session) => saveSomewhere(session),
    onFilesChanged: (paths) => reloadEditors(paths),
    onError: (message) => showError(message),
  },
);

await agent.refreshFacts(); // project snapshot for the system prompt (manifests, verify commands, git, rules files)
agent.mode = "agent"; // "agent" | "plan" | "ask"
agent.send("Add a --dry-run flag to the CLI and cover it with a test.");

// When a tool needs approval or the model asks a question, `pendingInteraction`
// is set and onChange fires; answer it from your UI:
agent.resolveInteraction({ kind: "approve" }); // | approveForSession | deny | { kind: "answer", text } | dismiss

Works with any OpenAI-compatible server — the Elyxndra engine daemon, llama.cpp, LM Studio, Ollama, vLLM, MLX servers — and hosted endpoints (endpoint.apiKey).

What's inside

| Module | Exports | | ------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | llm | streamChat, listModels, ThinkSplitter, ToolCallAssembler, buildBody — SSE streaming with reasoning_content / <think> support and tool-call fragment assembly | | agent | Agent, AgentConfig, AgentEvents, defaultConfig — the loop: prompt → stream → tools (with approvals) → continue; modes; compaction; checkpoints (revert, reapply, restoreCheckpoint, revertAll); sub-agents (delegate) | | tools, tools/files, tools/extra | ToolRegistry and the built-in tools; newChange records every edit as a FileChange (with stats) your UI can diff and revert | | host, nodeHost | the Host interface (file system, shell, memory) and NodeHost, a workspace-confined Node implementation (symlink-safe, .gitignore-aware) | | prompt, facts | buildSystemPrompt (byte-stable per session so prefix caches hold) and detectFacts (manifests, verify commands, languages, git, AGENTS.md / CLAUDE.md / .cursorrules) | | context | ContextBudget — token estimation calibrated from server usage, turn-aware trimming | | streaming | DeltaBuffer, statsLine, applyFinalStats — coalesce deltas and turn final stats into a line + budget calibration | | mcp | connectMCP — MCP servers over stdio, exposed as mcp__<server>__<tool> (minimal child environment unless fullEnv; the tools ask for approval unless approveMCP is off) | | net | fetchPublic, assertPublicUrl, isPrivateAddress — outbound fetch for model-supplied URLs that refuses loopback/private/link-local/metadata destinations and re-checks every redirect hop | | patch, diff | V4A multi-file patches (parsePatch, applyHunks); line diffs, hunks, stats | | types | ChatMessage, Session, FileChange, ToolDefinition, makeMessage, isEmptyAssistant, attachment helpers |

Security defaults: every path is confined to the workspace; terminal, delete_file, the web tools and MCP tools ask for approval (DEFAULT_APPROVAL_REQUIRED, approveMCP); writes to .vscode/, .git/, .husky/, .github/workflows/ and .env* always ask (paths are normalised first, so src/../.git/x or .GIT/x cannot slip past); web_fetch only reaches public hosts; grep refuses patterns that can backtrack catastrophically; Stop cancels sub-agents and terminal children; config.readOnly hides every mutating tool (untrusted workspaces). See SECURITY.md.

Engines that key a prefix cache on a per-session header (MTPLX's X-MTPLX-Session-Id) are served by config.sessionHeaderName: the host names the header (it learns it from the engine's chatWire), the agent fills in the session id; any static headers (client name, auth) go in endpoint.headers.

Develop

npm test                                  # vitest (offline)
ELYXNDRA_LIVE=1 npm run test:live          # one real turn against a local server (ELYXNDRA_ENDPOINT, ELYXNDRA_MODEL)
npm run build                             # dist/ (ESM + .d.ts) via tsdown

Part of the Elyxndra monorepo · MIT