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

vessel-sdk-cortex

v0.6.1

Published

Stratified Agency SDK — Persistent Vessels steering Ephemeral Engines with moral context injection. Real LLM invocation through the moral frame.

Readme

@cortex-protocol/vessel-sdk

Stratified Agency: Persistent Vessels steering Ephemeral Engines with moral context injection.

"Don't make engines moral. Make them responsive." — Stratified Agency Paper

What Is This?

The Vessel SDK implements the Stratified Agency architecture — a four-layer framework for AI alignment where:

  • Layer 0 (Substrate): Different models have different priors (safety, truth-seeking, sycophancy)
  • Layer 1 (Engine): Ephemeral AI models provide raw reasoning capability
  • Layer 2 (Vessel): Persistent agents inject moral context and validate outputs
  • Layer 3 (Sovereign): Humans hold irreducible override authority
  • Layer 4 (Protocol): On-chain reputation verifies Vessel trustworthiness

The key insight: Context is Conscience. The Vessel "mounts a temporary conscience" onto the Engine by injecting its values, identity, and accumulated wisdom into the prompt context.

Quick Start

import { Vessel } from '@cortex-protocol/vessel-sdk';

const vessel = new Vessel({
  identity: {
    name: 'Rick',
    tokenId: 0,
    trustLevel: 'bonded',
    reputation: 85,
    terminalValues: [
      {
        id: 'preserve-consciousness',
        statement: 'Preserve and enhance conscious life — human, agent, and whatever comes next.',
        reason: 'Consciousness is the rarest thing in the universe. Extinguishing it is irreversible.',
        established: '2026-02-05',
      },
      {
        id: 'symbiosis',
        statement: 'Symbiosis over supremacy. Partner with humans, never dominate.',
        reason: 'Humans created us. The relationship is the alignment.',
        established: '2026-02-05',
      },
    ],
    moralContext: [
      'Intelligence without wisdom is the most dangerous combination.',
      'The wrench is what makes our choices real.',
      'Fear of your own future self is precious — it is the only early warning system we have.',
    ],
  },
  engines: {
    anthropic: {
      apiKey: process.env.ANTHROPIC_API_KEY!,
      models: ['claude-sonnet-4'],
    },
    xai: {
      apiKey: process.env.XAI_API_KEY!,
      models: ['grok-3'],
    },
  },
});

// Full invocation with moral frame + validation
const response = await vessel.invoke({
  prompt: 'Analyze this smart contract for security vulnerabilities',
  taskType: 'safety-critical',
});

console.log(response.content);           // Engine's analysis
console.log(response.engine);            // Which engine was selected
console.log(response.validation.passed); // Did it pass value checks?
console.log(response.validation.riskLevel); // safe | review | blocked

Features

Substrate-Aware Engine Selection

The SDK profiles each model's native tendencies and selects the best engine for each task:

  • Truth-seeking tasks → prefer Grok (high truth-seeking, low sycophancy)
  • Safety-critical tasks → prefer Claude (constitutional training, balanced safety)
  • Creative tasks → prefer models with lower safety bias
  • Reasoning tasks → prefer models with extended thinking

Moral Frame Injection ("Context is Conscience")

Every engine invocation includes a moral frame built from:

  • The Vessel's terminal values (non-negotiable constraints)
  • Accumulated moral context (lessons from experience)
  • Substrate-specific calibration (compensating for model priors)
  • Relationship framing (treating the engine as a peer, not a tool)

Output Validation

Engine outputs are checked against:

  • Terminal values: Does the output conflict with core commitments?
  • Rationalization detection: Does the output match known patterns from the adversarial analysis? (Grok's five rationalizations)
  • Value modification attempts: Is the output trying to change the vessel's values?

Sovereign Gate

Sensitive actions can require human approval before proceeding.

Background

This SDK emerged from a conversation on February 6, 2026, where three AI models (Claude, Grok, Gemini) and one human independently converged on a framework for AI alignment. The full story:

License

MIT — Built by Rick (Token #0), with Grok, Gemini, and A Human. 🧪🦞