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

@kybernesis/enterprise

v0.7.0

Published

Kybernesis enterprise governance for eve agents: control-plane token verification and per-agent grant enforcement (kybernesisAuth).

Readme

@kybernesis/enterprise

Enterprise governance for eve agents, backed by the Kybernesis control plane: an org's admins invite employees, grant them access to specific agents, and revoke that access — and every governed agent enforces those decisions offline, per request, with no callback to the control plane on the hot path.

What it does

kybernesisAuth() is an eve route-auth entry (AuthFn) that admits only callers holding a valid control-plane IdentitySession with a grant for this specific agent:

  • Verifies the identity token (Authorization: Bearer …) and policy bundle (X-Kybernesis-Bundle: …) — both compact JWS — offline against the control plane's JWKS (<issuer>/api/jwks).
  • Cross-checks that the bundle belongs to the token's user and org.
  • Requires an agentGrants entry matching this agent's registered name: no grant → 403 agent_not_granted with a human-readable message.
  • No/invalid credentials → falls through the auth walk → 401. Fail-closed.

Revocation needs no infrastructure: grants are re-resolved at every mint and tokens are short-TTL, so a revoked employee's next session simply lacks the grant — and a suspended (off-boarded) employee cannot mint a session at all. Sessions already in flight expire with the token.

Usage

// agent/channels/eve.ts
import { eveChannel } from "eve/channels/eve";
import { localDev } from "eve/channels/auth";
import { kybernesisAuth } from "@kybernesis/enterprise";

export default eveChannel({
  auth: [
    kybernesisAuth({
      issuer: process.env.KYBERNESIS_ISSUER!, // e.g. https://agent.kybernesis.ai
      agent: process.env.KYBERNESIS_AGENT!,   // this agent's name in the control plane
    }),
    // Loopback-only, production-inert; required for local eve eval runs (the
    // eval runner sends no credentials).
    localDev(),
  ],
});

The agent must be registered in the control plane (an agent_ref row with runtime='eve') under the same name, and callers obtain their IdentitySession from the control plane (Studio, device flow, or the API).

The caller contract

| Header | Contents | | --- | --- | | Authorization: Bearer <token> | Identity token: iss, sub (user), org, email, exp | | X-Kybernesis-Bundle: <bundle> | Policy bundle: user, org, agentGrants: [{agent, level}], exp |

On success the session principal carries principalType: "user", principalId = the control-plane user id, and attributes org, email, agentGrantLevel (use | manage), and kybernesisGrants — ready for defineDynamic capability gating and approval policies.

Asserted asker

assertedAsker(session) returns { id: string; label?: string } | undefined. The value is the calling agent's claim about who asked. The control plane signs or records the claim, but never verifies the claimed person's identity, and the caller can supply the ID.

Use it to greet or address someone, attribute or log a request, or refuse an operation. Never use it to decide, grant, or widen access. A tool that accesses personal data must use the authenticated session principal instead. In an agent-to-agent call, that principal is the calling agent.

Verified behavior

The reference deployment exercises the full loop against a live control plane: 401 with no credentials · 200 for a granted user · 403 agent_not_granted after grant revocation · mint refusal for a suspended user · restored access after re-grant.

Roadmap

Planned modules in this package: governedSlackChannel() (grant-gated Slack message hooks), linkSlackIdentity(), a policy-bundle approval adapter, and an audit hook draining evlog wide events to the control plane.

Security notes

  • Verification is offline: only the JWKS endpoint is fetched (and cached by jose). An unreachable control plane cannot lock agents up — but also cannot extend a session past its TTL.
  • Tokens carry identity and grants, never credentials.
  • Pair route-level gating with capability-level gating (defineDynamic off the principal attributes) for defense in depth.