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

narai-primitives

v2.6.0

Published

Read-only-by-default service connectors (AWS, Confluence, databases, GCP, GitHub, GitLab, Jira, Linear, Notion) plus a planning hub, connector toolkit, and credential resolution, in one package. One gather() call plans and fans out across connectors; writ

Downloads

1,183

Readme

narai-primitives

Read-only connectors, a planning hub, a connector toolkit, and credential resolution for agent tooling — one npm dependency instead of N hand-rolled service integrations.

  • One gather() call. gather({ prompt, consumer }) plans against each configured connector's bundled documentation, dispatches the plan in parallel as connector subprocesses, and returns the plan plus structured results. Connectors are enabled per consumer in ~/.connectors/config.yaml (see Configuration below); with none configured, gather() returns an empty plan.
  • Nine connectors behind one dependency. aws, confluence, db (postgres, mysql, sqlite, mssql, mongodb, dynamodb, oracle), gcp, github, gitlab, jira, linear, notion.
  • Read-only by default. Every connector action is classified before it runs. Toolkit policy is keyed by read / write / admin plus per-aspect rules (a delete is a write carrying a delete aspect; the db connector adds further kinds internally). Reads auto-approve by default, with configurable approval modes (auto / confirm_once / confirm_each / grant_required); writes and admin actions are escalated or denied by the policy gate, and config can never set admin to auto-succeed — the policy loader rejects it.
  • Credentials stay inside the connector process. Config references such as password: env:DB_PW are expanded in the connector subprocess — the calling agent never handles secrets. The /credentials subpath adds a resolver with env-var, file, OS-keychain, and cloud-secret-manager providers for code that opts in by registering them; the stock connector bootstrap expands env: references only. Cloud SDKs and database drivers — other than the bundled sqlite driver (better-sqlite3), which loads with the db connector — are optional dependencies, loaded lazily only when used.
  • The db connector's config has a ceiling no overlay can lift. For the db connector, user-level ~/.connectors/config.yaml deep-merges with a per-repo overlay (repo wins, so an overlay can retarget servers and override non-admin policy in either direction) — but admin: allow and privilege: allow are rejected at every level after the merge. The other connectors read their policy from their own ~/.<name>-agent/config.yaml discovery.

Install

npm install narai-primitives

Library use

import { gather } from "narai-primitives";

const out = await gather({
  prompt: "What was the last commit on main in narailabs/foo?",
  consumer: "doc-wiki",
});
console.log(out.plan);
console.log(out.results);

CLI

Each connector ships its own CLI binary, plus the umbrella narai dispatcher:

# umbrella
npx narai jira list_issues --project AUTH

# individual (back-compat aliases)
npx jira-agent-connector --action list_issues --params '{"project":"AUTH"}'

Bundled packages and subpaths

Bundles what used to ship as eleven separate @narai/* packages:

  • @narai/connector-toolkitnarai-primitives/toolkit
  • @narai/connector-confignarai-primitives/config
  • @narai/connector-hubnarai-primitives (default) or narai-primitives/hub
  • @narai/credential-providersnarai-primitives/credentials
  • @narai/aws-agent-connectornarai-primitives/aws
  • @narai/confluence-agent-connectornarai-primitives/confluence
  • @narai/db-agent-connectornarai-primitives/db
  • @narai/gcp-agent-connectornarai-primitives/gcp
  • @narai/github-agent-connectornarai-primitives/github
  • @narai/jira-agent-connectornarai-primitives/jira
  • @narai/notion-agent-connectornarai-primitives/notion

The gitlab and linear connectors were added natively in 2.x (narai-primitives/gitlab, narai-primitives/linear); they never shipped as standalone @narai/* packages.

Migration from the old @narai/* packages

Update imports:

-import { gather } from "@narai/connector-hub";
-import { createConnector } from "@narai/connector-toolkit";
-import { loadResolvedConfig } from "@narai/connector-config";
+import { gather } from "narai-primitives";
+import { createConnector } from "narai-primitives/toolkit";
+import { loadResolvedConfig } from "narai-primitives/config";

All eleven old packages are deprecated on npm and will receive no new releases.

Configuration

Connectors read ~/.connectors/config.yaml (user defaults) with <cwd>/.connectors/config.yaml (repo overlay) merged on top. For the db connector specifically — overriding a server target and policy per-repo, and the admin/privilege ceiling that an overlay cannot bypass — see docs/db-layered-config.md.

External-write gating for the API connectors (asking or denying state-changing HTTP before it runs) is operator-configurable via per-connector gates.json manifests. See docs/external-write-gating.md.

Contributing

See CONTRIBUTING.md. Contributors touching src/toolkit/agent_resolver.ts, src/hub/index.ts, src/credentials/, or src/connectors/db/ should also read docs/architecture-invariants.md.